Chaste  Release::2018.1
TetrahedralMesh< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <TetrahedralMesh.hpp>

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

Classes

class  EdgeIterator
 

Public Member Functions

 TetrahedralMesh ()
 
void ConstructFromMeshReader (AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader)
 
void ReadNodesPerProcessorFile (const std::string &rNodesPerProcessorFile)
 
bool CheckIsConforming ()
 
double GetVolume ()
 
double GetSurfaceArea ()
 
void RefreshMesh ()
 
void PermuteNodes ()
 
void PermuteNodes (const std::vector< unsigned > &perm)
 
unsigned GetContainingElementIndexWithInitialGuess (const ChastePoint< SPACE_DIM > &rTestPoint, unsigned startingElementGuess, bool strict=false)
 
unsigned GetNearestElementIndex (const ChastePoint< SPACE_DIM > &rTestPoint)
 
std::vector< unsignedGetContainingElementIndices (const ChastePoint< SPACE_DIM > &rTestPoint)
 
virtual void Clear ()
 
double GetAngleBetweenNodes (unsigned indexA, unsigned indexB)
 
virtual void RefreshJacobianCachedData ()
 
virtual void GetJacobianForElement (unsigned elementIndex, c_matrix< double, SPACE_DIM, SPACE_DIM > &rJacobian, double &rJacobianDeterminant) 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 GetWeightedDirectionForElement (unsigned elementIndex, c_vector< double, SPACE_DIM > &rWeightedDirection, double &rJacobianDeterminant) const
 
virtual void GetWeightedDirectionForBoundaryElement (unsigned elementIndex, c_vector< double, SPACE_DIM > &rWeightedDirection, double &rJacobianDeterminant) const
 
EdgeIterator EdgesBegin ()
 
EdgeIterator EdgesEnd ()
 
- Public Member Functions inherited from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >
ElementIterator GetElementIteratorBegin (bool skipDeletedElements=true)
 
ElementIterator GetElementIteratorEnd ()
 
 AbstractTetrahedralMesh ()
 
virtual ~AbstractTetrahedralMesh ()
 
virtual unsigned GetNumElements () const
 
virtual unsigned GetNumLocalElements () const
 
virtual unsigned GetNumBoundaryElements () const
 
virtual unsigned GetNumLocalBoundaryElements () const
 
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
 
void CheckOutwardNormals ()
 
virtual void ConstructLinearMesh (unsigned width)
 
virtual void ConstructRectangularMesh (unsigned width, unsigned height, bool stagger=true)
 
virtual void ConstructCuboid (unsigned width, unsigned height, unsigned depth)
 
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)
 
virtual bool CalculateDesignatedOwnershipOfBoundaryElement (unsigned faceIndex)
 
virtual bool CalculateDesignatedOwnershipOfElement (unsigned elementIndex)
 
unsigned CalculateMaximumNodeConnectivityPerProcess () const
 
virtual void GetHaloNodeIndices (std::vector< unsigned > &rHaloIndices) const
 
void CalculateNodeExchange (std::vector< std::vector< unsigned > > &rNodesToSendPerProcess, std::vector< std::vector< unsigned > > &rNodesToReceivePerProcess)
 
virtual c_vector< double, 2 > CalculateMinMaxEdgeLengths ()
 
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 ()
 
virtual unsigned GetNumNodes () const
 
unsigned GetNumBoundaryNodes () const
 
virtual unsigned GetNumAllNodes () const
 
unsigned GetNumNodeAttributes () const
 
Node< SPACE_DIM > * GetNode (unsigned index) const
 
virtual Node< SPACE_DIM > * GetNodeOrHaloNode (unsigned index) const
 
Node< SPACE_DIM > * GetNodeFromPrePermutationIndex (unsigned index) const
 
virtual DistributedVectorFactoryGetDistributedVectorFactory ()
 
virtual void SetDistributedVectorFactory (DistributedVectorFactory *pFactory)
 
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
 
virtual ChasteCuboid< SPACE_DIM > CalculateBoundingBox () const
 
virtual unsigned GetNearestNodeIndex (const ChastePoint< SPACE_DIM > &rTestPoint)
 
virtual void Scale (const double xFactor=1.0, const double yFactor=1.0, const double zFactor=1.0)
 
virtual void Translate (const c_vector< double, SPACE_DIM > &rDisplacement)
 
void Translate (const double xMovement=0.0, const double yMovement=0.0, const double zMovement=0.0)
 
virtual void Rotate (c_matrix< double, SPACE_DIM, SPACE_DIM > rotationMatrix)
 
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)
 
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
 
template<class MESHER_IO >
void ExportToMesher (NodeMap &map, MESHER_IO &mesherInput, int *elementList=nullptr)
 
template<class MESHER_IO >
void ImportFromMesher (MESHER_IO &mesherOutput, unsigned numberOfElements, int *elementList, unsigned numberOfFaces, int *faceList, int *edgeMarkerList)
 
void InitialiseTriangulateIo (triangulateio &mesherIo)
 
void FreeTriangulateIo (triangulateio &mesherIo)
 
- Protected Member Functions inherited from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >
void SetElementOwnerships ()
 
- Protected Member Functions inherited from AbstractMesh< ELEMENT_DIM, SPACE_DIM >
ChasteCuboid< SPACE_DIM > CalculateBoundingBox (const std::vector< Node< SPACE_DIM > * > &rNodes) const
 

Protected Attributes

std::vector< c_vector< double,
SPACE_DIM > > 
mElementWeightedDirections
 
std::vector< c_matrix< double,
SPACE_DIM, ELEMENT_DIM > > 
mElementJacobians
 
std::vector< c_matrix< double,
ELEMENT_DIM, SPACE_DIM > > 
mElementInverseJacobians
 
std::vector< doublemElementJacobianDeterminants
 
std::vector< c_vector< double,
SPACE_DIM > > 
mBoundaryElementWeightedDirections
 
std::vector< doublemBoundaryElementJacobianDeterminants
 
- 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
 

Private Member Functions

template<class Archive >
void serialize (Archive &archive, const unsigned int version)
 

Friends

class TestTetrahedralMesh
 
class TestCryptSimulation2d
 
class boost::serialization::access
 

Additional Inherited Members

- 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
 

Detailed Description

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

Forward declaration for triangle helper methods (used in MutableMesh QuadraticMesh) A concrete tetrahedral mesh class.

Definition at line 64 of file TetrahedralMesh.hpp.

Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::TetrahedralMesh ( )

Constructor.

Definition at line 62 of file TetrahedralMesh.cpp.

Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::CheckIsConforming ( )

Check whether mesh is conforming Conforming (defn.): the intersection of two elements should be either the empty set, a vertex, an edge or a face.

It may be possible to construct non-conforming meshes which contain internal faces owned by only one element: two coplanar triangular faces of two elements form a square, but the same square on the adjacent pair of elements is formed by splitting the diagonal the other way.

Returns
false if there are any orphaned internal faces

Definition at line 236 of file TetrahedralMesh.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMeshReader ( AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &  rMeshReader)
virtual
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::EdgeIterator TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::EdgesBegin ( )
Returns
iterator pointing to the first edge (i.e. connection between 2 nodes) of the mesh

Definition at line 625 of file TetrahedralMesh.cpp.

References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), and AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumAllElements().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::EdgeIterator TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::EdgesEnd ( )
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
template<class MESHER_IO >
void TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ExportToMesher ( NodeMap map,
MESHER_IO &  mesherInput,
int *  elementList = nullptr 
)
protected

Export the mesh (currently only the nodes) to an external mesher This is determined at compile time when the MESHER_IO template is instantiated to either

  • triangulateio (for triangle remesher in 2D)
  • tetgenio (for tetgen remesher in 3D) Since conditional compilation is not allowed, care must be taken to only use common data members in this method
    Parameters
    mapis a NodeMap which associates the indices of nodes in the old mesh with indices of nodes in the new mesh. This should be created with the correct size (NumAllNodes)
    mesherInputis a triangulateio or tetgenio class (decided at compile time) Note that only nodes are exported and thus any late mesh is based on the convex hull
    elementListis a pointer to either mesherInput.trianglelist or mesherInput.tetrahedronlist (used when we are not remeshing, but converting the form of an existing mesh) Note that this should have been re-malloced and mesherInput.numberoftriangles or mesherInput.numberoftetrahedra should be set prior to the call when elementList is non-NULL

Definition at line 791 of file TetrahedralMesh.cpp.

References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorBegin(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorEnd(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumAllNodes(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, NodeMap::SetDeleted(), and NodeMap::SetNewIndex().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::FreeTriangulateIo ( triangulateio &  mesherIo)
protected

Convenience method to tidy up a triangleio data structure after use

Parameters
mesherIois a triangulateio class

Definition at line 772 of file TetrahedralMesh.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetAngleBetweenNodes ( unsigned  indexA,
unsigned  indexB 
)
Returns
calculated the angle between the node at indexB and the x axis about the node at indexA. The angle returned is in the range (-pi,pi].
Parameters
indexAa node index
indexBa node index

Definition at line 482 of file TetrahedralMesh.cpp.

References EXCEPTION.

Referenced by DiscreteSystemForceCalculator::CalculateFtAndFn(), and DiscreteSystemForceCalculator::GetSamplingAngles().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetContainingElementIndexWithInitialGuess ( const ChastePoint< SPACE_DIM > &  rTestPoint,
unsigned  startingElementGuess,
bool  strict = false 
)
Returns
the element index for the first element that contains a test point. Like GetContainingElementIndex but uses the user given element (M say) as the first element checked, and then checks M+1,M+2,..,Ne,0,1..
Parameters
rTestPointreference to the point
startingElementGuessWhich element to try first.
strictShould the element returned contain the point in the interior and not on an edge/face/vertex (default = not strict)

Definition at line 372 of file TetrahedralMesh.cpp.

References EXCEPTION.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< unsigned > TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetContainingElementIndices ( const ChastePoint< SPACE_DIM > &  rTestPoint)
Returns
all element indices for elements that are known to contain a test point.
Parameters
rTestPointreference to the point

Definition at line 444 of file TetrahedralMesh.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetInverseJacobianForElement ( unsigned  elementIndex,
c_matrix< double, SPACE_DIM, ELEMENT_DIM > &  rJacobian,
double rJacobianDeterminant,
c_matrix< double, ELEMENT_DIM, SPACE_DIM > &  rInverseJacobian 
) const
virtual
Returns
the Jacobian matrix, its inverse and its determinant for a given element.
Parameters
elementIndexindex of the element in the mesh
rJacobianthe Jacobian matrix
rJacobianDeterminantthe determinant of the Jacobian matrix
rInverseJacobianthe inverse Jacobian matrix

Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Reimplemented in NonCachedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 727 of file TetrahedralMesh.cpp.

References TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElementInverseJacobians, TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElementJacobianDeterminants, and TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElementJacobians.

Referenced by VertexMesh< ELEMENT_DIM, SPACE_DIM >::GenerateVerticesFromElementCircumcentres(), and CellwiseDataGradient< DIM >::SetupGradients().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetJacobianForElement ( unsigned  elementIndex,
c_matrix< double, SPACE_DIM, SPACE_DIM > &  rJacobian,
double rJacobianDeterminant 
) const
virtual
Returns
the Jacobian matrix and its determinant for a given element.
Parameters
elementIndexindex of the element in the mesh
rJacobianthe Jacobian matrix
rJacobianDeterminantthe determinant of the Jacobian matrix

Reimplemented in NonCachedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 718 of file TetrahedralMesh.cpp.

References TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElementJacobianDeterminants, and TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElementJacobians.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNearestElementIndex ( const ChastePoint< SPACE_DIM > &  rTestPoint)
Returns
the element index for an element is closest to the testPoint.

"Closest" means that the minimum interpolation weights for the testPoint are maximised for this element.

Parameters
rTestPointreference to the point

Definition at line 417 of file TetrahedralMesh.cpp.

References EXCEPT_IF_NOT.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetSurfaceArea ( )
Returns
the surface area of the mesh.

Definition at line 302 of file TetrahedralMesh.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetVolume ( )
Returns
the volume of the mesh, calculated by adding the determinant of each element and dividing by n!, where n is the element dimension.

Definition at line 287 of file TetrahedralMesh.cpp.

Referenced by CellPopulationAreaWriter< ELEMENT_DIM, SPACE_DIM >::Visit().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetWeightedDirectionForBoundaryElement ( unsigned  elementIndex,
c_vector< double, SPACE_DIM > &  rWeightedDirection,
double rJacobianDeterminant 
) const
virtual
Returns
the weighted direction and the determinant of the Jacobian for a given boundary element.
Parameters
elementIndexindex of the element in the mesh
rWeightedDirectionthe weighted direction
rJacobianDeterminantthe determinant of the Jacobian matrix

Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Reimplemented in NonCachedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 746 of file TetrahedralMesh.cpp.

References TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryElementJacobianDeterminants, and TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryElementWeightedDirections.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetWeightedDirectionForElement ( unsigned  elementIndex,
c_vector< double, SPACE_DIM > &  rWeightedDirection,
double rJacobianDeterminant 
) const
virtual
Returns
the weighted direction and the determinant of the Jacobian for a given element.
Parameters
elementIndexindex of the element in the mesh
rWeightedDirectionthe weighted direction
rJacobianDeterminantthe determinant of the Jacobian matrix

Reimplemented in NonCachedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 737 of file TetrahedralMesh.cpp.

References TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElementJacobianDeterminants, and TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElementWeightedDirections.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
template<class MESHER_IO >
void TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ImportFromMesher ( MESHER_IO &  mesherOutput,
unsigned  numberOfElements,
int *  elementList,
unsigned  numberOfFaces,
int *  faceList,
int *  edgeMarkerList 
)
protected

Import the mesh from an external mesher This is determined at compile time when the MESHER_IO template is instantiated to either

  • triangulateio (for triangle remesher in 2D)
  • tetgenio (for tetgen remesher in 3D) Since conditional compilation is not allowed, care must be taken to only use common data members in this method
    Parameters
    mesherOutputis a triangulateio or tetgenio class (decided at compile time)
    numberOfElementsis a copy of either mesherOutput.numberoftriangles or mesherOutput.numberoftetrahedra
    elementListis a pointer to either mesherOutput.trianglelist or mesherOutput.tetrahedronlist
    numberOfFacesis a copy of either mesherOutput.edges or mesherOutput.numberoftrifaces
    faceListis a pointer to either mesherOutput.edgelist or mesherOutput.trifacelist
    edgeMarkerListis a pointer to either mesherOutput.edgemarkerlist or NULL
    Todo:
    #1545: (or add arguments ...)

Definition at line 842 of file TetrahedralMesh.cpp.

References TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::Clear(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryElements, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryNodes, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElements, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, and TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RefreshJacobianCachedData().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::InitialiseTriangulateIo ( triangulateio &  mesherIo)
protected

Convenience method to tidy up a triangleio data structure before use

Parameters
mesherIois a triangulateio class

Definition at line 754 of file TetrahedralMesh.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::PermuteNodes ( )
virtual

Permute the nodes randomly so that they appear in a different order in mNodes (and their mIndex's are altered accordingly).

Reimplemented from AbstractMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 331 of file TetrahedralMesh.cpp.

References RandomNumberGenerator::Instance(), and RandomNumberGenerator::Shuffle().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::PermuteNodes ( const std::vector< unsigned > &  perm)

Permute the nodes so that they appear in a different order in mNodes (and their mIndex's are altered accordingly).

Parameters
permis a vector containing the new indices

Definition at line 343 of file TetrahedralMesh.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ReadNodesPerProcessorFile ( const std::string &  rNodesPerProcessorFile)
virtual

Read in the number of nodes per processor from file.

Parameters
rNodesPerProcessorFilethe name of the file

Reimplemented from AbstractMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 190 of file TetrahedralMesh.cpp.

References EXCEPTION, PetscTools::GetMyRank(), and PetscTools::GetNumProcs().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RefreshMesh ( )
virtual

Overridden RefreshMesh method. This method calls RefreshJacobianCachedData.

Reimplemented from AbstractMesh< ELEMENT_DIM, SPACE_DIM >.

Reimplemented in Cylindrical2dNodesOnlyMesh.

Definition at line 642 of file TetrahedralMesh.cpp.

References TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RefreshJacobianCachedData().

Referenced by Cylindrical2dNodesOnlyMesh::RefreshMesh().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
template<class Archive >
void TetrahedralMesh< 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 78 of file TetrahedralMesh.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned TetrahedralMesh< 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 662 of file TetrahedralMesh.cpp.

References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryElements.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned TetrahedralMesh< 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 655 of file TetrahedralMesh.cpp.

References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElements.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SolveNodeMapping ( unsigned  index) const
protectedvirtual

Overridden solve node mapping method.

Parameters
indexthe global index of the node
Returns
local index

Implements AbstractMesh< ELEMENT_DIM, SPACE_DIM >.

Reimplemented in NodesOnlyMesh< DIM >, and NodesOnlyMesh< 2 >.

Definition at line 648 of file TetrahedralMesh.cpp.

References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes.

Friends And Related Function Documentation

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

Needed for serialization.

Definition at line 70 of file TetrahedralMesh.hpp.

Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<double> TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryElementJacobianDeterminants
protected

Vector storing the determinant of the Jacobian matrix for each boundary element in the mesh.

Definition at line 125 of file TetrahedralMesh.hpp.

Referenced by TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetWeightedDirectionForBoundaryElement(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RefreshJacobianCachedData(), and Cylindrical2dMesh::ReMesh().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< c_vector<double, SPACE_DIM> > TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryElementWeightedDirections
protected
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< c_matrix<double, ELEMENT_DIM, SPACE_DIM> > TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElementInverseJacobians
protected
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<double> TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElementJacobianDeterminants
protected
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< c_matrix<double, SPACE_DIM, ELEMENT_DIM> > TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElementJacobians
protected
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< c_vector<double, SPACE_DIM> > TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElementWeightedDirections
protected

Vector storing the weighted direction for each element in the mesh.

Definition at line 110 of file TetrahedralMesh.hpp.

Referenced by TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetWeightedDirectionForElement(), and TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RefreshJacobianCachedData().


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