Hello,

It might be just my wrong interpretation. The Grid3D getFaceCenters doesn't
appear to give correct
printout result when the mesh is offset. Below is my script:

from fipy import *

region_3D =  Grid3D(dx=1,dy=1,dz=1,nx=2,ny=2,nz=2) + ((0,),(0,),(2,))
x,y,z = region_3D.getFaceCenters()

Then, if I print out z vector, I don't see offset being applied on z-axis:
z = [ 0. ,  0. ,  0. ,  0. ,  1. ,  1. ,  1. ,  1. ,  2. ,  2. ,  2. ,
         2. ,  0.5,  0.5,  0.5,  0.5,  0.5,  0.5,  1.5,  1.5,  1.5,  1.5,
         1.5,  1.5,  0.5,  0.5,  0.5,  0.5,  0.5,  0.5,  1.5,  1.5,  1.5,
         1.5,  1.5,  1.5]


The getCellCenters works just fine. The z vector from getCellCenters gives:

x,y,z =  region_3D.getCellCenters()
array([ 2.5,  2.5,  2.5,  2.5,  3.5,  3.5,  3.5,  3.5])


Thanks in advance for your help,
Tanto

Reply via email to