Partitioner class
#include <Rodin/Scotch/MeshPartitioner.h>
Mesh partitioner implemented with the SCOTCH library.
Partitions a local mesh by building the graph representation expected by SCOTCH and storing the resulting partition index for each mesh entity.
Base classes
- class Partitioner
- Abstract base class for mesh partitioning strategies.
Public types
-
using MeshType = Geometry::
Mesh<Context:: Local> - Mesh type.
Constructors, destructors, conversion operators
- Partitioner(const MeshType& mesh)
- Constructs a partitioner for a local mesh.
- ~Partitioner() override
- Virtual destructor.
Public functions
- auto getMesh() const -> const MeshType& override
- Gets the mesh being partitioned.
- void partition(size_t count)
- Partitions the mesh into a given number of parts.
- void partition(size_t numPartitions, size_t d) override
- Performs the partitioning of mesh polytopes.
- auto getPartition(Index index) const -> size_t override
- Gets the partition index for a given polytope.
- auto setStrategy(const SCOTCH_Strat& strat) -> Partitioner&
- Sets the SCOTCH partitioning strategy.
- auto getCount() const -> size_t override
- Gets the total number of partitions.
Function documentation
Rodin:: Scotch:: Partitioner:: Partitioner(const MeshType& mesh)
Constructs a partitioner for a local mesh.
| Parameters | |
|---|---|
| mesh | Mesh to partition. |
void Rodin:: Scotch:: Partitioner:: partition(size_t count)
Partitions the mesh into a given number of parts.
| Parameters | |
|---|---|
| count | Number of partitions to create. |
void Rodin:: Scotch:: Partitioner:: partition(size_t numPartitions,
size_t d) override
Performs the partitioning of mesh polytopes.
| Parameters | |
|---|---|
| numPartitions in | Number of partitions to create |
| d in | Dimension of polytopes to partition |
Divides the polytopes of dimension d into numPartitions disjoint partitions according to the partitioning strategy.
size_t Rodin:: Scotch:: Partitioner:: getPartition(Index index) const override
Gets the partition index for a given polytope.
| Parameters | |
|---|---|
| index in | Index of the polytope |
| Returns | Partition number assigned to the polytope |
Partitioner& Rodin:: Scotch:: Partitioner:: setStrategy(const SCOTCH_Strat& strat)
Sets the SCOTCH partitioning strategy.
| Parameters | |
|---|---|
| strat | Strategy object used by SCOTCH. |
| Returns | Reference to this partitioner. |
size_t Rodin:: Scotch:: Partitioner:: getCount() const override
Gets the total number of partitions.
| Returns | Number of partitions created |
|---|