36 #ifndef POTTSBASEDCELLPOPULATION_HPP_
37 #define POTTSBASEDCELLPOPULATION_HPP_
39 #include "AbstractOnLatticeCellPopulation.hpp"
40 #include "PottsMesh.hpp"
41 #include "VertexMesh.hpp"
42 #include "AbstractPottsUpdateRule.hpp"
43 #include "MutableMesh.hpp"
46 #include <boost/serialization/base_object.hpp>
47 #include <boost/serialization/vector.hpp>
49 template<
unsigned DIM>
62 template<
unsigned DIM>
65 friend class TestPottsBasedCellPopulation;
100 friend class boost::serialization::access;
112 template<
class Archive>
113 void serialize(Archive & archive,
const unsigned int version)
115 #define COVERAGE_IGNORE
116 archive & boost::serialization::base_object<AbstractOnLatticeCellPopulation<DIM> >(*this);
129 #undef COVERAGE_IGNORE
165 std::vector<CellPtr>& rCells,
166 bool deleteMesh=
false,
168 const std::vector<unsigned> locationIndices=std::vector<unsigned>());
261 CellPtr
AddCell(CellPtr pNewCell,
const c_vector<double,DIM>& rCellDivisionVector, CellPtr pParentCell=CellPtr());
295 void Update(
bool hasHadBirthsOrDeaths=
true);
355 double GetWidth(
const unsigned& rDimension);
436 namespace serialization
441 template<
class Archive,
unsigned DIM>
442 inline void save_construct_data(
454 template<
class Archive,
unsigned DIM>
455 inline void load_construct_data(
PottsMesh< DIM > * mpPottsMesh
Node< DIM > * GetNode(unsigned index)
void RemoveAllUpdateRules()
PottsMesh< DIM > & rGetMesh()
MutableMesh< DIM, DIM > * mpMutableMesh
VertexMesh< DIM, DIM > * GetElementTessellation()
std::set< unsigned > GetNeighbouringLocationIndices(CellPtr pCell)
PottsElement< DIM > * GetElementCorrespondingToCell(CellPtr pCell)
unsigned GetNumElements()
const std::vector< boost::shared_ptr< AbstractPottsUpdateRule< DIM > > > & rGetUpdateRuleCollection() const
unsigned RemoveDeadCells()
virtual void AcceptPopulationCountWriter(boost::shared_ptr< AbstractCellPopulationCountWriter< DIM, DIM > > pPopulationCountWriter)
void CreateElementTessellation()
c_vector< double, DIM > GetLocationOfCellCentre(CellPtr pCell)
virtual void AcceptCellWriter(boost::shared_ptr< AbstractCellWriter< DIM, DIM > > pCellWriter, CellPtr pCell)
#define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
void OutputCellPopulationParameters(out_stream &rParamsFile)
void SetTemperature(double temperature)
virtual void WriteVtkResultsToFile(const std::string &rDirectory)
void AddUpdateRule(boost::shared_ptr< AbstractPottsUpdateRule< DIM > > pUpdateRule)
virtual void AcceptPopulationWriter(boost::shared_ptr< AbstractCellPopulationWriter< DIM, DIM > > pPopulationWriter)
void Update(bool hasHadBirthsOrDeaths=true)
CellPtr AddCell(CellPtr pNewCell, const c_vector< double, DIM > &rCellDivisionVector, CellPtr pParentCell=CellPtr())
double GetVolumeOfCell(CellPtr pCell)
void serialize(Archive &archive, const unsigned int version)
unsigned mNumSweepsPerTimestep
virtual void WriteResultsToFiles(const std::string &rDirectory)
MutableMesh< DIM, DIM > * GetMutableMesh()
void UpdateCellLocations(double dt)
PottsElement< DIM > * GetElement(unsigned elementIndex)
double GetWidth(const unsigned &rDimension)
virtual void OpenWritersFiles(OutputFileHandler &rOutputFileHandler)
unsigned GetNumSweepsPerTimestep()
std::vector< boost::shared_ptr< AbstractPottsUpdateRule< DIM > > > mUpdateRuleCollection
virtual ~PottsBasedCellPopulation()
void SetNumSweepsPerTimestep(unsigned numSweepsPerTimestep)
VertexMesh< DIM, DIM > * mpElementTessellation
PottsBasedCellPopulation(PottsMesh< DIM > &rMesh, std::vector< CellPtr > &rCells, bool deleteMesh=false, bool validate=true, const std::vector< unsigned > locationIndices=std::vector< unsigned >())
bool IsCellAssociatedWithADeletedLocation(CellPtr pCell)