示例#1
0
    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()))
示例#2
0
 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}
示例#3
0
 def getCellCenters(self):
     return Grid1D.getCellCenters(self) % numerix.sum(self.globalNumberOfCells * self.args['dx'])
示例#4
0
 def _getGlobalOverlappingCellIDs(self):
     return Grid1D._getGlobalOverlappingCellIDs(self) % self.args['nx']