36 #ifndef CABASEDCELLPOPULATION_HPP_
37 #define CABASEDCELLPOPULATION_HPP_
39 #include "AbstractOnLatticeCellPopulation.hpp"
40 #include "PottsMesh.hpp"
41 #include "VertexMesh.hpp"
42 #include "AbstractCaUpdateRule.hpp"
43 #include "AbstractCaSwitchingUpdateRule.hpp"
44 #include "AbstractCaBasedDivisionRule.hpp"
48 #include <boost/serialization/base_object.hpp>
49 #include <boost/serialization/vector.hpp>
53 template<
unsigned DIM>
69 template<
unsigned DIM>
72 friend class TestCaBasedCellPopulation;
99 void SetEmptySites(
const std::set<unsigned>& rEmptySiteIndices);
101 friend class boost::serialization::access;
113 template<
class Archive>
114 void serialize(Archive & archive,
const unsigned int version)
116 #define COVERAGE_IGNORE
117 archive & boost::serialization::base_object<AbstractOnLatticeCellPopulation<DIM> >(*this);
122 #undef COVERAGE_IGNORE
158 std::vector<CellPtr>& rCells,
159 const std::vector<unsigned> locationIndices,
160 unsigned latticeCarryingCapacity=1u,
161 bool deleteMesh=
false,
162 bool validate=
false);
280 CellPtr
AddCell(CellPtr pNewCell,
const c_vector<double,DIM>& rCellDivisionVector, CellPtr pParentCell=CellPtr());
292 unsigned targetNodeIndex,
336 void Update(
bool hasHadBirthsOrDeaths=
true);
382 double GetWidth(
const unsigned& rDimension);
462 #define COVERAGE_IGNORE
465 namespace serialization
470 template<
class Archive,
unsigned DIM>
471 inline void save_construct_data(
483 template<
class Archive,
unsigned DIM>
484 inline void load_construct_data(
496 #undef COVERAGE_IGNORE
bool IsCellAssociatedWithADeletedLocation(CellPtr pCell)
boost::shared_ptr< AbstractCaBasedDivisionRule< DIM > > GetCaBasedDivisionRule()
std::vector< boost::shared_ptr< AbstractCaSwitchingUpdateRule< DIM > > > mSwitchingUpdateRuleCollection
std::vector< unsigned > mAvailableSpaces
std::vector< unsigned > & rGetAvailableSpaces()
void AddCellUsingLocationIndex(unsigned index, CellPtr pCell)
virtual double EvaluateDivisionPropensity(unsigned currentNodeIndex, unsigned targetNodeIndex, CellPtr pCell)
PottsMesh< DIM > & rGetMesh()
void OutputCellPopulationParameters(out_stream &rParamsFile)
Node< DIM > * GetNode(unsigned index)
virtual void AcceptPopulationCountWriter(boost::shared_ptr< AbstractCellPopulationCountWriter< DIM, DIM > > pPopulationCountWriter)
virtual bool IsSiteAvailable(unsigned index, CellPtr pCell)
boost::shared_ptr< AbstractCaBasedDivisionRule< DIM > > mpCaBasedDivisionRule
const std::vector< boost::shared_ptr< AbstractCaUpdateRule< DIM > > > & rGetUpdateRuleCollection() const
unsigned mLatticeCarryingCapacity
void SetEmptySites(const std::set< unsigned > &rEmptySiteIndices)
void RemoveCellUsingLocationIndex(unsigned index, CellPtr pCell)
virtual void WriteVtkResultsToFile(const std::string &rDirectory)
virtual ~CaBasedCellPopulation()
CaBasedCellPopulation(PottsMesh< DIM > &rMesh, std::vector< CellPtr > &rCells, const std::vector< unsigned > locationIndices, unsigned latticeCarryingCapacity=1u, bool deleteMesh=false, bool validate=false)
bool IsRoomToDivide(CellPtr pCell)
void SetCaBasedDivisionRule(boost::shared_ptr< AbstractCaBasedDivisionRule< DIM > > pCaBasedDivisionRule)
void RemoveAllSwitchingUpdateRules()
std::vector< boost::shared_ptr< AbstractCaUpdateRule< DIM > > > mUpdateRuleCollection
#define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
std::set< unsigned > GetNeighbouringLocationIndices(CellPtr pCell)
void UpdateCellLocations(double dt)
void Update(bool hasHadBirthsOrDeaths=true)
const std::vector< boost::shared_ptr< AbstractCaSwitchingUpdateRule< DIM > > > & rGetSwitchingUpdateRuleCollection() const
void AddSwitchingUpdateRule(boost::shared_ptr< AbstractCaSwitchingUpdateRule< DIM > > pUpdateRule)
void serialize(Archive &archive, const unsigned int version)
void RemoveAllUpdateRules()
void AddUpdateRule(boost::shared_ptr< AbstractCaUpdateRule< DIM > > pUpdateRule)
Node< DIM > * GetNodeCorrespondingToCell(CellPtr pCell)
c_vector< double, DIM > GetLocationOfCellCentre(CellPtr pCell)
double GetWidth(const unsigned &rDimension)
unsigned RemoveDeadCells()
virtual void AcceptPopulationWriter(boost::shared_ptr< AbstractCellPopulationWriter< DIM, DIM > > pPopulationWriter)
double GetVolumeOfCell(CellPtr pCell)
CellPtr AddCell(CellPtr pNewCell, const c_vector< double, DIM > &rCellDivisionVector, CellPtr pParentCell=CellPtr())
virtual void AcceptCellWriter(boost::shared_ptr< AbstractCellWriter< DIM, DIM > > pCellWriter, CellPtr pCell)
virtual void OpenWritersFiles(OutputFileHandler &rOutputFileHandler)