DPJIBT is called by DSTODI to compute and process the matrix P = A - HEL(1)J, where J is an approximation to the Jacobian dr/dy, and r = g(t,y) - A(t,y)*s.
Here J is computed by the user-supplied routine JAC if MITER = 1, or by finite differencing if MITER = 2.
J is stored in WM, rescaled, and ADDA is called to generate P.
P is then subjected to LU decomposition by DDECBT in preparation for later solution of linear systems with P as coefficient matrix.
In addition to variables described previously, communication with DPJIBT uses the following:
array containing predicted values on entry.
work array of length N (ACOR in DSTODI).
array used for output only. On output it contains the residual evaluated at current values of t and y.
array containing predicted values of dy/dt (SAVF in DSTODI).
real work space for matrices. On output it contains the LU decomposition of P. Storage of matrix elements starts at WM(3). WM also contains the following matrix-related data: WM(1) = SQRT(UROUND), used in numerical Jacobian increments.
integer work space containing pivot information, starting at IWM(21). IWM also contains block structure parameters MB = IWM(1) and NB = IWM(2). EL0
EL(1) (input).
output error flag. = 0 if no trouble occurred, = 1 if the P matrix was found to be unfactorable, = IRES (= 2 or 3) if RES returned IRES = 2 or 3.
output flag = 1 to indicate that the Jacobian matrix (or approximation) is now current.
This routine also uses the Common variables EL0, H, TN, UROUND, MITER, N, NFE, and NJE.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | dimension(*) | :: | Neq | |||
real(kind=dp), | intent(inout), | dimension(*) | :: | Y | ||
real(kind=dp), | intent(in), | dimension(Nyh,*) | :: | Yh | ||
integer, | intent(in) | :: | Nyh | |||
real(kind=dp), | intent(in), | dimension(*) | :: | Ewt | ||
real(kind=dp), | intent(inout), | dimension(*) | :: | Rtem | ||
real(kind=dp), | dimension(*) | :: | Savr | |||
real(kind=dp), | dimension(*) | :: | S | |||
real(kind=dp), | intent(inout), | dimension(*) | :: | Wm | ||
integer, | dimension(*) | :: | Iwm | |||
real | :: | res | ||||
integer | :: | jac | ||||
real | :: | adda |