Collaboration diagram for CVODES ODE Solver: x(t):
![]() |
Modules | |
CVODES Forward Sensitivity: dx(t)/dp | |
This module contains the functions that set up and call SUNDIALS CVODES forward sensitivity analysis routines. | |
Functions | |
SBML_ODESOLVER_API int | IntegratorInstance_cvodeOneStep (integratorInstance_t *engine) |
Calls CVODE to move the current simulation one time step. | |
int | IntegratorInstance_createCVODESolverStructures (integratorInstance_t *engine) |
creates CVODE structures and fills cvodeSolver, returns 1 on success or 0 on failure | |
void | IntegratorInstance_freeCVODESolverStructures (integratorInstance_t *engine) |
SBML_ODESOLVER_API void | IntegratorInstance_printCVODEStatistics (integratorInstance_t *engine, FILE *f) |
Prints some final statistics of the calls to CVODE routines, that are located in CVODE's iopt array. | |
int | check_flag (void *flagvalue, char *funcname, int opt, FILE *f) |
void | f (realtype t, N_Vector y, N_Vector ydot, void *f_data) |
f routine: Compute f(t,x) = df/dx . | |
void | JacODE (long int N, DenseMat J, realtype t, N_Vector y, N_Vector fy, void *jac_data, N_Vector vtemp1, N_Vector vtemp2, N_Vector vtemp3) |
Jacobian routine: Compute J(t,x) = df/dx. |
|
Calls CVODE to move the current simulation one time step. produces appropriate error messages on failures and returns 1 if the integration can continue, 0 otherwise. This function is called by IntegratorInstance_integrateOneStep, but could also be called directly by a calling application that is sure to use CVODES (and not e.g. IDA), to avoid the if statements in the wrapper function. |
|
creates CVODE structures and fills cvodeSolver, returns 1 on success or 0 on failure !! should use simplified ASTs for construction !!! Allocate y, abstol vectors Initialize y, abstol vectors
Call CVodeCreate to create the non-linear solver memory:
Nonlinear Solver: !! max. order should be set here !!
Call CVodeMalloc to initialize the integrator memory:
cvode_mem: pointer to the CVode memory block returned by CVodeCreate Link the main integrator with data for right-hand side function Link the main integrator with the CVDENSE linear solver Set the routine used by the CVDENSE linear solver to approximate the Jacobian matrix to ... Set maximum number of internal steps to be taken by the solver in its attempt to reach tout !! will need adaptation to selected sens.analysis !!! |
|
|
|
Prints some final statistics of the calls to CVODE routines, that are located in CVODE's iopt array.
|
|
|
|
f routine: Compute f(t,x) = df/dx . This function is called by CVODE's integration routines every time required. It evaluates the ODEs with the current variable values, as supplied by CVODE's N_Vector y vector containing the values of all variables (called x in this documentation. These values are first written back to CvodeData. Then every ODE is passed to evaluateAST, together with the cvodeData_t *, and this function calculates the current value of the ODE. The returned value is written back to CVODE's N_Vector(ydot) vector that contains the values of the ODEs. update parameters: p is modified by CVODES, if fS could not be generated update ODE variables from CVODE update assignment rules evaluate ODEs f(x,p,t) = dx/dt |
|
Jacobian routine: Compute J(t,x) = df/dx. This function is (optionally) called by CVODE's integration routines every time required. Very similar to the f routine, it evaluates the Jacobian matrix equations with CVODE's current values and writes the results back to CVODE's internal vector DENSE_ELEM(J,i,j). update parameters: p is modified by CVODES, if fS could not be generated update ODE variables from CVODE update assignment rules update time evaluate Jacobian J = df/dx |