YANEFramework 1.1.0

Class of ROCK solver of order 2 for merely stiff differential equations.
Public Member Functions  
virtual int  acceptedSteps () 
Function to obtain the number of accepted steps of the solver.  
void  calc (double t, double *rpar=0, int *ipar=0) 
Function to compute the solution of the dynamic.  
virtual OdeSolveFirst *  clone () 
Function to construct a clone of the object derived from the class yane::OdeSolve::OdeSolve.  
virtual int  computedSteps () 
Function to obtain the number of computed steps of the solver.  
virtual int  functionEvalCount () 
Function to obtain the number of function evaluations.  
void  init (double t0, double *y0) 
Function to set the initial values for the differential or difference equation system solver.  
void  refreshConfig () 
Function to refresh the configuration of the object.  
virtual int  rejectedSteps () 
Function to obtain the number of rejected steps of the solver.  
void  reset (OdeFunction *func, OdeConfig *config) 
Function to initialize the object.  
void  resize (int dimension) 
Function to change the size of the dynamic of the system.  
ROCK2 ()  
Constructor.  
Protected Member Functions  
virtual void  abstractCalc (double t, double *rpar, int *ipar) 
Function to abstract the computation of the solution of the differential equation or difference equation.  
virtual void  assertConfig () 
Function to check the configuration of the object.  
virtual void  assertMemory () 
Function to abstract the allocation of memory which are required by object classes derived from this class.  
virtual void  assertValidDGL (OdeFunction *dgl) 
Function to check whether the current differential equation or difference equation can be solved by the yane::OdeSolve::OdeSolve object.  
Protected Attributes  
double  _atol 
Absolute error tolerance.  
double *  _atol_vec 
Vector of absolute error tolerances.  
OdeConfig *  _config 
Pointer of the configuration object.  
yane::Utils::Uuid *  _config_id 
Pointer for configuration identifier.  
int  _did 
Error flag:
 
int  _dimension 
Dimension of the state variable of the system.  
OdeFunction *  _func 
Pointer of the differential or difference equation.  
bool  _initial_value_set 
Decision variable to check if an initial value has been assigned.  
int  _itol 
Decision variable
 
int *  _iwork 
Array for integer variables.  
int  _liwork 
Size of array for integer variables.  
int  _lwork 
Size of array for double variables.  
T_ODEPARAMS  _paramdata 
Structure of differential equation or difference equation data.  
void(*  _rock_func )(int *n, double *x, double *xend, double *hinit, double *y, yane::OdeSolve::T_ODEFUNC FCN, double *atol, double *rtol, yane::OdeSolve::T_RHOFUNC RHO, yane::OdeSolve::T_SOLOUTFUNC SOLOUT, int *iout, double *work, int *iwork, double *rpar, int *ipar, int *did) 
Prototype for calling the ROCK differential equation solver.  
double  _rtol 
Relative error tolerance.  
double *  _rtol_vec 
Vector of relative error tolerances.  
double  _t 
Current time instance.  
double *  _work 
Array for double variables.  
double *  _y 
Current state vector. 
LIB_EXPORT void yane::OdeSolve::ROCK::abstractCalc  (  double  t, 
double *  rpar,  
int *  ipar  
)  [protected, virtual, inherited] 
t  Terminal time for solving the differential or difference equation problem 
rpar  Array of double parameters 
ipar  Array of integer parameters 
NoInitialValueException  Is thrown if no initial value has been supplied 
WrongSolverInputException  Is thrown if parameters are incorrect 
TooManyStepsException  Is thrown if the maximal allowed number of steps is reached 
TooSmallStepSizeException  Is thrown if the current step size becomes too small 
StiffException  Is thrown if the system appears to be too stiff for the solver 
yane::Utils::NotInitializedException  Is thrown if the solver has not been initialized 
Implements yane::OdeSolve::OdeSolve.
LIB_EXPORT int yane::OdeSolve::ROCK::acceptedSteps  (  )  [virtual, inherited] 
Implements yane::OdeSolve::OdeSolve.
LIB_EXPORT void yane::OdeSolve::ROCK::assertValidDGL  (  OdeFunction *  dgl  )  [protected, virtual, inherited] 
IncompatibleDGLException  Is thrown if the current differential equation or difference equation cannot be solved by the yane::OdeSolve::OdeSolve object 
Reimplemented from yane::OdeSolve::OdeSolve.
LIB_EXPORT void yane::OdeSolve::OdeSolve::calc  (  double  t, 
double *  rpar = 0 , 

int *  ipar = 0 

)  [inherited] 
This function solves the differential or difference equation problem up to a supplied time instant. Internally, the function calls the function yane::OdeSolve::OdeSolve::abstractCalc which is given by the solver supplied to this object.
t  Terminal time for solving the differential or difference equation problem 
rpar  Array of double parameters 
ipar  Array of integer parameters 
noInitialValueException  Is thrown if no initial value has been supplied 
yane::Utils::NotInitializedException  Is thrown if the solver has not been initialized 
LIB_EXPORT yane::OdeSolve::OdeSolveFirst * yane::OdeSolve::ROCK2::clone  (  )  [virtual] 
This abstract function clone the object derived from the yane::OdeSolve::OdeSolve. Note that the new instance is constructed but not initialized. Hence, the function yane::OdeSolve::OdeSolve::reset and yane::OdeSolve::OdeSolve::init must be called prior to using this object. In a similar manner, the user must delete this object himself. It is not delete if the object which has been cloned is deleted.
Implements yane::OdeSolve::OdeSolveFirst.
LIB_EXPORT int yane::OdeSolve::ROCK::computedSteps  (  )  [virtual, inherited] 
Implements yane::OdeSolve::OdeSolve.
LIB_EXPORT int yane::OdeSolve::ROCK::functionEvalCount  (  )  [virtual, inherited] 
Implements yane::OdeSolve::OdeSolve.
LIB_EXPORT void yane::OdeSolve::OdeSolveFirst::init  (  double  t0, 
double *  y0  
)  [inherited] 
t0  Initial time 
y0  Initial state vector. On exit, this variable contrains the solution at the terminal time instance. 
yane::Utils::NotInitializedException  Is thrown if the solver has not been initialized 
LIB_EXPORT void yane::OdeSolve::OdeSolve::refreshConfig  (  )  [inherited] 
This function refreshed the configuration of the object. This may be necessary if the user cannot be sure that data within the yane::OdeSolve::OdeConfig object have been changed since the last call of yane::OdeSolve::OdeSolve::reset. Hence, this data should be handed over to the solver.
The function checks if the configuration has been changed and refreshes it using the internal function yane::OdeSolve::OdeSolve::assertConfig.
yane::Utils::NotInitializedException  Is thrown if the solver has not been initialized 
LIB_EXPORT int yane::OdeSolve::ROCK::rejectedSteps  (  )  [virtual, inherited] 
Implements yane::OdeSolve::OdeSolve.
LIB_EXPORT void yane::OdeSolve::OdeSolve::reset  (  OdeFunction *  func, 
OdeConfig *  config  
)  [inherited] 
This function initializes the object and provides the dynamic of the system as well as the configuration. The size of the problem is set according to the data contained in the OdeFunction object.
func  Pointer of the dynamic of the system 
config  Pointer of the configuration object 
yane::Utils::MemoryException  Is thrown if the memory allocation failed 
WrongSolverInputException  Is thrown if a null pointer is provided to the routine 
OdeSolEx  Is thrown if an error occured during the allocation or configuration of the differential equation solver 
IncompatibleConfigException  Is thrown if an error occured during the configuration of the differential equation solver 
LIB_EXPORT void yane::OdeSolve::OdeSolve::resize  (  int  dimension  )  [inherited] 
This function can be used to efficiently change the size of the dynamic of the system. The size of the dynamic must ont be larger than the dimension of the problem set within the yane::OdeSolve::OdeFunction object. Note that the object must be initialized with a call of yane::OdeSolve::OdeSolve::reset and that calling this method results in an update of the configuration of the object.
dimension  New size of the dynamic of the problem 
WrongSolverInputException  Is thrown if the new size or the system is too large or less or equal to zero 
yane::Utils::NotInitializedException  Is thrown if the solver has not been initialized 
void( * yane::OdeSolve::ROCK::_rock_func)(int *n, double *x, double *xend, double *hinit, double *y, yane::OdeSolve::T_ODEFUNC FCN, double *atol, double *rtol, yane::OdeSolve::T_RHOFUNC RHO, yane::OdeSolve::T_SOLOUTFUNC SOLOUT, int *iout, double *work, int *iwork, double *rpar, int *ipar, int *did) [protected, inherited] 
n  Dimension of the state 
x  Initial time 
xend  Terminal time 
hinit  Initial time step size 
y  Initial value of the state 
FCN  Pointer of the differential equation 
atol  Absolute tolerance 
rtol  Relative tolerance 
RHO  Pointer for computation of the spectral radius 
solout  Output function for continuous time output 
iout  Output parameter

work  Working array for double variables 
iwork  Working array for integer variables 
rpar  Array for double parameters 
ipar  Array for integer parameters 
did  Error flag:
