def createMesh(self): # Create BoundedMesh objects. from ExchangerLib import exchangeBoundedBox, createInterior, createEmptyBoundary ContainingCoupler.createMesh(self) # the bounding box of the mesh on remote solver2 self.remoteBBox2 = \ exchangeBoundedBox(self.globalBBox, self.communicator.handle(), self.srcCommList2[0].handle(), self.srcCommList2[0].size - 1) # the nodes within remoteBBox2 self.interior2, self.myBBox2 = createInterior(self.remoteBBox2, self.all_variables) # an empty boundary object,\ # which will be filled by a remote boundary obj. for i in range(self.remoteSize2): self.remoteBdryList2[i] = createEmptyBoundary() return
def createMesh(self): # Create BoundedMesh objects. from ExchangerLib import createGlobalBoundedBox, exchangeBoundedBox, createInterior, createEmptyBoundary # the bounding box of the mesh on this solver self.globalBBox = createGlobalBoundedBox(self.all_variables) # the bounding box of the mesh on the other solver self.remoteBBox = exchangeBoundedBox(self.globalBBox, self.communicator.handle(), self.srcCommList[0].handle(), self.srcCommList[0].size - 1) # the nodes within remoteBBox self.interior, self.myBBox = createInterior(self.remoteBBox, self.all_variables) self.remoteBdryList = range(self.remoteSize) for i in range(self.remoteSize): # an empty boundary object for remote velocity nodes # will be filled by a remote boundary obj. self.remoteBdryList[i] = createEmptyBoundary() return
def exchangeTemperature(self): if not self.inventory.exchange_initial_temperature: return from ExchangerLib import createInterior, Sink_create interior, bbox = createInterior(self.remoteBBox, self.all_variables) sink = Sink_create(self.sinkComm.handle(), self.remoteSize, interior) import Inlet inlet = Inlet.TInlet(interior, sink, self.all_variables) inlet.recv() inlet.impose() # Any modification of read-in temperature is done here # Note: modifyT is called after receiving unmodified T from CCPLR. # If T is modified before sending, ECPLR's T will lose sharp feature. # CCPLR has to call modifyT too to ensure consistent T field. #self.modifyT(self.globalBBox) return