![]() |
Chaste Commit::333233612e3dcc941d260418acd7b5ccdc30390e
|
#include <NodesOnlyMesh.hpp>
Public Member Functions | |
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 () |
double | GetWidth (const unsigned &rDimension) const |
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 | 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) |
std::vector< unsigned > | GetAllNodeIndices () const |
![]() | |
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) |
![]() | |
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 () |
![]() | |
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) |
![]() | |
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 () |
Protected Member Functions | |
void | ClearBoxCollection () |
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)) |
DistributedBoxCollection< SPACE_DIM > * | GetBoxCollection () |
![]() | |
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) |
![]() | |
void | SetElementOwnerships () |
![]() | |
ChasteCuboid< SPACE_DIM > | CalculateBoundingBox (const std::vector< Node< SPACE_DIM > * > &rNodes) const |
Private Member Functions | |
template<class Archive > | |
void | save (Archive &archive, const unsigned int version) const |
template<class Archive > | |
void | load (Archive &archive, const unsigned int version) |
unsigned | GetNextAvailableIndex () |
void | EnlargeBoxCollection () |
bool | IsANodeCloseToDomainBoundary () |
void | SetUpBoxCollection (const std::vector< Node< SPACE_DIM > * > &rNodes) |
void | RemoveDeletedNodes (NodeMap &map) |
void | UpdateNodeIndices () |
void | AddNodeWithFixedIndex (Node< SPACE_DIM > *pNewNode) |
Private Attributes | |
std::vector< boost::shared_ptr< Node< SPACE_DIM > > > | mHaloNodes |
double | mMaximumInteractionDistance |
std::map< unsigned, unsigned > | mNodesMapping |
std::map< unsigned, unsigned > | mHaloNodesMapping |
unsigned | mIndexCounter |
double | mMinimumNodeDomainBoundarySeparation |
std::vector< unsigned > | mDeletedGlobalNodeIndices |
std::vector< unsigned > | mNodesToSendRight |
std::vector< unsigned > | mNodesToSendLeft |
std::vector< bool > | mLocalInitialNodes |
unsigned | mMaxAddedNodeIndex |
DistributedBoxCollection< SPACE_DIM > * | mpBoxCollection |
bool | mCalculateNodeNeighbours |
Friends | |
class | TestNodesOnlyMesh |
class | boost::serialization::access |
Mesh class for storing lists of nodes (no elements). This inherits from MutableMesh because we want to be able to add and delete nodes.
Definition at line 52 of file NodesOnlyMesh.hpp.
NodesOnlyMesh< SPACE_DIM >::NodesOnlyMesh | ( | ) |
Default constructor to initialise BoxCollection to NULL.
Definition at line 41 of file NodesOnlyMesh.cpp.
|
virtual |
Over-written destructor to delete pointer to BoxCollection.
Definition at line 53 of file NodesOnlyMesh.cpp.
void NodesOnlyMesh< SPACE_DIM >::AddHaloNode | ( | boost::shared_ptr< Node< SPACE_DIM > > | pNewNode | ) |
Add a temporary halo node on this process.
pNewNode | a shared pointer to the new node to add. |
Definition at line 388 of file NodesOnlyMesh.cpp.
References Node< SPACE_DIM >::GetIndex().
void NodesOnlyMesh< SPACE_DIM >::AddHaloNodesToBoxes | ( | ) |
Iterate through each halo node and add it to its appropriate box.
Definition at line 651 of file NodesOnlyMesh.cpp.
void NodesOnlyMesh< SPACE_DIM >::AddMovedNode | ( | boost::shared_ptr< Node< SPACE_DIM > > | pMovedNode | ) |
Add a node to this process that has moved from another process.
pMovedNode | the node to add to this mesh. |
Definition at line 424 of file NodesOnlyMesh.cpp.
|
virtual |
Overridden AddNode() method.
pNewNode | pointer to the new node. |
Reimplemented from MutableMesh< SPACE_DIM, SPACE_DIM >.
Reimplemented in PeriodicNodesOnlyMesh< SPACE_DIM >.
Definition at line 403 of file NodesOnlyMesh.cpp.
References Node< SPACE_DIM >::SetIndex().
Referenced by Cylindrical2dNodesOnlyMesh::AddNode(), and PeriodicNodesOnlyMesh< SPACE_DIM >::AddNode().
void NodesOnlyMesh< SPACE_DIM >::AddNodesToBoxes | ( | ) |
Iterate through each node and add it to its appropriate box.
Definition at line 638 of file NodesOnlyMesh.cpp.
|
private |
Add pNewNode to the mesh, maintaining its current global index. Called by AddNode and AddMovedNode.
pNewNode | the new node to add to this mesh. |
Definition at line 359 of file NodesOnlyMesh.cpp.
void NodesOnlyMesh< SPACE_DIM >::CalculateBoundaryNodePairs | ( | std::vector< std::pair< Node< SPACE_DIM > *, Node< SPACE_DIM > * > > & | rNodePairs | ) |
Calculate pairs of nodes from boxes on the process boundary using the BoxCollection
rNodePairs | reference to the set of node pairs to populate. |
Definition at line 234 of file NodesOnlyMesh.cpp.
void NodesOnlyMesh< SPACE_DIM >::CalculateInteriorNodePairs | ( | std::vector< std::pair< Node< SPACE_DIM > *, Node< SPACE_DIM > * > > & | rNodePairs | ) |
Calculate pairs of nodes from interior boxes using the BoxCollection.
rNodePairs | reference to the set of node pairs to populate. |
Definition at line 226 of file NodesOnlyMesh.cpp.
void NodesOnlyMesh< SPACE_DIM >::CalculateNodesOutsideLocalDomain | ( | ) |
Work out which nodes lie outside the local domain and add their indices to the vectors mNodesToSendLeft and mNodesToSendRight.
Definition at line 291 of file NodesOnlyMesh.cpp.
|
virtual |
Overridden Clear() method for NodesOnlyMesh.
Reimplemented from MutableMesh< SPACE_DIM, SPACE_DIM >.
Definition at line 140 of file NodesOnlyMesh.cpp.
References MutableMesh< ELEMENT_DIM, SPACE_DIM >::Clear().
|
protected |
Clear the BoxCollection
Definition at line 570 of file NodesOnlyMesh.cpp.
void NodesOnlyMesh< SPACE_DIM >::ClearHaloNodes | ( | ) |
Delete all the halo nodes on this process.
Definition at line 395 of file NodesOnlyMesh.cpp.
void NodesOnlyMesh< SPACE_DIM >::ConstructFromMeshReader | ( | AbstractMeshReader< SPACE_DIM, SPACE_DIM > & | rMeshReader | ) |
Overridden ConstructFromMeshReader to correctly assign global node indices on load.
rMeshReader | the mesh reader for input. |
Definition at line 716 of file NodesOnlyMesh.cpp.
References TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMeshReader().
void NodesOnlyMesh< SPACE_DIM >::ConstructNodesWithoutMesh | ( | const AbstractMesh< SPACE_DIM, SPACE_DIM > & | rGeneratingMesh, |
double | maxInteractionDistance | ||
) |
A Helper method to enable you to construct a nodes-only mesh by stripping the nodes TetrahedralMesh, this calls the ConstructNodesWithoutMesh method with the nodes
rGeneratingMesh | any mesh with nodes, used to generate the NodesOnlyMesh. |
maxInteractionDistance | the distance that defines node neighbours in CalculateNodePairs. |
Definition at line 115 of file NodesOnlyMesh.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes.
void NodesOnlyMesh< SPACE_DIM >::ConstructNodesWithoutMesh | ( | const std::vector< boost::shared_ptr< Node< SPACE_DIM > > > & | rNodes, |
double | maxInteractionDistance | ||
) |
Construct the mesh using only nodes. No mesh is created, but the nodes are stored. The original vector of nodes is deep-copied: new node objects are made with are independent of the pointers in the input so that they can be safely deleted.
If this is the only way of constructing a mesh of this type, then we can be certain that elements and boundary elements are always unused.
rNodes | a vector of shared pointers to nodes. |
maxInteractionDistance | the distance that defines node neighbours in CalculateNodePairs. |
Definition at line 102 of file NodesOnlyMesh.cpp.
void NodesOnlyMesh< SPACE_DIM >::ConstructNodesWithoutMesh | ( | const std::vector< Node< SPACE_DIM > * > & | rNodes, |
double | maxInteractionDistance | ||
) |
Construct the mesh using only nodes. No mesh is created, but the nodes are stored. The original vector of nodes is deep-copied: new node objects are made with are independent of the pointers in the input so that they can be safely deleted.
If this is the only way of constructing a mesh of this type, then we can be certain that elements and boundary elements are always unused.
rNodes | a vector of pointers to nodes. |
maxInteractionDistance | the distance that defines node neighbours in CalculateNodePairs. |
Definition at line 60 of file NodesOnlyMesh.cpp.
References Node< SPACE_DIM >::GetIndex(), Node< SPACE_DIM >::rGetNodeAttributes(), and Node< SPACE_DIM >::SetRadius().
Referenced by CaBasedCellPopulation< DIM >::WriteVtkResultsToFile(), and PottsBasedCellPopulation< DIM >::WriteVtkResultsToFile().
void NodesOnlyMesh< SPACE_DIM >::DeleteMovedNode | ( | unsigned | index | ) |
Make a clean delete of a node that has moved off this process.
index | the global index of the node moving off this process. |
Definition at line 469 of file NodesOnlyMesh.cpp.
|
virtual |
Overridden DeleteNode() method.
index | of the node to be deleted |
Reimplemented from MutableMesh< SPACE_DIM, SPACE_DIM >.
Definition at line 454 of file NodesOnlyMesh.cpp.
|
private |
Increase box collection size by adding an extra row/face to each edge.
Definition at line 506 of file NodesOnlyMesh.cpp.
References PetscTools::AmMaster(), and PetscTools::AmTopMost().
std::vector< unsigned > NodesOnlyMesh< SPACE_DIM >::GetAllNodeIndices | ( | ) | const |
Get all node indices in order of appearance.
Definition at line 728 of file NodesOnlyMesh.cpp.
Referenced by NodesOnlyMesh< SPACE_DIM >::save().
|
protected |
Definition at line 152 of file NodesOnlyMesh.cpp.
bool NodesOnlyMesh< SPACE_DIM >::GetIsPeriodicAcrossProcsFromBoxCollection | ( | ) | const |
Gets the periodicity across processors information from mpBoxCollection
Definition at line 691 of file NodesOnlyMesh.cpp.
double NodesOnlyMesh< SPACE_DIM >::GetMaximumInteractionDistance | ( | ) |
Definition at line 203 of file NodesOnlyMesh.cpp.
|
virtual |
Get the largest node global index on this process.
Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.
Definition at line 191 of file NodesOnlyMesh.cpp.
References PetscTools::GetMyRank(), and PetscTools::GetNumProcs().
|
private |
Calculate the next unique global index available on this process. Uses a hashing function to ensure that a unique index is given to every node.
For example for 3 process they will have access to the following integers:
Proc 0: 0 3 6 9 12 ...
Proc 1: 1 4 7 10 13 ...
Proc 2: 2 5 8 11 14 ...
Deleted node indices can be locally re-used.
Deleted node indices of nodes that have *moved* process cannot be re-used.
Definition at line 486 of file NodesOnlyMesh.cpp.
|
virtual |
Overridden method to get node or halo node from the mesh.
index | the global index of the node. |
Reimplemented from AbstractMesh< ELEMENT_DIM, SPACE_DIM >.
Definition at line 158 of file NodesOnlyMesh.cpp.
|
virtual |
Reimplemented from MutableMesh< SPACE_DIM, SPACE_DIM >.
Definition at line 185 of file NodesOnlyMesh.cpp.
Referenced by NodesOnlyMesh< SPACE_DIM >::load().
|
virtual |
Overridden GetWidth method to work in parallel.
rDimension | the dimension along which to get the width. |
Reimplemented from AbstractMesh< ELEMENT_DIM, SPACE_DIM >.
Reimplemented in PeriodicNodesOnlyMesh< SPACE_DIM >.
Definition at line 209 of file NodesOnlyMesh.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetWidth().
Referenced by CaBasedCellPopulation< DIM >::WriteVtkResultsToFile().
|
private |
Definition at line 531 of file NodesOnlyMesh.cpp.
References PetscTools::GetWorld().
bool NodesOnlyMesh< SPACE_DIM >::IsOwned | ( | c_vector< double, SPACE_DIM > & | location | ) |
A method to identify whether a location is owned in the parallel space decomposition.
location | the location to test |
Definition at line 179 of file NodesOnlyMesh.cpp.
|
inlineprivate |
Load 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 94 of file NodesOnlyMesh.hpp.
References NodesOnlyMesh< SPACE_DIM >::GetNumNodes(), NodesOnlyMesh< SPACE_DIM >::mIndexCounter, NodesOnlyMesh< SPACE_DIM >::mMaxAddedNodeIndex, NodesOnlyMesh< SPACE_DIM >::mMaximumInteractionDistance, NodesOnlyMesh< SPACE_DIM >::mMinimumNodeDomainBoundarySeparation, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, and NodesOnlyMesh< SPACE_DIM >::mNodesMapping.
void NodesOnlyMesh< SPACE_DIM >::LoadBalanceMesh | ( | ) |
Re-allocate the underlaying BoxCollection rows based on the load-balance algorithm implemented in the box collection.
Definition at line 697 of file NodesOnlyMesh.cpp.
|
virtual |
Overridden ReMesh() method. Since only Nodes are stored, this method cleans up mNodes by removing nodes marked as deleted and reallocating mNodes to 'fill the gaps'.
rMap | a reference to a NodeMap which associates the indices of the old mesh with the new mesh. It should be large enough to contain all node indices. |
Reimplemented from MutableMesh< SPACE_DIM, SPACE_DIM >.
Definition at line 242 of file NodesOnlyMesh.cpp.
References NodeMap::ResetToIdentity().
|
private |
Remove all nodes that return mIsDeleted as true.
map | the NodeMap to record which nodes have been removed. |
Definition at line 257 of file NodesOnlyMesh.cpp.
void NodesOnlyMesh< SPACE_DIM >::ResizeBoxCollection | ( | ) |
Check whether any nodes are close to the edge of the box collection and increase the size of it if necessary.
Definition at line 677 of file NodesOnlyMesh.cpp.
std::vector< unsigned > & NodesOnlyMesh< SPACE_DIM >::rGetHaloNodesToSendLeft | ( | ) |
Definition at line 353 of file NodesOnlyMesh.cpp.
std::vector< unsigned > & NodesOnlyMesh< SPACE_DIM >::rGetHaloNodesToSendRight | ( | ) |
Definition at line 347 of file NodesOnlyMesh.cpp.
std::vector< bool > & NodesOnlyMesh< SPACE_DIM >::rGetInitiallyOwnedNodes | ( | ) |
Definition at line 121 of file NodesOnlyMesh.cpp.
std::vector< unsigned > & NodesOnlyMesh< SPACE_DIM >::rGetNodesToSendLeft | ( | ) |
Definition at line 335 of file NodesOnlyMesh.cpp.
std::vector< unsigned > & NodesOnlyMesh< SPACE_DIM >::rGetNodesToSendRight | ( | ) |
Definition at line 341 of file NodesOnlyMesh.cpp.
|
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 73 of file NodesOnlyMesh.hpp.
References NodesOnlyMesh< SPACE_DIM >::GetAllNodeIndices(), NodesOnlyMesh< SPACE_DIM >::mMaximumInteractionDistance, and NodesOnlyMesh< SPACE_DIM >::mMinimumNodeDomainBoundarySeparation.
void NodesOnlyMesh< SPACE_DIM >::SetCalculateNodeNeighbours | ( | bool | calculateNodeNeighbours | ) |
Set whether to calculate node neighbours for the rNodeNeigbours set in CalculateNodePairs. Switch off for efficiency
calculateNodeNeighbours | whether to store the neighbours. |
Definition at line 220 of file NodesOnlyMesh.cpp.
void NodesOnlyMesh< SPACE_DIM >::SetInitialBoxCollection | ( | const c_vector< double, 2 *SPACE_DIM > | domainSize, |
double | maxInteractionDistance | ||
) |
Set the initial box collection without passing nodes to the mesh. Used for memory efficient construction in parallel.
domainSize | the initial domain size of the mesh. |
maxInteractionDistance | the max interaction distance between nodes. |
Definition at line 580 of file NodesOnlyMesh.cpp.
void NodesOnlyMesh< SPACE_DIM >::SetMaximumInteractionDistance | ( | double | maxDistance | ) |
Set the maximum node interaction distance.
maxDistance | the new maximum distance. |
Definition at line 197 of file NodesOnlyMesh.cpp.
void NodesOnlyMesh< SPACE_DIM >::SetMinimumNodeDomainBoundarySeparation | ( | double | separation | ) |
Set the value of mMinimumNodeDomainBoundarySeparation.
separation | the new value for the separation. |
Definition at line 478 of file NodesOnlyMesh.cpp.
|
virtual |
Overridden SetNode() method.
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 MutableMesh< SPACE_DIM, SPACE_DIM >.
Reimplemented in PeriodicNodesOnlyMesh< SPACE_DIM >.
Definition at line 414 of file NodesOnlyMesh.cpp.
|
private |
Set up a DistributedBoxCollection by calculating the correct domain size from the node locations.
rNodes | the nodes that will be contained in the box collection. |
Definition at line 586 of file NodesOnlyMesh.cpp.
References ChasteCuboid< SPACE_DIM >::GetLongestAxis(), ChasteCuboid< SPACE_DIM >::GetWidth(), ChasteCuboid< SPACE_DIM >::rGetLowerCorner(), and ChasteCuboid< SPACE_DIM >::rGetUpperCorner().
Referenced by Cylindrical2dNodesOnlyMesh::SetUpBoxCollection(), and PeriodicNodesOnlyMesh< SPACE_DIM >::SetUpBoxCollection().
|
protectedvirtual |
Set up the box collection. Overridden in subclasses to implement periodicity.
cutOffLength | the cut off length for node neighbours. |
domainSize | the size of the domain containing the nodes. |
numLocalRows | the number of rows that should be owned by this process. |
isDimPeriodic | whether the DistributedBoxCollection should be periodic. |
Reimplemented in PeriodicNodesOnlyMesh< SPACE_DIM >.
Definition at line 609 of file NodesOnlyMesh.cpp.
|
virtual |
Overridden solve node mapping method
index | the global index of the node. |
Implements AbstractMesh< ELEMENT_DIM, SPACE_DIM >.
Definition at line 127 of file NodesOnlyMesh.cpp.
References EXCEPTION, and PetscTools::GetMyRank().
void NodesOnlyMesh< SPACE_DIM >::UpdateBoxCollection | ( | ) |
Clear the old box collection and set up a new one if necessary.
Definition at line 664 of file NodesOnlyMesh.cpp.
|
private |
Make sure that node indices match their location, and update mNodesMapping.
Definition at line 280 of file NodesOnlyMesh.cpp.
|
friend |
Needed for serialization.
Definition at line 59 of file NodesOnlyMesh.hpp.
|
friend |
Definition at line 56 of file NodesOnlyMesh.hpp.
|
private |
Whether to calculate node neighbours in the box collection. Switch off for efficiency
Definition at line 153 of file NodesOnlyMesh.hpp.
|
private |
A list of the global indices of nodes that have been deleted from this process and can be reused.
Definition at line 133 of file NodesOnlyMesh.hpp.
|
private |
Vector of shared-pointers to halo nodes used by this process.
Definition at line 115 of file NodesOnlyMesh.hpp.
|
private |
A map from halo node global index to local index in mHaloNodes.
Definition at line 124 of file NodesOnlyMesh.hpp.
|
private |
A counter of the number of fresh node indices used on this process. Ensures unique indices in parallel.
Definition at line 127 of file NodesOnlyMesh.hpp.
Referenced by NodesOnlyMesh< SPACE_DIM >::load().
|
private |
A list of flags showing which initial nodes passed to ConstructNodesWithoutMesh were created on this process.
Definition at line 143 of file NodesOnlyMesh.hpp.
|
private |
A variable to keep track of added node indices so we know the largest on this process. Used to create a large enough NodeMap when remeshing.
Definition at line 147 of file NodesOnlyMesh.hpp.
Referenced by NodesOnlyMesh< SPACE_DIM >::load().
|
private |
Nodes separated by a distance less than mMaximumInteractionDistance are neighbours.
Definition at line 118 of file NodesOnlyMesh.hpp.
Referenced by NodesOnlyMesh< SPACE_DIM >::load(), and NodesOnlyMesh< SPACE_DIM >::save().
|
private |
A minimum separation to maintain between nodes and the boundary of mpBoxCollection, which grows with the mesh.
Definition at line 130 of file NodesOnlyMesh.hpp.
Referenced by NodesOnlyMesh< SPACE_DIM >::load(), and NodesOnlyMesh< SPACE_DIM >::save().
|
private |
A map from node global index to local index in mNodes.
Definition at line 121 of file NodesOnlyMesh.hpp.
Referenced by NodesOnlyMesh< SPACE_DIM >::load().
|
private |
A list of global indices of nodes that need to be moved to the left hand process.
Definition at line 139 of file NodesOnlyMesh.hpp.
|
private |
A list of global indices of nodes that need to be moved to the right hand process.
Definition at line 136 of file NodesOnlyMesh.hpp.
|
private |
A pointer to the DistributedBoxCollection.
Definition at line 150 of file NodesOnlyMesh.hpp.