2008年11月28日

bug of building vlist in PPM library.

Found a bug in PPM library of building vlist in function of "ppm_neighlist_vlist_*" of line
" n1 = Nm(1,idom)
n2 = Nm(1,idom)*Nm(2,idom)
nz = Nm(3,idom)
IF (ppm_dim .EQ. 2) THEN
n2 = 0
nz = 2
ENDIF "
The above line will have rank problem is ppm_dim == 2 ; Because the Nm is returned by function "ppm_neighlist_clist" for ppm_dim ==2 case, the length of first dimesnion is 2. so
the line Nz = Nm(3,idiom) will have problem.
suggested modification:
" n1 = Nm(1,idom)

IF (ppm_dim .EQ. 2) THEN
n2 = 0
nz = 2
ELSE
n2 = Nm(1,idom)*Nm(2,idom)
nz = Nm(3,idom)
ENDIF
"