- (cvode-create-solver TSTART TSTOP VARIABLES RHS-FN [LMM] [ITER] [EWT-FN] [EVENT-FN] [EVENTS] [USER-DATA] [RELTOL] [ABSTOL]) => CVODE-SOLVERprocedure
Creates and initializes an object representing a problem to be solved with the CVODE solver.
Arguments TSTART and TSTOP must be real numbers that represent the beginning and end of the independent variable range.
Arguments VARIABLES must be a SRFI-4 f64vector object that holds the initial values of the system variables.
Argument RHS-FN is used to compute the right-hand side of the equations, and must be a procedure of the following form:
(LAMBDA T YY DATA)
(LAMBDA T YY)
depending on whether the USER-DATA optional argument is set, where
- real-valued independent variable
- SRFI-4 f64vector with current variable values
- is a user data object (if set)
This procedure must return a SRFI-4 f64vector containing the residual vector.
Optional keyword argument EWT-FN must be a procedure of the same form as (LAMBDA YY), which computes error weights for the system variables, and which can be used in place of relative and absolute error tolerance.
Optional keyword argument EVENT-FN must be a procedure of the same form as RHS-FN, which computes a rootfinding problem to be solved during the integration of the system. It is set only if argument EVENTS is given.
Optional keyword argument EVENTS is an SRFI-4 s32vector that is used for storage of root finding solutions. It must be given if EVENT-FN is given.
Optional keyword argument LMM specifies the linear multistep method to be used and can be one of cvode-lmm/adams (default) or cvode-lmm/bdf. cvode-lmm/bdf is recommended for stiff problems.
Optional keyword argument ITER specifies the iteration type to be used and can be one of cvode-iter/functional (default) or cvode-iter/newton. cvode-iter/newton is recommended for stiff problems.
Optional keyword argument USER-DATA is an object that will be passed as an additional argument to the residual functions.
Optional keyword arguments RELTOL and ABSTOL specify relative and absolute error tolerance, respectively. These both default to 1e-4. They are only set of EWT-FN is not specified.