YANE-Framework 1.1.0
Public Member Functions

yane::OdeSolve::OdeFunction Class Reference

Class for transferring data from the user to the yane::OdeSolve::OdeSolve object. More...

Collaboration diagram for yane::OdeSolve::OdeFunction:
[legend]

List of all members.

Public Member Functions

void getParams (T_ODEPARAMS *params)
 Function to set the parameters of the differential equation system.
 OdeFunction (T_ODEFUNC ode, int dim)
 Constructor.
void setAutonomeMode (bool autonome, T_DFTFUNC func=0)
 Function to define if the differential equation system is autonomous (default)
void setJacobiMatrix (T_JACFUNC func, int ljac=-1, int ujac=-1)
 Function to provide the Jacobian of the differential equation system.
void setMassMatrix (T_MASSFUNC func, int lmas=-1, int umas=-1)
 Function to provide the mass matrix of the differential equation system.
void setRho (bool is_constant, T_RHOFUNC func=0)
 Function to set the spectral radius of the differential equation system.
void setSolutionOutput (T_SOLOUTFUNC func)
 Function to set the solution output function.
virtual ~OdeFunction ()
 Destructor.

Detailed Description

This class assembles all data of the differential equation system and makes it accessable for the differential equation solver. Depending on the type of solver to be used, different data is required and stored.

An object of this class is fully configurated after calling the constructor and may be used within any of the solvers. In some cases, however, one should provide an analytically computed Jacobian to speed up the computation.


Constructor & Destructor Documentation

LIB_EXPORT yane::OdeSolve::OdeFunction::OdeFunction ( T_ODEFUNC  ode,
int  dim 
)

Upon construction, this object is initialized without Jacobian and mass matrix. Hence, if a method requires the use of the Jacobian or the mass matrix, this will be done numerically and it is assumed that these matrices are full. Moreover, by default the differential equation system is considered to be autonomous and no derivative of the differential equation system with respect to time is defined

Parameters:
odePointer of the differential equation system
dimDimension of the state variable

Member Function Documentation

LIB_EXPORT void yane::OdeSolve::OdeFunction::getParams ( T_ODEPARAMS params)
Parameters:
paramsPointer to an external structure
LIB_EXPORT void yane::OdeSolve::OdeFunction::setAutonomeMode ( bool  autonome,
T_DFTFUNC  func = 0 
)
Parameters:
autonomeDecision variable if the differential equation system is autonomous
funcPointer of the time derivative of the differential equation system
LIB_EXPORT void yane::OdeSolve::OdeFunction::setJacobiMatrix ( T_JACFUNC  func,
int  ljac = -1,
int  ujac = -1 
)
Parameters:
funcPointer of the Jacobian. If func = 0 then the Jacobian is computed numerically
ljacNumber of subdiagonals of the Jacobian (band structure). If ljac = -1 the Jacobian is assumed to be full
ujacNumber of superdiagonals of the Jacobian (band structure). If ujac = -1 the Jacobian is assumed to be full
LIB_EXPORT void yane::OdeSolve::OdeFunction::setMassMatrix ( T_MASSFUNC  func,
int  lmas = -1,
int  umas = -1 
)
Parameters:
funcPointer of the mass matrix. If func = 0 then the identity matrix is used
lmasNumber of subdiagonals of the mass matrix (band structure). If lmas = -1 the Jacobian is assumed to be full
umasNumber of superdiagonals of the mass matrix (band structure). If umas = -1 the Jacobian is assumed to be full
LIB_EXPORT void yane::OdeSolve::OdeFunction::setRho ( bool  is_constant,
T_RHOFUNC  func = 0 
)
Parameters:
funcPointer of the function to compute the spectral radius
is_constantDecision variable if the spectral radius is constant in time
LIB_EXPORT void yane::OdeSolve::OdeFunction::setSolutionOutput ( T_SOLOUTFUNC  func)
Parameters:
funcPointer of the solution output function which is called after each accepted step.