1 SUBROUTINE drchek (JOB, G, NG, NEQ, TN, TOUT, Y, YP, PHI, PSI,
2 * KOLD, G0, G1, GX, JROOT, IRT, UROUND, INFO3, RWORK, IWORK,
12 IMPLICIT DOUBLE PRECISION(a-h,o-z)
13 parameter(lnge=16, lirfnd=18, llast=19, limax=20,
14 * lt0=41, ltlast=42, lalphr=43, lx2=44)
16 INTEGER JOB, NG, NEQ, KOLD, JROOT, IRT, INFO3, IWORK, IPAR
17 DOUBLE PRECISION TN, TOUT, Y, YP, PHI, PSI, G0, G1, GX, UROUND,
19 dimension y(*), yp(*), phi(neq,*), psi(*),
20 1 g0(*), g1(*), gx(*), jroot(*), rwork(*), iwork(*)
23 DOUBLE PRECISION HMING, T1, TEMP1, TEMP2, X
68 hming = (dabs(tn) + dabs(h))*uround*100.0d0
70 GO TO (100, 200, 300), job
75 CALL ddatrp(tn,rwork(lt0),y,yp,neq,kold,phi,psi)
76 CALL g (neq, rwork(lt0), y, ng, g0, rpar, ipar)
80 110
IF (dabs(g0(i)) .LE. 0.0d0) zroot = .true.
81 IF (.NOT. zroot)
GO TO 190
83 temp1 = dsign(hming,h)
84 rwork(lt0) = rwork(lt0) + temp1
87 120 y(i) = y(i) + temp2*phi(i,2)
88 CALL g (neq, rwork(lt0), y, ng, g0, rpar, ipar)
89 iwork(lnge) = iwork(lnge) + 1
92 130
IF (dabs(g0(i)) .LE. 0.0d0) zroot = .true.
93 IF (.NOT. zroot)
GO TO 190
103 IF (iwork(lirfnd) .EQ. 0)
GO TO 260
105 CALL ddatrp (tn, rwork(lt0), y, yp, neq, kold, phi, psi)
106 CALL g (neq, rwork(lt0), y, ng, g0, rpar, ipar)
107 iwork(lnge) = iwork(lnge) + 1
110 210
IF (dabs(g0(i)) .LE. 0.0d0) zroot = .true.
111 IF (.NOT. zroot)
GO TO 260
113 temp1 = dsign(hming,h)
114 rwork(lt0) = rwork(lt0) + temp1
115 IF ((rwork(lt0) - tn)*h .LT. 0.0d0)
GO TO 230
118 220 y(i) = y(i) + temp2*phi(i,2)
120 230
CALL ddatrp (tn, rwork(lt0), y, yp, neq, kold, phi, psi)
121 240
CALL g (neq, rwork(lt0), y, ng, g0, rpar, ipar)
122 iwork(lnge) = iwork(lnge) + 1
125 IF (dabs(g0(i)) .GT. 0.0d0)
GO TO 250
129 IF (.NOT. zroot)
GO TO 260
135 260
IF (tn .EQ. rwork(ltlast))
GO TO 390
139 IF (info3 .EQ. 1)
GO TO 310
140 IF ((tout - tn)*h .GE. 0.0d0)
GO TO 310
142 IF ((t1 - rwork(lt0))*h .LE. 0.0d0)
GO TO 390
143 CALL ddatrp (tn, t1, y, yp, neq, kold, phi, psi)
148 330
CALL g (neq, t1, y, ng, g1, rpar, ipar)
149 iwork(lnge) = iwork(lnge) + 1
153 CALL droots (ng, hming, jflag, rwork(lt0), t1, g0, g1, gx, x,
154 * jroot, iwork(limax), iwork(llast), rwork(lalphr),
156 IF (jflag .GT. 1)
GO TO 360
157 CALL ddatrp (tn, x, y, yp, neq, kold, phi, psi)
158 CALL g (neq, x, y, ng, gx, rpar, ipar)
159 iwork(lnge) = iwork(lnge) + 1
162 CALL dcopy (ng, gx, 1, g0, 1)
163 IF (jflag .EQ. 4)
GO TO 390
165 CALL ddatrp (tn, x, y, yp, neq, kold, phi, psi)
subroutine ddatrp(X, XOUT, YOUT, YPOUT, NEQ, KOLD, PHI, PSI)
subroutine drchek(JOB, G, NG, NEQ, TN, TOUT, Y, YP, PHI, PSI, KOLD, G0, G1, GX, JROOT, IRT, UROUND, INFO3, RWORK, IWORK, RPAR, IPAR)
subroutine droots(NG, HMIN, JFLAG, X0, X1, G0, G1, GX, X, JROOT, IMAX, LAST, ALPHA, X2)