Chaste  Release::2017.1
DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <DistributedTetrahedralMesh.hpp>

+ Inheritance diagram for DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >:
+ Collaboration diagram for DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >:

Public Types

typedef std::vector< Node< SPACE_DIM > * >::const_iterator HaloNodeIterator
 
- Public Types inherited from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >
typedef std::vector< BoundaryElement< ELEMENT_DIM-1, SPACE_DIM > * >::const_iterator BoundaryElementIterator
 
- Public Types inherited from AbstractMesh< ELEMENT_DIM, SPACE_DIM >
typedef std::vector< Node< SPACE_DIM > * >::const_iterator BoundaryNodeIterator
 

Public Member Functions

 DistributedTetrahedralMesh (DistributedTetrahedralMeshPartitionType::type partitioningMethod=DistributedTetrahedralMeshPartitionType::PARMETIS_LIBRARY)
 
virtual ~DistributedTetrahedralMesh ()
 
void SetDistributedVectorFactory (DistributedVectorFactory *pFactory)
 
virtual void ConstructFromMeshReader (AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader)
 
unsigned GetNumLocalNodes () const
 
unsigned GetNumHaloNodes () const
 
unsigned GetNumLocalElements () const
 
unsigned GetNumLocalBoundaryElements () const
 
unsigned GetNumNodes () const
 
unsigned GetNumAllNodes () const
 
unsigned GetNumElements () const
 
DistributedTetrahedralMeshPartitionType::type GetPartitionType () const
 
unsigned GetNumBoundaryElements () const
 
void GetHaloNodeIndices (std::vector< unsigned > &rHaloIndices) const
 
void SetProcessRegion (ChasteCuboid< SPACE_DIM > *pRegion)
 
ChasteCuboid< SPACE_DIM > * GetProcessRegion ()
 
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 > * GetNodeOrHaloNode (unsigned index) const
 
virtual ChasteCuboid< SPACE_DIM > CalculateBoundingBox () const
 
virtual unsigned GetNearestNodeIndex (const ChastePoint< SPACE_DIM > &rTestPoint)
 
virtual c_vector< double, 2 > CalculateMinMaxEdgeLengths ()
 
void Rotate (c_matrix< double, SPACE_DIM, SPACE_DIM > rotationMatrix)
 
void Translate (const c_vector< double, SPACE_DIM > &rDisplacement)
 
HaloNodeIterator GetHaloNodeIteratorBegin () const
 
HaloNodeIterator GetHaloNodeIteratorEnd () const
 
- Public Member Functions inherited from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >
ElementIterator GetElementIteratorBegin (bool skipDeletedElements=true)
 
ElementIterator GetElementIteratorEnd ()
 
 AbstractTetrahedralMesh ()
 
virtual ~AbstractTetrahedralMesh ()
 
unsigned GetNumAllElements () const
 
unsigned GetNumAllBoundaryElements () const
 
virtual unsigned GetNumCableElements () const
 
virtual unsigned GetNumVertices () const
 
virtual unsigned GetMaximumNodeIndex ()
 
Element< ELEMENT_DIM, SPACE_DIM > * GetElement (unsigned index) const
 
BoundaryElement< ELEMENT_DIM-1, SPACE_DIM > * GetBoundaryElement (unsigned index) const
 
void ConstructFromMesh (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &rOtherMesh)
 
BoundaryElementIterator GetBoundaryElementIteratorBegin () const
 
BoundaryElementIterator GetBoundaryElementIteratorEnd () const
 
virtual void GetInverseJacobianForElement (unsigned elementIndex, c_matrix< double, SPACE_DIM, ELEMENT_DIM > &rJacobian, double &rJacobianDeterminant, c_matrix< double, ELEMENT_DIM, SPACE_DIM > &rInverseJacobian) const
 
virtual void GetWeightedDirectionForBoundaryElement (unsigned elementIndex, c_vector< double, SPACE_DIM > &rWeightedDirection, double &rJacobianDeterminant) const
 
void CheckOutwardNormals ()
 
void ConstructRegularSlabMesh (double spaceStep, double width, double height=0, double depth=0)
 
void ConstructRegularSlabMeshWithDimensionSplit (unsigned dimension, double spaceStep, double width, double height=0, double depth=0)
 
unsigned CalculateMaximumNodeConnectivityPerProcess () const
 
void CalculateNodeExchange (std::vector< std::vector< unsigned > > &rNodesToSendPerProcess, std::vector< std::vector< unsigned > > &rNodesToReceivePerProcess)
 
unsigned GetContainingElementIndex (const ChastePoint< SPACE_DIM > &rTestPoint, bool strict=false, std::set< unsigned > testElements=std::set< unsigned >(), bool onlyTryWithTestElements=false)
 
unsigned GetNearestElementIndexFromTestElements (const ChastePoint< SPACE_DIM > &rTestPoint, std::set< unsigned > testElements)
 
- Public Member Functions inherited from AbstractMesh< ELEMENT_DIM, SPACE_DIM >
NodeIterator GetNodeIteratorBegin (bool skipDeletedNodes=true)
 
NodeIterator GetNodeIteratorEnd ()
 
 AbstractMesh ()
 
virtual ~AbstractMesh ()
 
unsigned GetNumBoundaryNodes () const
 
unsigned GetNumNodeAttributes () const
 
Node< SPACE_DIM > * GetNode (unsigned index) const
 
Node< SPACE_DIM > * GetNodeFromPrePermutationIndex (unsigned index) const
 
virtual void ReadNodesPerProcessorFile (const std::string &rNodesPerProcessorFile)
 
virtual DistributedVectorFactoryGetDistributedVectorFactory ()
 
virtual void PermuteNodes ()
 
BoundaryNodeIterator GetBoundaryNodeIteratorBegin () const
 
BoundaryNodeIterator GetBoundaryNodeIteratorEnd () const
 
std::string GetMeshFileBaseName () const
 
bool IsMeshOnDisk () const
 
const std::vector< unsigned > & rGetNodePermutation () const
 
virtual c_vector< double, SPACE_DIM > GetVectorFromAtoB (const c_vector< double, SPACE_DIM > &rLocationA, const c_vector< double, SPACE_DIM > &rLocationB)
 
double GetDistanceBetweenNodes (unsigned indexA, unsigned indexB)
 
virtual double GetWidth (const unsigned &rDimension) const
 
void Translate (const double xMovement=0.0, const double yMovement=0.0, const double zMovement=0.0)
 
void Rotate (c_vector< double, 3 > axis, double angle)
 
void RotateX (const double theta)
 
void RotateY (const double theta)
 
void RotateZ (const double theta)
 
void Rotate (double theta)
 
virtual void RefreshMesh ()
 
bool IsMeshChanging () const
 
unsigned CalculateMaximumContainingElementsPerProcess () const
 
void SetMeshHasChangedSinceLoading ()
 

Protected Member Functions

unsigned SolveNodeMapping (unsigned index) const
 
unsigned SolveElementMapping (unsigned index) const
 
unsigned SolveBoundaryElementMapping (unsigned index) const
 
- Protected Member Functions inherited from AbstractMesh< ELEMENT_DIM, SPACE_DIM >
ChasteCuboid< SPACE_DIM > CalculateBoundingBox (const std::vector< Node< SPACE_DIM > * > &rNodes) const
 

Private Member Functions

template<class Archive >
void serialize (Archive &archive, const unsigned int version)
 
void SetElementOwnerships ()
 
void RegisterNode (unsigned index)
 
void RegisterHaloNode (unsigned index)
 
void RegisterElement (unsigned index)
 
void RegisterBoundaryElement (unsigned index)
 
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 ParMetisLibraryNodeAndElementPartitioning (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
 
ChasteCuboid< SPACE_DIM > * mpSpaceRegion
 
DistributedTetrahedralMeshPartitionType::type mPartitioning
 

Friends

class TestDistributedTetrahedralMesh
 
class TestDistributedQuadraticMesh
 
class boost::serialization::access
 

Additional Inherited Members

- Protected Attributes inherited from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >
bool mMeshIsLinear
 
std::vector< Element< ELEMENT_DIM, SPACE_DIM > * > mElements
 
std::vector< BoundaryElement< ELEMENT_DIM-1, SPACE_DIM > * > mBoundaryElements
 
- Protected Attributes inherited from AbstractMesh< ELEMENT_DIM, SPACE_DIM >
std::vector< Node< SPACE_DIM > * > mNodes
 
std::vector< Node< SPACE_DIM > * > mBoundaryNodes
 
DistributedVectorFactorympDistributedVectorFactory
 
std::vector< unsignedmNodePermutation
 
std::string mMeshFileBaseName
 
bool mMeshChangesDuringSimulation
 

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 62 of file DistributedTetrahedralMesh.hpp.

Member Typedef Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
typedef std::vector<Node<SPACE_DIM> *>::const_iterator DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::HaloNodeIterator
Todo:
#1494, this iterator needs to be dereferenced twice because it is an STL iterator to a pointer.

Definition of halo node Iterator type.

Definition at line 449 of file DistributedTetrahedralMesh.hpp.

Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::DistributedTetrahedralMesh ( DistributedTetrahedralMeshPartitionType::type  partitioningMethod = DistributedTetrahedralMeshPartitionType::PARMETIS_LIBRARY)

Constructor.

Parameters
partitioningMethoddefaults to PARMETIS_LIBRARY, but in 1-D is always overridden in this constructor to be the DUMB partition

Definition at line 75 of file DistributedTetrahedralMesh.cpp.

References DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mPartitioning.

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize().

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

Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ChasteCuboid< SPACE_DIM > DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::CalculateBoundingBox ( ) const
virtual

Calculate the bounding box (width extremes for all dimensions of the mesh). Override for distributed case

Returns
The minimum and maximum co-ordinates of any node in each dimension

Reimplemented from AbstractMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 1614 of file DistributedTetrahedralMesh.cpp.

References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::CalculateBoundingBox(), PetscTools::ReplicateException(), ChastePoint< DIM >::rGetLocation(), ChasteCuboid< SPACE_DIM >::rGetLowerCorner(), and ChasteCuboid< SPACE_DIM >::rGetUpperCorner().

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::CalculateDesignatedOwnershipOfBoundaryElement ( unsigned  faceIndex)
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).

Returns
true if process is designated owner
Parameters
faceIndexis the global index of the face

Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 567 of file DistributedTetrahedralMesh.cpp.

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::CalculateDesignatedOwnershipOfElement ( unsigned  elementIndex)
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).

Returns
true if process is designated owner
Parameters
elementIndexis the global index of the element

Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 554 of file DistributedTetrahedralMesh.cpp.

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
c_vector< double, 2 > DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::CalculateMinMaxEdgeLengths ( )
virtual

Computes the minimum and maximum lengths of the edges in the mesh. This method overrides the default implementation in the parent class

Todo:
Should be const
Returns
The minimum and maximum edge lengths in the mesh

Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 1678 of file DistributedTetrahedralMesh.cpp.

References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::CalculateMinMaxEdgeLengths().

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize().

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 
)
private

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

Parameters
rMeshReaderis the reader pointing to the mesh to be read in and partitioned
rNodesOwnedis a set to be filled with the indices of nodes owned by this process
rHaloNodesOwnedis a set to be filled with the indices of halo nodes owned by this process
rElementsOwnedis a set to be filled with the indices of elements owned by this process
rProcessorsOffseta 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 107 of file DistributedTetrahedralMesh.cpp.

References PetscTools::AmMaster(), PetscTools::Barrier(), NodePartitioner< ELEMENT_DIM, SPACE_DIM >::DumbPartitioning(), EXCEPTION, NodePartitioner< ELEMENT_DIM, SPACE_DIM >::GeometricPartitioning(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetContainingElementIndices(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetElementData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::HasNclFile(), PetscTools::HasParMetis(), PetscTools::IsParallel(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodePermutation, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mPartitioning, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mpSpaceRegion, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumElements, ElementData::NodeIndices, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ParMetisLibraryNodeAndElementPartitioning(), NodePartitioner< ELEMENT_DIM, SPACE_DIM >::PetscMatrixPartitioning(), Timer::PrintAndReset(), and AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset().

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

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

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

Distributed version splits the mesh in layers in the z-direction. That is, the zeroth process will own from z=0 to about z=depth/num_procs etc.

Parameters
widthwidth of the mesh (in the x-direction)
heightheight of the mesh (in the y-direction)
depthdepth of the mesh (in the z-direction)
Todo:
probably faster to make mesh from scratch.

Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 1018 of file DistributedTetrahedralMesh.cpp.

References PetscTools::AmMaster(), PetscTools::Barrier(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructCuboid(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMeshReader(), EXCEPTION, DistributedVectorFactory::GetHigh(), DistributedVectorFactory::GetLocalOwnership(), DistributedVectorFactory::GetLow(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeOrHaloNode(), OutputFileHandler::GetOutputDirectoryFullPath(), 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 >::mNodes, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mPartitioning, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mpDistributedVectorFactory, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mpSpaceRegion, 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(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RegisterNode(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh().

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize().

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

Construct the mesh using a MeshReader.

Parameters
rMeshReaderthe mesh reader
Todo:
#1930 We should use a reader set iterator for this bit now.
Todo:
#1730 and we should be able to combine ASCII branch
Todo:
#1930 We should use a reader set iterator for this bit now.
Todo:
#1289 assert the node is not considered both owned and halo-owned.

Implements AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Reimplemented in MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 232 of file DistributedTetrahedralMesh.cpp.

References Node< SPACE_DIM >::AddNodeAttribute(), PetscTools::AmTopMost(), ElementData::AttributeValue, PetscTools::Barrier(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ComputeMeshPartitioning(), EXCEPTION, AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorBegin(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorEnd(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetMeshFileBaseName(), PetscTools::GetMyRank(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNodeAttributes(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNodeIteratorBegin(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNodeIteratorEnd(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeOrHaloNode(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElementAttributes(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumFaceAttributes(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumFaces(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::HasNodePermutation(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::IsFileFormatBinary(), PetscTools::IsParallel(), 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, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodePermutation, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mNodesMapping, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mPartitioning, 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(), Timer::Reset(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::rGetNodePermutation(), and AbstractElement< ELEMENT_DIM, SPACE_DIM >::SetAttribute().

Referenced by DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructCuboid(), MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMeshReader(), DistributedQuadraticMesh< DIM >::ConstructFromMeshReader(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructLinearMesh(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructRectangularMesh(), Load2dMeshAndSetCircularTissue(), and DistributedTetrahedralMesh< DIM, DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructLinearMesh ( unsigned  width)
virtual

Construct a 1D linear grid on [0,width]

Throws if there are more processes than the number of nodes (width+1)

Parameters
widthwidth of the mesh (in the x-direction)
Todo:
probably faster to make mesh from scratch.

Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 697 of file DistributedTetrahedralMesh.cpp.

References PetscTools::AmMaster(), PetscTools::Barrier(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMeshReader(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructLinearMesh(), EXCEPTION, DistributedVectorFactory::GetHigh(), DistributedVectorFactory::GetLocalOwnership(), DistributedVectorFactory::GetLow(), OutputFileHandler::GetOutputDirectoryFullPath(), 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 >::mNodes, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mPartitioning, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mpDistributedVectorFactory, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mpSpaceRegion, 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(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RegisterNode(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh().

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructRectangularMesh ( unsigned  width,
unsigned  height,
bool  stagger = true 
)
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.

Distributed version splits the mesh in layers in the y-direction. That is, the zeroth process will own from y=0 to about y=height/num_procs etc.

Parameters
widthwidth of the mesh (in the x-direction)
heightheight of the mesh (in the y-direction)
staggerwhether the mesh should 'jumble' up the elements (defaults to true)
Todo:
probably faster to make mesh from scratch.

Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 815 of file DistributedTetrahedralMesh.cpp.

References PetscTools::AmMaster(), PetscTools::Barrier(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMeshReader(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructRectangularMesh(), EXCEPTION, DistributedVectorFactory::GetHigh(), DistributedVectorFactory::GetLocalOwnership(), DistributedVectorFactory::GetLow(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeOrHaloNode(), OutputFileHandler::GetOutputDirectoryFullPath(), 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 >::mNodes, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mPartitioning, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mpDistributedVectorFactory, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mpSpaceRegion, 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(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RegisterNode(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh().

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetHaloNodeIndices ( std::vector< unsigned > &  rHaloIndices) const
virtual

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

Parameters
rHaloIndicesA vector to fill with the global indices of the nodes which are locally halos

Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 520 of file DistributedTetrahedralMesh.cpp.

References DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mHaloNodes.

Referenced by DistanceMapCalculator< ELEMENT_DIM, SPACE_DIM >::DistanceMapCalculator(), and DistributedTetrahedralMesh< DIM, DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::HaloNodeIterator DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetHaloNodeIteratorBegin ( ) const
Returns
an iterator to the first halo node in the mesh.

Definition at line 1690 of file DistributedTetrahedralMesh.cpp.

References DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mHaloNodes.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::HaloNodeIterator DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetHaloNodeIteratorEnd ( ) const
Returns
an iterator to one past the last halo node in the mesh.

Definition at line 1730 of file DistributedTetrahedralMesh.cpp.

References EXPORT_TEMPLATE_CLASS_ALL_DIMS, and DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mHaloNodes.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNearestNodeIndex ( const ChastePoint< SPACE_DIM > &  rTestPoint)
virtual

GetNearestNodeIndex iterates through all nodes in the mesh and returns the global index with the smallest distance to the provided point.

This method is overridden in the distributed case to return the global node index.

Parameters
rTestPointreference to the point
Returns
node index

Reimplemented from AbstractMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 1648 of file DistributedTetrahedralMesh.cpp.

References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNearestNodeIndex(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), and ChastePoint< DIM >::rGetLocation().

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumAllNodes ( ) const
virtual
Returns
the total number of nodes that are actually in use (globally).

Reimplemented from AbstractMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 496 of file DistributedTetrahedralMesh.cpp.

References DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumNodes.

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumBoundaryElements ( ) const
virtual
Returns
the total number of boundary elements that are actually in use (globally).

Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 514 of file DistributedTetrahedralMesh.cpp.

References DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumBoundaryElements.

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumElements ( ) const
virtual
Returns
the total number of elements that are actually in use (globally).

Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 502 of file DistributedTetrahedralMesh.cpp.

References DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mTotalNumElements.

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumHaloNodes ( ) const
Returns
the number of nodes that are halo owned by the local process.

Definition at line 472 of file DistributedTetrahedralMesh.cpp.

References DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mHaloNodes.

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumLocalBoundaryElements ( ) const
virtual
Returns
the number of Boundary Elements which are owned by this process (have at least one entirely locally-owned node).

Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 484 of file DistributedTetrahedralMesh.cpp.

References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryElements.

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumLocalElements ( ) const
virtual
Returns
the number of Elements which are owned by this process (have at least one entirely locally-owned node).

Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 478 of file DistributedTetrahedralMesh.cpp.

References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElements.

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize(), and VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumLocalNodes ( ) const
Returns
the number of nodes that are entirely owned by the local process. (Does not include halo nodes).

Definition at line 466 of file DistributedTetrahedralMesh.cpp.

References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes.

Referenced by Hdf5ToVtkConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToVtkConverter(), and DistributedTetrahedralMesh< DIM, DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes ( ) const
virtual
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
DistributedTetrahedralMeshPartitionType::type DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetPartitionType ( ) const
Returns
the type of mesh partitioning that is being used...

serialization uses this method.

Definition at line 508 of file DistributedTetrahedralMesh.cpp.

References DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mPartitioning.

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ChasteCuboid< SPACE_DIM > * DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetProcessRegion ( )

Get the local region of space owned by this process

Returns
mSpaceRegion

Definition at line 531 of file DistributedTetrahedralMesh.cpp.

References EXCEPTION, and DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mpSpaceRegion.

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize().

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

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

Parameters
rMeshReaderis the reader pointing to the mesh to be read in and partitioned
rElementsOwnedis an empty set to be filled with the indices of elements owned by this process
rNodesOwnedis an empty set to be filled with the indices of nodes owned by this process
rHaloNodesOwnedis an empty set to be filled with the indices of halo nodes owned by this process
rProcessorsOffseta vector of length NumProcs to be filled with the index of the lowest indexed node owned by each process

Definition at line 1308 of file DistributedTetrahedralMesh.cpp.

References AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetElementData(), PetscTools::GetMyRank(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), PetscTools::GetNumProcs(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::IsFileFormatBinary(), PetscTools::IsParallel(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodePermutation, 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(), and DistributedTetrahedralMesh< DIM, DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ReorderNodes ( )
private
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::Rotate ( c_matrix< double, SPACE_DIM, SPACE_DIM >  rotationMatrix)
virtual

Do a general mesh rotation with a positive determinant orthonormal rotation matrix. This is the rotation method that actually does the work. This override is because class has halo nodes.

Parameters
rotationMatrixis a Ublas rotation matrix of the correct form

Reimplemented from AbstractMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 1696 of file DistributedTetrahedralMesh.cpp.

References DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mHaloNodes, and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes.

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize().

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 
)
virtual

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

Parameters
xFactoris the scale in the x-direction (defaults to 1.0)
yFactoris the scale in the y-direction (defaults to 1.0)
zFactoris the scale in the z-direction (defaults to 1.0)

Reimplemented from AbstractMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 1285 of file DistributedTetrahedralMesh.cpp.

References DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mHaloNodes, and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::Scale().

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize().

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

Serialize the mesh.

Parameters
archivethe archive
versionthe current version of this class

Definition at line 107 of file DistributedTetrahedralMesh.hpp.

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

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

Parameters
pFactorya factory to use for this mesh

Reimplemented from AbstractMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 100 of file DistributedTetrahedralMesh.cpp.

References DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mPartitioning, and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::SetDistributedVectorFactory().

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SetElementOwnerships ( )
privatevirtual

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

Information on node ownership comes from the distributed vector factory and an element is "owned" if one or more of its nodes are owned

Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 541 of file DistributedTetrahedralMesh.cpp.

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SetProcessRegion ( ChasteCuboid< SPACE_DIM > *  pRegion)

Set the local region of space to be owned by this process

Parameters
pRegionThe region, defined by a ChasteCuboid.

Definition at line 548 of file DistributedTetrahedralMesh.cpp.

References DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mpSpaceRegion.

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SolveBoundaryElementMapping ( unsigned  index) const
protectedvirtual

Overridden solve boundary element mapping method.

Parameters
indexthe global index of the boundary element
Returns
local index

Implements AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 636 of file DistributedTetrahedralMesh.cpp.

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

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SolveElementMapping ( unsigned  index) const
protectedvirtual

Overridden solve element mapping method.

Parameters
indexthe global index of the element
Returns
local index

Implements AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 623 of file DistributedTetrahedralMesh.cpp.

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

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SolveNodeMapping ( unsigned  index) const
protectedvirtual
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::Translate ( const c_vector< double, SPACE_DIM > &  rDisplacement)
virtual

Translate the mesh given the displacement vector. This is the translation method that actually does the work. This override is because class has halo nodes.

Parameters
rDisplacementis a translation vector of the correct size

Reimplemented from AbstractMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 1713 of file DistributedTetrahedralMesh.cpp.

References DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mHaloNodes, and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes.

Referenced by DistributedTetrahedralMesh< DIM, DIM >::serialize().

Friends And Related Function Documentation

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

Needed for serialization.

Definition at line 99 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 90 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 87 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::map<unsigned, unsigned> DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mHaloNodesMapping
private

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