385
K3=K2+NEQN
K4=K3+NEQN
K5=K4+NEQN
K6=K5+NEQN
K7=K6+1
CALL
RKFS(F,NEQN,Y,T,TOUT,RELERR,ABSERR,IFLAG,WORK(1),
&
WORK(K1M),WORK(K1),WORK(K2),WORK(K3),WORK(K4),WOR
K(K5),
&
WORK(K6),WORK(K7),IWORK(1),IWORK(2),IWORK(3),IWORK(4),
& IWORK(5))
RETURN
END
SUBROUTINE
RKFS(F,NEQN,Y,T,TOUT,RELERR,ABSERR,IFLAG,YP,H,F1,
& F2,F3,F4,F5,SAVRE,SAVAE,NFE,KOP,INIT,JFLAG,KFLAG)
LOGICAL HFAILD,OUTPUT
REAL
Y(NEQN),YP(NEQN),F1(NEQN),F2(NEQN),F3(NEQN),F4(NEQN),
& F5(NEQN)
EXTERNAL F
DATA REMIN,MAXNFE/1E-12,3000/
IF(NEQN.LT.1)GOTO 10
IF((RELERR.LT.0.).OR.(ABSERR.LT.0.))GOTO 10
MFLAG=IABS(IFLAG)
IF(MFLAG.EQ.0.OR.MFLAG.GT.8)GOTO 10
IF(MFLAG.NE.1)GOTO 20
EPS=1.
5 EPS=EPS/2.
EPSP1=EPS+1
IF(EPSP1.GT.1.)GOTO 5
U26=26*EPS
GOTO 50
10 IFGLAG=8
RETURN
20 IF(T.EQ.TOUT.AND.KFLAG.NE.3)GOTO 10
IF(MFLAG.NE.2) GOTO 25
IF(KFLAG.EQ.3.OR.INIT.EQ.0)GOTO 45
IF(KFLAG.EQ.4)GOTO 40
IF(KFLAG.EQ.5.AND.ABSERR.EQ.0.)GOTO 30