资源描述:
《方向相的同步图和程序---程兴超》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、(一)前三幅图的程序programcoupleimplicitnonereal,parameter::e1=0.6,u=3.7integer,parameter::con=1real,dimension(100,100)::x2,x3integer,dimension(100,100)::x1integeri,j,t,time,kk=time()open(10,file="output10.txt")doj=1,100doi=1,100x2(i,j)=ran(k)enddoenddodot=1,20000doj=1,100doi=1,1001if(i==1.and.j==1)thenx3(i,
2、j)=u*x2(i,j)*(1-x2(i,j))+e1*u*(x2(i+1,j)*(1-x2(i+1,j))+x2(100,j)*(1-x2(100,j))+x2(i,j+1)*(1-x2(i,j+1))+x2(i,100)*(1-x2(i,100))-4*x2(i,j)*(1-x2(i,j)))/42elseif(i==1.and.j==100)thenx3(i,j)=u*x2(i,j)*(1-x2(i,j))+e1*u*(x2(i+1,j)*(1-x2(i+1,j))+x2(100,j)*(1-x2(100,j))+x2(i,1)*(1-x2(i,1))+x2(i,j-1)*(1-x2(i
3、,j-1))-4*x2(i,j)*(1-x2(i,j)))/43elseif(i==100.and.j==1)thenx3(i,j)=u*x2(i,j)*(1-x2(i,j))+e1*u*(x2(1,j)*(1-x2(1,j))+x2(i-1,j)*(1-x2(i-1,j))+x2(i,j+1)*(1-x2(i,j+1))+x2(i,100)*(1-x2(i,100))-4*x2(i,j)*(1-x2(i,j)))/44elseif(i==100.and.j==100)thenx3(i,j)=u*x2(i,j)*(1-x2(i,j))+e1*u*(x2(1,j)*(1-x2(1,j))+x2(
4、i-1,j)*(1-x2(i-1,j))+x2(i,1)*(1-x2(i,1))+x2(i,j-1)*(1-x2(i,j-1))-4*x2(i,j)*(1-x2(i,j)))/45elseif(i==1.and.j/=1.and.j/=100)thenx3(i,j)=u*x2(i,j)*(1-x2(i,j))+e1*u*(x2(i+1,j)*(1-x2(i+1,j))+x2(100,j)*(1-x2(100,j))+x2(i,j+1)*(1-x2(i,j+1))+x2(i,j-1)*(1-x2(i,j-1))-4*x2(i,j)*(1-x2(i,j)))/46elseif(i==100.and
5、.j/=1.and.j/=100)thenx3(i,j)=u*x2(i,j)*(1-x2(i,j))+e1*u*(x2(1,j)*(1-x2(1,j))+x2(i-1,j)*(1-x2(i-1,j))+x2(i,j+1)*(1-x2(i,j+1))+x2(i,j-1)*(1-x2(i,j-1))-4*x2(i,j)*(1-x2(i,j)))/47elseif(i/=1.and.i/=100.and.j==1)thenx3(i,j)=u*x2(i,j)*(1-x2(i,j))+e1*u*(x2(i+1,j)*(1-x2(i+1,j))+x2(i-1,j)*(1-x2(i-1,j))+x2(i,j
6、+1)*(1-x2(i,j+1))+x2(i,100)*(1-x2(i,100))-4*x2(i,j)*(1-x2(i,j)))/48elseif(i/=1.and.i/=100.and.j==100)thenx3(i,j)=u*x2(i,j)*(1-x2(i,j))+e1*u*(x2(i+1,j)*(1-x2(i+1,j))+x2(i-1,j)*(1-x2(i-1,j))+x2(i,1)*(1-x2(i,1))+x2(i,j-1)*(1-x2(i,j-1))-4*x2(i,j)*(1-x2(i,j)))/49elseif(i/=1.and.i/=100.and.j/=1.and.j/=100
7、)thenx3(i,j)=u*x2(i,j)*(1-x2(i,j))+e1*u*(x2(i+1,j)*(1-x2(i+1,j))+x2(i-1,j)*(1-x2(i-1,j))+x2(i,j+1)*(1-x2(i,j+1))+x2(i,j-1)*(1-x2(i,j-1))-4*x2(i,j)*(1-x2(i,j)))/4endifif(t==20000)thenif(x3(i,j)-x2(i,j)