Chaste Release::3.1
|
#include <MutableVertexMesh.hpp>
Public Member Functions | |
MutableVertexMesh (std::vector< Node< SPACE_DIM > * > nodes, std::vector< VertexElement< ELEMENT_DIM, SPACE_DIM > * > vertexElements, double cellRearrangementThreshold=0.01, double t2Threshold=0.001, double cellRearrangementRatio=1.5) | |
MutableVertexMesh () | |
virtual | ~MutableVertexMesh () |
void | SetCellRearrangementThreshold (double cellRearrangementThreshold) |
void | SetT2Threshold (double t2Threshold) |
void | SetCellRearrangementRatio (double cellRearrangementRatio) |
virtual void | SetNode (unsigned nodeIndex, ChastePoint< SPACE_DIM > point) |
void | SetCheckForInternalIntersections (bool checkForInternalIntersections) |
double | GetCellRearrangementThreshold () const |
double | GetT2Threshold () const |
double | GetCellRearrangementRatio () const |
unsigned | GetNumNodes () const |
unsigned | GetNumElements () const |
bool | GetCheckForInternalIntersections () const |
std::vector< c_vector< double, SPACE_DIM > > | GetLocationsOfT1Swaps () |
std::vector< c_vector< double, SPACE_DIM > > | GetLocationsOfT3Swaps () |
void | ClearLocationsOfT1Swaps () |
void | ClearLocationsOfT3Swaps () |
unsigned | AddNode (Node< SPACE_DIM > *pNewNode) |
void | DeleteElementPriorToReMesh (unsigned index) |
void | DeleteNodePriorToReMesh (unsigned index) |
unsigned | DivideElementAlongShortAxis (VertexElement< ELEMENT_DIM, SPACE_DIM > *pElement, bool placeOriginalElementBelow=false) |
unsigned | DivideElementAlongGivenAxis (VertexElement< ELEMENT_DIM, SPACE_DIM > *pElement, c_vector< double, SPACE_DIM > axisOfDivision, bool placeOriginalElementBelow=false) |
unsigned | AddElement (VertexElement< ELEMENT_DIM, SPACE_DIM > *pNewElement) |
void | Clear () |
void | DivideEdge (Node< SPACE_DIM > *pNodeA, Node< SPACE_DIM > *pNodeB) |
void | RemoveDeletedNodesAndElements (VertexElementMap &rElementMap) |
void | RemoveDeletedNodes () |
void | ReMesh (VertexElementMap &rElementMap) |
void | ReMesh () |
Protected Member Functions | |
unsigned | DivideElement (VertexElement< ELEMENT_DIM, SPACE_DIM > *pElement, unsigned nodeAIndex, unsigned nodeBIndex, bool placeOriginalElementBelow=false) |
bool | CheckForT1Swaps (VertexElementMap &rElementMap) |
bool | CheckForT2Swaps (VertexElementMap &rElementMap) |
bool | CheckForIntersections () |
void | IdentifySwapType (Node< SPACE_DIM > *pNodeA, Node< SPACE_DIM > *pNodeB, VertexElementMap &rElementMap) |
void | PerformNodeMerge (Node< SPACE_DIM > *pNodeA, Node< SPACE_DIM > *pNodeB) |
void | PerformT1Swap (Node< SPACE_DIM > *pNodeA, Node< SPACE_DIM > *pNodeB, std::set< unsigned > &rElementsContainingNodes) |
void | PerformIntersectionSwap (Node< SPACE_DIM > *pNode, unsigned elementIndex) |
void | PerformT2Swap (VertexElement< ELEMENT_DIM, SPACE_DIM > &rElement) |
void | PerformT3Swap (Node< SPACE_DIM > *pNode, unsigned elementIndex) |
void | PerformVoidRemoval (Node< SPACE_DIM > *pNodeA, Node< SPACE_DIM > *pNodeB, Node< SPACE_DIM > *pNodeC) |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Protected Attributes | |
double | mCellRearrangementThreshold |
double | mCellRearrangementRatio |
double | mT2Threshold |
bool | mCheckForInternalIntersections |
std::vector< unsigned > | mDeletedNodeIndices |
std::vector< unsigned > | mDeletedElementIndices |
std::vector< c_vector< double, SPACE_DIM > > | mLocationsOfT1Swaps |
std::vector< c_vector< double, SPACE_DIM > > | mLocationsOfT3Swaps |
Friends | |
class | TestMutableVertexMesh |
class | TestMutableVertexMeshReMesh |
class | boost::serialization::access |
A vertex-based mesh class, for use in vertex-based cell-based simulations.
Definition at line 57 of file MutableVertexMesh.hpp.
MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::MutableVertexMesh | ( | std::vector< Node< SPACE_DIM > * > | nodes, |
std::vector< VertexElement< ELEMENT_DIM, SPACE_DIM > * > | vertexElements, | ||
double | cellRearrangementThreshold = 0.01 , |
||
double | t2Threshold = 0.001 , |
||
double | cellRearrangementRatio = 1.5 |
||
) |
Default constructor.
nodes | vector of pointers to nodes |
vertexElements | vector of pointers to VertexElements |
cellRearrangementThreshold | the minimum threshold distance for element rearrangment (defaults to 0.01) |
t2Threshold | the maximum threshold distance for Type 2 swaps (defaults to 0.001) |
cellRearrangementRatio | ratio between the minimum threshold distance for element rearrangment node separation after remeshing (defaults to 1.5) |
Definition at line 43 of file MutableVertexMesh.cpp.
References Node< SPACE_DIM >::AddElement(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::Clear(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::mElements, VertexMesh< ELEMENT_DIM, SPACE_DIM >::mFaces, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mMeshChangesDuringSimulation, and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes.
MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::MutableVertexMesh | ( | ) |
Default constructor for use by serializer.
Definition at line 109 of file MutableVertexMesh.cpp.
References MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::Clear(), and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mMeshChangesDuringSimulation.
MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::~MutableVertexMesh | ( | ) | [virtual] |
Destructor.
Definition at line 120 of file MutableVertexMesh.cpp.
unsigned MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::AddElement | ( | VertexElement< ELEMENT_DIM, SPACE_DIM > * | pNewElement | ) |
Add an element to the mesh.
pNewElement | the new element |
Definition at line 245 of file MutableVertexMesh.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), and MutableElement< ELEMENT_DIM, SPACE_DIM >::RegisterWithNodes().
unsigned MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::AddNode | ( | Node< SPACE_DIM > * | pNewNode | ) |
Add a node to the mesh.
Note: After calling this one or more times, you must then call ReMesh.
pNewNode | pointer to the new node |
Definition at line 226 of file MutableVertexMesh.cpp.
References Node< SPACE_DIM >::GetIndex(), and Node< SPACE_DIM >::SetIndex().
bool MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::CheckForIntersections | ( | ) | [protected] |
Helper method for ReMesh to check if elements have intersected and to correct them if required
Definition at line 896 of file MutableVertexMesh.cpp.
bool MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::CheckForT1Swaps | ( | VertexElementMap & | rElementMap | ) | [protected] |
Helper method for ReMesh to check if any neighbouring nodes in an element are within the mCellRearrangementThreshold and perform any T1Swaps if required
rElementMap | a VertexElementMap which associates the indices of VertexElements in the old mesh with indices of VertexElements in the new mesh. This should be created with the correct size, GetNumElements() |
Definition at line 804 of file MutableVertexMesh.cpp.
References Node< SPACE_DIM >::GetIndex(), and Node< SPACE_DIM >::rGetContainingElementIndices().
bool MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::CheckForT2Swaps | ( | VertexElementMap & | rElementMap | ) | [protected] |
Helper method for ReMesh to check if any elements are smaller than the mT2Threshold and perform any T2Swaps, removing elements, if required
rElementMap | a VertexElementMap which associates the indices of VertexElements in the old mesh with indices of VertexElements in the new mesh. This should be created with the correct size, GetNumElements() |
Definition at line 867 of file MutableVertexMesh.cpp.
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::Clear | ( | ) | [virtual] |
Delete mNodes and mElements.
Reimplemented from VertexMesh< ELEMENT_DIM, SPACE_DIM >.
Definition at line 174 of file MutableVertexMesh.cpp.
References VertexMesh< ELEMENT_DIM, SPACE_DIM >::Clear().
Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::MutableVertexMesh().
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::ClearLocationsOfT1Swaps | ( | ) |
Helper method to clear the stored T1Swaps
Definition at line 214 of file MutableVertexMesh.cpp.
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::ClearLocationsOfT3Swaps | ( | ) |
Helper method to clear the stored T3Swaps
Definition at line 220 of file MutableVertexMesh.cpp.
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::DeleteElementPriorToReMesh | ( | unsigned | index | ) |
Mark an element as deleted. Note that it DOES NOT deal with the associated nodes and therefore should only be called immediately prior to a ReMesh() being called.
index | the global index of a specified vertex element |
Definition at line 585 of file MutableVertexMesh.cpp.
References Node< SPACE_DIM >::GetIndex(), Node< SPACE_DIM >::rGetContainingElementIndices(), and Node< SPACE_DIM >::SetAsBoundaryNode().
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::DeleteNodePriorToReMesh | ( | unsigned | index | ) |
Mark a node as deleted. Note that this method DOES NOT deal with the associated elements and therefore should only be called immediately prior to a ReMesh() being called.
index | The index of the node to delete |
Definition at line 609 of file MutableVertexMesh.cpp.
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::DivideEdge | ( | Node< SPACE_DIM > * | pNodeA, |
Node< SPACE_DIM > * | pNodeB | ||
) |
Add a node on the edge between two nodes.
pNodeA | a pointer to one node |
pNodeB | a pointer to the other nodes |
Definition at line 616 of file MutableVertexMesh.cpp.
References Node< SPACE_DIM >::GetIndex(), Node< SPACE_DIM >::IsBoundaryNode(), Node< SPACE_DIM >::rGetContainingElementIndices(), Node< SPACE_DIM >::rGetLocation(), and Node< SPACE_DIM >::SetPoint().
unsigned MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::DivideElement | ( | VertexElement< ELEMENT_DIM, SPACE_DIM > * | pElement, |
unsigned | nodeAIndex, | ||
unsigned | nodeBIndex, | ||
bool | placeOriginalElementBelow = false |
||
) | [protected] |
Divide an element along the axis passing through two of its nodes.
pElement | the element to divide |
nodeAIndex | the local index of one node within this element |
nodeBIndex | the local index of another node within this element |
placeOriginalElementBelow | whether to place the original element below (in the y direction) the new element (defaults to false) |
Remove the correct nodes from each element. If placeOriginalElementBelow is true, place the original element below (in the y direction) the new element; otherwise, place it above.
Definition at line 457 of file MutableVertexMesh.cpp.
References MutableElement< ELEMENT_DIM, SPACE_DIM >::DeleteNode(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode(), and AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes().
unsigned MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::DivideElementAlongGivenAxis | ( | VertexElement< ELEMENT_DIM, SPACE_DIM > * | pElement, |
c_vector< double, SPACE_DIM > | axisOfDivision, | ||
bool | placeOriginalElementBelow = false |
||
) |
Divide an element along a specified axis.
If the new nodes (intersections of axis with element) are within mCellRearrangementThreshold of existing nodes then they are moved 2*mCellRearrangementThreshold away.
pElement | the element to divide |
axisOfDivision | axis to divide the element by |
placeOriginalElementBelow | whether to place the original element below (in the y direction) the new element (defaults to false) |
Definition at line 268 of file MutableVertexMesh.cpp.
References EXCEPTION, Node< SPACE_DIM >::GetIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode(), MutableElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocalIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocation(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), Node< SPACE_DIM >::IsBoundaryNode(), Node< SPACE_DIM >::rGetContainingElementIndices(), and Node< SPACE_DIM >::rGetLocation().
unsigned MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::DivideElementAlongShortAxis | ( | VertexElement< ELEMENT_DIM, SPACE_DIM > * | pElement, |
bool | placeOriginalElementBelow = false |
||
) |
Divide an element along its short axis.
pElement | the element to divide |
placeOriginalElementBelow | whether to place the original element below (in the y direction) the new element (defaults to false) |
Definition at line 442 of file MutableVertexMesh.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex().
double MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::GetCellRearrangementRatio | ( | ) | const |
Definition at line 138 of file MutableVertexMesh.cpp.
double MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::GetCellRearrangementThreshold | ( | ) | const |
Definition at line 126 of file MutableVertexMesh.cpp.
bool MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::GetCheckForInternalIntersections | ( | ) | const |
Definition at line 144 of file MutableVertexMesh.cpp.
std::vector< c_vector< double, SPACE_DIM > > MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::GetLocationsOfT1Swaps | ( | ) |
Definition at line 202 of file MutableVertexMesh.cpp.
std::vector< c_vector< double, SPACE_DIM > > MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::GetLocationsOfT3Swaps | ( | ) |
Definition at line 208 of file MutableVertexMesh.cpp.
unsigned MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::GetNumElements | ( | ) | const [virtual] |
Reimplemented from VertexMesh< ELEMENT_DIM, SPACE_DIM >.
Definition at line 189 of file MutableVertexMesh.cpp.
unsigned MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes | ( | ) | const [virtual] |
Reimplemented from VertexMesh< ELEMENT_DIM, SPACE_DIM >.
Definition at line 183 of file MutableVertexMesh.cpp.
double MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::GetT2Threshold | ( | ) | const |
Definition at line 132 of file MutableVertexMesh.cpp.
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::IdentifySwapType | ( | Node< SPACE_DIM > * | pNodeA, |
Node< SPACE_DIM > * | pNodeB, | ||
VertexElementMap & | rElementMap | ||
) | [protected] |
Helper method for ReMesh to Identify the type of swap when nodes are too close, T2Swap or NodeMerge.
pNodeA | one of the nodes to perform the swap with |
pNodeB | the other node to perform the swap |
rElementMap | a VertexElementMap which associates the indices of VertexElements in the old mesh with indices of VertexElements in the new mesh. This should be created with the correct size, GetNumElements() |
Definition at line 962 of file MutableVertexMesh.cpp.
References EXCEPTION, Node< SPACE_DIM >::GetIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), MutableElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocalIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), Node< SPACE_DIM >::IsBoundaryNode(), NEVER_REACHED, and Node< SPACE_DIM >::rGetContainingElementIndices().
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformIntersectionSwap | ( | Node< SPACE_DIM > * | pNode, |
unsigned | elementIndex | ||
) | [protected] |
Helper method for ReMesh to perform an element swap to fix overlaping elements
pNode | pointer to the node |
elementIndex | global index of the element in the mesh |
Definition at line 1517 of file MutableVertexMesh.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), Node< SPACE_DIM >::GetIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), MutableElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocalIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), Node< SPACE_DIM >::rGetContainingElementIndices(), and Node< SPACE_DIM >::rGetLocation().
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformNodeMerge | ( | Node< SPACE_DIM > * | pNodeA, |
Node< SPACE_DIM > * | pNodeB | ||
) | [protected] |
Helper method for ReMesh to merge nodes when needed. Replaces the node contained in the least number of elements with the other node.
pNodeA | one of the nodes to perform the merge with |
pNodeB | the other node to perform the merge with |
Definition at line 1288 of file MutableVertexMesh.cpp.
References Node< SPACE_DIM >::GetIndex(), Node< SPACE_DIM >::rGetContainingElementIndices(), Node< SPACE_DIM >::rGetLocation(), and Node< SPACE_DIM >::rGetModifiableLocation().
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT1Swap | ( | Node< SPACE_DIM > * | pNodeA, |
Node< SPACE_DIM > * | pNodeB, | ||
std::set< unsigned > & | rElementsContainingNodes | ||
) | [protected] |
Helper method for ReMesh to perform the T1 Swap
pNodeA | one of the nodes to perform the swap with |
pNodeB | the other node to perform the swap |
rElementsContainingNodes | set of common elements |
Definition at line 1339 of file MutableVertexMesh.cpp.
References EXCEPTION, Node< SPACE_DIM >::GetIndex(), Node< SPACE_DIM >::GetNumContainingElements(), Node< SPACE_DIM >::IsBoundaryNode(), Node< SPACE_DIM >::rGetContainingElementIndices(), Node< SPACE_DIM >::rGetLocation(), Node< SPACE_DIM >::rGetModifiableLocation(), and Node< SPACE_DIM >::SetAsBoundaryNode().
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT2Swap | ( | VertexElement< ELEMENT_DIM, SPACE_DIM > & | rElement | ) | [protected] |
Helper method for ReMesh to perform the T2 Swap
rElement | the element to remove |
Definition at line 1689 of file MutableVertexMesh.cpp.
References MutableElement< ELEMENT_DIM, SPACE_DIM >::DeleteNode(), EXCEPTION, Node< SPACE_DIM >::GetIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), MutableElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocalIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), Node< SPACE_DIM >::IsBoundaryNode(), MutableElement< ELEMENT_DIM, SPACE_DIM >::MarkAsDeleted(), and Node< SPACE_DIM >::rGetContainingElementIndices().
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT3Swap | ( | Node< SPACE_DIM > * | pNode, |
unsigned | elementIndex | ||
) | [protected] |
Called by ReMesh(). Moves a node, which has been found to overlap an element, back onto the edge of that element and associates it with the element and adds new nodes to maitain three elemets a node.
pNode | pointer to the node |
elementIndex | global index of the element in the mesh |
Definition at line 1791 of file MutableVertexMesh.cpp.
References MutableElement< ELEMENT_DIM, SPACE_DIM >::AddNode(), MutableElement< ELEMENT_DIM, SPACE_DIM >::DeleteNode(), EXCEPTION, Node< SPACE_DIM >::GetIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), MutableElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocalIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocation(), Node< SPACE_DIM >::GetNumContainingElements(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), Node< SPACE_DIM >::IsBoundaryNode(), NEVER_REACHED, Node< SPACE_DIM >::rGetContainingElementIndices(), Node< SPACE_DIM >::rGetLocation(), Node< SPACE_DIM >::rGetModifiableLocation(), and Node< SPACE_DIM >::SetAsBoundaryNode().
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformVoidRemoval | ( | Node< SPACE_DIM > * | pNodeA, |
Node< SPACE_DIM > * | pNodeB, | ||
Node< SPACE_DIM > * | pNodeC | ||
) | [protected] |
Helper method for ReMesh() to remove a triangular void in which one of the edges is less than the cell rearrangement threshold.
pNodeA | one of the nodes on the short edge |
pNodeB | the other node on the short edge |
pNodeC | the other node in the triangular void |
Definition at line 2452 of file MutableVertexMesh.cpp.
References Node< SPACE_DIM >::GetIndex(), Node< SPACE_DIM >::rGetLocation(), Node< SPACE_DIM >::rGetModifiableLocation(), and Node< SPACE_DIM >::SetAsBoundaryNode().
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::ReMesh | ( | ) |
Alternative version of remesh which takes no parameters does not require a VertexElementMap. Note: inherited classes should overload ReMesh(VertexElementMap&).
Definition at line 797 of file MutableVertexMesh.cpp.
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::ReMesh | ( | VertexElementMap & | rElementMap | ) |
Re-mesh the mesh.
rElementMap | a VertexElementMap which associates the indices of VertexElements in the old mesh with indices of VertexElements in the new mesh. This should be created with the correct size, GetNumElements() |
Definition at line 747 of file MutableVertexMesh.cpp.
References EXCEPTION.
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::RemoveDeletedNodes | ( | ) |
Helper method for ReMesh(). Removes the deleted nodes from the mesh and relabels the node indices.
Definition at line 721 of file MutableVertexMesh.cpp.
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::RemoveDeletedNodesAndElements | ( | VertexElementMap & | rElementMap | ) |
Helper method for ReMesh(). Removes the deleted nodes and elements from the mesh and updates the rElementMap accordingly.
rElementMap | a VertexElementMap which associates the indices of VertexElements in the old mesh with indices of VertexElements in the new mesh. This should be created with the correct size, GetNumElements() |
Definition at line 682 of file MutableVertexMesh.cpp.
References VertexElementMap::Resize(), VertexElementMap::SetDeleted(), and VertexElementMap::SetNewIndex().
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::serialize | ( | Archive & | archive, |
const unsigned int | version | ||
) | [inline, protected] |
Serialize the mesh.
Note that if you are calling this method (from subclasses) you should archive your member variables FIRST. So that this method can call a ReMesh (to convert from TrianglesMeshReader input format into your native format).
archive | the archive |
version | the current version of this class |
Reimplemented from AbstractMesh< ELEMENT_DIM, SPACE_DIM >.
Reimplemented in Cylindrical2dVertexMesh.
Definition at line 236 of file MutableVertexMesh.hpp.
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::SetCellRearrangementRatio | ( | double | cellRearrangementRatio | ) |
Set method for mCellRearrangementRatio.
cellRearrangementRatio |
Definition at line 162 of file MutableVertexMesh.cpp.
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::SetCellRearrangementThreshold | ( | double | cellRearrangementThreshold | ) |
Set method for mCellRearrangementThreshold.
cellRearrangementThreshold |
Definition at line 150 of file MutableVertexMesh.cpp.
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::SetCheckForInternalIntersections | ( | bool | checkForInternalIntersections | ) |
Set method for mCheckForInternalIntersections.
checkForInternalIntersections |
Definition at line 168 of file MutableVertexMesh.cpp.
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::SetNode | ( | unsigned | nodeIndex, |
ChastePoint< SPACE_DIM > | point | ||
) | [virtual] |
Move the node with a particular index to a new point in space.
nodeIndex | the index of the node to be moved |
point | the new target location of the node |
Definition at line 262 of file MutableVertexMesh.cpp.
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::SetT2Threshold | ( | double | t2Threshold | ) |
Set method for mT2Threshold.
t2Threshold |
Definition at line 156 of file MutableVertexMesh.cpp.
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from VertexMesh< ELEMENT_DIM, SPACE_DIM >.
Reimplemented in Cylindrical2dVertexMesh.
Definition at line 223 of file MutableVertexMesh.hpp.
double MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::mCellRearrangementRatio [protected] |
The ratio between the minimum distance apart that two nodes in the mesh can be without causing element rearrangement and their separation after remeshing.
Definition at line 71 of file MutableVertexMesh.hpp.
Referenced by MutableVertexMesh< DIM, DIM >::serialize().
double MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::mCellRearrangementThreshold [protected] |
The minimum distance apart that two nodes in the mesh can be without causing element rearrangement.
Definition at line 65 of file MutableVertexMesh.hpp.
Referenced by MutableVertexMesh< DIM, DIM >::serialize().
bool MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::mCheckForInternalIntersections [protected] |
Whether to check for edges intersections (true) or not (false)
Definition at line 77 of file MutableVertexMesh.hpp.
Referenced by MutableVertexMesh< DIM, DIM >::serialize().
std::vector<unsigned> MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedElementIndices [protected] |
Indices of elements that have been deleted. These indices can be reused when adding new elements.
Definition at line 83 of file MutableVertexMesh.hpp.
Referenced by MutableVertexMesh< DIM, DIM >::serialize().
std::vector<unsigned> MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedNodeIndices [protected] |
Indices of nodes that have been deleted. These indices can be reused when adding new elements/nodes.
Definition at line 80 of file MutableVertexMesh.hpp.
Referenced by MutableVertexMesh< DIM, DIM >::serialize().
std::vector< c_vector<double, SPACE_DIM> > MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::mLocationsOfT1Swaps [protected] |
Locations of T1Swaps (the mid point of the moving nodes), stored so they can be accessed and output by the cell population. The locations are stored until they are cleared by ClearLocationsOfT1Swaps()
Definition at line 89 of file MutableVertexMesh.hpp.
std::vector< c_vector<double, SPACE_DIM> > MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::mLocationsOfT3Swaps [protected] |
Locations of T3Swaps (the location of the intersection with the edge), stored so they can be accessed and output by the cell population. The locations are stored until they are cleared by ClearLocationsOfT3Swaps()
Definition at line 95 of file MutableVertexMesh.hpp.
double MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::mT2Threshold [protected] |
The area threshold at which T2 swaps occur in an apoptotic, triangular cell/element
Definition at line 74 of file MutableVertexMesh.hpp.
Referenced by MutableVertexMesh< DIM, DIM >::serialize().