{"id":772,"date":"2012-04-19T21:57:14","date_gmt":"2012-04-19T13:57:14","guid":{"rendered":"http:\/\/www.hsyyf.me\/?p=772"},"modified":"2012-04-24T20:23:39","modified_gmt":"2012-04-24T12:23:39","slug":"%e5%9b%9b%e9%98%b6%e9%be%99%e6%a0%bc%e5%ba%93%e5%a1%94%e6%b3%95%e8%a7%a3%e5%90%ab%e6%97%b6%e8%96%9b%e5%ae%9a%e8%b0%94%e6%96%b9%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.hsyyf.me\/?p=772","title":{"rendered":"\u56db\u9636\u9f99\u683c\u5e93\u5854\u6cd5\u89e3\u542b\u65f6\u859b\u5b9a\u8c14\u65b9\u7a0b"},"content":{"rendered":"<p style=\"text-align: left;\">\u56db\u9636\u9f99\u683c\u5e93\u5854\u6cd5\u89e3\u542b\u65f6\u859b\u5b9a\u8c14\u65b9\u7a0b\uff0c\u4e00\u7ef4\u7ebf\u6027\u8c10\u632f\u5b50\u9644\u52a0\u542b\u65f6\u9a71\u52a8\u529b\u3002<\/p>\n<p><code lang=\"fortran\">external f<br \/>\nparameter(n=100001,m=11)<br \/>\nDimension Y(m),D(m),z(m,n),b(m),c(m,n)<br \/>\ncomplex(8) y,d,z,b,h<br \/>\nreal(8) t,a<br \/>\nt=0.0d0<\/p>\n<p>do j=1,m<br \/>\nY(j)=(0.0,0.0)<br \/>\nenddo<br \/>\nY(1)=(1.0d0,0.0d0)<\/p>\n<p>h=2500.d0\/(n-1)<br \/>\ncall grkt1(t,y,m,h,n,z,f,d,b)<br \/>\nwrite(*,*)<br \/>\ncall Psi(z)<br \/>\nend<\/p>\n<p>subroutine Psi(z)<br \/>\nparameter(n=100001,m=11,pi=3.1415926d0)<br \/>\ncomplex(8) z(m,n),p(20,1000)<br \/>\nreal(8) a(m,n)<br \/>\ninteger t<\/p>\n<p>open(200,File='test.txt')<br \/>\nopen(201,File='test1.txt')<br \/>\nopen(202,File='test2.txt')<br \/>\nopen(203,File='test3.txt')<\/p>\n<p>do k=1,20,1<br \/>\ndo j=1,1000<br \/>\nx=-5.0d0+j*0.01d0<br \/>\nP(k,j)=(0.d0,0.d0)<br \/>\ndo i=1,m<br \/>\np(k,j)=p(k,j)+z(i,k*5000)\/sqrt((sqrt(pi)*(2**i)*JC(i)))*exp(-x*x\/2.0d0)*H(i,x*1.0)*exp((0.d0,-1.d0)*(2.d0*i+1.d0)*k*5000*(2500.d0\/(n-1)))<br \/>\n!p(k,j)=p(k,j)+z(i,k)\/sqrt((sqrt(pi)*(2**i)*JC(i)))*exp(-x*x\/2.0d0)*H(i,x*1.0)*exp((0.d0,-1.d0)*(2.d0*i+1.d0)*k*(2500.d0\/(n-1)))<br \/>\nenddo<br \/>\nenddo<br \/>\nenddo<\/p>\n<p>do j=1,1000<br \/>\nwrite(200,*)(-5.d0+j*0.01d0),(abs(p(i,j))**2,i=1,2)<br \/>\nwrite(201,*)(abs(p(i,j))**2,i=3,5)<br \/>\nwrite(202,*)(abs(p(i,j))**2,i=6,8)<br \/>\nwrite(203,*)(abs(p(i,j))**2,i=9,11)<br \/>\nenddo<\/p>\n<p>end subroutine<\/p>\n<p>subroutine F(t,y,m,d)<\/p>\n<p>Dimension Y(m),D(m)<br \/>\ncomplex(8) y,d<br \/>\nreal(8) t<br \/>\nD(1)=-(0.d0,1.d0)*g(t)*(Y(2)*sqrt(1.d0\/2.d0)*exp(-2.d0*(0,1)*t))<br \/>\ndo j=2,m-1<br \/>\nD(j)=-(0,1)*g(t)*(Y(j-1)*sqrt((j-1)\/2.d0)*exp(2.d0*(0,1)*t)+Y(j+1)*sqrt(j\/2.)*exp(-2.d0*(0,1)*t))<br \/>\nenddo<br \/>\nD(m)=-(0,1)*g(t)*(Y(m-1)*sqrt((m-1)\/2.d0)*exp(-2.d0*(0,1)*t))<br \/>\nreturn<br \/>\nend<\/p>\n<p>function g(t)<br \/>\nreal(8) g,t<br \/>\npi=3.1415926535d0<br \/>\nif(t&lt;=2000.d0)then<br \/>\ng=0.5*(1+sin(t\/2000.*pi-pi\/2.))<br \/>\n!\u00a0\u00a0 \u00a0g=t\/2000.d0<br \/>\nelse<br \/>\ng=1.00d0<br \/>\nendif<br \/>\nend<\/p>\n<p>real recursive function H(i,x) result(Hi)<br \/>\nselect case(i)<br \/>\ncase(1)<br \/>\nHi=1.0<br \/>\ncase(2)<br \/>\nHi=2.0*x<br \/>\ncase(3:)<br \/>\nHi=2*x*h(i-1,x)-2*(i-1)*H(i-2,x)<br \/>\nend select<br \/>\nend<\/p>\n<p>integer Recursive function JC(i) result(J)<br \/>\nif(i==0)then<br \/>\nJ=1<br \/>\nelse<br \/>\nJ=i*JC(i-1)<br \/>\nendif<br \/>\nend<\/p>\n<p>SUBROUTINE GRKT1(T,Y,M,H,N,Z,F,D,B)<br \/>\nDIMENSION Y(M),D(M),Z(M,N),A(4),B(M)<br \/>\ncomplex(8) Y,D,Z,A,B,H,X,TT<br \/>\nreal(8) t<br \/>\nA(1)=H\/2.0d0<br \/>\nA(2)=A(1)<br \/>\nA(3)=H<br \/>\nA(4)=H<br \/>\nDO I=1,M<br \/>\nZ(I,1)=Y(I)<br \/>\nenddo<br \/>\nX=T<br \/>\nDO J=2,N<br \/>\nCALL F(T,Y,M,D)<br \/>\nDO I=1,M<br \/>\nB(I)=Y(I)<br \/>\nenddo<br \/>\nDO K=1,3<br \/>\nDO I=1,M<br \/>\nY(I)=Z(I,J-1)+A(K)*D(I)<br \/>\nB(I)=B(I)+A(K+1)*D(I)\/3.0<br \/>\nenddo<br \/>\nTT=T+A(K)<br \/>\nCALL F(TT,Y,M,D)<br \/>\nenddo<br \/>\nDO I=1,M<br \/>\nY(I)=B(I)+H*D(I)\/6.0<br \/>\nenddo<br \/>\nDO I=1,M<br \/>\nZ(I,J)=Y(I)<br \/>\nenddo<br \/>\nT=T+H<br \/>\nenddo<br \/>\nT=X<br \/>\nRETURN<br \/>\nEND<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u56db\u9636\u9f99\u683c\u5e93\u5854\u6cd5\u89e3\u542b\u65f6\u859b\u5b9a\u8c14\u65b9\u7a0b\uff0c\u4e00\u7ef4\u7ebf\u6027\u8c10\u632f\u5b50\u9644\u52a0\u542b\u65f6\u9a71\u52a8\u529b\u3002 external f parameter(n= [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[16],"tags":[108,103],"class_list":["post-772","post","type-post","status-publish","format-standard","hentry","category-16","tag-fortran","tag-103"],"_links":{"self":[{"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/posts\/772","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=772"}],"version-history":[{"count":0,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/posts\/772\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=772"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=772"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=772"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}