CEPS  24.01
Cardiac ElectroPhysiology Simulator
GeometryPartitioner Class Referenceabstract

Detailed Description

Class is used to compute a geometry (multiple meshes) partitioning.

Definition at line 39 of file GeometryPartitioner.hpp.

#include <GeometryPartitioner.hpp>

Inheritance diagram for GeometryPartitioner:
[legend]

Public Member Functions

 GeometryPartitioner ()=delete
 Deleted constructor. More...
 
 GeometryPartitioner (Geometry *geometry)
 Constructor based on Geometry instance. More...
 
 ~GeometryPartitioner () override
 Destructor. More...
 
virtual CepsUInt computePartition ()=0
 Calls the partitioning method specified in the Geometry. More...
 
- Public Member Functions inherited from CepsObject
 CepsObject ()=default
 default constructor More...
 
 CepsObject (const CepsObject &)=default
 Copy constructor. More...
 
virtual ~CepsObject ()=default
 Destructor. More...
 
CepsObjectoperator= (const CepsObject &)=default
 Assignment operator. More...
 
CepsObjecttoBaseObject ()
 Returns a pointer to CepsObject class. More...
 
const CepsObjecttoBaseObject () const
 Returns a pointer to CepsObject class, const version. More...
 
ProfilergetProfiler () const
 Access to profiler. More...
 

Protected Member Functions

void readMeshOnMaster ()
 Read the Mesh on master process before distribution. More...
 
void broadcastMeshData ()
 Copies geometrical information from master on all other processes. More...
 
void setUpHalo (const CepsVector< CepsInt > &nodeOwnership, const CepsVector< CepsInt > *cellOwnership=nullptr)
 Register nodes in halo regions, and set up communication matrices of data in halos. More...
 
void buildNodeAdjacency ()
 For each node, stores its adjacent nodes and cells. (indices before partitioning) More...
 
void buildCellAdjacency ()
 For each cell, stores its adjacent cells. (indices before partitioning) More...
 
void nodeAttribution (const CepsVector< CepsInt > &nodeOwnership)
 Creates the lists of nodes in linked geometry according to partition. More...
 
void cellAttribution ()
 Creates the lists of cells and bdry cells in geometry according to partition. More...
 
template<CepsUInt _Dim>
void addCellToMesh (CepsUInt index, CepsBool isOnBoundary, Mesh *mesh)
 Create local simplex structures from geometrical data to fill meshes with. More...
 
CepsUInt getDimensionByNodeId (CepsUInt i) const
 Get the correct dimension, deduced by node id. More...
 
CepsUInt getDimensionByCellId (CepsUInt i) const
 Get the correct dimension, deduced by cell id. More...
 

Protected Attributes

Geometrym_geom
 Linked geometry to partition. More...
 
CepsSet< CepsCellGlobalIndexm_ownedCells
 Indices of local cells and boundary cells. More...
 
CepsSet< CepsNodeGlobalIndexm_ownedNodes
 Indices of local nodes. More...
 
CepsSet< CepsNodeGlobalIndexm_haloNodes
 Indices of local halo nodes. More...
 
CepsArray4< CepsUIntm_nodeOffset
 GeomNode offset. More...
 
CepsArray4< CepsUIntm_cellOffset
 Cell offset. More...
 
CepsUInt m_nbNodes
 Number of nodes in all combined meshes. More...
 
CepsVector< CepsRealm_coords
 GeomNode positions. More...
 
CepsVector< CepsAttributem_nodeAttr
 Attributes for each node. More...
 
CepsVector< CepsUIntm_nodeAttrOffset
 Offset in m_nodeAttr array for each node. More...
 
CepsUInt m_nodeAttrSize
 Size of combined lists of attributes per node. More...
 
CepsMap< CepsNodeGlobalIndex, CepsSet< CepsNodeGlobalIndex > > m_nodeNodeAdj
 lists of adjacent nodes More...
 
CepsMap< CepsNodeGlobalIndex, CepsSet< CepsCellGlobalIndex > > m_nodeCellAdj
 lists of adjacent cells More...
 
CepsMap< CepsCellGlobalIndex, CepsSet< CepsCellGlobalIndex > > m_cellCellAdj
 lists of adjacent cells More...
 
CepsSet< CepsCellGlobalIndexm_markedCells
 algorithmic flags More...
 
CepsMap< CepsCellGlobalIndex, CepsMathVertexm_cellBarycenters
 For cells with 1 node on bdry. More...
 
CepsMultiMap< CepsNodeGlobalIndex, CepsNodeGlobalIndexm_coupledNodes
 Links between meshes expressed with coupled nodes. More...
 
CepsUInt m_nbCells
 Number of cells and boundary cells in all combined meshes. More...
 
CepsVector< CepsIntm_nodeIndices
 Node indices for each cell (signed ints for lib compatibility) More...
 
CepsVector< CepsUIntm_nodeIndicesOffset
 Offset in m_nodeIndices array for each cell. More...
 
CepsUInt m_nodeIndicesSize
 Size of combined lists of nodes per cell. More...
 
CepsVector< CepsAttributem_cellAttr
 Cells attributes for each cell. More...
 
CepsVector< CepsUIntm_cellAttrOffset
 Offset in m_cellAttr array for each cell. More...
 
CepsUInt m_cellAttrSize
 Size of combined lists of attributes per cell. More...
 
CepsVector< CepsCharm_isBoundary
 Indicates which cell is on the boundary. More...
 

Additional Inherited Members

- Static Protected Attributes inherited from CepsObject
static Profiler m_profiler
 The same profiler for each big object. More...
 

Constructor & Destructor Documentation

◆ GeometryPartitioner() [1/2]

GeometryPartitioner::GeometryPartitioner ( )
delete

Deleted constructor.

◆ GeometryPartitioner() [2/2]

GeometryPartitioner::GeometryPartitioner ( Geometry geometry)
explicit

Constructor based on Geometry instance.

Definition at line 39 of file GeometryPartitioner.cpp.

◆ ~GeometryPartitioner()

GeometryPartitioner::~GeometryPartitioner ( )
override

Destructor.

Definition at line 56 of file GeometryPartitioner.cpp.

Member Function Documentation

◆ addCellToMesh()

template<CepsUInt _Dim>
void GeometryPartitioner::addCellToMesh ( CepsUInt  index,
CepsBool  isOnBoundary,
Mesh mesh 
)
protected

Create local simplex structures from geometrical data to fill meshes with.

Definition at line 465 of file GeometryPartitioner.cpp.

◆ broadcastMeshData()

void GeometryPartitioner::broadcastMeshData ( )
protected

Copies geometrical information from master on all other processes.

Definition at line 108 of file GeometryPartitioner.cpp.

◆ buildCellAdjacency()

void GeometryPartitioner::buildCellAdjacency ( )
protected

For each cell, stores its adjacent cells. (indices before partitioning)

Definition at line 268 of file GeometryPartitioner.cpp.

◆ buildNodeAdjacency()

void GeometryPartitioner::buildNodeAdjacency ( )
protected

For each node, stores its adjacent nodes and cells. (indices before partitioning)

Definition at line 241 of file GeometryPartitioner.cpp.

◆ cellAttribution()

void GeometryPartitioner::cellAttribution ( )
protected

Creates the lists of cells and bdry cells in geometry according to partition.

Definition at line 380 of file GeometryPartitioner.cpp.

◆ computePartition()

virtual CepsUInt GeometryPartitioner::computePartition ( )
pure virtual

Calls the partitioning method specified in the Geometry.

The different partitioning methods are defined in the enum type PartitioningMethod::method. The partitioning method is set via the method Geometry::setPartitioningMethod

Returns
non zero value on failure

Implemented in PtscotchPartitioner.

◆ getDimensionByCellId()

CepsUInt GeometryPartitioner::getDimensionByCellId ( CepsUInt  i) const
protected

Get the correct dimension, deduced by cell id.

Definition at line 570 of file GeometryPartitioner.cpp.

◆ getDimensionByNodeId()

CepsUInt GeometryPartitioner::getDimensionByNodeId ( CepsUInt  i) const
protected

Get the correct dimension, deduced by node id.

Definition at line 558 of file GeometryPartitioner.cpp.

◆ nodeAttribution()

void GeometryPartitioner::nodeAttribution ( const CepsVector< CepsInt > &  nodeOwnership)
protected

Creates the lists of nodes in linked geometry according to partition.

Definition at line 314 of file GeometryPartitioner.cpp.

◆ readMeshOnMaster()

void GeometryPartitioner::readMeshOnMaster ( )
protected

Read the Mesh on master process before distribution.

Definition at line 60 of file GeometryPartitioner.cpp.

◆ setUpHalo()

void GeometryPartitioner::setUpHalo ( const CepsVector< CepsInt > &  nodeOwnership,
const CepsVector< CepsInt > *  cellOwnership = nullptr 
)
protected

Register nodes in halo regions, and set up communication matrices of data in halos.

Parameters
[in]nodeOwnershipvector indicating to which process belongs each node
[in]cellOwnershipif cell ownership is already computed, use it instead of nodeOwnership

Definition at line 186 of file GeometryPartitioner.cpp.

Field Documentation

◆ m_cellAttr

CepsVector<CepsAttribute> GeometryPartitioner::m_cellAttr
protected

Cells attributes for each cell.

Definition at line 149 of file GeometryPartitioner.hpp.

◆ m_cellAttrOffset

CepsVector<CepsUInt> GeometryPartitioner::m_cellAttrOffset
protected

Offset in m_cellAttr array for each cell.

Definition at line 150 of file GeometryPartitioner.hpp.

◆ m_cellAttrSize

CepsUInt GeometryPartitioner::m_cellAttrSize
protected

Size of combined lists of attributes per cell.

Definition at line 151 of file GeometryPartitioner.hpp.

◆ m_cellBarycenters

CepsMap<CepsCellGlobalIndex,CepsMathVertex> GeometryPartitioner::m_cellBarycenters
protected

For cells with 1 node on bdry.

Definition at line 138 of file GeometryPartitioner.hpp.

◆ m_cellCellAdj

CepsMap<CepsCellGlobalIndex,CepsSet<CepsCellGlobalIndex> > GeometryPartitioner::m_cellCellAdj
protected

lists of adjacent cells

Definition at line 135 of file GeometryPartitioner.hpp.

◆ m_cellOffset

CepsArray4<CepsUInt> GeometryPartitioner::m_cellOffset
protected

Cell offset.

Definition at line 124 of file GeometryPartitioner.hpp.

◆ m_coords

CepsVector<CepsReal> GeometryPartitioner::m_coords
protected

GeomNode positions.

Definition at line 128 of file GeometryPartitioner.hpp.

◆ m_coupledNodes

CepsMultiMap<CepsNodeGlobalIndex, CepsNodeGlobalIndex> GeometryPartitioner::m_coupledNodes
protected

Links between meshes expressed with coupled nodes.

Definition at line 141 of file GeometryPartitioner.hpp.

◆ m_geom

Geometry* GeometryPartitioner::m_geom
protected

Linked geometry to partition.

Definition at line 117 of file GeometryPartitioner.hpp.

◆ m_haloNodes

CepsSet<CepsNodeGlobalIndex> GeometryPartitioner::m_haloNodes
protected

Indices of local halo nodes.

Definition at line 121 of file GeometryPartitioner.hpp.

◆ m_isBoundary

CepsVector<CepsChar> GeometryPartitioner::m_isBoundary
protected

Indicates which cell is on the boundary.

Note
: we use CepsChar instead of CepsBool because CepsVector<CepsBool> does not have data()

Definition at line 157 of file GeometryPartitioner.hpp.

◆ m_markedCells

CepsSet<CepsCellGlobalIndex> GeometryPartitioner::m_markedCells
protected

algorithmic flags

Definition at line 136 of file GeometryPartitioner.hpp.

◆ m_nbCells

CepsUInt GeometryPartitioner::m_nbCells
protected

Number of cells and boundary cells in all combined meshes.

Definition at line 144 of file GeometryPartitioner.hpp.

◆ m_nbNodes

CepsUInt GeometryPartitioner::m_nbNodes
protected

Number of nodes in all combined meshes.

Definition at line 127 of file GeometryPartitioner.hpp.

◆ m_nodeAttr

CepsVector<CepsAttribute> GeometryPartitioner::m_nodeAttr
protected

Attributes for each node.

Definition at line 129 of file GeometryPartitioner.hpp.

◆ m_nodeAttrOffset

CepsVector<CepsUInt> GeometryPartitioner::m_nodeAttrOffset
protected

Offset in m_nodeAttr array for each node.

Definition at line 130 of file GeometryPartitioner.hpp.

◆ m_nodeAttrSize

CepsUInt GeometryPartitioner::m_nodeAttrSize
protected

Size of combined lists of attributes per node.

Definition at line 131 of file GeometryPartitioner.hpp.

◆ m_nodeCellAdj

CepsMap<CepsNodeGlobalIndex,CepsSet<CepsCellGlobalIndex> > GeometryPartitioner::m_nodeCellAdj
protected

lists of adjacent cells

Definition at line 134 of file GeometryPartitioner.hpp.

◆ m_nodeIndices

CepsVector<CepsInt> GeometryPartitioner::m_nodeIndices
protected

Node indices for each cell (signed ints for lib compatibility)

Definition at line 146 of file GeometryPartitioner.hpp.

◆ m_nodeIndicesOffset

CepsVector<CepsUInt> GeometryPartitioner::m_nodeIndicesOffset
protected

Offset in m_nodeIndices array for each cell.

Definition at line 147 of file GeometryPartitioner.hpp.

◆ m_nodeIndicesSize

CepsUInt GeometryPartitioner::m_nodeIndicesSize
protected

Size of combined lists of nodes per cell.

Definition at line 148 of file GeometryPartitioner.hpp.

◆ m_nodeNodeAdj

CepsMap<CepsNodeGlobalIndex,CepsSet<CepsNodeGlobalIndex> > GeometryPartitioner::m_nodeNodeAdj
protected

lists of adjacent nodes

Definition at line 133 of file GeometryPartitioner.hpp.

◆ m_nodeOffset

CepsArray4<CepsUInt> GeometryPartitioner::m_nodeOffset
protected

GeomNode offset.

Definition at line 123 of file GeometryPartitioner.hpp.

◆ m_ownedCells

CepsSet<CepsCellGlobalIndex> GeometryPartitioner::m_ownedCells
protected

Indices of local cells and boundary cells.

Definition at line 119 of file GeometryPartitioner.hpp.

◆ m_ownedNodes

CepsSet<CepsNodeGlobalIndex> GeometryPartitioner::m_ownedNodes
protected

Indices of local nodes.

Definition at line 120 of file GeometryPartitioner.hpp.


The documentation for this class was generated from the following files: