Next: operatingsystem-pkg, Previous: Getting Started with ODEPACK, Up: odepack-pkg [Contents][Index]
This must be called before running the solver. This function returns a state object for use in the solver. The user must not modify the state.
The ODE to be solved is given in fex, which is a list of the equations. vars is a list of independent variable and the dependent variables. The list of dependent variables must be in the same order as the equations if fex. Finally, method indicates the method to be used by the solver:
10Nonstiff (Adams) method, no Jacobian used.
21Stiff (BDF) method, user-supplied full Jacobian.
22Stiff method, internally generated full Jacobian.
The returned state object is a list of lists. The sublist is a list of two elements:
fThe compiled function for the ODE.
varsThe list independent and dependent variables (vars).
mfThe method to be used (method).
neqThe number of equations.
lrwLength of the work vector for real values.
liwLength of the work vector for integer values.
rworkLisp array holding the real-valued work vector.
iworkLisp array holding the integer-valued work vector.
fjacCompiled analytical Jacobian of the equations
See also dlsode_step. See Getting Started with ODEPACK for
an example of usage.
Performs one step of the solver, returning the values of the independent and dependent variables, a success or error code.
inityFor the first call (when istate = 1), the initial values
tCurrent value of the independent value
toutNext point where output is desired which must not be equal to t.
rtolrelative tolerance parameter
atolAbsolute tolerance parameter, scalar of vector. If scalar, it applies to all dependent variables. Otherwise it must be the tolerance for each dependent variable.
Use rtol = 0 for pure absolute error and use atol = 0 for pure relative error.
istate1 for the first call to dlsode, 2 for subsequent calls.
statestate returned by dlsode_init.
The output is a list of the following items:
tindependent variable value
ylist of values of the dependent variables at time t.
istateIntegration status:
1no work because tout = tt
2successful result
-1Excess work done on this call
-2Excess accuracy requested
-3Illegal input detected
-4Repeated error test failures
-5Repeated convergence failures (perhaps bad Jacobian or wrong choice of mf or tolerances)
-6Error weight because zero during problem (solution component is vanished and atol(i) = 0.
infoassociation list of various bits of information:
n_stepstotal steps taken thus far
n_f_evaltotal number of function evals
n_j_evaltotal number of Jacobian evals
method_ordermethod order
len_rworkActual length used for real work array
len_iworkActual length used for integer work array
See also dlsode_init. See Getting Started with ODEPACK for
an example of usage.
Next: operatingsystem-pkg, Previous: Getting Started with ODEPACK, Up: odepack-pkg [Contents][Index]