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
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
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))
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
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