Exemplo n.º 1
0
    def createMesh(self):
        '''Create BoundedMesh objects.
        '''
        from ExchangerLib import createGlobalBoundedBox, exchangeBoundedBox, createBoundary, createEmptyInterior
        inv = self.inventory

        # 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
        mycomm = self.communicator
        self.remoteBBox = exchangeBoundedBox(self.globalBBox, mycomm.handle(),
                                             self.sinkComm.handle(), 0)

        # the nodes on the boundary, top and bottom boundaries are special
        self.boundary, self.myBBox = createBoundary(self.all_variables,
                                                    inv.exclude_top,
                                                    inv.exclude_bottom)

        # an empty interior object, which will be filled by a remote interior obj.
        if inv.two_way_communication:
            self.remoteIntrList = range(self.remoteSize)
            for i in range(self.remoteSize):
                self.remoteIntrList[i] = createEmptyInterior()

        return
Exemplo n.º 2
0
    def createMesh(self):
        '''Create BoundedMesh objects.
        '''
        from ExchangerLib import createGlobalBoundedBox, exchangeBoundedBox, createBoundary, createEmptyInterior
        inv = self.inventory

        # 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
        mycomm = self.communicator
        self.remoteBBox = exchangeBoundedBox(self.globalBBox,
                                             mycomm.handle(),
                                             self.sinkComm.handle(),
                                             0)

        # the nodes on the boundary, top and bottom boundaries are special
        self.boundary, self.myBBox = createBoundary(self.all_variables,
                                                    inv.exclude_top,
                                                    inv.exclude_bottom)

        # an empty interior object, which will be filled by a remote interior obj.
        if inv.two_way_communication:
            self.remoteIntrList = range(self.remoteSize)
            for i in range(self.remoteSize):
                self.remoteIntrList[i] = createEmptyInterior()

        return
Exemplo n.º 3
0
    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