00001 SUBROUTINE INTDY (T, K, YH, NYH, DKY, IFLAG)
00002
00003 INTEGER K, NYH, IFLAG
00004 INTEGER IOWND, IOWNS,
00005 1 ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L, METH, MITER,
00006 2 MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU
00007 INTEGER I, IC, J, JB, JB2, JJ, JJ1, JP1
00008 DOUBLE PRECISION T, YH, DKY
00009 DOUBLE PRECISION ROWNS,
00010 1 CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND
00011 DOUBLE PRECISION C, R, S, TP
00012 DIMENSION YH(NYH,*), DKY(*)
00013 COMMON /LS0001/ ROWNS(209),
00014 2 CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND,
00015 3 IOWND(14), IOWNS(6),
00016 4 ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L, METH, MITER,
00017 5 MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 IFLAG = 0
00039 IF (K .LT. 0 .OR. K .GT. NQ) GO TO 80
00040 TP = TN - HU - 100.0D0*UROUND*(TN + HU)
00041 IF ((T-TP)*(T-TN) .GT. 0.0D0) GO TO 90
00042
00043 S = (T - TN)/H
00044 IC = 1
00045 IF (K .EQ. 0) GO TO 15
00046 JJ1 = L - K
00047 DO 10 JJ = JJ1,NQ
00048 10 IC = IC*JJ
00049 15 C = DBLE(IC)
00050 DO 20 I = 1,N
00051 20 DKY(I) = C*YH(I,L)
00052 IF (K .EQ. NQ) GO TO 55
00053 JB2 = NQ - K
00054 DO 50 JB = 1,JB2
00055 J = NQ - JB
00056 JP1 = J + 1
00057 IC = 1
00058 IF (K .EQ. 0) GO TO 35
00059 JJ1 = JP1 - K
00060 DO 30 JJ = JJ1,J
00061 30 IC = IC*JJ
00062 35 C = DBLE(IC)
00063 DO 40 I = 1,N
00064 40 DKY(I) = C*YH(I,JP1) + S*DKY(I)
00065 50 CONTINUE
00066 IF (K .EQ. 0) RETURN
00067 55 R = H**(-K)
00068 DO 60 I = 1,N
00069 60 DKY(I) = R*DKY(I)
00070 RETURN
00071
00072 80 CALL XERRWD('INTDY-- K (=I1) ILLEGAL ',
00073 1 30, 51, 0, 1, K, 0, 0, 0.0D0, 0.0D0)
00074 IFLAG = -1
00075 RETURN
00076 90 CALL XERRWD('INTDY-- T (=R1) ILLEGAL ',
00077 1 30, 52, 0, 0, 0, 0, 1, T, 0.0D0)
00078 CALL XERRWD(
00079 1 ' T NOT IN INTERVAL TCUR - HU (= R1) TO TCUR (=R2) ',
00080 1 60, 52, 0, 0, 0, 0, 2, TP, TN)
00081 IFLAG = -2
00082 RETURN
00083
00084 END