Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

MODEL::Jacobian Class Template Reference

#include <jacobian.h>

List of all members.

Public Types

typedef NT::number numT
typedef NT::vect vect
typedef NT::matrix matrix
typedef NT::vf vf

Public Methods

 Jacobian (vf &rvf, numT JEps=1E-4, bool own=false)
 ~Jacobian ()
 Jacobian (const Jacobian &cj)
numT calculate_didj (integer i, integer j, const vect &u)
vect calculate_di (integer i, const vect &u)
matrix calculate (const vect &u, const vect &fu)
matrix calculate_accurate (const vect &u, const vect &fu)
matrix calculate (const vect &u)
matrix calculate_accurate (const vect &u)
vf& get_function (void)

Private Methods


Private Attributes

bool owned
vf* f
number epsilon

Detailed Description

template<integer dims, class NT = NumericTraits<number,dims>> class MODEL::Jacobian

Calculates the Jacobian of a VF using finite differences. i is always the component of the function in question, j is always the parameter we differentiate to.

Definition at line 33 of file jacobian.h.

Constructor & Destructor Documentation

Jacobian ( vf & rvf,
numT JEps = 1E-4,
bool own = false ) [inline]

Constructor taking a copy of the function

own   tells te constructor if it should take a copy, or use the reference

Definition at line 42 of file jacobian.h.

Jacobian ( const Jacobian<dims, NT> & cj ) [inline]

copying is allowed

Definition at line 48 of file jacobian.h.

Member Function Documentation

PRIVATE_ASSIGN ( Jacobian<dims, NT> ) [private]

Assignment operator is private and NOT implemented

matrix calculate ( const vect & u ) [inline]

Calculate full Jacobian using 2 evaluations. j[i][j]=df[i]dx[j]

Definition at line 67 of file jacobian.h.

NT::matrix calculate ( const vect & u,
const vect & fu )

Calculate full Jacobian using only 1 evaluation and a user supplied function value at u. Adapted from NRC

Definition at line 103 of file jacobian.h.

Referenced by calculate().

matrix calculate_accurate ( const vect & u ) [inline]

Calculate full Jacobian using 3 evaluations. j[i][j]=df[i]dx[j]

Definition at line 72 of file jacobian.h.

NT::matrix calculate_accurate ( const vect & u,
const vect & fu )

Calculate the jacobian, using a more accurate scheme. This eats two evaluations, but is second order accurate, using central differences

Definition at line 131 of file jacobian.h.

Referenced by calculate_accurate().

vect calculate_di ( integer i,
const vect & u )

Calculate one row of the Jacobian. Not implemented.

numT calculate_didj ( integer i,
integer j,
const vect & u )

Calculate one element of the Jacobian J(i,j) = df(i)/dj. Not implemented.

vf & get_function ( void ) [inline]

What function are we working on?

Definition at line 76 of file jacobian.h.

Member Data Documentation

number epsilon [private]

epsilon is the relative step size used in the finite difference jacobian.

Definition at line 89 of file jacobian.h.

The documentation for this class was generated from the following file:
To get the sources or tarballs, please go to SourceForge or you can use the CVS repository.

More Info? Michael Peeters. Also, check our research website:

Last update: June 2002.

Looking for Open Source? Check out SourceForge Logo !