*DECK PRO2P8
      SUBROUTINE INITAL
C...
C...  SUBROUTINE INITAL IS CALLED BY MAIN PROGRAM PRO1P3 TO DEFINE THE
C...  INITIAL CONDITION IN THE NUMOL SOLUTION OF EQUATIONS (2.49) TO
C...  (2.56)
C...
      COMMON/T/      T,  NSTOP,  NORUN
     1      /Y/  U(21),  V(21)
     2      /F/ UT(21), VT(21)
     3     /SD/ UX(21),UXX(21), VX(21),VXX(21)
     4      /X/  X(21)
     5      /P/      N,     E4
C...
C...  NUMBER OF GRID POINTS AND SPATIAL INCREMENT
      N=21
      DX=1./FLOAT(N-1)
C...
C...  VALUES OF X ALONG THE SPATIAL GRID
      DO 1 I=1,N
      X(I)=DX*FLOAT(I-1)
1     CONTINUE
C...
C...  INITIAL CONDITIONS, EQUATIONS (2.51) AND (2.52)
      DO 2 I=1,N
      U(I)=1.
      V(I)=1.
2     CONTINUE
C...
C...  CONSTANT E**4 USED IN BOUNDARY CONDITION (2.56)
      E4=EXP(1.)**4
      RETURN
      END
      SUBROUTINE DERV
C...
C...  SUBROUTINE DERV IS CALLED BY INTEGRATOR RKF45 TO DEFINE THE
C...  ODES IN THE NUMOL SOLUTION OF EQUATIONS (2.49) TO (2.56)
C...
      COMMON/T/      T,  NSTOP,  NORUN
     1      /Y/  U(21),  V(21)
     2      /F/ UT(21), VT(21)
     3     /SD/ UX(21),UXX(21), VX(21),VXX(21)
     4      /X/  X(21)
     5      /P/      N,     E4
C...
C...  BOUNDARY CONDITIONS AT X = 0, EQUATIONS (2.53) AND (2.54)
       U(1)=1.
      UT(1)=0.
       V(1)=1.
      VT(1)=0.
C...
C...  FIRST ORDER SPATIAL DERIVATIVES
      XL=X(1)
      XU=X(N)
C...
C...     THREE POINT CENTERED DIFFERENCES
      IF(NORUN.EQ.1)CALL DSS002(XL,XU,N,U,UX)
      IF(NORUN.EQ.1)CALL DSS002(XL,XU,N,V,VX)
C...
C...     FIVE POINT CENTERED DIFFERENCES
      IF(NORUN.EQ.2)CALL DSS004(XL,XU,N,U,UX)
      IF(NORUN.EQ.2)CALL DSS004(XL,XU,N,V,VX)
C...
C...  BOUNDARY CONDITIONS AT X = 1, EQUATIONS (2.55) AND (2.56)
      UX(N)=3.-3.*U(N)
      VX(N)=E4*(U(N)-1.)/5.
C...
C...  SECOND ORDER SPATIAL DERIVATIVES
C...
C...     THREE POINT CENTERED DIFFERENCES
      IF(NORUN.EQ.1)CALL DSS002(XL,XU,N,VX,VXX)
C...
C...     FIVE POINT CENTERED DIFFERENCES
      IF(NORUN.EQ.2)CALL DSS004(XL,XU,N,VX,VXX)
C...
C...  NOTE THAT ARRAY VX IS USED AS TEMPORARY STORAGE IN THE CALCULATION
C...  OF THE TERM ((V-1)*U )  WHICH IS FINALLY STORED IN ARRAY UXX
C...                      X X
      DO 1 I=1,N
      VX(I)=(V(I)-1.)*UX(I)
1     CONTINUE
      IF(NORUN.EQ.1)CALL DSS002(XL,XU,N,VX,UXX)
      IF(NORUN.EQ.2)CALL DSS004(XL,XU,N,VX,UXX)
C...
C...  PDES, EQUATIONS (2.49) AND (2.50)
      DO 3 I=2,N
      EX=EXP(-4.*X(I))
      UT(I)=UXX(I)+(16.*X(I)*T-2.*T-16.*(V(I)-1.))*(U(I)-1.)+10.*X(I)*EX
      VT(I)=VXX(I)+UX(I)+4.*U(I)-4.+X(I)**2-2.*T-10.*T*EX
3     CONTINUE
      RETURN
      END
      SUBROUTINE PRINT(NI,NO)
C...
C...  SUBROUTINE PRINT IS CALLED BY MAIN PROGRAM PRO1P3 TO PRINT THE
C...  NUMOL SOLUTION OF EQUATIONS (2.49) TO (2.56)
C...
      COMMON/T/      T,  NSTOP,  NORUN
     1      /Y/  U(21),  V(21)
     2      /F/ UT(21), VT(21)
     3     /SD/ UX(21),UXX(21), VX(21),VXX(21)
     4      /X/  X(21)
     5      /P/      N,     E4
     6      /A/ UA(21), DU(21), VA(21), DV(21)
C...
C...  PRINT A HEADING FOR THE NUMERICAL AND ANALYTICAL SOLUTIONS
      IF(T.LT.0.01)WRITE(NO,1)
1     FORMAT('  U =  NUMERICAL U(X,T)',/,
     1       ' UA = ANALYTICAL U(X,T)',/,
     2       ' DIFF U = U - UA       ',//,
     3       '  V =  NUMERICAL V(X,T)',/,
     4       ' VA = ANALYTICAL V(X,T)',/,
     5       ' DIFF V = V - VA      ',//,
     6       3X,'T',8X,'X',8X,'U',7X,'UA',5X,'DIFF U',
     7                     8X,'V',7X,'VA',5X,'DIFF V')
C...
C...  ANALYTICAL SOLUTIONS (2.57) AND (2.58), DIFFERENCES BETWEEN THE
C...  NUMERICAL AND ANALYTICAL SOLUTIONS
      DO 2 I=1,N,10
      UA(I)=1.+10.*X(I)*T*EXP(-4.*X(I))
      DU(I)=U(I)-UA(I)
      VA(I)=1.+(X(I)**2)*T
      DV(I)=V(I)-VA(I)
2     CONTINUE
C...
C...  PRINT THE NUMERICAL SOLUTION, ANALYTICAL SOLUTION, DIFFERENCE
C...  BETWEEN THE SOLUTIONS
      WRITE(NO,3)(T,X(I),U(I),UA(I),DU(I),V(I),VA(I),DV(I),I=1,N,10)
3     FORMAT(F4.1,F9.3,2F9.4,E11.3,2F9.4,E11.3)
      WRITE(NO,4)
4     FORMAT(' ')
      RETURN
      END
