def findLayout(self, layout): import ExchangerLib if layout.coarse: self.exchanger = self.inventory.coarse self.communicator = layout.coarse self.all_variables = ExchangerLib.CoarsereturnE() elif layout.fine: self.exchanger = self.inventory.fine self.communicator = layout.fine self.all_variables = ExchangerLib.FinereturnE() else: import journal journal.warning(self.name).log("node '%d' is an orphan" % layout.rank) self.intercomm = layout.intercomm self.rank = layout.rank self.nodes = layout.nodes self.leader = layout.leader self.remoteLeader = layout.remoteLeader print "%s exchanger: rank=%d leader=%d remoteLeader=%d" % ( self.exchanger.name, self.rank, self.leader, self.remoteLeader) return
def __init__(self, source, all_variables): import ExchangerLib self._handle = ExchangerLib.VOutlet_create(source, all_variables) return
def send(self): import ExchangerLib ExchangerLib.Outlet_send(self._handle) return
fine = pyre.inventory.facility("fine", factory=Coupler.embeddedcoupler, args=("fine","fine")) # main if __name__ == "__main__": import mpi # testing Exchangermodule.so import ExchangerLib if not mpi.world().rank: print ExchangerLib.copyright() print dir(ExchangerLib) import journal #journal.debug("Array2D").activate() journal.debug("Exchanger").activate() journal.info(" X").activate() journal.info(" proc").activate() journal.info(" bid").activate() app = TestExchanger("test") app.main() # version
args=("coarse", "coarse")) fine = pyre.inventory.facility("fine", factory=Coupler.embeddedcoupler, args=("fine", "fine")) # main if __name__ == "__main__": import mpi # testing Exchangermodule.so import ExchangerLib if not mpi.world().rank: print ExchangerLib.copyright() print dir(ExchangerLib) import journal #journal.debug("Array2D").activate() journal.debug("Exchanger").activate() journal.info(" X").activate() journal.info(" proc").activate() journal.info(" bid").activate() app = TestExchanger("test") app.main() # version __id__ = "$Id$"
def __init__(self, mesh, sink, all_variables): import ExchangerLib self._handle = ExchangerLib.VTInlet_create(mesh, sink, all_variables) return
def __init__(self, mesh, sink, all_variables, comm): import ExchangerLib self._handle = ExchangerLib.BoundarySVTInlet_create( mesh, sink, all_variables, comm) return
def storeTimestep(self, fge_t, cge_t): import ExchangerLib ExchangerLib.Inlet_storeTimestep(self._handle, fge_t, cge_t) return
def recv(self): import ExchangerLib ExchangerLib.Inlet_recv(self._handle) return
def impose(self): import ExchangerLib ExchangerLib.Inlet_impose(self._handle) return