def _calcFaceCenters(self): maskedFaceVertexIDs = MA.filled(self.faceVertexIDs, 0) faceVertexCoords = numerix.take(self.vertexCoords, maskedFaceVertexIDs, axis=1) if MA.getmask(self.faceVertexIDs) is False: faceVertexCoordsMask = numerix.zeros(numerix.shape(faceVertexCoords), 'l') else: faceVertexCoordsMask = \ numerix.repeat(MA.getmaskarray(self.faceVertexIDs)[numerix.newaxis,...], self.dim, axis=0) faceVertexCoords = MA.array(data=faceVertexCoords, mask=faceVertexCoordsMask) return MA.filled(MA.average(faceVertexCoords, axis=1))
def _calcCellCenters( self ): #cell center from bot1 and top1 (ignore coordinates of eventual bot2 and top2) tmp = numerix.take(self._faceCenters, self.cellFaceIDs[:2, :], axis=1) return MA.filled(MA.average(tmp, 1))
def _calcCellCenters(self): tmp = numerix.take(self._faceCenters, self.cellFaceIDs, axis=1) return MA.filled(MA.average(tmp, 1))