早教吧作业答案频道 -->其他-->
急求fortran大神帮忙,编译出现Theshapesofthearrayexpressionsdonotconform.[U]ubroutineInit(U,dx,dy)implicitdoubleprecision(a-h,o-z)common/Gdef/Gama,Pi,Jx,Jy,dLx,dLy,TT,Sfdimension::U(Jx+1,Jy+1,4)u=3.0v=0.0rou=1.0p=0.71429dx=dLx/
题目详情
急求fortran大神帮忙,编译出现The shapes of the array expressions do not conform. [U]
ubroutine Init(U,dx,dy)
implicit double precision (a-h,o-z)
common/G_def/Gama,Pi,Jx,Jy,dLx,dLy,TT,Sf
dimension ::U(Jx+1,Jy+1,4)
u=3.0
v=0.0
rou=1.0
p=0.71429
dx=dLx/Jx
dy=dLy/Jy
do i=2,Jx/4
do j=1,Jy
U(i,j,1)=rou
U(i,j,2)=rou*u
U(i,j,3)=rou*v
U(i,j,4)=p/(Gama-1.0)+rou*(u*u+v*v)/2.0
end do
end do
do i=Jx/4+1,Jx
do j=Jy/5+1,Jy
U(i,j,1)=rou
U(i,j,2)=rou*u
U(i,j,3)=rou*v
U(i,j,4)=p/(Gama-1.0)+rou*(u*u+v*v)/2.0
end do
end do
ubroutine Init(U,dx,dy)
implicit double precision (a-h,o-z)
common/G_def/Gama,Pi,Jx,Jy,dLx,dLy,TT,Sf
dimension ::U(Jx+1,Jy+1,4)
u=3.0
v=0.0
rou=1.0
p=0.71429
dx=dLx/Jx
dy=dLy/Jy
do i=2,Jx/4
do j=1,Jy
U(i,j,1)=rou
U(i,j,2)=rou*u
U(i,j,3)=rou*v
U(i,j,4)=p/(Gama-1.0)+rou*(u*u+v*v)/2.0
end do
end do
do i=Jx/4+1,Jx
do j=Jy/5+1,Jy
U(i,j,1)=rou
U(i,j,2)=rou*u
U(i,j,3)=rou*v
U(i,j,4)=p/(Gama-1.0)+rou*(u*u+v*v)/2.0
end do
end do
▼优质解答
答案和解析
U和u一样,fortran不分大小写的,最后几行都是数等于数组,所以错了
看了急求fortran大神帮忙,编...的网友还看了以下:
英语单词填空(组成单词)1)d.l.e.d.m.i2)l.e.p.o.i.ee3)u.y.g.o. 2020-04-25 …
选出划线部分读音不同的选项1.t(i)mev(i)olinfavor(i)tek(i)nd2.sh 2020-05-14 …
已知集合A、B满足A∪B=U(U为全集),则下列关系一定正确的是A B⊆ A补 B A∩B= 空集 2020-05-15 …
∵EM是⊙O的切线,怎么推出EB•EC=EM2①?,看题后回答.(2005•温州)如图,已知四边形 2020-05-21 …
寻一句话或几句话中包含如下不同韵母的句子:第1组:a,o,e,i,u,v.第二组:ai,ao,an 2020-06-18 …
如果O+O=U+U+U,O+Z=U+U+U+U,那么Z+Z+U=()个O.如果设U=6,那么O=( 2020-06-18 …
用以下英文宇母填在上a,a,a,a,a,a,b,e,e,d,e,e,e,e,e,e,f,g,g用以 2020-06-24 …
函数w=1/z,把z平面上x^2+(y-1)^2=4映射成w平面上怎样的曲线?z=1/w=1/(u 2020-07-30 …
大气臭氧层的反应是:O+O3=2O2△H,该反应的能量变化如图所示,下列叙述中,正确的是()A.O+ 2020-10-31 …
纯电感交变电路中[U=U反设有纯电感交变电路,由于无电阻,电能全部转化为磁场能.这样一来就得到U=U 2020-11-27 …