On May 1, 2009, at 9:01 AM, david wende wrote:
In meantime, how do I select a subset of faces from 3D mesh?
[1] m3D = Grid3D(nx=nx, ny=ny, nz=nz)
[2] x, y, z = m3D.getCellCenters()
[3] facesRight = m3D.getFacesRight()
[4] facesLeft = (m3D.getFacesLeft() & (x < 2) )
Line 3 is OK.
Line 4 I get an error message:
"ValueError: shape mismatch: objects cannot be broadcast to a single
shape"
Cells get selected with Cell centers. Faces get selected with Face
centers.
Try:
X, Y, Z = m3D.getFaceCenters()
facesLeft = (m3D.getFacesLeft() & (X < 2) )
x, y, and z (or X, Y, and Z) are not mathematical abstractions of the
abscissae, they are arrays of coordinates representing the discrete
points at the centers of the Cells or the centers of the Faces.