dprepji Subroutine

public subroutine dprepji(Neq, Y, Yh, Nyh, Ewt, Rtem, Savr, S, Wm, Iwm, res, jac, adda)

DPREPJI 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, where r = g(t,y) - A(t,y)*s.

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 is stored in WM, rescaled, and ADDA is called to generate 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 DPREPJI uses the following:

Y

array containing predicted values on entry.

RTEM

work array of length N (ACOR in DSTODI).

SAVR

array used for output only. On output it contains the residual evaluated at current values of t and y.

S

array containing predicted values of dy/dt (SAVF in DSTODI).

WM

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.

IWM

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.

EL0

el(1) (input).

IERPJ

output error flag. = 0 if no trouble occurred, = 1 if the P matrix was found to be singular, = IRES (= 2 or 3) if RES returned IRES = 2 or 3.

JCUR

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.

Arguments

Type IntentOptional Attributes Name
integer :: Neq(*)
real(kind=dp), intent(inout) :: Y(*)
real(kind=dp), intent(in) :: Yh(Nyh,*)
integer, intent(in) :: Nyh
real(kind=dp), intent(in) :: Ewt(*)
real(kind=dp) :: Rtem(*)
real(kind=dp) :: Savr(*)
real(kind=dp) :: S(*)
real(kind=dp), intent(inout) :: Wm(*)
integer :: Iwm(*)
real :: res
integer :: jac
real :: adda

Calls

proc~~dprepji~2~~CallsGraph proc~dprepji~2 M_odepack::dprepji proc~daxpy~2 M_odepack::daxpy proc~dprepji~2->proc~daxpy~2 proc~dgefa~2 M_odepack::dgefa proc~dprepji~2->proc~dgefa~2 proc~dscal M_odepack::dscal proc~dprepji~2->proc~dscal proc~dgefa~2->proc~daxpy~2 proc~dgefa~2->proc~dscal