Diana  0.8.3
Public Member Functions | Protected Member Functions | Protected Attributes
DiffitModel Class Reference

#include <DiffitModel.hpp>

Inheritance diagram for DiffitModel:
DiffitESO DianaDAESO IDianaDAESO ICapeNumericDAESO ICapeNumericESO ICapeIdentification ICapeUtilities

List of all members.

Public Member Functions

 DiffitModel (const char *description, const int NEQNS, const int NPARAMS, const double *DefParameters, const double *MinParameters, const double *MaxParameters, const double *DefYValues, const double *MinYValues, const double *MaxYValues, const char **_ParameterNames, const char **_VariableNames)
 DiffitModel (const DiffitModel &org)
virtual void Initialize () throw (Common::Error::ECapeBadInvOrder, Common::Error::ECapeLicenceError, Common::Error::ECapeOutOfResources, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeUnknown)
virtual void calculateResiduals ()
const Diana::DianaSparseArrayGetAllJacobianValues () throw (Common::Error::ECapeUnknown, Common::Error::ECapeNoImpl)
const Diana::DianaSparseArrayGetAllParJacobianValues (const Common::Types::CapeArrayLong *parIndices=NULL) throw (Common::Error::ECapeUnknown, Common::Error::ECapeNoImpl)
virtual int observation (Glob *globs, ExperimentSystem *ex, double t, double *y, double *gy, double *p, double **dgdy, double **dgdp)=0

Protected Member Functions

Diana::DianaDAESOcreateClone ()
virtual void jacobi (double t, double *y, double **jac, double *p)=0
virtual void inhomo (double t, double *y, double **inh, double *p)=0
virtual void inhomo1 (double t, double *y, double *inh1, double *p, int &jp)=0
virtual void R2 (Glob *globs, ExperimentSystem *ex, int computeDerivs)=0
virtual void R3 (Glob *globs, ExperimentSystem *ex, int computeDerivs)=0
virtual void ode (double t, double *y, double *f, double *p)=0
const DianaSparseArrayGuessJacobianStructure ()

Protected Attributes

const int NEQNS
const int NPARAMS
const char * DefModelDescription
const double * DefParameters
const double * DefYValues
string * ParameterNames
string * VariableNames

Detailed Description

Direct superclass for all Diffit Models. This should partially be backmerged into DiffitESO.


Constructor & Destructor Documentation

DiffitModel ( const DiffitModel org)

Copy CTOR


Member Function Documentation

virtual void calculateResiduals ( ) [virtual]

calculateResiduals updates array pResidualsVector with a values of the

\[F(t,x,\dot{x}) = B\dot{x}-f(t,x)\]

.

Reimplemented from DiffitESO.

Diana::DianaDAESO* createClone ( ) [protected]

Returns a matrix object whose GetValues method will provide the Jacobian values at the ESO's current variable values each time it is called (the values of entries indicated as uncomputable in the matrix returned by GetJacobianStruct will be meaningless, but the call to GetValues will not cause an error simply because such entries exist).

Reimplemented from DianaDAESO.

Symbolic implementation of the GetAllParJacobianValues

Reimplemented from DianaDAESO.

virtual void inhomo ( double  t,
double *  y,
double **  inh,
double *  p 
) [protected, pure virtual]

GetParameters() p.setValue(p[i]) setVariables(y) setIndependentVar(t) setAllDerivatives(0) GetAllDiffJacobianValues() Function of old model interface, calculate jacobi

\[\frac{\partial \vec f}{\partial \vec p}\]

(inhomogenity) inh out of the state defined by the other parameters. This method is generated by model2diffit. It works generically by repeatedly calling inhomo1 for all parameters.

Parameters:
inhout matrix
tin time,
yin state,
pin parameters.
virtual void inhomo1 ( double  t,
double *  y,
double *  inh1,
double *  p,
int &  jp 
) [protected, pure virtual]

Function of old model interface, calculate jacobi column

\[\frac{\partial \vec f}{\partial p_i}\]

inh1 out of the state defined by the other parameters. This method is generated by model2diffit. It works generically by repeatedly calling inhomo1 for all parameters.

Parameters:
inh1out vector
tin time,
yin state,
pin parameters.

Initialize the model

Reimplemented from DiffitESO.

virtual void jacobi ( double  t,
double *  y,
double **  jac,
double *  p 
) [protected, pure virtual]

Function of old model interface, calculate jacobi

\[\frac{\partial \vec f}{\partial \vec x}\]

into jac out of the states defined by the other parameters. This method is generated by model2diffit

Parameters:
jacout matrix, must be filled with 0
tin time,
yin state,
pin parameters.
virtual int observation ( Glob globs,
ExperimentSystem ex,
double  t,
double *  y,
double *  gy,
double *  p,
double **  dgdy,
double **  dgdp 
) [pure virtual]

Obsolete function of the old models.

This one is left public, because the observation-indices can be detected by calling it. But it works only for generic observations.

Calculates an observation (i.e. additional algebraic variables) out of the state of the model. Usually it returns 1, meaning a generic observation which is just selected states of the model which are written to gy. In case of complex observations, these must be mappable to the original states and parameters by dgdy and dgdp.

virtual void R2 ( Glob globs,
ExperimentSystem ex,
int  computeDerivs 
) [protected, pure virtual]

set data->me and data->mg according to number of constraints set data->r2[1..data->me]; (equal. constr., components must be == 0)

virtual void R3 ( Glob globs,
ExperimentSystem ex,
int  computeDerivs 
) [protected, pure virtual]

set data->r3[1..data->mg]; (ineq. constr., components must be >= 0)


The documentation for this class was generated from the following file: