2 SUBROUTINE DATP
(NEQ
, Y
, SAVF
, P
, WGHT
, HL0
, WK
, F
, W
)
5 DOUBLE PRECISION Y
, SAVF
, P
, WGHT
, HL0
, WK
, W
6 DIMENSION NEQ
(*), Y
(*), SAVF
(*), P
(*), WGHT
(*), WK
(*), W
(*)
8 1 ICF
, IERPJ
, IERSL
, JCUR
, JSTART
, KFLAG
, L
,
9 2 LYH
, LEWT
, LACOR
, LSAVF
, LWM
, LIWM
, METH
, MITER
,
10 3 MAXORD
, MAXCOR
, MSBP
, MXNCF
, N
, NQ
, NST
, NFE
, NJE
, NQU
11 DOUBLE PRECISION ROWNS
,
12 1 CCMAX
, EL0
, H
, HMIN
, HMXI
, HU
, RC
, TN
, UROUND
13 COMMON /DLS001
/ ROWNS
(209),
14 1 CCMAX
, EL0
, H
, HMIN
, HMXI
, HU
, RC
, TN
, UROUND
,
16 3 ICF
, IERPJ
, IERSL
, JCUR
, JSTART
, KFLAG
, L
,
17 4 LYH
, LEWT
, LACOR
, LSAVF
, LWM
, LIWM
, METH
, MITER
,
18 5 MAXORD
, MAXCOR
, MSBP
, MXNCF
, N
, NQ
, NST
, NFE
, NJE
, NQU
19 C-----------------------------------------------------------------------
20 C This routine computes the product
22 C w = (I - hl0*df/dy)*p
24 C This is computed by a call to F and a difference quotient.
25 C-----------------------------------------------------------------------
29 C NEQ = problem size, passed to F and PSOL (NEQ(1) = N).
31 C Y = array containing current dependent variable vector.
33 C SAVF = array containing current value of f(t,y).
35 C P = real array of length N.
37 C WGHT = array of length N containing scale factors.
38 C 1/WGHT(i) are the diagonal elements of the matrix D.
40 C WK = work array of length N.
45 C W = array of length N containing desired
46 C matrix-vector product.
48 C In addition, this routine uses the Common variables TN, N, NFE.
49 C-----------------------------------------------------------------------
51 DOUBLE PRECISION FAC
, PNRM
, RPNRM
, DVNORM
53 PNRM
= DVNORM
(N
, P
, WGHT
)
55 CALL DCOPY
(N
, Y
, 1, W
, 1)
57 20 Y
(I
) = W
(I
) + P
(I
)*RPNRM
58 CALL F
(NEQ
, TN
, Y
, WK
)
60 CALL DCOPY
(N
, W
, 1, Y
, 1)
63 40 W
(I
) = P
(I
) - FAC*
(WK
(I
) - SAVF
(I
))
65 C----------------------- End of Subroutine DATP ------------------------