36 #ifndef CABASEDCELLPOPULATION_HPP_
37 #define CABASEDCELLPOPULATION_HPP_
39 #include "AbstractOnLatticeCellPopulation.hpp"
40 #include "PottsMesh.hpp"
41 #include "VertexMesh.hpp"
42 #include "AbstractUpdateRule.hpp"
43 #include "AbstractCaBasedDivisionRule.hpp"
46 #include <boost/serialization/base_object.hpp>
47 #include <boost/serialization/vector.hpp>
63 template<
unsigned DIM>
66 friend class TestCaBasedCellPopulation;
91 void SetEmptySites(
const std::set<unsigned>& rEmptySiteIndices);
93 friend class boost::serialization::access;
105 template<
class Archive>
106 void serialize(Archive & archive,
const unsigned int version)
108 archive & boost::serialization::base_object<AbstractOnLatticeCellPopulation<DIM> >(*this);
148 std::vector<CellPtr>& rCells,
149 const std::vector<unsigned> locationIndices,
150 unsigned latticeCarryingCapacity=1u,
151 bool deleteMesh=
false,
152 bool validate=
false);
278 CellPtr
AddCell(CellPtr pNewCell, CellPtr pParentCell=CellPtr());
292 unsigned targetNodeIndex,
336 void Update(
bool hasHadBirthsOrDeaths=
true);
382 double GetWidth(
const unsigned& rDimension);
458 std::string& rVariableName,
459 bool dirichletBoundaryConditionApplies=
false,
460 double dirichletBoundaryValue=0.0);
480 namespace serialization
485 template<
class Archive,
unsigned DIM>
486 inline void save_construct_data(
498 template<
class Archive,
unsigned DIM>
499 inline void load_construct_data(
bool IsCellAssociatedWithADeletedLocation(CellPtr pCell)
boost::shared_ptr< AbstractCaBasedDivisionRule< DIM > > GetCaBasedDivisionRule()
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)
virtual bool IsPdeNodeAssociatedWithNonApoptoticCell(unsigned pdeNodeIndex)
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
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)
virtual TetrahedralMesh< DIM, DIM > * GetTetrahedralMeshForPdeModifier()
void SetCaBasedDivisionRule(boost::shared_ptr< AbstractCaBasedDivisionRule< DIM > > pCaBasedDivisionRule)
#define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
std::set< unsigned > GetNeighbouringLocationIndices(CellPtr pCell)
void UpdateCellLocations(double dt)
void Update(bool hasHadBirthsOrDeaths=true)
void serialize(Archive &archive, const unsigned int version)
virtual double GetCellDataItemAtPdeNode(unsigned pdeNodeIndex, std::string &rVariableName, bool dirichletBoundaryConditionApplies=false, double dirichletBoundaryValue=0.0)
void RemoveAllUpdateRules()
std::vector< boost::shared_ptr< AbstractUpdateRule< DIM > > > mSwitchingUpdateRuleCollection
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, CellPtr pParentCell=CellPtr())
gcov doesn't like this file...
virtual void AddUpdateRule(boost::shared_ptr< AbstractUpdateRule< DIM > > pUpdateRule)
virtual void AcceptCellWriter(boost::shared_ptr< AbstractCellWriter< DIM, DIM > > pCellWriter, CellPtr pCell)
virtual void OpenWritersFiles(OutputFileHandler &rOutputFileHandler)
virtual const std::vector< boost::shared_ptr< AbstractUpdateRule< DIM > > > GetUpdateRuleCollection() const