Chaste
Release::3.4
|
#include <Cylindrical2dNodesOnlyMesh.hpp>
Public Member Functions | |
Cylindrical2dNodesOnlyMesh (double width) | |
virtual void | SetUpBoxCollection (double cutOffLength, c_vector< double, 2 *2 > domainSize, int numLocalRows=PETSC_DECIDE, bool isPeriodic=true) |
c_vector< double, 2 > | GetVectorFromAtoB (const c_vector< double, 2 > &rLocation1, const c_vector< double, 2 > &rLocation2) |
double | GetWidth (const unsigned &rDimension) const |
void | SetNode (unsigned nodeIndex, ChastePoint< 2 > point, bool concreteMove=false) |
unsigned | AddNode (Node< 2 > *pNewNode) |
Public Member Functions inherited from NodesOnlyMesh< 2 > | |
NodesOnlyMesh () | |
virtual | ~NodesOnlyMesh () |
void | ConstructNodesWithoutMesh (const std::vector< Node< SPACE_DIM > * > &rNodes, double maxInteractionDistance) |
void | ConstructNodesWithoutMesh (const AbstractMesh< SPACE_DIM, SPACE_DIM > &rGeneratingMesh, double maxInteractionDistance) |
std::vector< bool > & | rGetInitiallyOwnedNodes () |
void | Clear () |
unsigned | SolveNodeMapping (unsigned index) const |
Node< SPACE_DIM > * | GetNodeOrHaloNode (unsigned index) const |
bool | IsOwned (c_vector< double, SPACE_DIM > &location) |
unsigned | GetNumNodes () const |
virtual unsigned | GetMaximumNodeIndex () |
void | SetMaximumInteractionDistance (double maxDistance) |
double | GetMaximumInteractionDistance () |
double | GetWidth (const unsigned &rDimension) const |
void | SetCalculateNodeNeighbours (bool calculateNodeNeighbours) |
void | CalculateInteriorNodePairs (std::vector< std::pair< Node< SPACE_DIM > *, Node< SPACE_DIM > * > > &rNodePairs, std::map< unsigned, std::set< unsigned > > &rNodeNeighbours) |
void | CalculateBoundaryNodePairs (std::vector< std::pair< Node< SPACE_DIM > *, Node< SPACE_DIM > * > > &rNodePairs, std::map< unsigned, std::set< unsigned > > &rNodeNeighbours) |
void | ReMesh (NodeMap &rMap) |
void | SetInitialBoxCollection (const c_vector< double, 2 *SPACE_DIM > domainSize, double maxInteractionDistance) |
void | UpdateBoxCollection () |
void | ResizeBoxCollection () |
void | AddNodesToBoxes () |
void | AddHaloNodesToBoxes () |
void | CalculateNodesOutsideLocalDomain () |
std::vector< unsigned > & | rGetNodesToSendLeft () |
std::vector< unsigned > & | rGetNodesToSendRight () |
std::vector< unsigned > & | rGetHaloNodesToSendRight () |
std::vector< unsigned > & | rGetHaloNodesToSendLeft () |
void | AddHaloNode (boost::shared_ptr< Node< SPACE_DIM > > pNewNode) |
void | ClearHaloNodes () |
void | SetNode (unsigned nodeIndex, ChastePoint< SPACE_DIM > point, bool concreteMove=false) |
unsigned | AddNode (Node< SPACE_DIM > *pNewNode) |
void | AddMovedNode (boost::shared_ptr< Node< SPACE_DIM > > pMovedNode) |
void | DeleteNode (unsigned index) |
void | DeleteMovedNode (unsigned index) |
void | SetMinimumNodeDomainBoundarySeparation (double separation) |
void | LoadBalanceMesh () |
void | ConstructFromMeshReader (AbstractMeshReader< SPACE_DIM, SPACE_DIM > &rMeshReader) |
Public Member Functions inherited from MutableMesh< SPACE_DIM, SPACE_DIM > | |
bool | CheckIsVoronoi (double maxPenetration=0.0) |
MutableMesh () | |
MutableMesh (std::vector< Node< SPACE_DIM > * > nodes) | |
virtual | ~MutableMesh () |
unsigned | GetNumElements () const |
unsigned | GetNumBoundaryElements () const |
void | RescaleMeshFromBoundaryNode (ChastePoint< 1 > updatedPoint, unsigned boundaryNodeIndex) |
unsigned | AddElement (Element< ELEMENT_DIM, SPACE_DIM > *pNewElement) |
void | MoveMergeNode (unsigned index, unsigned targetIndex, bool concreteMove=true) |
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 | 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< 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 |
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 |
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 | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Private Attributes | |
double | mWidth |
Friends | |
class | TestCylindrical2dNodesOnlyMesh |
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 NodesOnlyMesh< 2 > | |
virtual void | SetUpBoxCollection (double cutOffLength, c_vector< double, 2 *SPACE_DIM > domainSize, int numLocalRows=PETSC_DECIDE, bool isPeriodic=false) |
void | ClearBoxCollection () |
DistributedBoxCollection < SPACE_DIM > * | GetBoxCollection () |
Protected Member Functions inherited from TetrahedralMesh< ELEMENT_DIM, SPACE_DIM > | |
unsigned | SolveElementMapping (unsigned index) const |
unsigned | SolveBoundaryElementMapping (unsigned index) const |
template<class MESHER_IO > | |
void | ExportToMesher (NodeMap &map, MESHER_IO &mesherInput, int *elementList=NULL) |
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< SPACE_DIM, SPACE_DIM > | |
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 NodesOnlyMesh<2> for a rectangular mesh with periodic left and right boundaries, representing a cylindrical 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 NodesOnlyMesh<2>.
Definition at line 52 of file Cylindrical2dNodesOnlyMesh.hpp.
Cylindrical2dNodesOnlyMesh::Cylindrical2dNodesOnlyMesh | ( | double | width | ) |
Constructor.
width | the width of the mesh (circumference) |
Definition at line 39 of file Cylindrical2dNodesOnlyMesh.cpp.
Overridden AddNode() method.
pNewNode | pointer to the new node |
Definition at line 97 of file Cylindrical2dNodesOnlyMesh.cpp.
References NodesOnlyMesh< SPACE_DIM >::AddNode(), Node< SPACE_DIM >::GetPoint(), and SetNode().
c_vector< double, 2 > Cylindrical2dNodesOnlyMesh::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 cylindrical geometry.
rLocation1 | the x and y co-ordinates of point 1 |
rLocation2 | the x and y co-ordinates of point 2 |
Definition at line 110 of file Cylindrical2dNodesOnlyMesh.cpp.
References mWidth.
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 58 of file Cylindrical2dNodesOnlyMesh.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetWidth(), and mWidth.
|
inlineprivate |
Archives the member variables of the object which have to be preserved during its lifetime.
Note that we must archive any member variables FIRST so that this method can call a ReMesh (to convert from TrianglesMeshReader input format into our native format).
archive | the archive |
version | the current version of this class |
Definition at line 76 of file Cylindrical2dNodesOnlyMesh.hpp.
References mWidth.
void Cylindrical2dNodesOnlyMesh::SetNode | ( | unsigned | nodeIndex, |
ChastePoint< 2 > | point, | ||
bool | concreteMove = false |
||
) |
Overridden SetNode() method.
If the location should be set outside a cylindrical boundary move it back onto the cylinder.
nodeIndex | 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 in the parent Class Note this should always be false here |
Definition at line 74 of file Cylindrical2dNodesOnlyMesh.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), mWidth, ChastePoint< DIM >::rGetLocation(), and ChastePoint< DIM >::SetCoordinate().
Referenced by AddNode().
|
virtual |
Set up the box collection
cutOffLength | the cut off length for node neighbours |
domainSize | the size of the domain containing the nodes. |
numLocalRows | the number of rows of the collection that this process should own. |
isPeriodic | whether the box collection should be periodic. Defaults to true. |
Definition at line 46 of file Cylindrical2dNodesOnlyMesh.cpp.
References NodesOnlyMesh< 2 >::AddNodesToBoxes(), EXCEPTION, mWidth, and NodesOnlyMesh< SPACE_DIM >::SetUpBoxCollection().
|
friend |
Needed for serialization.
Definition at line 63 of file Cylindrical2dNodesOnlyMesh.hpp.
|
private |
The periodic width of the domain
Definition at line 58 of file Cylindrical2dNodesOnlyMesh.hpp.
Referenced by GetVectorFromAtoB(), GetWidth(), serialize(), SetNode(), and SetUpBoxCollection().