dprja Subroutine

public subroutine dprja(Neq, Y, Yh, Nyh, Ewt, Ftem, Savf, Wm, Iwm, f, jac)

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:

Y

array containing predicted values on entry.

FTEM

work array of length N (ACOR in DSTODA).

SAVF

array containing f evaluated at predicted y.

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).

PDNORM

norm of Jacobian matrix. (Output).

IERPJ

output error flag, = 0 if no trouble, .gt. 0 if P matrix found to be singular.

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, 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

Calls

proc~~dprja~2~~CallsGraph proc~dprja~2 M_odepack::dprja proc~daxpy~2 M_odepack::daxpy proc~dprja~2->proc~daxpy~2 proc~dgefa~2 M_odepack::dgefa proc~dprja~2->proc~dgefa~2 proc~dmnorm~2 M_odepack::dmnorm proc~dprja~2->proc~dmnorm~2 proc~dscal M_odepack::dscal proc~dprja~2->proc~dscal proc~dgefa~2->proc~daxpy~2 proc~dgefa~2->proc~dscal