Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals

ODE/DAE Integrator Interface
[Numerical Analysis]

Collaboration diagram for ODE/DAE Integrator Interface:

This module contains all interfaces to an integratorInstance. More...


Modules

 CVODES ODE Solver: x(t)
 This module contains the functions that call SUNDIALS CVODES solver routines for stiff and non-stiff ODE systems.
 IDA DAE Solver: x(t)
 NOT COMPILED CODE: This module contains the functions that will call SUNDIALS IDA solver routines for DAE systems, once implemented.
 KINSOL Root Finder: f(x,p,t) = dx/dt = 0
 NOT FUNCTIONAL YET: An interface to SUNDIALS KinSolver to find a local root of a system of non-linear equations.

Functions

SBML_ODESOLVER_API integratorInstance_tIntegratorInstance_create (odeModel_t *om, cvodeSettings_t *opt)
 Creates an new integratorInstance.
SBML_ODESOLVER_API int IntegratorInstance_set (integratorInstance_t *engine, cvodeSettings_t *opt)
 Resets and existing integratorInstance with new settings.
SBML_ODESOLVER_API int IntegratorInstance_reset (integratorInstance_t *engine)
 Resets and integratorInstance to its initial values.
SBML_ODESOLVER_API cvodeSettings_tIntegratorInstance_getSettings (integratorInstance_t *engine)
 Returns the settings of this integratorInstance.
SBML_ODESOLVER_API void IntegratorInstance_copyVariableState (integratorInstance_t *target, integratorInstance_t *source)
 Copies variable and parameter values between two integratorInstances that have been created from the same odeModel.
SBML_ODESOLVER_API double IntegratorInstance_getTime (integratorInstance_t *engine)
 Returns the current time of an integration.
SBML_ODESOLVER_API int IntegratorInstance_setNextTimeStep (integratorInstance_t *engine, double nexttime)
 Sets the next output time for infinite integration.
SBML_ODESOLVER_API double IntegratorInstance_getVariableValue (integratorInstance_t *engine, variableIndex_t *vi)
 Gets the value of a variable or parameter during an integration via its variableIndex.
SBML_ODESOLVER_API double IntegratorInstance_getSensitivity (integratorInstance_t *engine, variableIndex_t *y, variableIndex_t *p)
 Gets the sensitivity of variable y to parameter p at the current time.
SBML_ODESOLVER_API void IntegratorInstance_dumpNames (integratorInstance_t *engine)
 Prints variable names, the first value is the time,.
SBML_ODESOLVER_API void IntegratorInstance_dumpData (integratorInstance_t *engine)
 Prints the current integration data,.
SBML_ODESOLVER_API void IntegratorInstance_dumpYSensitivities (integratorInstance_t *engine, variableIndex_t *y)
 Prints the current time, current value of variable y and sensitivities to all parameters for which calculated.
SBML_ODESOLVER_API void IntegratorInstance_dumpPSensitivities (integratorInstance_t *engine, variableIndex_t *p)
 Prints the current time, the value of parameter p and all variable's sensitivities Si to p, where i = 1 to NEQ.
SBML_ODESOLVER_API cvodeData_tIntegratorInstance_getData (integratorInstance_t *engine)
 Returns a pointer cvodeData of the integratorInstance, which contains the current values of all variables.
SBML_ODESOLVER_API int IntegratorInstance_integrate (integratorInstance_t *engine)
 Starts the default integration loop with standard error handling and returns 0 if integration was OK, and the error code if not.
SBML_ODESOLVER_API int IntegratorInstance_timeCourseCompleted (integratorInstance_t *engine)
 Returns TRUE if the requested timecourse has been completed for the passed integratorInstance.
SBML_ODESOLVER_API cvodeResults_tIntegratorInstance_createResults (integratorInstance_t *engine)
 Creates and returns a cvodeResults structure containing the results of one integration run and NULL if not successful.
SBML_ODESOLVER_API int IntegratorInstance_updateModel (integratorInstance_t *engine)
 Writes current simulation data to original model.
SBML_ODESOLVER_API int IntegratorInstance_simpleOneStep (integratorInstance_t *engine)
 Handles the simple case of models that contain no ODEs.
int IntegratorInstance_updateData (integratorInstance_t *engine)
 Default function for updating data, to be used by solvers after they have calculate x(t) and updated the time.
SBML_ODESOLVER_API int IntegratorInstance_checkTrigger (integratorInstance_t *engine)
 Evaluates event trigger expressions and executes event assignments for those triggers that are true.
SBML_ODESOLVER_API int IntegratorInstance_checkSteadyState (integratorInstance_t *engine)
 Approximate identification of a steady state.
SBML_ODESOLVER_API void IntegratorInstance_setVariableValue (integratorInstance_t *engine, variableIndex_t *vi, double value)
 Sets the value of a variable or parameter during an integration via its variableIndex.
SBML_ODESOLVER_API int IntegratorInstance_integrateOneStep (integratorInstance_t *engine)
 Moves the current integration one step forward and switches between different solvers for filling ODE variables.
SBML_ODESOLVER_API void IntegratorInstance_dumpSolver (integratorInstance_t *engine)
 Prints the current state of the solver.
SBML_ODESOLVER_API void IntegratorInstance_free (integratorInstance_t *engine)
 Frees an integratorInstance, including cvodeData.
SBML_ODESOLVER_API int IntegratorInstance_handleError (integratorInstance_t *engine)
 Standard handler for when the integrate function fails.
SBML_ODESOLVER_API void IntegratorInstance_printStatistics (integratorInstance_t *engine, FILE *f)
 Prints some final statistics of the solver.

Detailed Description

This module contains all interfaces to an integratorInstance.

SOSlib allows to get and set model data during an integration run. This groups contain all functions available for this purpose.


Function Documentation

SBML_ODESOLVER_API integratorInstance_t* IntegratorInstance_create odeModel_t om,
cvodeSettings_t opt
 

Creates an new integratorInstance.

reads initial values from odeModel and integration settings from cvodeSettings to create integration data cvodeData and cvodeResults and initializes cvodeSolver structures.

SBML_ODESOLVER_API int IntegratorInstance_set integratorInstance_t engine,
cvodeSettings_t opt
 

Resets and existing integratorInstance with new settings.

The instance can the be used for further integration runs with these new settings. Don't use during an integration run!

SBML_ODESOLVER_API int IntegratorInstance_reset integratorInstance_t engine  ) 
 

Resets and integratorInstance to its initial values.

After that, a new integration can be run. Don't use during an integration run!

SBML_ODESOLVER_API cvodeSettings_t* IntegratorInstance_getSettings integratorInstance_t engine  ) 
 

Returns the settings of this integratorInstance.

These settings can then be change with cvodeSettings interface functions. The changes become only effective after IntegratorInstance_reset has been called. Don't use during an integration run!

SBML_ODESOLVER_API void IntegratorInstance_copyVariableState integratorInstance_t target,
integratorInstance_t source
 

Copies variable and parameter values between two integratorInstances that have been created from the same odeModel.

SBML_ODESOLVER_API double IntegratorInstance_getTime integratorInstance_t engine  ) 
 

Returns the current time of an integration.

SBML_ODESOLVER_API int IntegratorInstance_setNextTimeStep integratorInstance_t engine,
double  nexttime
 

Sets the next output time for infinite integration.

WARNING: the next output time must always be bigger then the previous. This function can only be used for infinite integration (CvodeSettings_setIndefinite(set, 1)). Returns 1 if successful and 0 otherwise.

SBML_ODESOLVER_API double IntegratorInstance_getVariableValue integratorInstance_t engine,
variableIndex_t vi
 

Gets the value of a variable or parameter during an integration via its variableIndex.

The variableIndex can be retrieved from the odeModel with ODEModel_getVariable via the variable's or the parameter's ID symbol in the input SBML model (can be SBML compartments, species and parameters).

SBML_ODESOLVER_API double IntegratorInstance_getSensitivity integratorInstance_t engine,
variableIndex_t y,
variableIndex_t p
 

Gets the sensitivity of variable y to parameter p at the current time.

Must not be called, if sensitivity wasn't calculated!

!! needs better solution, if sensitivity for selected params will be implemented !!!

SBML_ODESOLVER_API void IntegratorInstance_dumpNames integratorInstance_t engine  ) 
 

Prints variable names, the first value is the time,.

ODE variable values, assigned variable values and constant values follow. The order is the same as in IntegratorInstance_dumpData.

SBML_ODESOLVER_API void IntegratorInstance_dumpData integratorInstance_t engine  ) 
 

Prints the current integration data,.

the first value is the current time, ODE variable values, assigned variable values and constant values follow. The order is the same as in IntegratorInstance_dumpNames.

SBML_ODESOLVER_API void IntegratorInstance_dumpYSensitivities integratorInstance_t engine,
variableIndex_t y
 

Prints the current time, current value of variable y and sensitivities to all parameters for which calculated.

SBML_ODESOLVER_API void IntegratorInstance_dumpPSensitivities integratorInstance_t engine,
variableIndex_t p
 

Prints the current time, the value of parameter p and all variable's sensitivities Si to p, where i = 1 to NEQ.

SBML_ODESOLVER_API cvodeData_t* IntegratorInstance_getData integratorInstance_t engine  ) 
 

Returns a pointer cvodeData of the integratorInstance, which contains the current values of all variables.

This structure is `read-only' and can be used for evaluation of formulas with evaluateAST after integration. Ownership stays with the integratorInstance.

SBML_ODESOLVER_API int IntegratorInstance_integrate integratorInstance_t engine  ) 
 

Starts the default integration loop with standard error handling and returns 0 if integration was OK, and the error code if not.

SBML_ODESOLVER_API int IntegratorInstance_timeCourseCompleted integratorInstance_t engine  ) 
 

Returns TRUE if the requested timecourse has been completed for the passed integratorInstance.

SBML_ODESOLVER_API cvodeResults_t* IntegratorInstance_createResults integratorInstance_t engine  ) 
 

Creates and returns a cvodeResults structure containing the results of one integration run and NULL if not successful.

The results must be freed by the caller with CvodeResults_free(results).

SBML_ODESOLVER_API int IntegratorInstance_updateModel integratorInstance_t engine  ) 
 

Writes current simulation data to original model.

SBML_ODESOLVER_API int IntegratorInstance_simpleOneStep integratorInstance_t engine  ) 
 

Handles the simple case of models that contain no ODEs.

int IntegratorInstance_updateData integratorInstance_t engine  ) 
 

Default function for updating data, to be used by solvers after they have calculate x(t) and updated the time.

The function updates assigned variables, checks for event triggers and steady state, increases loop variables, stores results and sets next output time.

SBML_ODESOLVER_API int IntegratorInstance_checkTrigger integratorInstance_t engine  ) 
 

Evaluates event trigger expressions and executes event assignments for those triggers that are true.

Results are stored appropriately in engine->data->value. Recreation of new solver structures (if an ODE variable is changed) is handled by integratorInstance_setVariableValue(engine). Returns the number of triggers that fired.

SBML_ODESOLVER_API int IntegratorInstance_checkSteadyState integratorInstance_t engine  ) 
 

Approximate identification of a steady state.

Evaluates mean and std of rates and returns 1 if a "steady state" is reached to stop the calling integrator. This function is only called by the integrator function if specified via cvodeSettings !

SBML_ODESOLVER_API void IntegratorInstance_setVariableValue integratorInstance_t engine,
variableIndex_t vi,
double  value
 

Sets the value of a variable or parameter during an integration via its variableIndex.

This function also takes care of creating and freeing solver structures and ODE variables are changed! The variableIndex can be retrieved from the odeModel with ODEModel_getVariable via the variable's or the parameter's ID symbol in the input SBML model (can be SBML compartments, species and parameters).

!! will need adaptation to selected sens.analysis !!!

SBML_ODESOLVER_API int IntegratorInstance_integrateOneStep integratorInstance_t engine  ) 
 

Moves the current integration one step forward and switches between different solvers for filling ODE variables.

Returns 1 if integration can continue, 0 otherwise.

SBML_ODESOLVER_API void IntegratorInstance_dumpSolver integratorInstance_t engine  ) 
 

Prints the current state of the solver.

SBML_ODESOLVER_API void IntegratorInstance_free integratorInstance_t engine  ) 
 

Frees an integratorInstance, including cvodeData.

SBML_ODESOLVER_API int IntegratorInstance_handleError integratorInstance_t engine  ) 
 

Standard handler for when the integrate function fails.

SBML_ODESOLVER_API void IntegratorInstance_printStatistics integratorInstance_t engine,
FILE *  f
 

Prints some final statistics of the solver.


Generated on Wed Dec 21 18:10:36 2005 for SBML ODE Solver Library API by  doxygen 1.4.4