pyopensn.mesh.KBAGraphPartitioner
- class pyopensn.mesh.KBAGraphPartitioner
Koch, Baker and Alcouffe based partitioning.
This is an overlayed ortho-grid based partitioner.
Wrapper of
opensn::KBAGraphPartitioner.- __init__(self: pyopensn.mesh.KBAGraphPartitioner, **kwargs) None
Construct a KBA graph partitioner.
- Parameters:
nx (int, default=1) – Number of partitions in x.
ny (int, default=1) – Number of partitions in y.
nz (int, default=1) – Number of partitions in z.
xcuts (List[float], default=[]) – Location of the internal x-cuts. Requires
nx - 1entries.ycuts (List[float], default=[]) – Location of the internal y-cuts. Requires
ny - 1entries.zcuts (List[float], default=[]) – Location of the internal z-cuts. Requires
nz - 1entries.
Notes
The cuts divide the domain into an
nxxnyxnzarray of brick-shaped cellsets. Each cell goes to the cellset that contains its centroid. A centroid that lies on a cut goes to the cellset above it.Cuts must be finite and strictly increasing, and every slab between cuts must contain cell centroids. An axis on which the mesh has no extent must have one partition. A 2D mesh needs
nz=1, and a 1D mesh, which lies alongz, needsnx=1andny=1. Mesh generation raisesValueErrorwhen one of these rules is broken.With
nx * ny * nzequal to the number of MPI ranks, the rank-level sweep graph is acyclic for every direction. With more cellsets than ranks, each rank owns an equal brick-shaped subdomain of cellsets when the cellset counts allow one. Otherwise, ranks take consecutive cellsets and a warning is logged.