      SUBROUTINE INITAL
C...
C...  INITIAL CONDITIONS FOR CARTESIAN COORDINATES IN TWO DIMENSIONS
C...
      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
      PARAMETER (NX=11,NY=11)
      COMMON/T/       TIME,      NSTOP,     NORUN
     +      /Y/   T(NX,NY)
     +      /F/  TT(NX,NY)
     +      /S/  TX(NX,NY), TXX(NX,NY),  TY(NX,NY), TYY(NX,NY)
     +      /P/       HX0K
     +      /I/         ND,         NC
C...
C...  SELECT BIOT NUMBER, H*X0/K
      IF(NORUN.EQ.1)HX0K=0.0D0
      IF(NORUN.EQ.2)HX0K=1.0D0/6.0D0
      IF(NORUN.EQ.3)HX0K=1.0D0/2.0D0
      IF(NORUN.EQ.4)HX0K=1.0D0/1.0D0
      IF(NORUN.EQ.5)HX0K=1.0D0/0.5D0
      IF(NORUN.EQ.6)HX0K=1.0D0/0.05D0
C...
C...  INITIAL CONDITION
      DO 1 I=1,NX
      DO 1 J=1,NY
         T(I,J)=1.0D0
1     CONTINUE
      RETURN
      END
      SUBROUTINE DERV
C...
C...  TEMPORAL DERIVATIVES FOR CARTESIAN COORDINATES
C...
      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
      PARAMETER (NX=11,NY=11)
      COMMON/T/       TIME,      NSTOP,      NORUN
     +      /Y/   T(NX,NY)
     +      /F/  TT(NX,NY)
     +      /S/  TX(NX,NY), TXX(NX,NY),  TY(NX,NY), TYY(NX,NY)
     +      /P/       HX0K
     +      /I/         ND,         NC
C...
C...  BOUNDARY CONDITION AT X = 0
      NL=2
      DO 1 J=1,NY
         TX(1,J)=0.0D0
1     CONTINUE
C...
C...  BOUNDARY CONDITION AT X = X0
      DO 2 J=1,NY
         IF(NORUN.NE.6)THEN
            NU=2
            TX(NX,J)=-HX0K*T(NX,J)
         ELSE IF(NORUN.EQ.6)THEN
            NU=1
            T(NX,J)=0.0D0
         END IF
2     CONTINUE
C...
C...  TXX
      CALL DSS028(0.0D0,1.0D0,NX,NY,1,T,TX,TXX,NL,NU)
C...
C...  BOUNDARY CONDITION AT Y = 0
      NL=2
      DO 3 I=1,NX
         TY(I,1)=0.0D0
3     CONTINUE
C...
C...  BOUNDARY CONDITION AT Y = Y0
      DO 4 I=1,NX
         IF(NORUN.NE.6)THEN
            NU=2
            TY(I,NY)=-HX0K*T(I,NY)
         ELSE IF(NORUN.EQ.6)THEN
            NU=1
            T(I,NY)=0.0D0
         END IF
4     CONTINUE
C...
C...  TYY
      CALL DSS028(0.0D0,1.0D0,NX,NY,2,T,TY,TYY,NL,NU)
C...
C...  FOURIER'S SECOND LAW
      DO 5 I=1,NX
      DO 5 J=1,NY
         TT(I,J)=TXX(I,J)+TYY(I,J)
5       CONTINUE
      RETURN
      END
      SUBROUTINE PRINT(NI,NO)
C...
C...  WRITING SOLUTION FOR CARTESIAN COORDINATES
C...
      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
      PARAMETER (NX=11,NY=11)
      COMMON/T/       TIME,      NSTOP,      NORUN
     +      /Y/   T(NX,NY)
     +      /F/  TT(NX,NY)
     +      /S/  TX(NX,NY), TXX(NX,NY),  TY(NX,NY), TYY(NX,NY)
     +      /P/       HX0K
     +      /I/         ND,         NC
C...
C...  MONITOR OUTPUT
      IF(TIME.LT.0.001D0)WRITE(*,2)HX0K
2     FORMAT(' H*X0/K = ',F8.3,'  FROM PRINT')
      WRITE(*,1)TIME,T(1,1),T(NX,NY)
C...
C...  WRITE NUMERICAL SOLUTION FOR 11 X 11 GRID POINTS
      WRITE(NO,1)TIME,T(1,1),T(NX,NY)
1     FORMAT(3F10.5)
      RETURN
      END
