DPRJA is called by DSTODA to compute and process the matrix P = I - HEL(1)J, where J is an approximation to the Jacobian.
Here J is computed by the user-supplied routine JAC if MITER = 1 or 4 or by finite differencing if MITER = 2 or 5.
J, scaled by -H*EL(1), is stored in WM. Then the norm of J (the matrix norm consistent with the weighted max-norm on vectors given by DMNORM) is computed, and J is overwritten by P.
P is then subjected to LU decomposition in preparation for later solution of linear systems with P as coefficient matrix. This is done by DGEFA if MITER = 1 or 2, and by DGBFA if MITER = 4 or 5.
In addition to variables described previously, communication with DPRJA uses the following:
array containing predicted values on entry.
work array of length N (ACOR in DSTODA).
array containing f evaluated at predicted y.
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 the band parameters ML = IWM(1) and MU = IWM(2) if MITER is 4 or 5.
EL(1) (input).
norm of Jacobian matrix. (Output).
output error flag, = 0 if no trouble, .gt. 0 if P matrix found to be singular.
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), | dimension(*) | :: | Ewt | |||
real(kind=dp), | dimension(*) | :: | Ftem | |||
real(kind=dp), | dimension(*) | :: | Savf | |||
real(kind=dp), | intent(inout), | dimension(*) | :: | Wm | ||
integer, | dimension(*) | :: | Iwm | |||
real | :: | f | ||||
integer | :: | jac |