pyopensn.mesh.MeshGenerator

class pyopensn.mesh.MeshGenerator

Generic mesh generator.

Wrapper of opensn::MeshGenerator.

Execute(self: pyopensn.mesh.MeshGenerator) → pyopensn.mesh.Mesh

Build the mesh and partition it over the ranks.

Collective: every rank must call it. Rank 0 partitions the mesh. A pyopensn.mesh.DistributedMeshGenerator or pyopensn.mesh.SplitFileMeshGenerator also builds the mesh on rank 0 only.

Raises:

RuntimeError – On every rank, when partitioning the mesh fails on rank 0, or when a pyopensn.mesh.DistributedMeshGenerator or pyopensn.mesh.SplitFileMeshGenerator fails to build or write the mesh on rank 0, for example because the mesh is folded or has an inverted cell. Other generators build the mesh on every rank, and a build error is raised on each rank where it occurs.