示例#1
0
    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
示例#2
0
 def __init__(self, source, all_variables):
     import ExchangerLib
     self._handle = ExchangerLib.VOutlet_create(source,
                                                all_variables)
     return
示例#3
0
 def send(self):
     import ExchangerLib
     ExchangerLib.Outlet_send(self._handle)
     return
示例#4
0
        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
示例#5
0
                                         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$"
示例#6
0
 def __init__(self, mesh, sink, all_variables):
     import ExchangerLib
     self._handle = ExchangerLib.VTInlet_create(mesh, sink, all_variables)
     return
示例#7
0
 def __init__(self, mesh, sink, all_variables, comm):
     import ExchangerLib
     self._handle = ExchangerLib.BoundarySVTInlet_create(
         mesh, sink, all_variables, comm)
     return
示例#8
0
 def storeTimestep(self, fge_t, cge_t):
     import ExchangerLib
     ExchangerLib.Inlet_storeTimestep(self._handle, fge_t, cge_t)
     return
示例#9
0
 def recv(self):
     import ExchangerLib
     ExchangerLib.Inlet_recv(self._handle)
     return
示例#10
0
 def impose(self):
     import ExchangerLib
     ExchangerLib.Inlet_impose(self._handle)
     return