Chaste Commit::1fd4e48e3990e67db148bc1bc4cf6991a0049d0c
|
#include <PeriodicNodesOnlyMesh.hpp>
Public Member Functions | |
PeriodicNodesOnlyMesh (c_vector< double, SPACE_DIM > width) | |
virtual void | SetUpBoxCollection (double cutOffLength, c_vector< double, 2 *SPACE_DIM > domainSize, int numLocalRows=PETSC_DECIDE, c_vector< bool, SPACE_DIM > isDimPeriodic=zero_vector< bool >(SPACE_DIM)) |
c_vector< double, SPACE_DIM > | GetVectorFromAtoB (const c_vector< double, SPACE_DIM > &rLocation1, const c_vector< double, SPACE_DIM > &rLocation2) |
double | GetWidth (const unsigned &rDimension) const |
c_vector< double, SPACE_DIM > | GetPeriodicWidths () const |
void | SetNode (unsigned nodeIndex, ChastePoint< SPACE_DIM > point, bool concreteMove=false) |
unsigned | AddNode (Node< SPACE_DIM > *pNewNode) |
void | RefreshMesh () |
Public Member Functions inherited from NodesOnlyMesh< SPACE_DIM > | |
NodesOnlyMesh () | |
virtual | ~NodesOnlyMesh () |
void | ConstructNodesWithoutMesh (const std::vector< Node< SPACE_DIM > * > &rNodes, double maxInteractionDistance) |
void | ConstructNodesWithoutMesh (const std::vector< boost::shared_ptr< 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 () |
void | SetCalculateNodeNeighbours (bool calculateNodeNeighbours) |
void | CalculateInteriorNodePairs (std::vector< std::pair< Node< SPACE_DIM > *, Node< SPACE_DIM > * > > &rNodePairs) |
void | CalculateBoundaryNodePairs (std::vector< std::pair< Node< SPACE_DIM > *, Node< SPACE_DIM > * > > &rNodePairs) |
void | ReMesh (NodeMap &rMap) |
void | SetInitialBoxCollection (const c_vector< double, 2 *SPACE_DIM > domainSize, double maxInteractionDistance) |
void | UpdateBoxCollection () |
void | ResizeBoxCollection () |
bool | GetIsPeriodicAcrossProcsFromBoxCollection () const |
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 | 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) |
std::vector< unsigned > | GetAllNodeIndices () const |
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) |
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 |
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 | |
c_vector< double, SPACE_DIM > | mWidth |
c_vector< bool, SPACE_DIM > | mIsDimPeriodic |
Friends | |
class | TestPeriodicNodesOnlyMesh |
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< SPACE_DIM > | |
void | ClearBoxCollection () |
DistributedBoxCollection< SPACE_DIM > * | GetBoxCollection () |
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< 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<SPACE_DIM> for a rectangular mesh with periodic boundaries.
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<SPACE_DIM>.
Definition at line 53 of file PeriodicNodesOnlyMesh.hpp.
PeriodicNodesOnlyMesh< SPACE_DIM >::PeriodicNodesOnlyMesh | ( | c_vector< double, SPACE_DIM > | width | ) |
Constructor.
width | the periodic widths of the mesh. (Note if width=0.0 then not periodic) |
Definition at line 40 of file PeriodicNodesOnlyMesh.cpp.
References PeriodicNodesOnlyMesh< SPACE_DIM >::mIsDimPeriodic.
|
virtual |
Overridden AddNode() method.
pNewNode | pointer to the new node |
Reimplemented from NodesOnlyMesh< SPACE_DIM >.
Definition at line 167 of file PeriodicNodesOnlyMesh.cpp.
References NodesOnlyMesh< SPACE_DIM >::AddNode(), and Node< SPACE_DIM >::GetPoint().
c_vector< double, SPACE_DIM > PeriodicNodesOnlyMesh< SPACE_DIM >::GetPeriodicWidths | ( | ) | const |
Method to get the width of the periodic dimensions
Definition at line 94 of file PeriodicNodesOnlyMesh.cpp.
|
virtual |
Overridden GetVectorFromAtoB() method.
Evaluates the (surface) distance between two points in ND periodic geometry.
rLocation1 | the x y and z co-ordinates of point 1 |
rLocation2 | the x y and z co-ordinates of point 2 |
Reimplemented from AbstractMesh< ELEMENT_DIM, SPACE_DIM >.
Definition at line 181 of file PeriodicNodesOnlyMesh.cpp.
|
virtual |
Overridden GetWidth() method.
Calculate the 'width' of any dimension of the mesh, taking periodicity into account.
rDimension | a dimension (0,1 or 2) |
Reimplemented from NodesOnlyMesh< SPACE_DIM >.
Definition at line 100 of file PeriodicNodesOnlyMesh.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetWidth().
|
virtual |
Overridden RefreshMesh() method.
If the location is outside the domain width, move it to within the boundary
Reimplemented from AbstractMesh< ELEMENT_DIM, SPACE_DIM >.
Definition at line 208 of file PeriodicNodesOnlyMesh.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::RefreshMesh().
|
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 82 of file PeriodicNodesOnlyMesh.hpp.
References PeriodicNodesOnlyMesh< SPACE_DIM >::mIsDimPeriodic, and PeriodicNodesOnlyMesh< SPACE_DIM >::mWidth.
|
virtual |
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 |
Reimplemented from NodesOnlyMesh< SPACE_DIM >.
Definition at line 118 of file PeriodicNodesOnlyMesh.cpp.
References ChastePoint< DIM >::rGetLocation(), and ChastePoint< DIM >::SetCoordinate().
|
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. |
isDimPeriodic | whether the box collection should be periodic in the x y and/or z direction. |
Reimplemented from NodesOnlyMesh< SPACE_DIM >.
Definition at line 57 of file PeriodicNodesOnlyMesh.cpp.
References EXCEPTION, PetscTools::GetNumProcs(), and NodesOnlyMesh< SPACE_DIM >::SetUpBoxCollection().
|
friend |
Needed for serialization.
Definition at line 69 of file PeriodicNodesOnlyMesh.hpp.
|
friend |
Definition at line 66 of file PeriodicNodesOnlyMesh.hpp.
|
private |
Whether a dimension is periodic
Definition at line 64 of file PeriodicNodesOnlyMesh.hpp.
Referenced by PeriodicNodesOnlyMesh< SPACE_DIM >::PeriodicNodesOnlyMesh(), and PeriodicNodesOnlyMesh< SPACE_DIM >::serialize().
|
private |
The periodic widths of the domain
Definition at line 59 of file PeriodicNodesOnlyMesh.hpp.
Referenced by PeriodicNodesOnlyMesh< SPACE_DIM >::serialize().