LifeV
GraphCutterParMETIS< MeshType > Class Template Reference

Class that partitions the graph associated with a mesh (ParMETIS version) More...

#include <GraphCutterParMETIS.hpp>

+ Inheritance diagram for GraphCutterParMETIS< MeshType >:
+ Collaboration diagram for GraphCutterParMETIS< MeshType >:

Private Member Functions

 GraphCutterParMETIS (const GraphCutterParMETIS &)
 
GraphCutterParMETISoperator= (const GraphCutterParMETIS &)
 

Private Attributes

commPtr_Type M_comm
 
Int M_myPID
 
Int M_numProcessors
 
Int M_numParts
 
bool M_hierarchical
 
Int M_topology
 
pList_Type M_parameters
 
meshPtr_Type M_mesh
 
UInt M_elementVertices
 
UInt M_elementFacets
 
UInt M_elementRidges
 
UInt M_facetVertices
 
idTablePtr_Type M_vertexPartition
 

Public Types

typedef Teuchos::ParameterList pList_Type
 
typedef std::shared_ptr< Epetra_Comm > commPtr_Type
 
typedef MeshType mesh_Type
 
typedef std::shared_ptr< mesh_TypemeshPtr_Type
 
typedef boost::bimap< UInt, UIntbiMap_Type
 
typedef biMap_Type::value_type biMapValue_Type
 

Constructor & Destructor

Constructor taking the original mesh, the MPI comm and parameters

 GraphCutterParMETIS (meshPtr_Type &mesh, commPtr_Type &comm, pList_Type &parameters)
 
virtual ~GraphCutterParMETIS ()
 Destructor. More...
 

Public methods

virtual Int run ()
 Performs the graph partitioning. More...
 

Get Methods

virtual const idListPtr_TypegetPart (const UInt i) const
 Get a pointer to one of the partitions. More...
 
virtual idListPtr_TypegetPart (const UInt i)
 
virtual const UInt numParts () const
 Return the number of parts. More...
 
virtual const idTablePtr_Type getGraph () const
 Get the entire partitioned graph, wrapped in a smart pointer. More...
 

Private Methods

virtual void setParameters (pList_Type &parameters)
 Set values for all the parameters, with default values where needed. More...
 
Int partitionFlat ()
 Perform a flat, non-hierarchical partition. More...
 
Int partitionHierarchical ()
 Perform a hierarchical (2-level) partition. More...
 

Additional Inherited Members

- Public Types inherited from GraphCutterBase< MeshType >
typedef Teuchos::ParameterList pList_Type
 
- Public Member Functions inherited from GraphCutterBase< MeshType >
 GraphCutterBase ()
 Default constructor. More...
 
virtual ~GraphCutterBase ()
 Destructor. More...
 

Detailed Description

template<typename MeshType>
class LifeV::GraphCutterParMETIS< MeshType >

Class that partitions the graph associated with a mesh (ParMETIS version)

Author
Radu Popescu radu..nosp@m.pope.nosp@m.scu@e.nosp@m.pfl..nosp@m.ch

This class uses the ParMETIS package to partition the graph associated with a mesh. This class builds the dual graph of the mesh, partitions it according to a set of parameters and the stores the partition in a table (vector of vectors). At the end of the partition process, each vector will contain the GID of the elements in a part.

While this class can be used stand-alone, it is used automatically by the MeshPartitionTool class during the mesh partition process.

Definition at line 70 of file GraphCutterParMETIS.hpp.

Member Typedef Documentation

◆ pList_Type

typedef Teuchos::ParameterList pList_Type

Definition at line 75 of file GraphCutterParMETIS.hpp.

◆ commPtr_Type

typedef std::shared_ptr<Epetra_Comm> commPtr_Type

Definition at line 76 of file GraphCutterParMETIS.hpp.

◆ mesh_Type

Definition at line 77 of file GraphCutterParMETIS.hpp.

◆ meshPtr_Type

typedef std::shared_ptr<mesh_Type> meshPtr_Type

Definition at line 78 of file GraphCutterParMETIS.hpp.

◆ biMap_Type

typedef boost::bimap<UInt, UInt> biMap_Type

Definition at line 80 of file GraphCutterParMETIS.hpp.

◆ biMapValue_Type

typedef biMap_Type::value_type biMapValue_Type

Definition at line 81 of file GraphCutterParMETIS.hpp.

Constructor & Destructor Documentation

◆ GraphCutterParMETIS() [1/2]

GraphCutterParMETIS ( meshPtr_Type mesh,
commPtr_Type comm,
pList_Type parameters 
)

This constructor can be used to build the object and perform the graph partitioning in one shot.

Parameters
meshThe original mesh whose graph this object will partition
commThe Epetra MPI comm object which contains the processes which participate
parametersThe Teuchos parameter list which contains the partitioning parameters

Definition at line 188 of file GraphCutterParMETIS.hpp.

+ Here is the caller graph for this function:

◆ ~GraphCutterParMETIS()

virtual ~GraphCutterParMETIS ( )
inlinevirtual

Destructor.

Definition at line 101 of file GraphCutterParMETIS.hpp.

◆ GraphCutterParMETIS() [2/2]

Member Function Documentation

◆ run()

Int run ( )
virtual

Performs the graph partitioning.

Implements GraphCutterBase< MeshType >.

Definition at line 222 of file GraphCutterParMETIS.hpp.

◆ getPart() [1/2]

virtual const idListPtr_Type& getPart ( const UInt  i) const
inlinevirtual

Get a pointer to one of the partitions.

Implements GraphCutterBase< MeshType >.

Definition at line 113 of file GraphCutterParMETIS.hpp.

◆ getPart() [2/2]

virtual idListPtr_Type& getPart ( const UInt  i)
inlinevirtual

Implements GraphCutterBase< MeshType >.

Definition at line 117 of file GraphCutterParMETIS.hpp.

◆ numParts()

virtual const UInt numParts ( ) const
inlinevirtual

Return the number of parts.

Implements GraphCutterBase< MeshType >.

Definition at line 123 of file GraphCutterParMETIS.hpp.

◆ getGraph()

virtual const idTablePtr_Type getGraph ( ) const
inlinevirtual

Get the entire partitioned graph, wrapped in a smart pointer.

Implements GraphCutterBase< MeshType >.

Definition at line 129 of file GraphCutterParMETIS.hpp.

◆ setParameters()

void setParameters ( pList_Type parameters)
privatevirtual

Set values for all the parameters, with default values where needed.

Implements GraphCutterBase< MeshType >.

Definition at line 203 of file GraphCutterParMETIS.hpp.

+ Here is the caller graph for this function:

◆ partitionFlat()

Int partitionFlat ( )
private

Perform a flat, non-hierarchical partition.

Definition at line 251 of file GraphCutterParMETIS.hpp.

+ Here is the caller graph for this function:

◆ partitionHierarchical()

Int partitionHierarchical ( )
private

Perform a hierarchical (2-level) partition.

Definition at line 273 of file GraphCutterParMETIS.hpp.

+ Here is the caller graph for this function:

◆ operator=()

GraphCutterParMETIS& operator= ( const GraphCutterParMETIS< MeshType > &  )
private

Field Documentation

◆ M_comm

commPtr_Type M_comm
private

Definition at line 164 of file GraphCutterParMETIS.hpp.

◆ M_myPID

Int M_myPID
private

Definition at line 165 of file GraphCutterParMETIS.hpp.

◆ M_numProcessors

Int M_numProcessors
private

Definition at line 166 of file GraphCutterParMETIS.hpp.

◆ M_numParts

Int M_numParts
private

Definition at line 167 of file GraphCutterParMETIS.hpp.

◆ M_hierarchical

bool M_hierarchical
private

Definition at line 168 of file GraphCutterParMETIS.hpp.

◆ M_topology

Int M_topology
private

Definition at line 169 of file GraphCutterParMETIS.hpp.

◆ M_parameters

pList_Type M_parameters
private

Definition at line 170 of file GraphCutterParMETIS.hpp.

◆ M_mesh

meshPtr_Type M_mesh
private

Definition at line 171 of file GraphCutterParMETIS.hpp.

◆ M_elementVertices

UInt M_elementVertices
private

Definition at line 172 of file GraphCutterParMETIS.hpp.

◆ M_elementFacets

UInt M_elementFacets
private

Definition at line 173 of file GraphCutterParMETIS.hpp.

◆ M_elementRidges

UInt M_elementRidges
private

Definition at line 174 of file GraphCutterParMETIS.hpp.

◆ M_facetVertices

UInt M_facetVertices
private

Definition at line 175 of file GraphCutterParMETIS.hpp.

◆ M_vertexPartition

idTablePtr_Type M_vertexPartition
private

Definition at line 176 of file GraphCutterParMETIS.hpp.


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