       program tempcalc
c
c###################################################################
c
c  Creator : Chris Anderson
c  (C) UCLA 1997  7/16/97
c
c###################################################################
c
       implicit real*8 (a-h,o-z)
       parameter(m = 20, n = 20)
       real*8 T(m,n)
       real*8 work(m,n)
c
c      Set Problem parameters
c
       diffusivity = 0.1
       a = 0.0
       b = 1.0
       c = 0.0
       d = 1.0
c
c      Set Runtime parameters
c
       nSteps  = 100
       nOut    = 10
       dt      = 0.01
c
c      Open output file
c
       open(unit = 7, file = "fortout.dat")

       call initTemp(T,m,n,a,b,c,d)
       time  = 0.0

       do 100 k = 1,nSteps
       call evTemp(T,m,n,a,b,c,d,dt,diffusivity,work)
       time = time + dt

       if(mod(k,nOut).eq.0) then
       write(*,*) " Step ",k

       write(7,*) m
       write(7,*) n
       do 50 i = 1,m
       do 50 j = 1,n
         write(7,*) T(i,j)
50     continue
       write(7,*) time
       endif

100    continue
       stop
       end




