35 #ifndef MUTABLEVERTEXMESH_HPP_
36 #define MUTABLEVERTEXMESH_HPP_
39 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
47 #include <boost/serialization/vector.hpp>
48 #include <boost/serialization/base_object.hpp>
49 #include <boost/serialization/split_member.hpp>
51 #include "VertexMesh.hpp"
52 #include "RandomNumberGenerator.hpp"
64 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
67 friend class TestMutableVertexMesh;
68 friend class TestMutableVertexMeshReMesh;
69 friend class TestMutableVertexMeshRosetteMethods;
135 bool placeOriginalElementBelow=
false);
316 friend class boost::serialization::access;
328 template<
class Archive>
329 void serialize(Archive & archive,
const unsigned int version)
343 archive & boost::serialization::base_object<VertexMesh<ELEMENT_DIM, SPACE_DIM> >(*this);
366 double cellRearrangementThreshold=0.01,
367 double t2Threshold=0.001,
368 double cellRearrangementRatio=1.5,
369 double protorosetteFormationProbability=0.0,
370 double protorosetteResolutionProbabilityPerTimestep=0.0,
371 double rosetteResolutionProbabilityPerTimestep=0.0);
553 bool placeOriginalElementBelow=
false);
569 c_vector<double, SPACE_DIM> axisOfDivision,
570 bool placeOriginalElementBelow=
false);
unsigned DivideElement(VertexElement< ELEMENT_DIM, SPACE_DIM > *pElement, unsigned nodeAIndex, unsigned nodeBIndex, bool placeOriginalElementBelow=false)
void SetRosetteResolutionProbabilityPerTimestep(double rosetteResolutionProbabilityPerTimestep)
double GetRosetteResolutionProbabilityPerTimestep() const
void PerformIntersectionSwap(Node< SPACE_DIM > *pNode, unsigned elementIndex)
double GetCellRearrangementRatio() const
c_vector< double, 2 > WidenEdgeOrCorrectIntersectionLocationIfNecessary(unsigned indexA, unsigned indexB, c_vector< double, 2 > intersection)
std::vector< c_vector< double, SPACE_DIM > > GetLocationsOfT3Swaps()
void RemoveDeletedNodesAndElements(VertexElementMap &rElementMap)
void PerformRosetteRankDecrease(Node< SPACE_DIM > *pRosetteNode)
std::vector< c_vector< double, SPACE_DIM > > mLocationsOfT3Swaps
unsigned DivideElementAlongGivenAxis(VertexElement< ELEMENT_DIM, SPACE_DIM > *pElement, c_vector< double, SPACE_DIM > axisOfDivision, bool placeOriginalElementBelow=false)
bool CheckForT2Swaps(VertexElementMap &rElementMap)
std::vector< c_vector< double, SPACE_DIM > > GetLocationsOfT1Swaps()
unsigned DivideElementAlongShortAxis(VertexElement< ELEMENT_DIM, SPACE_DIM > *pElement, bool placeOriginalElementBelow=false)
void PerformNodeMerge(Node< SPACE_DIM > *pNodeA, Node< SPACE_DIM > *pNodeB)
bool CheckForSwapsFromShortEdges()
void SetProtorosetteResolutionProbabilityPerTimestep(double protorosetteResolutionProbabilityPerTimestep)
double GetT2Threshold() const
void serialize(Archive &archive, const unsigned int version)
bool mCheckForInternalIntersections
unsigned AddNode(Node< SPACE_DIM > *pNewNode)
std::vector< unsigned > mDeletedNodeIndices
double GetCellRearrangementThreshold() const
void PerformVoidRemoval(Node< SPACE_DIM > *pNodeA, Node< SPACE_DIM > *pNodeB, Node< SPACE_DIM > *pNodeC)
double mRosetteResolutionProbabilityPerTimestep
std::vector< c_vector< double, SPACE_DIM > > mLocationsOfT1Swaps
c_vector< double, SPACE_DIM > mLastT2SwapLocation
double mCellRearrangementRatio
double mCellRearrangementThreshold
void ClearLocationsOfT1Swaps()
bool GetCheckForInternalIntersections() const
void SetCellRearrangementThreshold(double cellRearrangementThreshold)
double GetProtorosetteResolutionProbabilityPerTimestep() const
void PerformT3Swap(Node< SPACE_DIM > *pNode, unsigned elementIndex)
virtual void SetNode(unsigned nodeIndex, ChastePoint< SPACE_DIM > point)
unsigned AddElement(VertexElement< ELEMENT_DIM, SPACE_DIM > *pNewElement)
void PerformProtorosetteResolution(Node< SPACE_DIM > *pProtorosetteNode)
bool CheckForIntersections()
double mProtorosetteResolutionProbabilityPerTimestep
unsigned GetNumNodes() const
void PerformRosetteRankIncrease(Node< SPACE_DIM > *pNodeA, Node< SPACE_DIM > *pNodeB)
double mProtorosetteFormationProbability
void DeleteNodePriorToReMesh(unsigned index)
double GetProtorosetteFormationProbability() const
void ClearLocationsOfT3Swaps()
#define EXPORT_TEMPLATE_CLASS_ALL_DIMS(CLASS)
void SetProtorosetteFormationProbability(double protorosetteFormationProbability)
virtual void HandleHighOrderJunctions(Node< SPACE_DIM > *pNodeA, Node< SPACE_DIM > *pNodeB)
void DivideEdge(Node< SPACE_DIM > *pNodeA, Node< SPACE_DIM > *pNodeB)
void SetCheckForInternalIntersections(bool checkForInternalIntersections)
void DeleteElementPriorToReMesh(unsigned index)
unsigned GetNumElements() const
void SetCellRearrangementRatio(double cellRearrangementRatio)
void RemoveDeletedNodes()
virtual ~MutableVertexMesh()
void PerformT1Swap(Node< SPACE_DIM > *pNodeA, Node< SPACE_DIM > *pNodeB, std::set< unsigned > &rElementsContainingNodes)
void SetT2Threshold(double t2Threshold)
virtual void IdentifySwapType(Node< SPACE_DIM > *pNodeA, Node< SPACE_DIM > *pNodeB)
c_vector< double, SPACE_DIM > GetLastT2SwapLocation()
void PerformT2Swap(VertexElement< ELEMENT_DIM, SPACE_DIM > &rElement)
std::vector< unsigned > mDeletedElementIndices