LifeV
MeshPartBuilder< MeshType > Class Template Reference

Class that builds a mesh part, after the graph has been partitioned. More...

#include <MeshPartBuilder.hpp>

+ Collaboration diagram for MeshPartBuilder< MeshType >:

Data Structures

struct  entityPID_Type
 

Private Member Functions

void markEntityOwnership (const entityPID_Type &entityPID)
 Mark entity ownership. More...
 

Public Types

typedef MeshType mesh_Type
 
typedef std::shared_ptr< mesh_TypemeshPtr_Type
 
typedef std::shared_ptr< Epetra_Comm > commPtr_Type
 

Constructors & Destructors

 MeshPartBuilder (const meshPtr_Type &mesh, const UInt overlap, const commPtr_Type &comm)
 Constructor. More...
 
 ~MeshPartBuilder ()
 Empty destructor. More...
 

Public Methods

void run (const meshPtr_Type &meshPart, const idTablePtr_Type &graph, const entityPID_Type &entityPIDList, const UInt partIndex)
 Run part builder. More...
 
void reset ()
 Resets the MeshPartBuilder object to the initial state. More...
 

Get Methods

const std::map< Int, Int > & globalToLocalElement () const
 
void constructLocalMesh (const std::vector< Int > &elementList)
 Private Methods. More...
 
void constructNodes ()
 Construct nodes. More...
 
void constructElements ()
 Construct volumes. More...
 
void constructRidges ()
 Construct edges. More...
 
void constructFacets ()
 Construct faces. More...
 
void finalSetup ()
 Final setup of local mesh. More...
 
UInt M_nBoundaryVertices
 Private Data Members. More...
 
UInt M_nBoundaryRidges
 
UInt M_nBoundaryFacets
 
UInt M_elementVertices
 
UInt M_elementFacets
 
UInt M_elementRidges
 
UInt M_facetVertices
 
std::vector< IntM_localVertices
 
std::set< IntM_localRidges
 
std::set< IntM_localFacets
 
std::vector< IntM_localElements
 
std::map< Int, IntM_globalToLocalVertex
 
std::map< Int, IntM_globalToLocalElement
 
meshPtr_Type M_originalMesh
 
meshPtr_Type M_meshPart
 
UInt M_partIndex
 
UInt M_overlap
 
commPtr_Type M_comm
 

Detailed Description

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

Class that builds a mesh part, after the graph has been partitioned.

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

This class is used as a component for the MeshPartitionTool class. When an object of class MeshPartBuilder is instantiated it holds pointer to the global uncut mesh.

The only public method that this class implements is a run method, which takes a vector of element IDs which corespond to a mesh part and builds a RegionMesh object with this elements.

Definition at line 68 of file MeshPartBuilder.hpp.

Member Typedef Documentation

◆ mesh_Type

Definition at line 73 of file MeshPartBuilder.hpp.

◆ meshPtr_Type

typedef std::shared_ptr<mesh_Type> meshPtr_Type

Definition at line 74 of file MeshPartBuilder.hpp.

◆ commPtr_Type

typedef std::shared_ptr<Epetra_Comm> commPtr_Type

Definition at line 75 of file MeshPartBuilder.hpp.

Constructor & Destructor Documentation

◆ MeshPartBuilder()

MeshPartBuilder ( const meshPtr_Type mesh,
const UInt  overlap,
const commPtr_Type comm 
)

Constructor.

Constructor which takes a pointer to a RegionMesh object, the uncut mesh

Parameters
mesh- shared pointer to the global uncut mesh

Definition at line 207 of file MeshPartBuilder.hpp.

◆ ~MeshPartBuilder()

~MeshPartBuilder ( )
inline

Empty destructor.

Definition at line 100 of file MeshPartBuilder.hpp.

Member Function Documentation

◆ run()

void run ( const meshPtr_Type meshPart,
const idTablePtr_Type graph,
const entityPID_Type entityPIDList,
const UInt  partIndex 
)

Run part builder.

This method performs all the steps for the mesh and graph partitioning

Parameters
meshPart- shared pointer to a RegionMesh object which will contain the mesh part
elementList- shared pointer to a vector of int, representing the element IDs associated with this mesh part

Definition at line 225 of file MeshPartBuilder.hpp.

◆ reset()

void reset ( )

Resets the MeshPartBuilder object to the initial state.

Definition at line 613 of file MeshPartBuilder.hpp.

◆ globalToLocalElement()

const std::map<Int, Int>& globalToLocalElement ( ) const
inline

Definition at line 125 of file MeshPartBuilder.hpp.

◆ constructLocalMesh()

void constructLocalMesh ( const std::vector< Int > &  elementList)
private

Private Methods.

Construct local mesh

Constructs the data structures for the local mesh partition. Updates M_localVertices, M_localRidges, M_localFacets, M_localElements, M_globalToLocalVertex.

Definition at line 257 of file MeshPartBuilder.hpp.

◆ constructNodes()

void constructNodes ( )
private

Construct nodes.

Adds nodes to the partitioned mesh object. Updates M_nBoundaryVertices, M_meshPartition.

Definition at line 310 of file MeshPartBuilder.hpp.

+ Here is the caller graph for this function:

◆ constructElements()

void constructElements ( )
private

Construct volumes.

Adds volumes to the partitioned mesh object. Updates M_globalToLocalElement, M_meshPartition.

Definition at line 345 of file MeshPartBuilder.hpp.

+ Here is the caller graph for this function:

◆ constructRidges()

void constructRidges ( )
private

Construct edges.

Adds edges to the partitioned mesh object. Updates M_nBoundaryRidges, M_meshPartition.

Definition at line 383 of file MeshPartBuilder.hpp.

+ Here is the caller graph for this function:

◆ constructFacets()

void constructFacets ( )
private

Construct faces.

Adds faces to the partitioned mesh object. Updates M_nBoundaryFacets, M_meshPartition.

Definition at line 425 of file MeshPartBuilder.hpp.

+ Here is the caller graph for this function:

◆ finalSetup()

void finalSetup ( )
private

Final setup of local mesh.

Updates the partitioned mesh object data members after adding the mesh elements (nodes, edges, faces, volumes). Updates M_meshPartition.

Definition at line 535 of file MeshPartBuilder.hpp.

+ Here is the caller graph for this function:

◆ markEntityOwnership()

void markEntityOwnership ( const entityPID_Type entityPID)
private

Mark entity ownership.

Mark all owned entities in the partition with EntityFlag::OWNED to properly build map members in DOF::GlobalElements().

Definition at line 571 of file MeshPartBuilder.hpp.

+ Here is the caller graph for this function:

Field Documentation

◆ M_nBoundaryVertices

UInt M_nBoundaryVertices
private

Private Data Members.

Definition at line 183 of file MeshPartBuilder.hpp.

◆ M_nBoundaryRidges

UInt M_nBoundaryRidges
private

Definition at line 184 of file MeshPartBuilder.hpp.

◆ M_nBoundaryFacets

UInt M_nBoundaryFacets
private

Definition at line 185 of file MeshPartBuilder.hpp.

◆ M_elementVertices

UInt M_elementVertices
private

Definition at line 186 of file MeshPartBuilder.hpp.

◆ M_elementFacets

UInt M_elementFacets
private

Definition at line 187 of file MeshPartBuilder.hpp.

◆ M_elementRidges

UInt M_elementRidges
private

Definition at line 188 of file MeshPartBuilder.hpp.

◆ M_facetVertices

UInt M_facetVertices
private

Definition at line 189 of file MeshPartBuilder.hpp.

◆ M_localVertices

std::vector<Int> M_localVertices
private

Definition at line 190 of file MeshPartBuilder.hpp.

◆ M_localRidges

std::set<Int> M_localRidges
private

Definition at line 191 of file MeshPartBuilder.hpp.

◆ M_localFacets

std::set<Int> M_localFacets
private

Definition at line 192 of file MeshPartBuilder.hpp.

◆ M_localElements

std::vector<Int> M_localElements
private

Definition at line 193 of file MeshPartBuilder.hpp.

◆ M_globalToLocalVertex

std::map<Int, Int> M_globalToLocalVertex
private

Definition at line 194 of file MeshPartBuilder.hpp.

◆ M_globalToLocalElement

std::map<Int, Int> M_globalToLocalElement
private

Definition at line 195 of file MeshPartBuilder.hpp.

◆ M_originalMesh

meshPtr_Type M_originalMesh
private

Definition at line 196 of file MeshPartBuilder.hpp.

◆ M_meshPart

meshPtr_Type M_meshPart
private

Definition at line 197 of file MeshPartBuilder.hpp.

◆ M_partIndex

UInt M_partIndex
private

Definition at line 198 of file MeshPartBuilder.hpp.

◆ M_overlap

UInt M_overlap
private

Definition at line 199 of file MeshPartBuilder.hpp.

◆ M_comm

commPtr_Type M_comm
private

Definition at line 200 of file MeshPartBuilder.hpp.


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