![]() |
YANE-Framework 1.1.0
|
Class for transferring data from the user to the yane::OdeSolve::OdeSolve object. More...
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. |
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.
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
ode | Pointer of the differential equation system |
dim | Dimension of the state variable |
LIB_EXPORT void yane::OdeSolve::OdeFunction::getParams | ( | T_ODEPARAMS * | params | ) |
params | Pointer to an external structure |
LIB_EXPORT void yane::OdeSolve::OdeFunction::setAutonomeMode | ( | bool | autonome, |
T_DFTFUNC | func = 0 |
||
) |
autonome | Decision variable if the differential equation system is autonomous |
func | Pointer 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 |
||
) |
func | Pointer of the Jacobian. If func = 0 then the Jacobian is computed numerically |
ljac | Number of subdiagonals of the Jacobian (band structure). If ljac = -1 the Jacobian is assumed to be full |
ujac | Number 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 |
||
) |
func | Pointer of the mass matrix. If func = 0 then the identity matrix is used |
lmas | Number of subdiagonals of the mass matrix (band structure). If lmas = -1 the Jacobian is assumed to be full |
umas | Number 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 |
||
) |
func | Pointer of the function to compute the spectral radius |
is_constant | Decision variable if the spectral radius is constant in time |
LIB_EXPORT void yane::OdeSolve::OdeFunction::setSolutionOutput | ( | T_SOLOUTFUNC | func | ) |
func | Pointer of the solution output function which is called after each accepted step. |