LifeV
|
Class that does flexible mesh partitioning. More...
#include <MeshPartitionTool.hpp>
Private Member Functions | |
MeshPartitionTool (const MeshPartitionTool &) | |
MeshPartitionTool & | operator= (const MeshPartitionTool &) |
Public Types | |
typedef MeshType | mesh_Type |
typedef GraphCutterBase< mesh_Type > | graphCutter_Type |
typedef MeshPartBuilder< mesh_Type > | meshPartBuilder_Type |
typedef std::shared_ptr< mesh_Type > | meshPtr_Type |
typedef std::vector< meshPtr_Type > | partMesh_Type |
typedef std::shared_ptr< partMesh_Type > | partMeshPtr_Type |
typedef std::vector< idTablePtr_Type > | vertexPartitionTable_Type |
typedef std::shared_ptr< vertexPartitionTable_Type > | vertexPartitionTablePtr_Type |
Constructors & Destructors | |
MeshPartitionTool (const meshPtr_Type &mesh, const std::shared_ptr< Epetra_Comm > &comm, const Teuchos::ParameterList parameters=Teuchos::ParameterList()) | |
Constructor. More... | |
~MeshPartitionTool () | |
Empty destructor. More... | |
Public Methods | |
void | showMe (std::ostream &output=std::cout) const |
Get Methods | |
bool | success () const |
Return the succeess state of the partitioning (true || false) More... | |
const meshPtr_Type & | meshPart () const |
Return a shared pointer to the mesh part (online mode, const ver.) More... | |
const partMeshPtr_Type & | allMeshParts () const |
Return a shared pointer to the mesh parts. More... | |
const vertexPartitionTablePtr_Type & | secondStageParts () const |
Return a shared pointer to the second stage graph parts (for ShyLU-MT) More... | |
const idTablePtr_Type & | mySecondStageParts () const |
Return a shared pointer to the second stage graph parts (for ShyLU-MT) More... | |
Private methods | |
void | run () |
This method performs all the steps for the mesh and graph partitioning. More... | |
void | fillEntityPID (idTablePtr_Type graph) |
Initialize M_entityPID. More... | |
void | globalToLocal (const Int curPart) |
Global to local element ID conversion for second stage. More... | |
std::shared_ptr< Epetra_Comm > | M_comm |
Private Data Members. More... | |
Int | M_myPID |
Teuchos::ParameterList | M_parameters |
meshPtr_Type | M_originalMesh |
meshPtr_Type | M_meshPart |
partMeshPtr_Type | M_allMeshParts |
std::string | M_graphLib |
std::shared_ptr< graphCutter_Type > | M_graphCutter |
std::shared_ptr< meshPartBuilder_Type > | M_meshPartBuilder |
bool | M_success |
bool | M_secondStage |
Int | M_secondStageNumParts |
vertexPartitionTablePtr_Type | M_secondStageParts |
meshPartBuilder_Type::entityPID_Type | M_entityPID |
Store ownership for each entity, subdivided by entity type. More... | |
Class that does flexible mesh partitioning.
This class implements the partitioning of a global mesh and allows choosing the graph partitioning tool and the method to build the mesh parts.
The class is configured through the Teuchos::Parameter list passed to the constructor. The following parameters are used:
graph-lib - std::string - "parmetis" or "zoltan" selects the graph partition library to be used (default "parmetis") overlap - UInt - level of overlap for the mesh partition process (default 0) offline-mode - bool - mode of operation; offline mode can only be used in serial (default false == online) num-parts - Int - (for offline-mode only) sets the number of parts for the mesh partition process (no default value) hierarchical - bool - enable hierarchical partitioning mode (default false) topology - std::string - value which represents the number of mesh parts per compute node (N == num-parts; topology="m"; N % m == 0) (default "1")
Notes:
The value of the "topology" parameter is given as a string due to a requirement of the Zoltan interface When using Zoltan as a graph partition library, additional advanced parameters are available. See GraphCutterZoltan.hpp for more information. Hierarchical partitioning is available in online mode ONLY when using Zoltan and in offline mode ONLY when using ParMETIS.
Definition at line 99 of file MeshPartitionTool.hpp.
Definition at line 104 of file MeshPartitionTool.hpp.
typedef GraphCutterBase<mesh_Type> graphCutter_Type |
Definition at line 105 of file MeshPartitionTool.hpp.
typedef MeshPartBuilder<mesh_Type> meshPartBuilder_Type |
Definition at line 106 of file MeshPartitionTool.hpp.
typedef std::shared_ptr<mesh_Type> meshPtr_Type |
Definition at line 107 of file MeshPartitionTool.hpp.
typedef std::vector<meshPtr_Type> partMesh_Type |
Definition at line 108 of file MeshPartitionTool.hpp.
typedef std::shared_ptr<partMesh_Type> partMeshPtr_Type |
Definition at line 109 of file MeshPartitionTool.hpp.
typedef std::vector<idTablePtr_Type> vertexPartitionTable_Type |
Definition at line 110 of file MeshPartitionTool.hpp.
typedef std::shared_ptr<vertexPartitionTable_Type> vertexPartitionTablePtr_Type |
Definition at line 112 of file MeshPartitionTool.hpp.
MeshPartitionTool | ( | const meshPtr_Type & | mesh, |
const std::shared_ptr< Epetra_Comm > & | comm, | ||
const Teuchos::ParameterList | parameters = Teuchos::ParameterList() |
||
) |
Constructor.
The constructor takes as parameters the global uncut mesh, the Epetra comm of the group or processes involved in the mesh partition process and a Teuchos parameter list.
After initializing the object, the constructor will call the private run() method and perform the mesh partition
mesh | - shared pointer to the global uncut mesh |
comm | - shared pointer to the Epetra comm object containing the processes involved in the mesh partition process |
parameters | - Teuchos parameter list |
Definition at line 235 of file MeshPartitionTool.hpp.
|
inline |
Empty destructor.
Definition at line 137 of file MeshPartitionTool.hpp.
|
private |
void showMe | ( | std::ostream & | output = std::cout | ) | const |
Definition at line 505 of file MeshPartitionTool.hpp.
|
inline |
Return the succeess state of the partitioning (true || false)
Definition at line 148 of file MeshPartitionTool.hpp.
|
inline |
Return a shared pointer to the mesh part (online mode, const ver.)
Definition at line 153 of file MeshPartitionTool.hpp.
|
inline |
Return a shared pointer to the mesh parts.
Return a shared pointer to the mesh parts on offline partition (const)
Definition at line 161 of file MeshPartitionTool.hpp.
|
inline |
Return a shared pointer to the second stage graph parts (for ShyLU-MT)
Return a shared pointer to the second stage graph parts (for ShyLU-MT) Offline mode
Definition at line 171 of file MeshPartitionTool.hpp.
|
inline |
Return a shared pointer to the second stage graph parts (for ShyLU-MT)
Return a shared pointer to the second stage graph parts (for ShyLU-MT) Online mode
Definition at line 181 of file MeshPartitionTool.hpp.
|
private |
This method performs all the steps for the mesh and graph partitioning.
Definition at line 274 of file MeshPartitionTool.hpp.
|
private |
Initialize M_entityPID.
Definition at line 436 of file MeshPartitionTool.hpp.
|
private |
Global to local element ID conversion for second stage.
Definition at line 486 of file MeshPartitionTool.hpp.
|
private |
|
private |
Private Data Members.
Definition at line 206 of file MeshPartitionTool.hpp.
|
private |
Definition at line 207 of file MeshPartitionTool.hpp.
|
private |
Definition at line 208 of file MeshPartitionTool.hpp.
|
private |
Definition at line 209 of file MeshPartitionTool.hpp.
|
private |
Definition at line 210 of file MeshPartitionTool.hpp.
|
private |
Definition at line 211 of file MeshPartitionTool.hpp.
|
private |
Definition at line 212 of file MeshPartitionTool.hpp.
|
private |
Definition at line 213 of file MeshPartitionTool.hpp.
|
private |
Definition at line 214 of file MeshPartitionTool.hpp.
|
private |
Definition at line 215 of file MeshPartitionTool.hpp.
|
private |
Definition at line 216 of file MeshPartitionTool.hpp.
|
private |
Definition at line 217 of file MeshPartitionTool.hpp.
|
private |
Definition at line 218 of file MeshPartitionTool.hpp.
|
private |
Store ownership for each entity, subdivided by entity type.
Definition at line 221 of file MeshPartitionTool.hpp.