36 #ifndef VERTEXBASEDCELLPOPULATION_HPP_
37 #define VERTEXBASEDCELLPOPULATION_HPP_
39 #include "AbstractOffLatticeCellPopulation.hpp"
40 #include "MutableVertexMesh.hpp"
41 #include "AbstractVertexBasedDivisionRule.hpp"
44 #include <boost/serialization/base_object.hpp>
45 #include <boost/serialization/set.hpp>
46 #include <boost/serialization/vector.hpp>
57 template<
unsigned DIM>
105 friend class boost::serialization::access;
117 template<
class Archive>
118 void serialize(Archive & archive,
const unsigned int version)
120 archive & boost::serialization::base_object<AbstractOffLatticeCellPopulation<DIM> >(*this);
146 std::vector<CellPtr>& rCells,
147 bool deleteMesh=
false,
149 const std::vector<unsigned> locationIndices=std::vector<unsigned>());
281 CellPtr
AddCell(CellPtr pNewCell,
282 const c_vector<double,DIM>& rCellDivisionVector,
283 CellPtr pParentCell=CellPtr());
312 void Update(
bool hasHadBirthsOrDeaths=
true);
427 double GetWidth(
const unsigned& rDimension);
462 namespace serialization
467 template<
class Archive,
unsigned DIM>
468 inline void save_construct_data(
480 template<
class Archive,
unsigned DIM>
481 inline void load_construct_data(
void SetOutputCellRearrangementLocations(bool outputCellRearrangementLocations)
std::vector< c_vector< double, DIM > > GetLocationsOfT2Swaps()
virtual void AcceptPopulationCountWriter(boost::shared_ptr< AbstractCellPopulationCountWriter< DIM, DIM > > pPopulationCountWriter)
double GetVolumeOfCell(CellPtr pCell)
virtual ~VertexBasedCellPopulation()
void UpdateNodeLocations(double dt)
unsigned GetNumElements()
bool mOutputCellRearrangementLocations
friend class TestVertexBasedDivisionRules
boost::shared_ptr< AbstractVertexBasedDivisionRule< DIM > > mpVertexBasedDivisionRule
virtual void AcceptCellWriter(boost::shared_ptr< AbstractCellWriter< DIM, DIM > > pCellWriter, CellPtr pCell)
void SetVertexBasedDivisionRule(boost::shared_ptr< AbstractVertexBasedDivisionRule< DIM > > pVertexBasedDivisionRule)
std::vector< unsigned > GetCellIdsOfT2Swaps()
std::vector< c_vector< double, DIM > > mLocationsOfT2Swaps
std::set< unsigned > GetNeighbouringNodeIndices(unsigned index)
std::vector< unsigned > mCellIdsOfT2Swaps
boost::shared_ptr< AbstractVertexBasedDivisionRule< DIM > > GetVertexBasedDivisionRule()
bool IsCellAssociatedWithADeletedLocation(CellPtr pCell)
double GetDampingConstant(unsigned nodeIndex)
std::set< unsigned > GetNeighbouringLocationIndices(CellPtr pCell)
unsigned GetRosetteRankOfCell(CellPtr pCell)
MutableVertexMesh< DIM, DIM > & rGetMesh()
TetrahedralMesh< DIM, DIM > * GetTetrahedralMeshUsingVertexMesh()
#define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
virtual void AcceptPopulationWriter(boost::shared_ptr< AbstractCellPopulationWriter< DIM, DIM > > pPopulationWriter)
void Update(bool hasHadBirthsOrDeaths=true)
void AddLocationOfT2Swap(c_vector< double, DIM > locationOfT2Swap)
VertexBasedCellPopulation(MutableVertexMesh< DIM, DIM > &rMesh, std::vector< CellPtr > &rCells, bool deleteMesh=false, bool validate=true, const std::vector< unsigned > locationIndices=std::vector< unsigned >())
Node< DIM > * GetNode(unsigned index)
void OutputCellPopulationParameters(out_stream &rParamsFile)
unsigned RemoveDeadCells()
virtual void OpenWritersFiles(OutputFileHandler &rOutputFileHandler)
void SetNode(unsigned index, ChastePoint< DIM > &rNewLocation)
void AddCellIdOfT2Swap(unsigned idOfT2Swap)
double GetWidth(const unsigned &rDimension)
c_vector< double, DIM > GetLocationOfCellCentre(CellPtr pCell)
unsigned AddNode(Node< DIM > *pNewNode)
MutableVertexMesh< DIM, DIM > * mpMutableVertexMesh
virtual void WriteVtkResultsToFile(const std::string &rDirectory)
void ClearLocationsAndCellIdsOfT2Swaps()
CellPtr AddCell(CellPtr pNewCell, const c_vector< double, DIM > &rCellDivisionVector, CellPtr pParentCell=CellPtr())
VertexElement< DIM, DIM > * GetElement(unsigned elementIndex)
void serialize(Archive &archive, const unsigned int version)
bool GetOutputCellRearrangementLocations()
VertexElement< DIM, DIM > * GetElementCorrespondingToCell(CellPtr pCell)