Chaste Commit::baa90ac2819b962188b7562f2326be23c47859a7
|
#include <Toroidal2dMesh.hpp>
Public Member Functions | |
Toroidal2dMesh (double width, double depth) | |
Toroidal2dMesh (double width, double depth, std::vector< Node< 2 > * > nodes) | |
~Toroidal2dMesh () | |
void | ReMesh (NodeMap &rMap) |
c_vector< double, 2 > | GetVectorFromAtoB (const c_vector< double, 2 > &rLocation1, const c_vector< double, 2 > &rLocation2) |
void | SetNode (unsigned index, ChastePoint< 2 > point, bool concreteMove) |
double | GetWidth (const unsigned &rDimension) const |
unsigned | AddNode (Node< 2 > *pNewNode) |
bool | GetInstanceOfMismatchedBoundaryNodes () |
void | RefreshMesh () |
Public Member Functions inherited from MutableMesh< 2, 2 > | |
bool | CheckIsVoronoi (double maxPenetration=0.0) |
MutableMesh () | |
MutableMesh (std::vector< Node< SPACE_DIM > * > nodes) | |
virtual | ~MutableMesh () |
void | Clear () |
unsigned | GetNumNodes () const |
unsigned | GetNumElements () const |
unsigned | GetNumBoundaryElements () const |
void | RescaleMeshFromBoundaryNode (ChastePoint< 1 > updatedPoint, unsigned boundaryNodeIndex) |
void | RescaleMeshFromBoundaryNode (ChastePoint< 1 > updatedPoint, unsigned boundaryNodeIndex) |
virtual unsigned | AddNode (Node< SPACE_DIM > *pNewNode) |
unsigned | AddElement (Element< ELEMENT_DIM, SPACE_DIM > *pNewElement) |
virtual void | SetNode (unsigned index, ChastePoint< SPACE_DIM > point, bool concreteMove=true) |
void | MoveMergeNode (unsigned index, unsigned targetIndex, bool concreteMove=true) |
virtual void | DeleteNode (unsigned index) |
virtual void | DeleteElement (unsigned index) |
void | DeleteNodePriorToReMesh (unsigned index) |
unsigned | RefineElement (Element< ELEMENT_DIM, SPACE_DIM > *pElement, ChastePoint< SPACE_DIM > point) |
void | DeleteBoundaryNodeAt (unsigned index) |
void | ReIndex (NodeMap &map) |
void | ReMesh () |
std::vector< c_vector< unsigned, 5 > > | SplitLongEdges (double cutoffLength) |
c_vector< unsigned, 3 > | SplitEdge (Node< SPACE_DIM > *pNodeA, Node< SPACE_DIM > *pNodeB) |
Public Member Functions inherited from TetrahedralMesh< ELEMENT_DIM, SPACE_DIM > | |
TetrahedralMesh () | |
void | ConstructFromMeshReader (AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader) |
void | ReadNodesPerProcessorFile (const std::string &rNodesPerProcessorFile) |
bool | CheckIsConforming () |
double | GetVolume () |
double | GetSurfaceArea () |
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< unsigned > | GetContainingElementIndices (const ChastePoint< SPACE_DIM > &rTestPoint) |
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 | GetNumLocalElements () 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 () |
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 DistributedVectorFactory * | GetDistributedVectorFactory () |
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 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 () |
Private Member Functions | |
void | CreateMirrorNodes () |
void | ReconstructCylindricalMesh () |
void | ReconstructToroidalMesh () |
void | CorrectCylindricalNonPeriodicMesh () |
void | CorrectToroidalNonPeriodicMesh () |
void | GenerateVectorsOfElementsStraddlingCylindricalPeriodicBoundaries () |
void | GenerateVectorsOfElementsStraddlingToroidalPeriodicBoundaries () |
unsigned | GetCorrespondingCylindricalNodeIndex (unsigned nodeIndex) |
unsigned | GetCorrespondingToroidalNodeIndex (unsigned nodeIndex) |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Private Attributes | |
double | mWidth |
double | mHeight |
std::vector< unsigned > | mLeftOriginals |
std::vector< unsigned > | mLeftImages |
std::map< unsigned, unsigned > | mImageToLeftOriginalNodeMap |
std::vector< unsigned > | mRightOriginals |
std::vector< unsigned > | mRightImages |
std::map< unsigned, unsigned > | mImageToRightOriginalNodeMap |
std::set< unsigned > | mLeftPeriodicBoundaryElementIndices |
std::set< unsigned > | mRightPeriodicBoundaryElementIndices |
std::vector< unsigned > | mBottomOriginals |
std::vector< unsigned > | mBottomImages |
std::map< unsigned, unsigned > | mImageToBottomOriginalNodeMap |
std::vector< unsigned > | mTopOriginals |
std::vector< unsigned > | mTopImages |
std::map< unsigned, unsigned > | mImageToTopOriginalNodeMap |
std::set< unsigned > | mBottomPeriodicBoundaryElementIndices |
std::set< unsigned > | mTopPeriodicBoundaryElementIndices |
bool | mMismatchedBoundaryElements |
Friends | |
class | TestToroidal2dMesh |
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 |
Protected Member Functions inherited from TetrahedralMesh< ELEMENT_DIM, SPACE_DIM > | |
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 inherited from MutableMesh< 2, 2 > | |
std::vector< unsigned > | mDeletedElementIndices |
std::vector< unsigned > | mDeletedBoundaryElementIndices |
std::vector< unsigned > | mDeletedNodeIndices |
bool | mAddedNodes |
Protected Attributes inherited from TetrahedralMesh< ELEMENT_DIM, SPACE_DIM > | |
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< double > | mElementJacobianDeterminants |
std::vector< c_vector< double, SPACE_DIM > > | mBoundaryElementWeightedDirections |
std::vector< double > | mBoundaryElementJacobianDeterminants |
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 |
DistributedVectorFactory * | mpDistributedVectorFactory |
std::vector< unsigned > | mNodePermutation |
std::string | mMeshFileBaseName |
bool | mMeshChangesDuringSimulation |
A subclass of MutableMesh<2,2> for a rectangular mesh with periodic left and right boundaries, representing a Toroidal geometry.
The class works by overriding calls such as ReMesh() and GetVectorFromAtoB() so that simulation classes can treat this class in exactly the same way as a MutableMesh<2,2>.
Definition at line 55 of file Toroidal2dMesh.hpp.
Con+structor.
width | the periodic width of the mesh |
depth | the periodic depth of the mesh |
Definition at line 47 of file Toroidal2dMesh.cpp.
A constructor which reads in a width and collection of nodes, then calls a ReMesh() command to create the elements of the mesh.
width | the periodic width of the mesh |
depth | the periodic depth of the mesh |
nodes | a collection of nodes to construct the mesh with |
Definition at line 60 of file Toroidal2dMesh.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, MutableMesh< 2, 2 >::ReMesh(), Node< SPACE_DIM >::rGetLocation(), and UNUSED_OPT.
Toroidal2dMesh::~Toroidal2dMesh | ( | ) |
Destructor.
Definition at line 56 of file Toroidal2dMesh.cpp.
Overridden AddNode() method.
pNewNode | the node to be added to the mesh |
Definition at line 798 of file Toroidal2dMesh.cpp.
References MutableMesh< ELEMENT_DIM, SPACE_DIM >::AddNode(), Node< SPACE_DIM >::GetPoint(), and SetNode().
|
private |
This method should only ever be called by the public ReMesh() method.
Uses mLeftPeriodicBoundaryElementIndices and mRightPeriodicBoundaryElementIndices and compares the nodes in each to ensure that both boundaries have been meshed identically. If they have not it calls UseTheseElementsToDecideMeshing() to sort out the troublesome elements which have been meshed differently on each side and uses the meshing of the elements on the right hand boundary to decide on how to mesh the left hand side.
Definition at line 809 of file Toroidal2dMesh.cpp.
References GenerateVectorsOfElementsStraddlingCylindricalPeriodicBoundaries(), GetCorrespondingCylindricalNodeIndex(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), mLeftPeriodicBoundaryElementIndices, mRightPeriodicBoundaryElementIndices, and NEVER_REACHED.
Referenced by ReMesh().
|
private |
This method should only ever be called by the public ReMesh() method.
Uses mLeftPeriodicBoundaryElementIndices and mRightPeriodicBoundaryElementIndices and compares the nodes in each to ensure that both boundaries have been meshed identically. If they have not it calls UseTheseElementsToDecideMeshing() to sort out the troublesome elements which have been meshed differently on each side and uses the meshing of the elements on the right hand boundary to decide on how to mesh the left hand side.
Definition at line 915 of file Toroidal2dMesh.cpp.
References GenerateVectorsOfElementsStraddlingToroidalPeriodicBoundaries(), GetCorrespondingToroidalNodeIndex(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), mBottomPeriodicBoundaryElementIndices, mTopPeriodicBoundaryElementIndices, and NEVER_REACHED.
Referenced by ReMesh().
|
private |
Creates a set of mirrored nodes for a Toroidal re-mesh. Updates mRightImages, mLeftImages, mTopImages and mBottomImages . All mesh points should be 0 < x < mWidth and 0 < y < mHeight
This method should only ever be called by the public ReMesh() method.
Definition at line 84 of file Toroidal2dMesh.cpp.
References MutableMesh< ELEMENT_DIM, SPACE_DIM >::AddNode(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeIteratorBegin(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeIteratorEnd(), mBottomImages, mBottomOriginals, mBottomPeriodicBoundaryElementIndices, mHeight, mImageToBottomOriginalNodeMap, mImageToLeftOriginalNodeMap, mImageToRightOriginalNodeMap, mImageToTopOriginalNodeMap, mLeftImages, mLeftOriginals, mLeftPeriodicBoundaryElementIndices, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, mRightImages, mRightOriginals, mRightPeriodicBoundaryElementIndices, mTopImages, mTopOriginals, mTopPeriodicBoundaryElementIndices, and mWidth.
Referenced by ReMesh().
|
private |
This method should only ever be called by the public ReMesh method.
The elements which straddle the periodic boundaries need to be identified in order to compare the list on the right with the list on the left and reconstruct a Toroidal mesh.
Empties and repopulates the member variables mLeftPeriodicBoundaryElementIndices and mRightPeriodicBoundaryElementIndices
Definition at line 1022 of file Toroidal2dMesh.cpp.
References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorBegin(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorEnd(), mImageToLeftOriginalNodeMap, mImageToRightOriginalNodeMap, mLeftPeriodicBoundaryElementIndices, and mRightPeriodicBoundaryElementIndices.
Referenced by CorrectCylindricalNonPeriodicMesh().
|
private |
This method should only ever be called by the public ReMesh method.
The elements which straddle the periodic boundaries need to be identified in order to compare the list on the right with the list on the left and reconstruct a Toroidal mesh.
Empties and repopulates the member variables mLeftPeriodicBoundaryElementIndices and mRightPeriodicBoundaryElementIndices
Definition at line 1103 of file Toroidal2dMesh.cpp.
References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorBegin(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorEnd(), mBottomPeriodicBoundaryElementIndices, mImageToBottomOriginalNodeMap, mImageToTopOriginalNodeMap, and mTopPeriodicBoundaryElementIndices.
Referenced by CorrectToroidalNonPeriodicMesh().
This method should only ever be called by the public ReMesh() method.
nodeIndex | The index of an original/mirrored node |
Definition at line 1154 of file Toroidal2dMesh.cpp.
References mRightImages, mRightOriginals, and NEVER_REACHED.
Referenced by CorrectCylindricalNonPeriodicMesh().
This method should only ever be called by the public ReMesh() method.
nodeIndex | The index of an original/mirrored node |
Definition at line 1203 of file Toroidal2dMesh.cpp.
References mTopImages, mTopOriginals, and NEVER_REACHED.
Referenced by CorrectToroidalNonPeriodicMesh().
bool Toroidal2dMesh::GetInstanceOfMismatchedBoundaryNodes | ( | ) |
c_vector< double, 2 > Toroidal2dMesh::GetVectorFromAtoB | ( | const c_vector< double, 2 > & | rLocation1, |
const c_vector< double, 2 > & | rLocation2 | ||
) |
Overridden GetVectorFromAtoB() method.
Evaluates the (surface) distance between two points in a 2D Toroidal geometry.
rLocation1 | the x and y co-ordinates of point 1 |
rLocation2 | the x and y co-ordinates of point 2 |
Definition at line 720 of file Toroidal2dMesh.cpp.
Overridden GetWidth() method.
Calculate the 'width' of any dimension of the mesh, taking periodicity into account.
rDimension | a dimension (0 or 1) |
Reimplemented from AbstractMesh< ELEMENT_DIM, SPACE_DIM >.
Definition at line 783 of file Toroidal2dMesh.cpp.
|
private |
After any corrections have been made to the boundary elements (see UseTheseElementsToDecideMeshing()) this method deletes the mirror image nodes, elements and boundary elements created for a Toroidal remesh by cycling through the elements and changing elements with partly real and partly imaginary elements to be real with periodic real nodes instead of mirror image nodes. We end up with very strangely shaped elements which cross the whole mesh but specify the correct connections between nodes.
This method should only ever be called by the public ReMesh() method.
Definition at line 449 of file Toroidal2dMesh.cpp.
References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorBegin(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorEnd(), MutableMesh< 2, 2 >::mDeletedElementIndices, MutableMesh< 2, 2 >::mDeletedNodeIndices, mImageToLeftOriginalNodeMap, mImageToRightOriginalNodeMap, mLeftImages, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, and mRightImages.
Referenced by ReMesh().
|
private |
After any corrections have been made to the boundary elements (see UseTheseElementsToDecideMeshing()) this method deletes the mirror image nodes, elements and boundary elements created for a Toroidal remesh by cycling through the elements and changing elements with partly real and partly imaginary elements to be real with periodic real nodes instead of mirror image nodes. We end up with very strangely shaped elements which cross the whole mesh but specify the correct connections between nodes.
This method should only ever be called by the public ReMesh() method.
Definition at line 586 of file Toroidal2dMesh.cpp.
References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorBegin(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorEnd(), mBottomImages, MutableMesh< 2, 2 >::mDeletedElementIndices, MutableMesh< 2, 2 >::mDeletedNodeIndices, mImageToBottomOriginalNodeMap, mImageToTopOriginalNodeMap, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, and mTopImages.
Referenced by ReMesh().
|
virtual |
Overridden RefreshMesh method. This method moves node backinto domain and calls RefreshJacobianCachedData.
Reimplemented from TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.
Definition at line 1252 of file Toroidal2dMesh.cpp.
References mHeight, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, and mWidth.
|
virtual |
Overridden ReMesh() method.
Conduct a Toroidal remesh by calling CreateMirrorNodes() to create mirror image nodes, then calling ReMesh() on the parent class, then mapping the new node indices and calling ReconstructToroidalMesh() to remove surplus nodes, leaving a fully periodic mesh.
rMap | a reference to a nodemap which should be created with the required number of nodes. |
Reimplemented from MutableMesh< 2, 2 >.
Definition at line 199 of file Toroidal2dMesh.cpp.
References CorrectCylindricalNonPeriodicMesh(), CorrectToroidalNonPeriodicMesh(), CreateMirrorNodes(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryElementIteratorBegin(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryElementIteratorEnd(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorBegin(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorEnd(), NodeMap::GetNewIndex(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumAllElements(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumAllNodes(), NodeMap::GetSize(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::IsDeleted(), NodeMap::IsDeleted(), NodeMap::IsIdentityMap(), mBottomImages, mBottomOriginals, mBottomPeriodicBoundaryElementIndices, TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryElementJacobianDeterminants, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryElements, TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryElementWeightedDirections, MutableMesh< 2, 2 >::mDeletedBoundaryElementIndices, MutableMesh< 2, 2 >::mDeletedElementIndices, mHeight, mImageToBottomOriginalNodeMap, mImageToLeftOriginalNodeMap, mImageToRightOriginalNodeMap, mImageToTopOriginalNodeMap, mLeftImages, mLeftOriginals, mLeftPeriodicBoundaryElementIndices, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, mRightImages, mRightOriginals, mRightPeriodicBoundaryElementIndices, mTopImages, mTopOriginals, mTopPeriodicBoundaryElementIndices, mWidth, ReconstructCylindricalMesh(), ReconstructToroidalMesh(), BoundaryElement< ELEMENT_DIM, SPACE_DIM >::RegisterWithNodes(), MutableMesh< 2, 2 >::ReIndex(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReMesh(), NodeMap::ResetToIdentity(), NodeMap::Resize(), Node< SPACE_DIM >::rGetLocation(), NodeMap::SetDeleted(), and NodeMap::SetNewIndex().
|
inlineprivate |
Archives the member variables of the Toroidal2dMesh class which have to be preserved during the lifetime of the mesh.
The remaining member variables are re-initialised before being used by each ReMesh() call so they do not need to be archived.
archive | the archive |
version | the current version of this class the current version of this class |
Definition at line 236 of file Toroidal2dMesh.hpp.
void Toroidal2dMesh::SetNode | ( | unsigned | index, |
ChastePoint< 2 > | point, | ||
bool | concreteMove | ||
) |
Overridden SetNode() method.
If the location should be set outside a Toroidal boundary, it is moved back onto the cylinder.
index | is the index of the node to be moved |
point | is the new target location of the node |
concreteMove | is set to false if we want to skip the signed area tests |
Definition at line 752 of file Toroidal2dMesh.cpp.
References mHeight, mWidth, ChastePoint< DIM >::rGetLocation(), ChastePoint< DIM >::SetCoordinate(), and MutableMesh< ELEMENT_DIM, SPACE_DIM >::SetNode().
Referenced by AddNode().
|
friend |
Needed for serialization.
Definition at line 223 of file Toroidal2dMesh.hpp.
|
friend |
Definition at line 57 of file Toroidal2dMesh.hpp.
|
private |
The image nodes corresponding to these Bottom nodes (on Top of mesh).
Definition at line 94 of file Toroidal2dMesh.hpp.
Referenced by CreateMirrorNodes(), ReconstructToroidalMesh(), and ReMesh().
|
private |
The Bottom nodes which have been mirrored during the remesh.
Definition at line 91 of file Toroidal2dMesh.hpp.
Referenced by CreateMirrorNodes(), and ReMesh().
|
private |
The indices of elements which straddle the Bottom periodic boundary.
Definition at line 109 of file Toroidal2dMesh.hpp.
Referenced by CorrectToroidalNonPeriodicMesh(), CreateMirrorNodes(), GenerateVectorsOfElementsStraddlingToroidalPeriodicBoundaries(), and ReMesh().
|
private |
The periodic height of the domain.
Definition at line 64 of file Toroidal2dMesh.hpp.
Referenced by CreateMirrorNodes(), GetVectorFromAtoB(), GetWidth(), RefreshMesh(), ReMesh(), serialize(), and SetNode().
A map from image node index (on Top of mesh) to original node index (on Bottom of mesh).
Definition at line 97 of file Toroidal2dMesh.hpp.
Referenced by CreateMirrorNodes(), GenerateVectorsOfElementsStraddlingToroidalPeriodicBoundaries(), ReconstructToroidalMesh(), and ReMesh().
A map from image node index (on right of mesh) to original node index (on left of mesh).
Definition at line 73 of file Toroidal2dMesh.hpp.
Referenced by CreateMirrorNodes(), GenerateVectorsOfElementsStraddlingCylindricalPeriodicBoundaries(), ReconstructCylindricalMesh(), and ReMesh().
A map from image node index (on left of mesh) to original node index (on right of mesh).
Definition at line 82 of file Toroidal2dMesh.hpp.
Referenced by CreateMirrorNodes(), GenerateVectorsOfElementsStraddlingCylindricalPeriodicBoundaries(), ReconstructCylindricalMesh(), and ReMesh().
A map from image node index (on Bottom of mesh) to original node index (on Top of mesh).
Definition at line 106 of file Toroidal2dMesh.hpp.
Referenced by CreateMirrorNodes(), GenerateVectorsOfElementsStraddlingToroidalPeriodicBoundaries(), ReconstructToroidalMesh(), and ReMesh().
|
private |
The image nodes corresponding to these left nodes (on right of mesh).
Definition at line 70 of file Toroidal2dMesh.hpp.
Referenced by CreateMirrorNodes(), ReconstructCylindricalMesh(), and ReMesh().
|
private |
The left nodes which have been mirrored during the remesh.
Definition at line 67 of file Toroidal2dMesh.hpp.
Referenced by CreateMirrorNodes(), and ReMesh().
|
private |
The indices of elements which straddle the left periodic boundary.
Definition at line 85 of file Toroidal2dMesh.hpp.
Referenced by CorrectCylindricalNonPeriodicMesh(), CreateMirrorNodes(), GenerateVectorsOfElementsStraddlingCylindricalPeriodicBoundaries(), and ReMesh().
|
private |
Whether the number of left hand boundary nodes does not equal the number of right hand boundary nodes (and top=bottom)
Definition at line 116 of file Toroidal2dMesh.hpp.
|
private |
The image nodes corresponding to these right nodes (on left of mesh).
Definition at line 79 of file Toroidal2dMesh.hpp.
Referenced by CreateMirrorNodes(), GetCorrespondingCylindricalNodeIndex(), ReconstructCylindricalMesh(), and ReMesh().
|
private |
The right nodes which have been mirrored during the remesh.
Definition at line 76 of file Toroidal2dMesh.hpp.
Referenced by CreateMirrorNodes(), GetCorrespondingCylindricalNodeIndex(), and ReMesh().
|
private |
The indices of elements which straddle the right periodic boundary.
Definition at line 88 of file Toroidal2dMesh.hpp.
Referenced by CorrectCylindricalNonPeriodicMesh(), CreateMirrorNodes(), GenerateVectorsOfElementsStraddlingCylindricalPeriodicBoundaries(), and ReMesh().
|
private |
The image nodes corresponding to these Top nodes (on Bottom of mesh).
Definition at line 103 of file Toroidal2dMesh.hpp.
Referenced by CreateMirrorNodes(), GetCorrespondingToroidalNodeIndex(), ReconstructToroidalMesh(), and ReMesh().
|
private |
The Top nodes which have been mirrored during the remesh.
Definition at line 100 of file Toroidal2dMesh.hpp.
Referenced by CreateMirrorNodes(), GetCorrespondingToroidalNodeIndex(), and ReMesh().
|
private |
The indices of elements which straddle the Top periodic boundary.
Definition at line 112 of file Toroidal2dMesh.hpp.
Referenced by CorrectToroidalNonPeriodicMesh(), CreateMirrorNodes(), GenerateVectorsOfElementsStraddlingToroidalPeriodicBoundaries(), and ReMesh().
|
private |
The periodic width of the domina.
Definition at line 61 of file Toroidal2dMesh.hpp.
Referenced by CreateMirrorNodes(), GetVectorFromAtoB(), GetWidth(), RefreshMesh(), ReMesh(), serialize(), and SetNode().