|
请教大神出现下面的问题怎么解决,目前调试定位错误为
定义数组这一行代码出错: real*8::w_laplace(4,ncells)
提示信息如下:
子程序全部代码如下:
subroutine artificial_d
use global
implicit none
integer::i,k,p
real*8::w_laplace(4,ncells),d2(4),d4(4),shock_v,epson2,epson4
real*8::u,v,c,pp,pk
w_laplace=0.
d=0.
do i=1,nedges
k=iedge(3,i)
p=iedge(4,i)
if(p>0) then
w_laplace(:,k)=w_laplace(:,k)+0.5*(w(:,p)-w(:,k))
w_laplace(:,p)=w_laplace(:,p)+0.5*(w(:,k)-w(:,p))
end if
end do
do i=1,nedges
k=iedge(3,i)
p=iedge(4,i)
end do
delta_t=cfl*vol/scale_a
return
end subroutine
|
|