1 SUBROUTINE dprepj (NEQ, Y, YH, NYH, EWT, FTEM, SAVF, WM, IWM,
58 DOUBLE PRECISION Y, YH, EWT, FTEM, SAVF, WM
59 dimension neq(*), y(*), yh(nyh,*), ewt(*), ftem(*), savf(*),
61 INTEGER ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L, METH, MITER,
62 2 maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
63 INTEGER ILLIN, INIT, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
64 1 mxstep, mxhnil, nhnil, ntrep, nslast, cnyh,
65 2 ialth, ipup, lmax, meo, nqnyh, nslp
66 DOUBLE PRECISION CONIT, CRATE, EL, ELCO, HOLD, RMAX, TESCO,
67 1 ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround
68 COMMON /dls001/ conit, crate, el(13), elco(13,12),
69 1 hold, rmax, tesco(3,12),
70 2 ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround,
71 2 illin, init, lyh, lewt, lacor, lsavf, lwm, liwm,
72 3 mxstep, mxhnil, nhnil, ntrep, nslast, cnyh,
73 3 ialth, ipup, lmax, meo, nqnyh, nslp,
74 4 icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
75 5 maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
76 INTEGER I, I1, I2, IER, II, J, J1, JJ, LENP,
77 1 mba, mband, meb1, meband, ml, ml3, mu, np1
78 DOUBLE PRECISION CON, DI, FAC, HL0, R, R0, SRUR, YI, YJ, YJJ,
86 GO TO (100, 200, 300, 400, 500), miter
91 CALL jac (neq, tn, y, 0, 0, wm(3), n)
94 120 wm(i+2) = wm(i+2)*con
97 200 fac =
dvnorm(n, savf, ewt)
98 r0 = 1000.0d0*abs(h)*uround*n*fac
99 IF (r0 .EQ. 0.0d0) r0 = 1.0d0
104 r =
max(srur*abs(yj),r0/ewt(j))
107 CALL f (neq, tn, y, ftem)
109 220 wm(i+j1) = (ftem(i) - savf(i))*fac
118 wm(j) = wm(j) + 1.0d0
121 CALL dgetrf ( n, n, wm(3), n, iwm(21), ier)
122 IF (ier .NE. 0) ierpj = 1
128 310 y(i) = y(i) + r*(h*savf(i) - yh(i,2))
129 CALL f (neq, tn, y, wm(3))
132 r0 = h*savf(i) - yh(i,2)
133 di = 0.1d0*r0 - h*(wm(i+2) - savf(i))
135 IF (abs(r0) .LT. uround/ewt(i))
GO TO 320
136 IF (abs(di) .EQ. 0.0d0)
GO TO 330
137 wm(i+2) = 0.1d0*r0/di
151 CALL jac (neq, tn, y, ml, mu, wm(ml3), meband)
154 420 wm(i+2) = wm(i+2)*con
164 fac =
dvnorm(n, savf, ewt)
165 r0 = 1000.0d0*abs(h)*uround*n*fac
166 IF (r0 .EQ. 0.0d0) r0 = 1.0d0
170 r =
max(srur*abs(yi),r0/ewt(i))
172 CALL f (neq, tn, y, ftem)
173 DO 550 jj = j,n,mband
176 r =
max(srur*abs(yjj),r0/ewt(jj))
180 ii = jj*meb1 - ml + 2
182 540 wm(ii+i) = (ftem(i) - savf(i))*fac
189 wm(ii) = wm(ii) + 1.0d0
192 CALL dgbtrf ( n, n, ml, mu, wm(3), meband, iwm(21), ier)
193 IF (ier .NE. 0) ierpj = 1
charNDArray max(char d, const charNDArray &m)
charNDArray min(char d, const charNDArray &m)
subroutine dprepj(NEQ, Y, YH, NYH, EWT, FTEM, SAVF, WM, IWM, F, JAC)
double precision function dvnorm(N, V, W)