DSTODA performs one step of the integration of an initial value problem for a system of ordinary differential equations.
Note: DSTODA is independent of the value of the iteration method indicator MITER, when this is .ne. 0, and hence is independent of the type of chord method used, or the Jacobian structure.
Communication with DSTODA is done with the following variables:
an array of length .ge. N used as the Y argument in all calls to F and JAC.
integer array containing problem size in NEQ(1), and passed as the NEQ argument in all calls to F and JAC.
an NYH by LMAX array containing the dependent variables and their approximate scaled derivatives, where LMAX = MAXORD + 1. YH(i,j+1) contains the approximate j-th derivative of y(i), scaled by H**j/factorial(j) (j = 0,1,…,NQ). On entry for the first step, the first two columns of YH must be set from the initial values.
a constant integer .ge. N, the first dimension of YH.
a one-dimensional array occupying the same space as YH.
an array of length N containing multiplicative weights for local error measurements. Local errors in y(i) are compared to 1.0/EWT(i) in various error tests.
an array of working storage, of length N.
a work array of length N, used for the accumulated corrections. On a successful return, ACOR(i) contains the estimated one-step local error in y(i).
real and integer work arrays associated with matrix operations in chord iteration (MITER .ne. 0).
name of routine to evaluate and preprocess Jacobian matrix and P = I - HEL0Jac, if a chord method is being used. It also returns an estimate of norm(Jac) in PDNORM.
name of routine to solve linear system in chord iteration.
maximum relative change in H*EL0 before PJAC is called.
the step size to be attempted on the next step. H is altered by the error control algorithm during the problem. H can be either positive or negative, but its sign must remain constant throughout the problem.
the minimum absolute value of the step size H to be used.
inverse of the maximum absolute value of H to be used. HMXI = 0.0 is allowed and corresponds to an infinite HMAX. HMIN and HMXI may be changed at any time, but will not take effect until the next change of H is considered.
the independent variable. TN is updated on each step taken.
an integer used for input only, with the following values and meanings: 0 perform the first step. .gt.0 take a new step continuing from the last. -1 take the next step with a new value of H, N, METH, MITER, and/or matrix parameters. -2 take the next step with a new value of H, but with other inputs unchanged. On return, JSTART is set to 1 to facilitate continuation.
a completion code with the following meanings: 0 the step was succesful. -1 the requested error could not be achieved. -2 corrector convergence could not be achieved. -3 fatal error in PJAC or SLVS.
A return with KFLAG = -1 or -2 means either ABS(H) = HMIN or 10 consecutive failures occurred. On a return with KFLAG negative, the values of TN and the YH array are as of the beginning of the last step, and H is the last step size attempted.
the maximum order of integration method to be allowed.
the maximum number of corrector iterations allowed.
maximum number of steps between PJAC calls (MITER .gt. 0).
maximum number of convergence failures allowed.
current method. METH = 1 means Adams method (nonstiff) METH = 2 means BDF method (stiff) METH may be reset by DSTODA.
corrector iteration method. MITER = 0 means functional iteration. MITER = JT .gt. 0 means a chord iteration corresponding to Jacobian type JT. (The DLSODA/DLSODAR argument JT is communicated here as JTYP, but is not used in DSTODA except to load MITER following a method switch.) MITER may be reset by DSTODA.
the number of first-order differential equations.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer | :: | Neq(*) | ||||
real(kind=dp), | intent(inout) | :: | Y(*) | |||
real(kind=dp), | intent(inout) | :: | Yh(Nyh,*) | |||
integer | :: | Nyh | ||||
real(kind=dp), | intent(inout) | :: | Yh1(*) | |||
real(kind=dp) | :: | Ewt(*) | ||||
real(kind=dp), | intent(inout) | :: | Savf(*) | |||
real(kind=dp), | intent(inout) | :: | Acor(*) | |||
real(kind=dp) | :: | Wm(*) | ||||
integer | :: | Iwm(*) | ||||
real | :: | f | ||||
integer | :: | jac | ||||
real | :: | pjac | ||||
real | :: | slvs |