36#ifndef ABSTRACTCELLBASEDSIMULATION_HPP_
37#define ABSTRACTCELLBASEDSIMULATION_HPP_
40#include <boost/serialization/vector.hpp>
41#include <boost/serialization/string.hpp>
45#include "AbstractCellKiller.hpp"
46#include "AbstractCellBasedSimulationModifier.hpp"
47#include "AbstractForce.hpp"
48#include "RandomNumberGenerator.hpp"
67template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM=ELEMENT_DIM>
71 friend class TestCryptSimulation2d;
72 friend class TestOffLatticeSimulation3d;
73 friend class TestOffLatticeSimulation;
86 template<
class Archive>
87 void serialize(Archive & archive,
const unsigned int version)
90 archive & p_time_wrapper;
93 archive & p_rng_wrapper;
165 std::vector<boost::shared_ptr<AbstractCellKiller<SPACE_DIM> > >
mCellKillers;
168 std::vector<boost::shared_ptr<AbstractCellBasedSimulationModifier<ELEMENT_DIM, SPACE_DIM> > >
mSimulationModifiers;
283 bool deleteCellPopulationInDestructor=
false,
284 bool initialiseCells=
true);
326 void SetDt(
double dt);
401 std::vector<boost::shared_ptr<AbstractCellBasedSimulationModifier<ELEMENT_DIM, SPACE_DIM> > >*
GetSimulationModifiers();
std::vector< boost::shared_ptr< AbstractCellBasedSimulationModifier< ELEMENT_DIM, SPACE_DIM > > > mSimulationModifiers
void SetEndTime(double endTime)
AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > & mrCellPopulation
void SetUpdateCellPopulationRule(bool updateCellPopulation)
bool GetUpdateCellPopulationRule()
virtual void SetupSolve()
virtual void UpdateCellLocationsAndTopology()=0
std::vector< boost::shared_ptr< AbstractCellKiller< SPACE_DIM > > > mCellKillers
void SetOutputCellVelocities(bool outputCellVelocities)
void SetUpdatingTimestepMultiple(unsigned updatingTimestepMultiple)
virtual bool StoppingEventHasOccurred()
AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > & rGetCellPopulation()
void RemoveAllCellKillers()
unsigned mUpdatingTimestepMultiple
virtual unsigned DoCellBirth()
bool mUpdateCellPopulation
unsigned mSamplingTimestepMultiple
void SetNoBirth(bool noBirth)
std::vector< boost::shared_ptr< AbstractCellBasedSimulationModifier< ELEMENT_DIM, SPACE_DIM > > > * GetSimulationModifiers()
std::vector< boost::shared_ptr< AbstractCellBasedSimulationModifier< ELEMENT_DIM, SPACE_DIM > > > mTopologyUpdateSimulationModifiers
virtual void UpdateCellPopulation()
std::string GetOutputDirectory()
void AddSimulationModifier(boost::shared_ptr< AbstractCellBasedSimulationModifier< ELEMENT_DIM, SPACE_DIM > > pSimulationModifier)
out_stream mpCellVelocitiesFile
void serialize(Archive &archive, const unsigned int version)
void AddTopologyUpdateSimulationModifier(boost::shared_ptr< AbstractCellBasedSimulationModifier< ELEMENT_DIM, SPACE_DIM > > pSimulationModifier)
virtual void OutputSimulationParameters(out_stream &rParamsFile)=0
virtual void OutputAdditionalSimulationSetup(out_stream &rParamsFile)=0
bool GetOutputDivisionLocations()
void OutputSimulationSetup()
std::string mOutputDirectory
virtual void WriteVisualizerSetupFile()
bool GetOutputCellVelocities()
bool mDeleteCellPopulationInDestructor
void SetOutputDirectory(std::string outputDirectory)
out_stream mpDivisionLocationFile
void AddCellKiller(boost::shared_ptr< AbstractCellKiller< SPACE_DIM > > pCellKiller)
virtual ~AbstractCellBasedSimulation()
std::vector< boost::shared_ptr< AbstractCellBasedSimulationModifier< ELEMENT_DIM, SPACE_DIM > > > * GetTopologyUpdateSimulationModifiers()
bool mOutputCellVelocities
std::vector< double > GetNodeLocation(const unsigned &rNodeIndex)
out_stream mpVizSetupFile
friend class boost::serialization::access
bool mOutputDivisionLocations
std::string mSimulationOutputDirectory
void SetSamplingTimestepMultiple(unsigned samplingTimestepMultiple)
void SetOutputDivisionLocations(bool outputDivisionLocations)
static RandomNumberGenerator * Instance()
SerializableSingleton< SINGLETON_CLASS > * GetSerializationWrapper() const
static SimulationTime * Instance()