On Mar 19, 2007, at 6:17 PM, Chris Calebrese wrote:
X = mesh.getCellCenters()[0:nx*ny*nz,0]
In addition to what Daniel said, it's neither desired nor required to
do the "0:nx*ny*nz" bit. We make no guarantees about what the layout
of the cell centers (or any other mesh property) is, either now or
into the future (it is entirely conceivable that some future FiPy
might lay out its Grid3D mesh like [0:nx,0:ny,0:nz,0:dim]). What we
do promise is that they will always be laid out self-consistently and
that the last index of vectors will get you the appropriate x, y, z
component (modulo the dimensionality of your mesh).
You'll always get the right thing if you do
X = mesh.getCellCenters()[...,0]