dimension t(30,30), t1(30,30) C********************************************************** open(10, FILE='in.dat', STATUS='UNKNOWN') read(10,*) im6, im11, im16, nend, nout, c, dx, tb, qb close(10) do 10 i=0,im16+1 do 10 j=0,im16+1 t(i,j)=0.0 10 continue do 20 i=im6,im11 do 20 j=im6,im11 if(i.eq.im6) then t(i,j)=7 endif if(i.eq.im11) then t(i,j)=3 endif if(j.eq.im6) then t(i,j)=7 endif if(j.eq.im11) then t(i,j)=3 endif 20 continue t(6,11)=5 t(11,6)=5 n=0 open(11, FILE='out.dat', STATUS='UNKNOWN') go to 200 C********************************************************** 100 n=n+1 do 110 i=1,im6-1 do 110 j=1,im16 if(i.eq.1) then tip=t(i+1,j)+2.0*dx*qb else tip=t(i-1,j) endif if(j.eq.1) then tip=t(i,j+1)+2.0*dx*qb else tip=t(i,j-1) endif if(j.eq.im16) then tip=t(i,j-1)+2.0*dx*qb else tip=t(i,j+1) endif t1(i,j)=t(i,j)+c*(t(i+1,j)-2.0*t(i,j) # +tip+t(i,j-1)-2.0*t(i,j)+tjp) 110 continue do 120 i=1,im16 do 120 j=im11+1,im16 if(j.eq.im16) then tip=t(i,j-1)+2.0*dx*qb else tip=t(i,j+1) endif if(i.eq.1) then tip=t(i+1,j)+2.0*dx*qb else tip=t(i-1,j) endif if(i.eq.im16) then tip=t(i-1,j)+2.0*dx*qb else tip=t(i+1,j) endif t1(i,j)=t(i,j)+c*(t(i-1,j)-2.0*t(i,j) # +tip+t(i,j-1)-2.0*t(i,j)+tjp) 120 continue do 130 i=im11+1,im16 do 130 j=1,im16 if(i.eq.im16) then tip=t(i-1,j)+2.0*dx*qb else tip=t(i+1,j) endif if(j.eq.im16) then tip=t(i,j-1)+2.0*dx*qb else tip=t(i,j+1) endif if(j.eq.1) then tip=t(i,j+1)+2.0*dx*qb else tip=t(i,j-1) endif t1(i,j)=t(i,j)+c*(t(i-1,j)-2.0*t(i,j) # +tip+t(i,j-1)-2.0*t(i,j)+tjp) 130 continue do 140 i=1,im16 do 140 j=1,im6-1 if(j.eq.1) then tip=t(i,j+1)+2.0*dx*qb else tip=t(i,j-1) endif if(i.eq.im16) then tip=t(i-1,j)+2.0*dx*qb else tip=t(i+1,j) endif if(i.eq.1) then tip=t(i+1,j)+2.0*dx*qb else tip=t(i-1,j) endif t1(i,j)=t(i,j)+c*(t(i-1,j)-2.0*t(i,j) # +tip+t(i,j+1)-2.0*t(i,j)+tjp) 140 continue C********************************************************** do 150 i=1,im16 do 150 j=1,im16 t(i,j)=t1(i,j) 150 continue do 170 i=im6,im11 do 170 j=im6,im11 if(i.eq.im6) then t(i,j)=7 endif if(i.eq.im11) then t(i,j)=3 endif if(j.eq.im6) then t(i,j)=7 endif if(j.eq.im11) then t(i,j)=3 endif 170 continue t(6,11)=5 t(11,6)=5 C********************************************************** 200 nn=mod(n,nout) if (nn.eq.0)then write(*,*) n do 210 i=1,im16 do 210 j=1,im16 write(*,*) i,j,t(i,j) 210 continue endif C********************************************************** if (n.lt.nend) go to 100 close(11) stop end