示例#1
0
文件: Mesh.py 项目: youngsolar/pylith
 def groupSizes(self):
   """
   Return the name and number of vertices for each group
   """
   groups = []
   names  = ModuleMesh.groups(self)
   for name in names:
     groups.append((name,ModuleMesh.groupSize(self, name)))
   return groups
示例#2
0
文件: Mesh.py 项目: xiaoxiz/pylith
 def groupSizes(self):
     """
 Return the name and number of vertices for each group
 """
     groups = []
     names = ModuleMesh.groups(self)
     for name in names:
         groups.append((name, ModuleMesh.groupSize(self, name)))
     return groups
示例#3
0
文件: Mesh.py 项目: youngsolar/pylith
 def comm(self):
   """
   Get communicator.
   """
   # Use Communicator object to wrap C++ MPI_Comm* returned by
   # module.
   from pylith.mpi.Communicator import Communicator
   return Communicator(ModuleMesh.comm(self))
示例#4
0
文件: Mesh.py 项目: xiaoxiz/pylith
 def comm(self):
     """
 Get communicator.
 """
     # Use Communicator object to wrap C++ MPI_Comm* returned by
     # module.
     from pylith.mpi.Communicator import Communicator
     return Communicator(ModuleMesh.comm(self))
示例#5
0
文件: Mesh.py 项目: youngsolar/pylith
  def __init__(self, dim=None, comm=None, mesh=None, label=None, isSubMesh=False):
    """
    Constructor.
    """
    if comm is None and dim is None and label is None:
      ModuleMesh.__init__(self, isSubMesh)
    elif comm is None and mesh is None and label is None:
      ModuleMesh.__init__(self, dim)
    elif label is None:
      ModuleMesh.__init__(self, dim, comm.handle)
    else:
      assert(not mesh is None and not label is None)
      ModuleMesh.__init__(self, mesh, label)

    # Name of logging stage for mesh. We progress through various
    # stages as we read, distribute, and refine mesh.
    self.memLoggingStage = "Mesh"
    return
示例#6
0
文件: Mesh.py 项目: xiaoxiz/pylith
    def __init__(self,
                 dim=None,
                 comm=None,
                 mesh=None,
                 label=None,
                 isSubMesh=False):
        """
    Constructor.
    """
        if comm is None and dim is None and label is None:
            ModuleMesh.__init__(self, isSubMesh)
        elif comm is None and mesh is None and label is None:
            ModuleMesh.__init__(self, dim)
        elif label is None:
            ModuleMesh.__init__(self, dim, comm.handle)
        else:
            assert (not mesh is None and not label is None)
            ModuleMesh.__init__(self, mesh, label)

        # Name of logging stage for mesh. We progress through various
        # stages as we read, distribute, and refine mesh.
        self.memLoggingStage = "Mesh"
        return