Community
cancel
Showing results for 
Search instead for 
Did you mean: 
guan90
Beginner
75 Views

Dynamic array treated as static arry in Intel Visual Fortran 2013

I have a subroutine (please see the below). After debug, there are 3 errors (please see the screenshot). Actually, x(dim, maxn) , vx(dim, maxn) are dynamic arrays, but they are treated as static arrays. Would you help me to make IVF 2013 recognize them as dynamic? Many thanks in advance.

 

 

 

implicit none
include 'param.inc'
subroutine shear_cavity(x, vx, mass, rho, p, u, itype, hsml, ntotal)
integer itype(maxn), ntotal
double precision mass(maxn), x(dim, maxn), vx(dim, maxn),
& rho(maxn), p(maxn), u(maxn), hsml(maxn)

integer i, j, d, m, n, mp, np, k
double precision xl, yl, dx, dy

c Giving mass and smoothing length as well as other data.

m = 41
n = 41
mp = m-1
np = n-1
ntotal = mp * np
xl = 1.e-3
yl = 1.e-3
dx = xl/mp
dy = yl/np


do i = 1, mp
do j = 1, np
k = j + (i-1)*np
x(1, k) = (i-1)*dx + dx/2.
x(2, k) = (j-1)*dy + dy/2.
enddo
enddo

do i = 1, mp*np
vx(1, i) = 0.
vx(2, i) = 0.
rho (i) = 1000.
mass(i) = dx*dy*rho(i)
p(i)= 0.
u(i)=357.1
itype(i) = 2
hsml(i) = dx
enddo

0 Kudos
0 Replies
Reply