Partitioner

Mesh partitioner implemented with the SCOTCH library.

Defined in Rodin/Scotch/MeshPartitioner.h

class Partitioner;

Partitions a local mesh by building the graph representation expected by SCOTCH and storing the resulting partition index for each mesh entity.

Direct inheritance by class family
↓
Partitioner

Inherits from

Base classResponsibility
Geometry::Partitionerpublic
Full type
Geometry::Partitioner
Abstract base class for mesh partitioning strategies.

Overrides

MemberBase declaration
~Partitioner()Partitioner::~Partitioner
getMesh()Partitioner::getMesh
partition()Partitioner::partition
getPartition()Partitioner::getPartition
getCount()Partitioner::getCount

Inherited interface

Declared inMembers
Geometry::Partitioner
1 members

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 a stored partition assignment.
auto setStrategy(const SCOTCH_Strat& strat) -> Partitioner&
Sets the SCOTCH partitioning strategy. Strategy contents are copied; the caller retains ownership of strat and may release it immediately after this call.
auto getCount() const -> size_t override
Gets the total number of partitions.

Function documentation

Partitioner(const MeshType& mesh)

Constructs a partitioner for a local mesh.

Parameters
mesh Mesh to partition.

const MeshType& getMesh() const override

Gets the mesh being partitioned.

Returns Reference to the mesh

void partition(size_t count)

Partitions the mesh into a given number of parts.

Parameters
count Number of partitions to create.

void 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 getPartition(Index index) const override

Gets a stored partition assignment.

Parameters
index Entity index in the most recently partitioned dimension.
Returns Partition index for the selected entity.
Exceptions
Alert::Exception If no assignment exists for index.

Partitioner& setStrategy(const SCOTCH_Strat& strat)

Sets the SCOTCH partitioning strategy. Strategy contents are copied; the caller retains ownership of strat and may release it immediately after this call.

Parameters
strat Graph mapping strategy object used by SCOTCH.
Returns Reference to this partitioner.

size_t getCount() const override

Gets the total number of partitions.

Returns Number of partitions created