DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <DistributedTetrahedralMesh.hpp>

Inherits AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Collaboration diagram for DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >:
Collaboration graph
[legend]

List of all members.

Public Types

enum  PartitionType { DUMB = 0, PARMETIS_LIBRARY = 1, METIS_LIBRARY = 2 }

Public Member Functions

 DistributedTetrahedralMesh (PartitionType metisPartitioning=METIS_LIBRARY)
virtual ~DistributedTetrahedralMesh ()
void SetDistributedVectorFactory (DistributedVectorFactory *pFactory)
void ConstructFromMeshReader (AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader)
unsigned GetNumLocalNodes () const
unsigned GetNumLocalElements () const
unsigned GetNumLocalBoundaryElements () const
unsigned GetNumNodes () const
unsigned GetNumAllNodes () const
unsigned GetNumElements () const
PartitionType GetPartitionType () const
unsigned GetNumBoundaryElements () const
void GetHaloNodeIndices (std::vector< unsigned > &rHaloIndices) const
void SetElementOwnerships (unsigned lo, unsigned hi)
bool CalculateDesignatedOwnershipOfElement (unsigned elementIndex)
bool CalculateDesignatedOwnershipOfBoundaryElement (unsigned faceIndex)
void ConstructLinearMesh (unsigned width)
void ConstructRectangularMesh (unsigned width, unsigned height, bool stagger=true)
void ConstructCuboid (unsigned width, unsigned height, unsigned depth)
virtual void Scale (const double xFactor=1.0, const double yFactor=1.0, const double zFactor=1.0)
Node< SPACE_DIM > * GetAnyNode (unsigned index) const

Private Member Functions

template<class Archive >
void serialize (Archive &archive, const unsigned int version)
void RegisterNode (unsigned index)
void RegisterHaloNode (unsigned index)
void RegisterElement (unsigned index)
void RegisterBoundaryElement (unsigned index)
unsigned SolveNodeMapping (unsigned index) const
unsigned SolveElementMapping (unsigned index) const
unsigned SolveBoundaryElementMapping (unsigned index) const
void ComputeMeshPartitioning (AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader, std::set< unsigned > &rNodesOwned, std::set< unsigned > &rHaloNodesOwned, std::set< unsigned > &rElementsOwned, std::vector< unsigned > &rProcessorsOffset)
void DumbNodePartitioning (AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader, std::set< unsigned > &rNodesOwned)
void MetisLibraryNodePartitioning (AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader, std::set< unsigned > &rNodesOwned, std::vector< unsigned > &rProcessorsOffset)
void ParMetisLibraryNodePartitioning (AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader, std::set< unsigned > &rElementsOwned, std::set< unsigned > &rNodesOwned, std::set< unsigned > &rHaloNodesOwned, std::vector< unsigned > &rProcessorsOffset)
void ReorderNodes ()

Private Attributes

unsigned mTotalNumElements
unsigned mTotalNumBoundaryElements
unsigned mTotalNumNodes
std::vector< Node< SPACE_DIM > * > mHaloNodes
std::map< unsigned, unsignedmNodesMapping
std::map< unsigned, unsignedmHaloNodesMapping
std::map< unsigned, unsignedmElementsMapping
std::map< unsigned, unsignedmBoundaryElementsMapping
PartitionType mMetisPartitioning

Friends

class TestDistributedTetrahedralMesh
class boost::serialization::access

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
class DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >

Parallel implementation of a mesh Nodes are distributed such that each process has A set of nodes (possibly reordered) with contiguous global indices A local copy of all the elements supporting those nodes A local copy of ghost/halo nodes which are all the nodes used in the supporting elements, but not owned outright.

Definition at line 67 of file DistributedTetrahedralMesh.hpp.


Member Enumeration Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
enum DistributedTetrahedralMesh::PartitionType

Definition of partition types. "DUMB" is using natural mesh ordering with PETSC_DECIDE. "PARMETIS_LIBRARY" is a call to the parallel parMETIS library "METIS_LIBRARY" is a call to the sequential METIS library

Definition at line 78 of file DistributedTetrahedralMesh.hpp.


Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::DistributedTetrahedralMesh ( PartitionType  metisPartitioning = METIS_LIBRARY  )  [inline]

Constructor.

Parameters:
metisPartitioning defaults to METIS_LIBRARY, but in 1-D is always overridden in this constructor to be the DUMB partition

Definition at line 50 of file DistributedTetrahedralMesh.cpp.

References DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mMetisPartitioning.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::~DistributedTetrahedralMesh (  )  [inline, virtual]

Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::CalculateDesignatedOwnershipOfBoundaryElement ( unsigned  faceIndex  )  [inline, virtual]

Determine whether or not the current process owns node 0 of this boundary element (tie breaker to determine which process writes to file for when two or more share ownership of a face).

Parameters:
faceIndex is the global index of the face

Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 467 of file DistributedTetrahedralMesh.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::CalculateDesignatedOwnershipOfElement ( unsigned  elementIndex  )  [inline, virtual]

Determine whether or not the current process owns node 0 of this element (tie breaker to determine which process writes to file for when two or more share ownership of an element).

Parameters:
elementIndex is the global index of the element

Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 454 of file DistributedTetrahedralMesh.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ComputeMeshPartitioning ( AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &  rMeshReader,
std::set< unsigned > &  rNodesOwned,
std::set< unsigned > &  rHaloNodesOwned,
std::set< unsigned > &  rElementsOwned,
std::vector< unsigned > &  rProcessorsOffset 
) [inline, private]

Compute a parallel partitioning of a given mesh using specialised methods below based on the value of mMetisPartitioning

Parameters:
rMeshReader is the reader pointing to the mesh to be read in and partitioned
rNodesOwned is a set to be filled with the indices of nodes owned by this process
rHaloNodesOwned is a set to be filled with the indices of halo nodes owned by this process
rElementsOwned is a set to be filled with the indices of elements owned by this process
rProcessorsOffset a vector of length NumProcs to be filled with the index of the lowest indexed node owned by each process

Todo:
#1293 add a timing event for the partitioning

Definition at line 81 of file DistributedTetrahedralMesh.cpp.

References DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::DumbNodePartitioning(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), PetscTools::IsSequential(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::MetisLibraryNodePartitioning(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mMetisPartitioning, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumElements, ElementData::NodeIndices, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ParMetisLibraryNodePartitioning(), and AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset().

Referenced by DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMeshReader().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructCuboid ( unsigned  width,
unsigned  height,
unsigned  depth 
) [inline, virtual]

Construct a 3D cuboid grid on [0,width]x[0,height]x[0,depth].

Parameters:
width width of the mesh (in the x-direction)
height height of the mesh (in the y-direction)
depth depth of the mesh (in the z-direction)

Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 1002 of file DistributedTetrahedralMesh.cpp.

References PetscTools::AmMaster(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetAnyNode(), DistributedVectorFactory::GetHigh(), DistributedVectorFactory::GetLocalOwnership(), DistributedVectorFactory::GetLow(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryElements, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryNodes, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElements, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mHaloNodes, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mMetisPartitioning, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mpDistributedVectorFactory, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumBoundaryElements, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumElements, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumNodes, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RegisterBoundaryElement(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RegisterElement(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RegisterHaloNode(), and DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RegisterNode().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMeshReader ( AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &  rMeshReader  )  [inline, virtual]

Construct the mesh using a MeshReader.

Parameters:
rMeshReader the mesh reader

Todo:
#1289 assert the node is not considered both owned and halo-owned.

Implements AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 142 of file DistributedTetrahedralMesh.cpp.

References PetscTools::AmTopMost(), ElementData::AttributeValue, PetscTools::Barrier(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ComputeMeshPartitioning(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetAnyNode(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetElementData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetMeshFileBaseName(), PetscTools::GetMyRank(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElementAttributes(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumFaceAttributes(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumFaces(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::IsFileFormatBinary(), PetscTools::IsSequential(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryElements, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryNodes, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElements, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mHaloNodes, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mMeshFileBaseName, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mMetisPartitioning, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mNodesMapping, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodesPermutation, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mpDistributedVectorFactory, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumBoundaryElements, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumElements, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumNodes, ElementData::NodeIndices, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RegisterBoundaryElement(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RegisterElement(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RegisterHaloNode(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RegisterNode(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ReorderNodes(), PetscTools::ReplicateException(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset(), Timer::Reset(), and AbstractElement< ELEMENT_DIM, SPACE_DIM >::SetRegion().

Referenced by Load2dMeshAndSetCircularTissue().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructLinearMesh ( unsigned  width  )  [inline, virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructRectangularMesh ( unsigned  width,
unsigned  height,
bool  stagger = true 
) [inline, virtual]

Construct a 2D rectangular grid on [0,width]x[0,height].

Diagonals can be staggered so that there is no preferred diffusion propagation direction.

Parameters:
width width of the mesh (in the x-direction)
height height of the mesh (in the y-direction)
stagger whether the mesh should 'jumble' up the elements (defaults to true)

Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 829 of file DistributedTetrahedralMesh.cpp.

References PetscTools::AmMaster(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetAnyNode(), DistributedVectorFactory::GetHigh(), DistributedVectorFactory::GetLocalOwnership(), DistributedVectorFactory::GetLow(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryElements, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryNodes, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElements, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mHaloNodes, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mMetisPartitioning, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mpDistributedVectorFactory, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumBoundaryElements, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumElements, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumNodes, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RegisterBoundaryElement(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RegisterElement(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RegisterHaloNode(), and DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RegisterNode().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::DumbNodePartitioning ( AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &  rMeshReader,
std::set< unsigned > &  rNodesOwned 
) [inline, private]

Specialised method to compute a parallel partitioning of a given mesh (called by ComputeMeshPartitioning, based on the value of mMetisPartitioning)

Parameters:
rMeshReader is the reader pointing to the mesh to be read in and partitioned
rNodesOwned is an empty set to be filled with the indices of nodes owned by this process

Definition at line 576 of file DistributedTetrahedralMesh.cpp.

References DistributedVectorFactory::GetHigh(), DistributedVectorFactory::GetLow(), DistributedVectorFactory::GetProblemSize(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mpDistributedVectorFactory, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumBoundaryElements, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumElements, and DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumNodes.

Referenced by DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ComputeMeshPartitioning().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
Node< SPACE_DIM > * DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetAnyNode ( unsigned  index  )  const [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetHaloNodeIndices ( std::vector< unsigned > &  rHaloIndices  )  const [inline]

Utility method to give the functionality of iterating through the halo nodes of a process

Parameters:
rHaloIndices A vector to fill with the global indices of the nodes which are locally halos

Definition at line 428 of file DistributedTetrahedralMesh.cpp.

References DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mHaloNodes.

Referenced by DistanceMapCalculator< ELEMENT_DIM, SPACE_DIM >::DistanceMapCalculator().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumAllNodes (  )  const [inline, virtual]

Get the total number of nodes that are actually in use (globally).

Reimplemented from AbstractMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 404 of file DistributedTetrahedralMesh.cpp.

References DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumNodes.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumBoundaryElements (  )  const [inline, virtual]

Get the total number of boundary elements that are actually in use (globally).

Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 422 of file DistributedTetrahedralMesh.cpp.

References DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumBoundaryElements.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumElements (  )  const [inline, virtual]

Get the total number of elements that are actually in use (globally).

Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 410 of file DistributedTetrahedralMesh.cpp.

References DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumElements.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumLocalBoundaryElements (  )  const [inline]

Get the number of Boundary Elements which are owned by this process (have at least one entirely locally-owned node).

Definition at line 392 of file DistributedTetrahedralMesh.cpp.

References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryElements.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumLocalElements (  )  const [inline]

Get the number of Elements which are owned by this process (have at least one entirely locally-owned node).

Definition at line 386 of file DistributedTetrahedralMesh.cpp.

References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElements.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumLocalNodes (  )  const [inline]

Get the number of nodes that are entirely owned by the local process. (Does not include halo nodes).

Definition at line 380 of file DistributedTetrahedralMesh.cpp.

References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes (  )  const [inline, virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::PartitionType DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetPartitionType (  )  const [inline]

Get the type of mesh partition ing that is being used...

serialization uses this method.

Definition at line 416 of file DistributedTetrahedralMesh.cpp.

References DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mMetisPartitioning.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::MetisLibraryNodePartitioning ( AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &  rMeshReader,
std::set< unsigned > &  rNodesOwned,
std::vector< unsigned > &  rProcessorsOffset 
) [inline, private]

Specialised method to compute a parallel partitioning of a given mesh (called by ComputeMeshPartitioning, based on the value of mMetisPartitioning

Parameters:
rMeshReader is the reader pointing to the mesh to be read in and partitioned
rNodesOwned is an empty set to be filled with the indices of nodes owned by this process
rProcessorsOffset a vector of length NumProcs to be filled with the index of the lowest indexed node owned by each process

Definition at line 606 of file DistributedTetrahedralMesh.cpp.

References PetscTools::AmMaster(), PetscTools::GetMyRank(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), PetscTools::GetNumProcs(), PetscTools::IsSequential(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodesPermutation, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumElements, ElementData::NodeIndices, Timer::Reset(), and AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset().

Referenced by DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ComputeMeshPartitioning().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ParMetisLibraryNodePartitioning ( AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &  rMeshReader,
std::set< unsigned > &  rElementsOwned,
std::set< unsigned > &  rNodesOwned,
std::set< unsigned > &  rHaloNodesOwned,
std::vector< unsigned > &  rProcessorsOffset 
) [inline, private]

Specialised method to compute a parallel partitioning of a given mesh with the ParMetis library (called by ComputeMeshPartitioning, based on the value of mMetisPartitioning)

Parameters:
rMeshReader is the reader pointing to the mesh to be read in and partitioned
rElementsOwned is an empty set to be filled with the indices of elements owned by this process
rNodesOwned is an empty set to be filled with the indices of nodes owned by this process
rHaloNodesOwned is an empty set to be filled with the indices of halo nodes owned by this process
rProcessorsOffset a vector of length NumProcs to be filled with the index of the lowest indexed node owned by each process

Definition at line 1264 of file DistributedTetrahedralMesh.cpp.

References PetscTools::GetMyRank(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), PetscTools::GetNumProcs(), PetscTools::IsSequential(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodesPermutation, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumElements, ElementData::NodeIndices, Timer::Reset(), and AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset().

Referenced by DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ComputeMeshPartitioning().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RegisterBoundaryElement ( unsigned  index  )  [inline, private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RegisterElement ( unsigned  index  )  [inline, private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RegisterHaloNode ( unsigned  index  )  [inline, private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RegisterNode ( unsigned  index  )  [inline, private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ReorderNodes (  )  [inline, private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::Scale ( const double  xFactor = 1.0,
const double  yFactor = 1.0,
const double  zFactor = 1.0 
) [inline, virtual]

Scale the mesh - uses the parent class for scaling the nodes. This derived specialisation is for scaling halo nodes.

Parameters:
xFactor is the scale in the x-direction (defaults to 1.0)
yFactor is the scale in the y-direction (defaults to 1.0)
zFactor is the scale in the z-direction (defaults to 1.0)

Reimplemented from AbstractMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 1241 of file DistributedTetrahedralMesh.cpp.

References DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mHaloNodes.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
template<class Archive >
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::serialize ( Archive &  archive,
const unsigned int  version 
) [inline, private]

Serialize the mesh.

Parameters:
archive the archive
version the current version of this class

Reimplemented from AbstractMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 123 of file DistributedTetrahedralMesh.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SetDistributedVectorFactory ( DistributedVectorFactory pFactory  )  [inline, virtual]

Specify the node distribution across processes. This also makes sure we don't try to use METIS to partition the mesh.

Parameters:
pFactory a factory to use for this mesh

Reimplemented from AbstractMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 74 of file DistributedTetrahedralMesh.cpp.

References DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mMetisPartitioning.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SetElementOwnerships ( unsigned  lo,
unsigned  hi 
) [inline, virtual]

Sets the ownership of each element according to which nodes are owned by the process.

Parameters:
lo is the lowest node number owned by the process
hi is one higher than the highest node number owned by the process ie. this process owns nodes [lo..hi) and element is "owned" if one or more of its nodes are owned

Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 439 of file DistributedTetrahedralMesh.cpp.

References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElements, and AbstractElement< ELEMENT_DIM, SPACE_DIM >::SetOwnership().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SolveBoundaryElementMapping ( unsigned  index  )  const [inline, private, virtual]

Overridden solve boundary element mapping method.

Parameters:
index the global index of the boundary element

Implements AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 540 of file DistributedTetrahedralMesh.cpp.

References PetscTools::GetMyRank(), and DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryElementsMapping.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SolveElementMapping ( unsigned  index  )  const [inline, private, virtual]

Overridden solve element mapping method.

Parameters:
index the global index of the element

Implements AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 525 of file DistributedTetrahedralMesh.cpp.

References PetscTools::GetMyRank(), and DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElementsMapping.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SolveNodeMapping ( unsigned  index  )  const [inline, private, virtual]

Overridden solve node mapping method.

Parameters:
index the global index of the node

Implements AbstractMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 504 of file DistributedTetrahedralMesh.cpp.

References PetscTools::GetMyRank(), and DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mNodesMapping.


Friends And Related Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
friend class boost::serialization::access [friend]

Needed for serialization.

Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 115 of file DistributedTetrahedralMesh.hpp.


Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::map<unsigned, unsigned> DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryElementsMapping [private]

A map from boundary element global index to local index used by this process.

Definition at line 109 of file DistributedTetrahedralMesh.hpp.

Referenced by DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RegisterBoundaryElement(), and DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SolveBoundaryElementMapping().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::map<unsigned, unsigned> DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElementsMapping [private]

A map from element global index to local index used by this process.

Definition at line 106 of file DistributedTetrahedralMesh.hpp.

Referenced by DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RegisterElement(), and DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SolveElementMapping().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<Node<SPACE_DIM>* > DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mHaloNodes [private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::map<unsigned, unsigned> DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mHaloNodesMapping [private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
PartitionType DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mMetisPartitioning [private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::map<unsigned, unsigned> DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mNodesMapping [private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumBoundaryElements [private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumElements [private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumNodes [private]

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

Generated by  doxygen 1.6.2