def __init__(self, dx = 1., nx = None): Grid1D.__init__(self, dx = dx, nx = nx) from fipy.tools import numerix if self.occupiedNodes == 1: self._connectFaces(numerix.nonzero(self.getFacesLeft()), numerix.nonzero(self.getFacesRight()))
def _getOverlap(self, overlap, procID, occupiedNodes): self.occupiedNodes = occupiedNodes if occupiedNodes == 1: return Grid1D._getOverlap(self, overlap, procID, occupiedNodes) else: return {'left': overlap, 'right': overlap}
def getCellCenters(self): return Grid1D.getCellCenters(self) % numerix.sum(self.globalNumberOfCells * self.args['dx'])
def _getGlobalOverlappingCellIDs(self): return Grid1D._getGlobalOverlappingCellIDs(self) % self.args['nx']