pyopensn.mesh.OrthogonalMeshGenerator

class pyopensn.mesh.OrthogonalMeshGenerator

Orthogonal mesh generator.

Wrapper of opensn::OrthogonalMeshGenerator.

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.

__init__(self: pyopensn.mesh.OrthogonalMeshGenerator, **kwargs) → None

Construct an orthogonal mesh generator.

Parameters:
  • scale (float, default=1.0) – Uniform scale to apply to the mesh after reading.

  • inputs (List[pyopensn.mesh.MeshGenerator], default=[]) – A list of MeshGenerator objects.

  • partitioner (pyopensn.mesh.GraphPartitioner, default=None) – Handle to a GraphPartitioner object to use for parallel partitioning. This will default to PETScGraphPartitioner with a “parmetis” setting.

  • replicated_mesh (bool, default=False) – Flag, when set, makes the mesh appear in full fidelity on each process.

  • node_sets (List[List[float]]) – Sets of nodes per dimension. Node values must be monotonically increasing.

  • coord_sys ({'cartesian', 'cylindrical', 'spherical'}) – The coordinate system of the mesh.

  • distributed_generation (bool, default=False) – When true, partition the orthogonal cell graph on rank 0 and build each rank’s local and ghost cells directly on that rank.