Chaste Commit::baa90ac2819b962188b7562f2326be23c47859a7
|
#include <MutableVertexMesh.hpp>
Public Member Functions | |
void | PerformNodeMerge (Node< SPACE_DIM > *pNodeA, Node< SPACE_DIM > *pNodeB) |
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, double protorosetteFormationProbability=0.0, double protorosetteResolutionProbabilityPerTimestep=0.0, double rosetteResolutionProbabilityPerTimestep=0.0) | |
MutableVertexMesh () | |
virtual | ~MutableVertexMesh () |
void | SetCellRearrangementThreshold (double cellRearrangementThreshold) |
void | SetT2Threshold (double t2Threshold) |
void | SetCellRearrangementRatio (double cellRearrangementRatio) |
void | SetProtorosetteFormationProbability (double protorosetteFormationProbability) |
void | SetProtorosetteResolutionProbabilityPerTimestep (double protorosetteResolutionProbabilityPerTimestep) |
void | SetRosetteResolutionProbabilityPerTimestep (double rosetteResolutionProbabilityPerTimestep) |
virtual void | SetNode (unsigned nodeIndex, ChastePoint< SPACE_DIM > point) |
void | SetCheckForInternalIntersections (bool checkForInternalIntersections) |
void | SetCheckForT3Swaps (bool checkForT3Swaps) |
double | GetCellRearrangementThreshold () const |
double | GetT2Threshold () const |
double | GetCellRearrangementRatio () const |
double | GetProtorosetteFormationProbability () const |
double | GetProtorosetteResolutionProbabilityPerTimestep () const |
double | GetRosetteResolutionProbabilityPerTimestep () const |
void | SetDistanceForT3SwapChecking (double distanceForT3SwapChecking) |
double | GetDistanceForT3SwapChecking () const |
unsigned | GetNumNodes () const |
unsigned | GetNumElements () const |
bool | GetCheckForInternalIntersections () const |
bool | GetCheckForT3Swaps () const |
std::vector< c_vector< double, SPACE_DIM > > | GetLocationsOfT1Swaps () |
c_vector< double, SPACE_DIM > | GetLastT2SwapLocation () |
std::vector< c_vector< double, SPACE_DIM > > | GetLocationsOfT3Swaps () |
std::vector< c_vector< double, SPACE_DIM > > | GetLocationsOfIntersectionSwaps () |
void | ClearLocationsOfT1Swaps () |
void | ClearLocationsOfT3Swaps () |
void | ClearLocationsOfIntersectionSwaps () |
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) |
bool | CheckForT2Swaps (VertexElementMap &rElementMap) |
void | Clear () |
void | DivideEdge (Node< SPACE_DIM > *pNodeA, Node< SPACE_DIM > *pNodeB) |
void | RemoveDeletedNodesAndElements (VertexElementMap &rElementMap) |
void | RemoveDeletedNodes () |
virtual void | ReMesh (VertexElementMap &rElementMap) |
void | ReMesh () |
void | SetMeshOperationTracking (const bool track) |
VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM > * | GetOperationRecorder () |
Public Member Functions inherited from VertexMesh< ELEMENT_DIM, SPACE_DIM > | |
VertexElementIterator | GetElementIteratorBegin (bool skipDeletedElements=true) |
VertexElementIterator | GetElementIteratorEnd () |
VertexMesh (std::vector< Node< SPACE_DIM > * > nodes, std::vector< VertexElement< ELEMENT_DIM, SPACE_DIM > * > vertexElements) | |
VertexMesh (std::vector< Node< SPACE_DIM > * > nodes, std::vector< VertexElement< ELEMENT_DIM - 1, SPACE_DIM > * > faces, std::vector< VertexElement< ELEMENT_DIM, SPACE_DIM > * > vertexElements) | |
VertexMesh (TetrahedralMesh< 2, 2 > &rMesh, bool isPeriodic=false, bool isBounded=false, bool scaleBoundByEdgeLength=true, double maxDelaunayEdgeLength=DBL_MAX, bool offsetNewBoundaryNodes=false) | |
Alternative 2D 'Voronoi' constructor. | |
VertexMesh (TetrahedralMesh< 3, 3 > &rMesh) | |
VertexMesh () | |
virtual | ~VertexMesh () |
unsigned | GetNumEdges () const |
Edge< SPACE_DIM > * | GetEdge (unsigned index) const |
const EdgeHelper< SPACE_DIM > & | rGetEdgeHelper () const |
unsigned | GetNumAllElements () const |
virtual unsigned | GetNumFaces () const |
VertexElement< ELEMENT_DIM, SPACE_DIM > * | GetElement (unsigned index) const |
VertexElement< ELEMENT_DIM - 1, SPACE_DIM > * | GetFace (unsigned index) const |
virtual c_vector< double, SPACE_DIM > | GetCentroidOfElement (unsigned index) |
void | ConstructFromMeshReader (AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader) |
unsigned | GetDelaunayNodeIndexCorrespondingToVoronoiElementIndex (unsigned elementIndex) |
unsigned | GetVoronoiElementIndexCorrespondingToDelaunayNodeIndex (unsigned nodeIndex) |
unsigned | GetRosetteRankOfElement (unsigned index) |
virtual c_vector< double, SPACE_DIM > | GetVectorFromAtoB (const c_vector< double, SPACE_DIM > &rLocationA, const c_vector< double, SPACE_DIM > &rLocationB) |
virtual double | GetVolumeOfElement (unsigned index) |
virtual double | GetSurfaceAreaOfElement (unsigned index) |
c_vector< double, SPACE_DIM > | GetAreaGradientOfElementAtNode (VertexElement< ELEMENT_DIM, SPACE_DIM > *pElement, unsigned localIndex) |
c_vector< double, SPACE_DIM > | GetPreviousEdgeGradientOfElementAtNode (VertexElement< ELEMENT_DIM, SPACE_DIM > *pElement, unsigned localIndex) |
c_vector< double, SPACE_DIM > | GetNextEdgeGradientOfElementAtNode (VertexElement< ELEMENT_DIM, SPACE_DIM > *pElement, unsigned localIndex) |
c_vector< double, SPACE_DIM > | GetPerimeterGradientOfElementAtNode (VertexElement< ELEMENT_DIM, SPACE_DIM > *pElement, unsigned localIndex) |
virtual c_vector< double, 3 > | CalculateMomentsOfElement (unsigned index) |
double | GetEdgeLength (unsigned elementIndex1, unsigned elementIndex2) |
double | GetElongationShapeFactorOfElement (unsigned elementIndex) |
double | CalculateUnitNormalToFaceWithArea (VertexElement< ELEMENT_DIM - 1, SPACE_DIM > *pFace, c_vector< double, SPACE_DIM > &rNormal) |
virtual double | CalculateAreaOfFace (VertexElement< ELEMENT_DIM - 1, SPACE_DIM > *pFace) |
c_vector< double, SPACE_DIM > | GetShortAxisOfElement (unsigned index) |
std::set< unsigned > | GetNeighbouringNodeIndices (unsigned nodeIndex) |
std::set< unsigned > | GetNeighbouringNodeNotAlsoInElement (unsigned nodeIndex, unsigned elemIndex) |
std::set< unsigned > | GetNeighbouringElementIndices (unsigned elementIndex) |
virtual VertexMesh< ELEMENT_DIM, SPACE_DIM > * | GetMeshForVtk () |
bool | IsNearExistingNodes (c_vector< double, SPACE_DIM > newNodeLocation, std::vector< Node< SPACE_DIM > * > nodesToCheck, double minClearance) |
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 void | ReadNodesPerProcessorFile (const std::string &rNodesPerProcessorFile) |
virtual DistributedVectorFactory * | GetDistributedVectorFactory () |
virtual void | SetDistributedVectorFactory (DistributedVectorFactory *pFactory) |
virtual void | PermuteNodes () |
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 double | GetWidth (const unsigned &rDimension) const |
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) |
virtual void | RefreshMesh () |
bool | IsMeshChanging () const |
unsigned | CalculateMaximumContainingElementsPerProcess () const |
void | SetMeshHasChangedSinceLoading () |
Protected Member Functions | |
unsigned | DivideElement (VertexElement< ELEMENT_DIM, SPACE_DIM > *pElement, unsigned nodeAIndex, unsigned nodeBIndex, bool placeOriginalElementBelow=false) |
virtual bool | CheckForSwapsFromShortEdges () |
bool | CheckForIntersections () |
virtual void | IdentifySwapType (Node< SPACE_DIM > *pNodeA, Node< SPACE_DIM > *pNodeB) |
Protected Member Functions inherited from VertexMesh< ELEMENT_DIM, SPACE_DIM > | |
unsigned | SolveNodeMapping (unsigned index) const |
unsigned | SolveElementMapping (unsigned index) const |
unsigned | SolveBoundaryElementMapping (unsigned index) const |
void | GenerateEdgesFromElements (std::vector< VertexElement< ELEMENT_DIM, SPACE_DIM > * > &rElements) |
void | GenerateVerticesFromElementCircumcentres (TetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &rMesh) |
bool | ElementIncludesPoint (const c_vector< double, SPACE_DIM > &rTestPoint, unsigned elementIndex) |
unsigned | GetLocalIndexForElementEdgeClosestToPoint (const c_vector< double, SPACE_DIM > &rTestPoint, unsigned elementIndex) |
template<class Archive > | |
void | save (Archive &archive, const unsigned int version) const |
template<class Archive > | |
void | load (Archive &archive, const unsigned int version) |
Protected Member Functions inherited from AbstractMesh< ELEMENT_DIM, SPACE_DIM > | |
virtual void | SetElementOwnerships () |
ChasteCuboid< SPACE_DIM > | CalculateBoundingBox (const std::vector< Node< SPACE_DIM > * > &rNodes) const |
Private Member Functions | |
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) |
virtual void | HandleHighOrderJunctions (Node< SPACE_DIM > *pNodeA, Node< SPACE_DIM > *pNodeB) |
void | PerformRosetteRankIncrease (Node< SPACE_DIM > *pNodeA, Node< SPACE_DIM > *pNodeB) |
void | PerformProtorosetteResolution (Node< SPACE_DIM > *pProtorosetteNode) |
void | PerformRosetteRankDecrease (Node< SPACE_DIM > *pRosetteNode) |
void | CheckForRosettes () |
c_vector< double, 2 > | WidenEdgeOrCorrectIntersectionLocationIfNecessary (unsigned indexA, unsigned indexB, c_vector< double, 2 > intersection) |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Friends | |
class | TestMutableVertexMesh |
class | TestMutableVertexMeshReMesh |
class | TestMutableVertexMeshRosetteMethods |
class | TestMutableVertexEdges |
class | TestCellEdgeInteriorSrn |
class | TestMutableVertexMeshOperationsWithPopulationSrn |
class | boost::serialization::access |
Additional Inherited Members | |
Public Types inherited from AbstractMesh< ELEMENT_DIM, SPACE_DIM > | |
typedef std::vector< Node< SPACE_DIM > * >::const_iterator | BoundaryNodeIterator |
A mutable vertex-based mesh class, which inherits from VertexMesh and allows for local remeshing. This is implemented through simple operations including node merging, neighbour exchange ("T1 swap"), node/edge merging in the case of intersections ("T3 swap") and removal of small triangular elements ("T2 swap").
MutableVertexMesh is used as a member of the VertexBasedCellPopulation class to represent the junctional network of cells that forms the basis of simulations of off-lattice vertex-based models.
Definition at line 67 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 , |
||
double | protorosetteFormationProbability = 0.0 , |
||
double | protorosetteResolutionProbabilityPerTimestep = 0.0 , |
||
double | rosetteResolutionProbabilityPerTimestep = 0.0 |
||
) |
Default constructor.
nodes | vector of pointers to nodes |
vertexElements | vector of pointers to VertexElements |
cellRearrangementThreshold | the minimum threshold distance for element rearrangement (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 rearrangement node separation after remeshing (defaults to 1.5) |
protorosetteFormationProbability | the probability of a protorosette formation event happening instead of a T1 swap |
protorosetteResolutionProbabilityPerTimestep | the probability that, in a given timestep, a protorosette will resolve (similar to the completion of a T1 swap) |
rosetteResolutionProbabilityPerTimestep | the probability that, in a given timestep, a rosette will resolve (reduce the number of cells sharing a common vertex by 1) |
Definition at line 42 of file MutableVertexMesh.cpp.
References Node< SPACE_DIM >::AddElement(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::Clear(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GenerateEdgesFromElements(), VertexElement< ELEMENT_DIM, SPACE_DIM >::GetFace(), 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 126 of file MutableVertexMesh.cpp.
References MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::Clear(), and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mMeshChangesDuringSimulation.
|
virtual |
Destructor.
Definition at line 143 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 384 of file MutableVertexMesh.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex().
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 365 of file MutableVertexMesh.cpp.
References Node< SPACE_DIM >::SetIndex().
Referenced by Cylindrical2dVertexMesh::AddNode(), and Toroidal2dVertexMesh::AddNode().
|
protected |
Helper method for ReMesh().
Check if any elements have become intersected and correct this by implementing the appropriate local remeshing operation (a T3 swap or node merge).
Definition at line 1151 of file MutableVertexMesh.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), and NEVER_REACHED.
|
private |
Helper method for ReMesh().
Check whether the mesh contains rosettes or protorosettes, and implement resolution events if necessary.
First, we loop over each node and populate vectors of protorosette and rosette nodes which need to undergo resolution.
We do not perform the resolution events in this initial loop because the resolution events involve changing nodes in the mesh.
Finally, we loop over the contents of each node vector and perform the necessary resolution events.
Because each resolution event changes nodes, we include several assertions to catch possible unconsidered behaviour.
Definition at line 4033 of file MutableVertexMesh.cpp.
References RandomNumberGenerator::Instance(), Node< SPACE_DIM >::IsDeleted(), NEVER_REACHED, and Node< SPACE_DIM >::rGetContainingElementIndices().
|
protectedvirtual |
Helper method for ReMesh().
Check if any neighbouring nodes in an element are closer than the mCellRearrangementThreshold and are not contained in any triangular elements. If any such pair of nodes are found, then call IdentifySwapType(), which in turn implements the appropriate local remeshing operation (a T1 swap, void removal, or node merge).
Definition at line 1058 of file MutableVertexMesh.cpp.
References Node< SPACE_DIM >::GetIndex(), NEVER_REACHED, and Node< SPACE_DIM >::rGetContainingElementIndices().
bool MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::CheckForT2Swaps | ( | VertexElementMap & | rElementMap | ) |
Helper method for ReMesh().
Check for any triangular element whose area is smaller than mT2Threshold and call PerformT2Swap() on any such element.
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 1126 of file MutableVertexMesh.cpp.
References VertexElementMap::SetDeleted().
|
virtual |
Delete mNodes and mElements.
Reimplemented from VertexMesh< ELEMENT_DIM, SPACE_DIM >.
Definition at line 290 of file MutableVertexMesh.cpp.
Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::MutableVertexMesh(), and MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::MutableVertexMesh().
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::ClearLocationsOfIntersectionSwaps | ( | ) |
Helper method to clear the stored intersection swaps
Definition at line 359 of file MutableVertexMesh.cpp.
Referenced by VertexIntersectionSwapLocationsWriter< ELEMENT_DIM, SPACE_DIM >::Visit().
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::ClearLocationsOfT1Swaps | ( | ) |
Helper method to clear the stored T1 swaps
Definition at line 347 of file MutableVertexMesh.cpp.
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::ClearLocationsOfT3Swaps | ( | ) |
Helper method to clear the stored T3 swaps
Definition at line 353 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 819 of file MutableVertexMesh.cpp.
References Node< SPACE_DIM >::GetIndex(), NEVER_REACHED, Node< SPACE_DIM >::rGetContainingElementIndices(), and Node< SPACE_DIM >::SetAsBoundaryNode().
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::DeleteNodePriorToReMesh | ( | unsigned | index | ) |
Mark a given 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 848 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 855 of file MutableVertexMesh.cpp.
References Node< SPACE_DIM >::GetIndex(), MutableElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocalIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), Node< SPACE_DIM >::IsBoundaryNode(), Node< SPACE_DIM >::rGetContainingElementIndices(), Node< SPACE_DIM >::rGetLocation(), and Node< SPACE_DIM >::SetPoint().
|
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 686 of file MutableVertexMesh.cpp.
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 410 of file MutableVertexMesh.cpp.
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 668 of file MutableVertexMesh.cpp.
double MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::GetCellRearrangementRatio | ( | ) | const |
Definition at line 161 of file MutableVertexMesh.cpp.
double MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::GetCellRearrangementThreshold | ( | ) | const |
Definition at line 149 of file MutableVertexMesh.cpp.
bool MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::GetCheckForInternalIntersections | ( | ) | const |
Definition at line 197 of file MutableVertexMesh.cpp.
bool MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::GetCheckForT3Swaps | ( | ) | const |
This is a shortcut to get locations from mOperationRecorder
Definition at line 203 of file MutableVertexMesh.cpp.
double MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::GetDistanceForT3SwapChecking | ( | ) | const |
Get Distance for T3 swap checking.
Definition at line 191 of file MutableVertexMesh.cpp.
c_vector< double, SPACE_DIM > MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::GetLastT2SwapLocation | ( | ) |
Definition at line 323 of file MutableVertexMesh.cpp.
std::vector< c_vector< double, SPACE_DIM > > MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::GetLocationsOfIntersectionSwaps | ( | ) |
Definition at line 341 of file MutableVertexMesh.cpp.
Referenced by VertexIntersectionSwapLocationsWriter< ELEMENT_DIM, SPACE_DIM >::Visit().
std::vector< c_vector< double, SPACE_DIM > > MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::GetLocationsOfT1Swaps | ( | ) |
Definition at line 311 of file MutableVertexMesh.cpp.
std::vector< c_vector< double, SPACE_DIM > > MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::GetLocationsOfT3Swaps | ( | ) |
This is a shortcut to get locations from mOperationRecorder
Definition at line 329 of file MutableVertexMesh.cpp.
|
virtual |
Reimplemented from VertexMesh< ELEMENT_DIM, SPACE_DIM >.
Definition at line 305 of file MutableVertexMesh.cpp.
|
virtual |
Reimplemented from VertexMesh< ELEMENT_DIM, SPACE_DIM >.
Definition at line 299 of file MutableVertexMesh.cpp.
VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM > * MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::GetOperationRecorder | ( | ) |
Definition at line 4193 of file MutableVertexMesh.cpp.
Referenced by VertexBasedPopulationSrn< DIM >::UpdateSrnAfterBirthOrDeath(), VertexT1SwapLocationsWriter< ELEMENT_DIM, SPACE_DIM >::Visit(), VertexT2SwapLocationsWriter< ELEMENT_DIM, SPACE_DIM >::Visit(), and VertexT3SwapLocationsWriter< ELEMENT_DIM, SPACE_DIM >::Visit().
double MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::GetProtorosetteFormationProbability | ( | ) | const |
Get method for mProtoRosetteFormationProbability.
Definition at line 167 of file MutableVertexMesh.cpp.
double MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::GetProtorosetteResolutionProbabilityPerTimestep | ( | ) | const |
Get method for mProtoRosetteResolutionProbabilityPerTimestep.
Definition at line 173 of file MutableVertexMesh.cpp.
double MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::GetRosetteResolutionProbabilityPerTimestep | ( | ) | const |
Get method for mRosetteResolutionProbabilityPerTimestep.
Definition at line 179 of file MutableVertexMesh.cpp.
double MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::GetT2Threshold | ( | ) | const |
Definition at line 155 of file MutableVertexMesh.cpp.
|
privatevirtual |
Helper method for ReMesh(), called by IdentifySwapType().
Handles the case where a swap involves a junction with more than three adjacent elements. This is implemented in a separate method to allow child classes to override this behaviour and implement junction remodelling with high-order nodes (see #2664).
pNodeA | one of the nodes to perform the swap with |
pNodeB | the other node to perform the swap |
Definition at line 3509 of file MutableVertexMesh.cpp.
References EXCEPTION, and Node< SPACE_DIM >::rGetContainingElementIndices().
|
protectedvirtual |
Helper method for ReMesh(), called by CheckForSwapsFromShortEdges() when neighbouring nodes in an element have been found to be closer than the mCellRearrangementThreshold and do not share any triangular elements.
Identify the type of local remeshing operation required (T1 swap, void removal, or node merge).
pNodeA | one of the nodes to perform the swap with |
pNodeB | the other node to perform the swap |
Here, the triangular element would be along the short edge. Since we are already checking in CheckForSwapsFromShortEdges() whether the element is triangular, this exception is redundant for simulations. We leave it in for clarity. ///
If this is true then one of the elements adjacent to the triangular void is triangular. This element will then not share the short edge that is considered for a swap. Nevertheless, it would loose an edge during the swap. We are currently not able to deal with this situation. Related to #2533 and #2401.
Definition at line 1292 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(), RandomNumberGenerator::Instance(), Node< SPACE_DIM >::IsDeleted(), NEVER_REACHED, Node< SPACE_DIM >::rGetContainingElementIndices(), Node< SPACE_DIM >::rGetLocation(), Node< SPACE_DIM >::rGetModifiableLocation(), and Node< SPACE_DIM >::SetAsBoundaryNode().
|
private |
Helper method for ReMesh(), called by CheckForIntersections().
Perform an element swap to resolve the situation where a given node has been found to overlap a given element not containing it.
pNode | pointer to the node |
elementIndex | global index of the element in the mesh |
Definition at line 2025 of file MutableVertexMesh.cpp.
References EXCEPTION, AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), MutableElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocalIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), and NEVER_REACHED.
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformNodeMerge | ( | Node< SPACE_DIM > * | pNodeA, |
Node< SPACE_DIM > * | pNodeB | ||
) |
Helper method for ReMesh(), called by IdentifySwapType().
Merge two given nodes in the mesh and update node/element ownership, by replacing the node contained in the least number of elements with the other node. The merged node is moved to the centre between the two old node positions.
pNodeA | one of the nodes to perform the merge with |
pNodeB | the other node to perform the merge with |
Definition at line 1769 of file MutableVertexMesh.cpp.
References Node< SPACE_DIM >::GetIndex(), Node< SPACE_DIM >::rGetContainingElementIndices(), Node< SPACE_DIM >::rGetLocation(), and Node< SPACE_DIM >::rGetModifiableLocation().
|
private |
Helper method for ReMesh(), called by CheckForRosettes().
Split protorosette in random direction. Create new node and redistribute nodes along line joining centres of randomly selected cell and cell opposite it.
pProtorosetteNode | node at centre of protorosette |
Ordering elements as follows:
\ A / \ / \ / B X D / \ / \ / C \
Element A is the randomly chosen element. Element C, which is directly opposite A, will end up separated from A, while the two elements B and D which start adjacent to A will end up sharing a common edge:
\ A / \ / \ / | B | D | / \ / \ / C \
Next, we compute where to place the two nodes which will replace the single protorosette node.
We place each node along the line joining the protorosette node to the centroid of element which will contain it, and the distance along this line is half of the swap distance.
To do this, we will move the existing protorosette node in to element A, and create a new node in element C. We then need to tidy up the nodes by adding the new node to elements B, C and D, and removing the protorosette node from element C.
NOTE: as the protorosette node was not necessarily on the line joining the centroids of elements A and C, unlike in a T1 swap, the new node locations will not necessarily be the full swap distance apart.
Here, we add the new node to elements B, C and D.
The method AddNode() takes the local index of a node i, where the new node is to be inserted between nodes i and i+1, so we need to find the local idx of the node directly before (clockwise from) where we wish to insert it.
For elements C and D, we just need the local index of the protorosette node, but for element B we need the one before, modulo number of elements.
Definition at line 3649 of file MutableVertexMesh.cpp.
References MutableElement< ELEMENT_DIM, SPACE_DIM >::AddNode(), MutableElement< ELEMENT_DIM, SPACE_DIM >::DeleteNode(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), MutableElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocalIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), RandomNumberGenerator::Instance(), NEVER_REACHED, RandomNumberGenerator::randMod(), and Node< SPACE_DIM >::rGetContainingElementIndices().
|
private |
Helper method for ReMesh(), called by CheckForRosettes().
Split rosette by removing one cell at random. Create new node positioned along line joining rosette node and centre of randomly selected cell. Rosette node will remain unmoved.
pRosetteNode | node at centre of rosette |
We have now picked a vertex element at random from the rosette. This element will now be disconnected from the rosette in a manner analogous to performing a T1 swap.
The node at the centre of the rosette will not move, and a new node will be created a suitable distance away, along a line joining the rosette node and the centroid of the element we have randomly selected to move.
Ordering of elements is as follows:
\ S / \ / N \ / P —–X—– / \ / \ / \
where element S is the selected element, N is the next (counterclockwise) element from S, and P is the previous (clockwise) element from S.
Elements N and P will end up sharing an edge:
\ S / \ / \ / N | P | —–*—– / \ / \ / \
Next, we compute where to place the new node which will separate the rosette node from element S.
We place this node along the line joining the rosette node to the centroid of element S, at a distance of the swap distance ( (rearrangement ratio) x (rearrangement threshold) )
To do this, we create a new node in element S. We then need to tidy up the nodes by adding the new node to elements S, N and P, and by removing the rosette node from element S.
Here, we add the new node to elements S, N and P, and remove the rosette node from element S.
The method AddNode() takes the local index of a node i, where the new node is to be inserted between nodes i and i+1, so we need to find the local idx of the node directly before (clockwise from) where we wish to insert it.
For elements S and P, we just need the local index of the rosette node, but for element N we need the one before, modulo number of elements.
Definition at line 3847 of file MutableVertexMesh.cpp.
References MutableElement< ELEMENT_DIM, SPACE_DIM >::AddNode(), MutableElement< ELEMENT_DIM, SPACE_DIM >::DeleteNode(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), MutableElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocalIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), RandomNumberGenerator::Instance(), RandomNumberGenerator::randMod(), and Node< SPACE_DIM >::rGetContainingElementIndices().
|
private |
Helper method for ReMesh(), called by HandleHighOrderJunctions().
Merge a node of a non-rosette cell with the central node of a rosette, by replacing the node in the non-rosette cell with that of the rosette centre, keeping the rosette centre in the same position.
pNodeA | one of the nodes to perform the merge with |
pNodeB | the other node to perform the merge with |
The picture below shows the situation we are in. The central node (marked with an 'X') is contained in (at least) four elements already (A, B, C and D), and this is the rosette node which we have designated as hi_rank_node.
The node shared by elements C, D and E has come within the cell rearrangement threshold of the rosette node in order for this method to have been called. We have designated this node lo_rank_node.
We now 'merge' hi_rank_node and lo_rank_node, but keep hi_rank_node where it is (which is why we don't call PerformNodeMerge(), as that would move both nodes to their average location).
To accomplish this merge, we need do nothing to elements A and B. We remove lo_rank_node from elements C and D, and we replace lo_rank_node by hi_rank_node in element E.
\ A / \ / \ / B X C / \ ______ / \ / D \ E
Definition at line 3528 of file MutableVertexMesh.cpp.
References NEVER_REACHED, and Node< SPACE_DIM >::rGetContainingElementIndices().
|
private |
Helper method for ReMesh(), called by IdentifySwapType().
Perform a T1 swap on two given nodes contained in a given set of elements. This involves replacing the two nodes with two new nodes placed on either side of the previous shared edge, such that the edge formed by the two new nodes is the perpendicular bisector of the previous shared edge, and 'just larger' (by a factor mCellRearrangementRatio) than mThresholdDistance.
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 1825 of file MutableVertexMesh.cpp.
References EXCEPTION, T1SwapInfo< SPACE_DIM >::mLocation, T1SwapInfo< SPACE_DIM >::mPostSwapEdge, T1SwapInfo< SPACE_DIM >::mPreSwapEdge, and NEVER_REACHED.
|
private |
Helper method for ReMesh(), called by CheckForT2Swaps().
Perform a T2 swap on a given triangular element whose area is smaller than mT2Threshold by replacing it with a new node located at the centroid of the former element and updating node/element ownership.
rElement | the element to remove |
Definition at line 2394 of file MutableVertexMesh.cpp.
References MutableElement< ELEMENT_DIM, SPACE_DIM >::DeleteNode(), EXCEPTION, MutableElement< ELEMENT_DIM, SPACE_DIM >::GetEdge(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), Node< SPACE_DIM >::GetIndex(), MutableElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocalIndex(), MutableElement< ELEMENT_DIM, SPACE_DIM >::GetNumEdges(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), T2SwapInfo< SPACE_DIM >::mCellId, T2SwapInfo< SPACE_DIM >::mLocation, NEVER_REACHED, AbstractElement< ELEMENT_DIM, SPACE_DIM >::ReplaceNode(), and Node< SPACE_DIM >::rGetContainingElementIndices().
|
private |
Helper method for ReMesh(), called by CheckForIntersections().
Perform a T3 swap on a given node that has been found to overlap a given element by moving the node back onto the edge of that element, associating it with the element and adding new nodes to maintain three elements per node.
pNode | pointer to the node |
elementIndex | global index of the element in the mesh |
Definition at line 2514 of file MutableVertexMesh.cpp.
References MutableElement< ELEMENT_DIM, SPACE_DIM >::AddNode(), MutableElement< ELEMENT_DIM, SPACE_DIM >::DeleteNode(), EXCEPTION, MutableElement< ELEMENT_DIM, SPACE_DIM >::GetEdge(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), MutableElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocalIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocation(), MutableElement< ELEMENT_DIM, SPACE_DIM >::GetNumEdges(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), T3SwapInfo< SPACE_DIM >::mLocation, and NEVER_REACHED.
|
private |
Helper method for ReMesh(), called by IdentifySwapType().
Remove a triangular void bounded by three given nodes, in which one of the edges is less than mCellRearrangementThreshold, through calls to PerformNodeMerge().
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 3465 of file MutableVertexMesh.cpp.
References Node< SPACE_DIM >::IsDeleted(), NEVER_REACHED, Node< SPACE_DIM >::rGetModifiableLocation(), and Node< SPACE_DIM >::SetAsBoundaryNode().
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::ReMesh | ( | ) |
Alternative version of ReMesh which takes no parameters and does not require a VertexElementMap. Note: inherited classes should overload ReMesh(VertexElementMap&).
Definition at line 1051 of file MutableVertexMesh.cpp.
|
virtual |
Update the state of the mesh by implementing any local remeshing operations (node merging, or T1, T2 or T3 swaps) that are required, and store any changes in element indices using the given VertexElementMap.
This method calls several other methods, in particular CheckForT2Swaps(), CheckForSwapsFromShortEdges() and CheckForIntersections().
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 1003 of file MutableVertexMesh.cpp.
References EXCEPTION, and NEVER_REACHED.
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 969 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 931 of file MutableVertexMesh.cpp.
References VertexElementMap::Resize(), VertexElementMap::SetDeleted(), and VertexElementMap::SetNewIndex().
|
inlineprivate |
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 |
Definition at line 343 of file MutableVertexMesh.hpp.
References MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::mCellRearrangementRatio, MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::mCellRearrangementThreshold, MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::mCheckForInternalIntersections, MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::mCheckForT3Swaps, MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedElementIndices, MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedNodeIndices, MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::mDistanceForT3SwapChecking, MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::mOperationRecorder, MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::mProtorosetteFormationProbability, MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::mProtorosetteResolutionProbabilityPerTimestep, MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::mRosetteResolutionProbabilityPerTimestep, and MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::mT2Threshold.
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::SetCellRearrangementRatio | ( | double | cellRearrangementRatio | ) |
Set method for mCellRearrangementRatio.
cellRearrangementRatio |
Definition at line 221 of file MutableVertexMesh.cpp.
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::SetCellRearrangementThreshold | ( | double | cellRearrangementThreshold | ) |
Set method for mCellRearrangementThreshold.
cellRearrangementThreshold |
Definition at line 209 of file MutableVertexMesh.cpp.
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::SetCheckForInternalIntersections | ( | bool | checkForInternalIntersections | ) |
Set method for mCheckForInternalIntersections.
checkForInternalIntersections |
Definition at line 278 of file MutableVertexMesh.cpp.
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::SetCheckForT3Swaps | ( | bool | checkForT3Swaps | ) |
Set method for mCheckForT3Swaps.
checkForT3Swaps |
Definition at line 284 of file MutableVertexMesh.cpp.
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::SetDistanceForT3SwapChecking | ( | double | distanceForT3SwapChecking | ) |
Set distance for T3 swap checking. At each time step we check for each boundary node whether it intersects with any boundary elements (cells) whose centroids lie within this distance to the node. Note that T3 swaps may not be resolved correctly if this distance is chosen too small, while large values for mDistanceForT3SwapChecking may slow down the simulation.
distanceForT3SwapChecking |
Definition at line 185 of file MutableVertexMesh.cpp.
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::SetMeshOperationTracking | ( | const bool | track | ) |
track | whether we need to track mesh operations during ReMesh |
Definition at line 4183 of file MutableVertexMesh.cpp.
Referenced by VertexBasedCellPopulation< DIM >::VertexBasedCellPopulation().
|
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 404 of file MutableVertexMesh.cpp.
Referenced by Cylindrical2dVertexMesh::SetNode(), and Toroidal2dVertexMesh::SetNode().
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::SetProtorosetteFormationProbability | ( | double | protorosetteFormationProbability | ) |
Set method for mProtoRosetteFormationProbability.
protorosetteFormationProbability | the new value of mProtoRosetteFormationProbability |
Definition at line 227 of file MutableVertexMesh.cpp.
References EXCEPTION.
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::SetProtorosetteResolutionProbabilityPerTimestep | ( | double | protorosetteResolutionProbabilityPerTimestep | ) |
Set method for mProtoRosetteResolutionProbabilityPerTimestep.
protorosetteResolutionProbabilityPerTimestep | the new value of mProtoRosetteResolutionProbabilityPerTimestep |
Definition at line 244 of file MutableVertexMesh.cpp.
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::SetRosetteResolutionProbabilityPerTimestep | ( | double | rosetteResolutionProbabilityPerTimestep | ) |
Set method for mRosetteResolutionProbabilityPerTimestep.
rosetteResolutionProbabilityPerTimestep | the new value of mRosetteResolutionProbabilityPerTimestep |
Definition at line 261 of file MutableVertexMesh.cpp.
References EXCEPTION.
void MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::SetT2Threshold | ( | double | t2Threshold | ) |
Set method for mT2Threshold.
t2Threshold |
Definition at line 215 of file MutableVertexMesh.cpp.
|
private |
Helper method for ReMesh(), called by PerformT3Swap(). During T3 swaps nodes are merged onto edges. This method checks if the edge is too short and moves its vertices apart if necessary in order to prevent T1 swaps from happening right away. The method also checks that the location where the merged node is going to end up at is not too close to one of the neighbouring vertices and moves it if necessary to prevent T1 swaps.
indexA | index of one of the nodes on the short edge |
indexB | index of the other node on the short edge |
intersection | the intersection location, i.e. the location where we are planning to put the merged node |
If the edge is shorter than 4.0*mCellRearrangementRatio*mCellRearrangementThreshold move vertexA and vertexB 4.0*mCellRearrangementRatio*mCellRearrangementThreshold apart.
Note: this distance is so that there is always enough room for new nodes (if necessary)
Reset the intersection away from vertices A and B to allow enough room for new nodes.
If the intersection is within mCellRearrangementRatio^2*mCellRearrangementThreshold of vertexA or vertexB move it mCellRearrangementRatio^2*mCellRearrangementThreshold away.
Note: this distance so that there is always enough room for new nodes (if necessary).
Definition at line 4119 of file MutableVertexMesh.cpp.
Needed for serialization.
Definition at line 330 of file MutableVertexMesh.hpp.
Definition at line 73 of file MutableVertexMesh.hpp.
Definition at line 72 of file MutableVertexMesh.hpp.
Definition at line 69 of file MutableVertexMesh.hpp.
|
friend |
Definition at line 74 of file MutableVertexMesh.hpp.
Definition at line 70 of file MutableVertexMesh.hpp.
|
friend |
Definition at line 71 of file MutableVertexMesh.hpp.
|
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 89 of file MutableVertexMesh.hpp.
Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::serialize().
|
protected |
The minimum distance apart that two nodes in the mesh can be without causing element rearrangement.
Definition at line 83 of file MutableVertexMesh.hpp.
Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::serialize().
|
protected |
Whether to check for edges intersections (true) or not (false).
Definition at line 104 of file MutableVertexMesh.hpp.
Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::serialize().
|
protected |
Whether to check for T3 swaps (true) or not (false).
Definition at line 107 of file MutableVertexMesh.hpp.
Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::serialize().
|
protected |
Indices of elements that have been deleted. These indices can be reused when adding new elements.
Definition at line 113 of file MutableVertexMesh.hpp.
Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::serialize().
|
protected |
Indices of nodes that have been deleted. These indices can be reused when adding new elements/nodes.
Definition at line 110 of file MutableVertexMesh.hpp.
Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::serialize().
|
protected |
Distance for T3 swap checking. At each time step we check for each boundary node whether it intersects with any boundary elements (cells) whose centroids lie within this distance to the node. Note that T3 swaps may not be resolved correctly if this distance is chosen too small, while large values for mDistanceForT3SwapChecking may slow down the simulation.
Definition at line 121 of file MutableVertexMesh.hpp.
Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::serialize().
|
protected |
The location of the last T2 swap (the centre of the removed triangle), stored so it can be accessed by the T2SwapCellKiller.
Definition at line 126 of file MutableVertexMesh.hpp.
|
protected |
Locations of intersection swaps (the mid point of the switching nodes), stored so they can be accessed and output by the cell population. The locations are stored until they are cleared by ClearLocationsOfIntersectionSwaps().
Definition at line 132 of file MutableVertexMesh.hpp.
|
protected |
Helper class to record rearrangements and mesh operations
Definition at line 80 of file MutableVertexMesh.hpp.
Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::serialize().
|
protected |
The probability that, instead of a T1 swap, the relevant nodes merge to form a protorosette
Definition at line 95 of file MutableVertexMesh.hpp.
Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::serialize().
|
protected |
The probability that, in a given timestep, a protorosette node resolves into two rank-3 nodes
Definition at line 98 of file MutableVertexMesh.hpp.
Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::serialize().
|
protected |
The probability that, in a given timestep, a rosette node resolves into two lower-rank nodes
Definition at line 101 of file MutableVertexMesh.hpp.
Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::serialize().
|
protected |
The area threshold at which T2 swaps occur in an apoptotic, triangular cell/element.
Definition at line 92 of file MutableVertexMesh.hpp.
Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::serialize().
|
protected |
Whether we need to record mesh operations, e.g. when SRN models are used
Definition at line 77 of file MutableVertexMesh.hpp.