36#ifndef MESHBASEDCELLPOPULATION_HPP_
37#define MESHBASEDCELLPOPULATION_HPP_
40#include "AbstractCentreBasedCellPopulation.hpp"
41#include "MutableMesh.hpp"
42#include "VertexMesh.hpp"
43#include "TrianglesMeshReader.hpp"
46#include <boost/serialization/base_object.hpp>
47#include <boost/serialization/set.hpp>
48#include <boost/serialization/vector.hpp>
59#ifdef DOXYGEN_CHASTE_ISSUE_199
60template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
62template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM = ELEMENT_DIM>
66 friend class TestMeshBasedCellPopulation;
81 template<
class Archive>
82 void serialize(Archive & archive,
const unsigned int version)
84 archive & boost::serialization::base_object<AbstractCentreBasedCellPopulation<ELEMENT_DIM, SPACE_DIM> >(*this);
190 std::vector<CellPtr>& rCells,
191 const std::vector<unsigned> locationIndices = {},
192 bool deleteMesh =
false,
193 bool validate =
true);
299 virtual CellPtr
AddCell(CellPtr pNewCell, CellPtr pParentCell);
348 virtual void Update(
bool hasHadBirthsOrDeaths=
true);
454 double GetWidth(
const unsigned& rDimension);
657 void SetRestLength(
unsigned indexA,
unsigned indexB,
double restLength);
666namespace serialization
671template<
class Archive,
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
672inline void save_construct_data(
684template<
class Archive,
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
685inline void load_construct_data(
gcov doesn't like this file...
#define EXPORT_TEMPLATE_CLASS_ALL_DIMS(CLASS)
MutableMesh< ELEMENT_DIM, SPACE_DIM >::EdgeIterator mEdgeIter
MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM > & mrCellPopulation
bool operator!=(const typename MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::SpringIterator &rOther)
std::set< std::set< unsigned > > mSpringsVisited
SpringIterator & operator++()
Node< SPACE_DIM > * GetNodeA()
Node< SPACE_DIM > * GetNodeB()
bool UseAreaBasedDampingConstant()
virtual void OpenWritersFiles(OutputFileHandler &rOutputFileHandler)
bool GetOffsetNewBoundaryNodes()
void serialize(Archive &archive, const unsigned int version)
double mBoundedVoroniTesselationLengthCutoff
std::vector< std::pair< Node< SPACE_DIM > *, Node< SPACE_DIM > * > > mNodePairs
double GetBoundedVoroniTesselationLengthCutoff()
std::vector< std::pair< Node< SPACE_DIM > *, Node< SPACE_DIM > * > > & rGetNodePairs()
std::map< std::pair< unsigned, unsigned >, double > mSpringRestLengths
void TessellateIfNeeded()
void SetBoundedVoroniTesselationLengthCutoff(double boundedVoroniTesselationLengthCutoff)
void OutputCellPopulationParameters(out_stream &rParamsFile)
bool GetBoundVoronoiTessellation()
virtual void WriteResultsToFiles(const std::string &rDirectory)
bool mBoundVoronoiTessellation
virtual void Update(bool hasHadBirthsOrDeaths=true)
bool mUseAreaBasedDampingConstant
bool mHasVariableRestLength
bool GetScaleBoundByEdgeLength()
bool mOffsetNewBoundaryNodes
double GetVoronoiEdgeLength(unsigned index1, unsigned index2)
void SetScaleBoundByEdgeLength(bool scaleBoundByEdgeLength)
virtual void AcceptPopulationWriter(boost::shared_ptr< AbstractCellPopulationWriter< ELEMENT_DIM, SPACE_DIM > > pPopulationWriter)
double GetDampingConstant(unsigned nodeIndex)
virtual ~MeshBasedCellPopulation()
virtual void AcceptCellWriter(boost::shared_ptr< AbstractCellWriter< ELEMENT_DIM, SPACE_DIM > > pCellWriter, CellPtr pCell)
void SetWriteVtkAsPoints(bool writeVtkAsPoints)
double GetWidth(const unsigned &rDimension)
bool mScaleBoundByEdgeLength
SpringIterator SpringsEnd()
void SetNode(unsigned nodeIndex, ChastePoint< SPACE_DIM > &rNewLocation)
virtual void AcceptPopulationEventWriter(boost::shared_ptr< AbstractCellPopulationEventWriter< ELEMENT_DIM, SPACE_DIM > > pPopulationEventWriter)
void SetAreaBasedDampingConstant(bool useAreaBasedDampingConstant)
virtual void WriteVtkResultsToFile(const std::string &rDirectory)
virtual TetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * GetTetrahedralMeshForPdeModifier()
SpringIterator SpringsBegin()
VertexMesh< ELEMENT_DIM, SPACE_DIM > * mpVoronoiTessellation
virtual CellPtr AddCell(CellPtr pNewCell, CellPtr pParentCell)
unsigned AddNode(Node< SPACE_DIM > *pNewNode)
double GetSurfaceAreaOfVoronoiElement(unsigned index)
void SetOffsetNewBoundaryNodes(bool offsetNewBoundaryNodes)
std::set< unsigned > GetNeighbouringNodeIndices(unsigned index)
Node< SPACE_DIM > * GetNode(unsigned index)
virtual void UpdateGhostNodesAfterReMesh(NodeMap &rMap)
void SetBoundVoronoiTessellation(bool boundVoronoiTessellation)
void CreateVoronoiTessellation()
virtual void AcceptPopulationCountWriter(boost::shared_ptr< AbstractCellPopulationCountWriter< ELEMENT_DIM, SPACE_DIM > > pPopulationCountWriter)
double GetVolumeOfVoronoiElement(unsigned index)
virtual unsigned RemoveDeadCells()
friend class boost::serialization::access
void SetRestLength(unsigned indexA, unsigned indexB, double restLength)
bool GetWriteVtkAsPoints()
double mAreaBasedDampingConstantParameter
virtual void WriteDataToVisualizerSetupFile(out_stream &pVizSetupFile)
VertexMesh< ELEMENT_DIM, SPACE_DIM > * GetVoronoiTessellation()
MutableMesh< ELEMENT_DIM, SPACE_DIM > * mpMutableMesh
void SetAreaBasedDampingConstantParameter(double areaBasedDampingConstantParameter)
void DivideLongSprings(double springDivisionThreshold)
double GetRestLength(unsigned indexA, unsigned indexB)
double GetVolumeOfCell(CellPtr pCell)
MutableMesh< ELEMENT_DIM, SPACE_DIM > & rGetMesh()
double GetAreaBasedDampingConstantParameter()
void CalculateRestLengths()