Diana
0.8.3
|
#include <DiffitModel.hpp>
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::DianaSparseArray & | GetAllJacobianValues () throw (Common::Error::ECapeUnknown, Common::Error::ECapeNoImpl) |
const Diana::DianaSparseArray & | GetAllParJacobianValues (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::DianaDAESO * | createClone () |
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 DianaSparseArray & | GuessJacobianStructure () |
Protected Attributes | |
const int | NEQNS |
const int | NPARAMS |
const char * | DefModelDescription |
const double * | DefParameters |
const double * | DefYValues |
string * | ParameterNames |
string * | VariableNames |
Direct superclass for all Diffit Models. This should partially be backmerged into DiffitESO.
DiffitModel | ( | const DiffitModel & | org | ) |
Copy CTOR
virtual void calculateResiduals | ( | ) | [virtual] |
calculateResiduals updates array pResidualsVector with a values of the
.
Reimplemented from DiffitESO.
Diana::DianaDAESO* createClone | ( | ) | [protected] |
const Diana::DianaSparseArray& GetAllJacobianValues | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeNoImpl) [virtual] |
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.
const Diana::DianaSparseArray& GetAllParJacobianValues | ( | const Common::Types::CapeArrayLong * | parIndices = NULL | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeNoImpl) [virtual] |
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
(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.
inh | out matrix |
t | in time, |
y | in state, |
p | in 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
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.
inh1 | out vector |
t | in time, |
y | in state, |
p | in parameters. |
virtual void Initialize | ( | ) | throw (Common::Error::ECapeBadInvOrder, Common::Error::ECapeLicenceError, Common::Error::ECapeOutOfResources, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeUnknown) [virtual] |
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
into jac out of the states defined by the other parameters. This method is generated by model2diffit
jac | out matrix, must be filled with 0 |
t | in time, |
y | in state, |
p | in 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)