1 SUBROUTINE prepj (NEQ, Y, YH, NYH, EWT, FTEM, SAVF, WM, IWM,
6 INTEGER ILLIN, INIT, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
7 1 mxstep, mxhnil, nhnil, ntrep, nslast, cnyh,
8 2 ialth, ipup, lmax, meo, nqnyh, nslp
9 INTEGER ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L, METH, MITER,
10 2 maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
11 INTEGER I, I1, I2, IER, II, J, J1, JJ, LENP,
12 1 mba, mband, meb1, meband, ml, ml3, mu, np1
13 DOUBLE PRECISION Y, YH, EWT, FTEM, SAVF, WM
14 DOUBLE PRECISION CONIT, CRATE, EL, ELCO, HOLD, RMAX, TESCO,
15 1 ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround
16 DOUBLE PRECISION CON, DI, FAC, HL0, R, R0, SRUR, YI, YJ, YJJ,
18 dimension neq(*), y(*), yh(nyh,*), ewt(*), ftem(*), savf(*),
20 COMMON /ls0001/ conit, crate, el(13), elco(13,12),
21 1 hold, rmax, tesco(3,12),
22 2 ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround,
23 2 illin, init, lyh, lewt, lacor, lsavf, lwm, liwm,
24 3 mxstep, mxhnil, nhnil, ntrep, nslast, cnyh,
25 3 ialth, ipup, lmax, meo, nqnyh, nslp,
26 4 icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
27 5 maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
66 GO TO (100, 200, 300, 400, 500), miter
71 CALL jac (neq, tn, y, 0, 0, wm(3), n)
74 120 wm(i+2) = wm(i+2)*con
77 200 fac =
vnorm(n, savf, ewt)
78 r0 = 1000.0d0*dabs(h)*uround*dble(n)*fac
79 IF (r0 .EQ. 0.0d0) r0 = 1.0d0
84 r = dmax1(srur*dabs(yj),r0/ewt(j))
88 CALL f (neq, tn, y, ftem, ierr)
89 IF (ierr .LT. 0)
RETURN
91 220 wm(i+j1) = (ftem(i) - savf(i))*fac
100 wm(j) = wm(j) + 1.0d0
103 CALL dgetrf ( n, n, wm(3), n, iwm(21), ier)
104 IF (ier .NE. 0) ierpj = 1
110 310 y(i) = y(i) + r*(h*savf(i) - yh(i,2))
112 CALL f (neq, tn, y, wm(3), ierr)
113 IF (ierr .LT. 0)
RETURN
116 r0 = h*savf(i) - yh(i,2)
117 di = 0.1d0*r0 - h*(wm(i+2) - savf(i))
119 IF (dabs(r0) .LT. uround/ewt(i))
GO TO 320
120 IF (dabs(di) .EQ. 0.0d0)
GO TO 330
121 wm(i+2) = 0.1d0*r0/di
135 CALL jac (neq, tn, y, ml, mu, wm(ml3), meband)
138 420 wm(i+2) = wm(i+2)*con
148 fac =
vnorm(n, savf, ewt)
149 r0 = 1000.0d0*dabs(h)*uround*dble(n)*fac
150 IF (r0 .EQ. 0.0d0) r0 = 1.0d0
154 r = dmax1(srur*dabs(yi),r0/ewt(i))
157 CALL f (neq, tn, y, ftem, ierr)
158 IF (ierr .LT. 0)
RETURN
159 DO 550 jj = j,n,mband
162 r = dmax1(srur*dabs(yjj),r0/ewt(jj))
166 ii = jj*meb1 - ml + 2
168 540 wm(ii+i) = (ftem(i) - savf(i))*fac
175 wm(ii) = wm(ii) + 1.0d0
178 CALL dgbtrf ( n, n, ml, mu, wm(3), meband, iwm(21), ier)
179 IF (ier .NE. 0) ierpj = 1
subroutine prepj(NEQ, Y, YH, NYH, EWT, FTEM, SAVF, WM, IWM, F, JAC, IERR)
double precision function vnorm(N, V, W)