3 double precision, allocatable
,dimension(:,:)::t0
,t1
,mask
,r11
,r12
,r13
,r21
,r23
,r31
,r32
,r33
4 integer::m
,n
,i
,j
,k
,nsteps
,changed
,masked
5 double precision::diff
,a
6 open(1,file
='r.dat',form
='unformatted',status
='old')
28 open(1,file
='in.dat',form
='unformatted',status
='old')
34 t1
=t0
; ! keep old where not updated
42 t1(i
,j
)=min(t0(i
-1,j
)+r32(i
-1,j
), &
43 t0(i
+1,j
)+r12(i
+1,j
), &
44 t0(i
,j
-1)+r23(i
,j
-1), &
45 t0(i
,j
+1)+r21(i
,j
+1), &
46 t0(i
-1,j
-1)+r33(i
-1,j
-1), &
47 t0(i
+1,j
-1)+r13(i
+1,j
-1), &
48 t0(i
-1,j
+1)+r31(i
-1,j
+1), &
49 t0(i
+1,j
+1)+r11(i
+1,j
+1))
50 a
=abs(t1(i
,j
)-t0(i
,j
))
61 print *,'iter ',k
,' diff ',diff
,' changed ',changed
,' masked ',masked
63 open(1,file
='out.dat',form
='unformatted',status
='unknown')
66 end program sfire_simple