def initializeElasticityLocal(self): for cell in self.cellList: elasticityDataList = self.getElasticityDataList(cell) for elasticityData in elasticityDataList: # visiting all elastic links of 'cell' targetLength = elasticityData.targetLength elasticityData.targetLength = 6.0 elasticityData.lambdaLength = 200.0 elasticityNeighbor = elasticityData.neighborAddress # now we set up elastic link data stored in neighboring cell neighborElasticityData = None neighborElasticityDataList = self.getElasticityDataList( elasticityNeighbor) for neighborElasticityDataTmp in neighborElasticityDataList: if not CompuCell.areCellsDifferent( neighborElasticityDataTmp.neighborAddress, cell): neighborElasticityData = neighborElasticityDataTmp break if neighborElasticityData is None: print "None Type returned. Problems with FemDataNeighbors initialization or sets of elasticityNeighborData are corrupted" sys.exit() neighborElasticityData.targetLength = 6.0 neighborElasticityData.lambdaLength = 200.0
def initializeElasticityLocal(self): for cell in self.cellList: elasticityDataList=self.getElasticityDataList(cell) for elasticityData in elasticityDataList: # visiting all elastic links of 'cell' targetLength=elasticityData.targetLength elasticityData.targetLength=6.0 elasticityData.lambdaLength=200.0 elasticityNeighbor=elasticityData.neighborAddress # now we set up elastic link data stored in neighboring cell neighborElasticityData=None neighborElasticityDataList=self.getElasticityDataList(elasticityNeighbor) for neighborElasticityDataTmp in neighborElasticityDataList: if not CompuCell.areCellsDifferent(neighborElasticityDataTmp.neighborAddress,cell): neighborElasticityData=neighborElasticityDataTmp break if neighborElasticityData is None: print "None Type returned. Problems with FemDataNeighbors initialization or sets of elasticityNeighborData are corrupted" sys.exit() neighborElasticityData.targetLength=6.0 neighborElasticityData.lambdaLength=200.0
def calculateHTBL(self): cellSurfaceManualCalculation = 0 pt = CompuCell.Point3D() for x in xrange(self.dim.x): for y in xrange(self.dim.y): for z in xrange(self.dim.z): cell = self.cellField[x, y, z] if cell: for pixelNeighbor in self.getPixelNeighborsBasedOnNeighborOrder(pt, 1): nCell = self.cellField[pixelNeighbor.pt.x, pixelNeighbor.pt.y, pixelNeighbor.pt.z] if CompuCell.areCellsDifferent(nCell, cell): cellSurfaceManualCalculation += 1 return cellSurfaceManualCalculation
def calculateHTBL(self): cellSurfaceManualCalculation = 0 pt = CompuCell.Point3D() for x in xrange(self.dim.x): for y in xrange(self.dim.y): for z in xrange(self.dim.z): cell = self.cellField[x, y, z] if cell: for pixelNeighbor in self.getPixelNeighborsBasedOnNeighborOrder( pt, 1): nCell = self.cellField[pixelNeighbor.pt.x, pixelNeighbor.pt.y, pixelNeighbor.pt.z] if CompuCell.areCellsDifferent(nCell, cell): cellSurfaceManualCalculation += 1 return cellSurfaceManualCalculation