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" 67 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM=ELEMENT_DIM>
71 friend class TestCryptSimulation2d;
72 friend class TestOffLatticeSimulation3d;
73 friend class TestOffLatticeSimulation;
78 friend class boost::serialization::access;
86 template<
class Archive>
87 void serialize(Archive & archive,
const unsigned int version)
90 archive & p_time_wrapper;
93 archive & p_rng_wrapper;
163 std::vector<boost::shared_ptr<AbstractCellKiller<SPACE_DIM> > >
mCellKillers;
166 std::vector<boost::shared_ptr<AbstractCellBasedSimulationModifier<ELEMENT_DIM, SPACE_DIM> > >
mSimulationModifiers;
270 bool deleteCellPopulationInDestructor=
false,
271 bool initialiseCells=
true);
313 void SetDt(
double dt);
380 std::vector<boost::shared_ptr<AbstractCellBasedSimulationModifier<ELEMENT_DIM, SPACE_DIM> > >*
GetSimulationModifiers();
std::string mSimulationOutputDirectory
bool mUpdateCellPopulation
virtual unsigned DoCellBirth()
virtual ~AbstractCellBasedSimulation()
virtual bool StoppingEventHasOccurred()
void AddCellKiller(boost::shared_ptr< AbstractCellKiller< SPACE_DIM > > pCellKiller)
bool mDeleteCellPopulationInDestructor
std::string mOutputDirectory
static SimulationTime * Instance()
AbstractCellBasedSimulation(AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > &rCellPopulation, bool deleteCellPopulationInDestructor=false, bool initialiseCells=true)
bool GetOutputDivisionLocations()
void OutputSimulationSetup()
AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > & rGetCellPopulation()
void SetOutputCellVelocities(bool outputCellVelocities)
void serialize(Archive &archive, const unsigned int version)
void SetNoBirth(bool noBirth)
std::string GetOutputDirectory()
out_stream mpVizSetupFile
virtual void OutputAdditionalSimulationSetup(out_stream &rParamsFile)=0
bool GetOutputCellVelocities()
void SetUpdateCellPopulationRule(bool updateCellPopulation)
virtual void WriteVisualizerSetupFile()
out_stream mpCellVelocitiesFile
void SetEndTime(double endTime)
std::vector< boost::shared_ptr< AbstractCellKiller< SPACE_DIM > > > mCellKillers
bool GetUpdateCellPopulationRule()
void SetOutputDivisionLocations(bool outputDivisionLocations)
virtual void OutputSimulationParameters(out_stream &rParamsFile)=0
void RemoveAllCellKillers()
virtual void UpdateCellLocationsAndTopology()=0
virtual void UpdateCellPopulation()
void SetOutputDirectory(std::string outputDirectory)
static RandomNumberGenerator * Instance()
bool mOutputCellVelocities
std::vector< double > GetNodeLocation(const unsigned &rNodeIndex)
void AddSimulationModifier(boost::shared_ptr< AbstractCellBasedSimulationModifier< ELEMENT_DIM, SPACE_DIM > > pSimulationModifier)
out_stream mpDivisionLocationFile
unsigned mSamplingTimestepMultiple
SerializableSingleton< SINGLETON_CLASS > * GetSerializationWrapper() const
bool mOutputDivisionLocations
std::vector< boost::shared_ptr< AbstractCellBasedSimulationModifier< ELEMENT_DIM, SPACE_DIM > > > mSimulationModifiers
virtual void SetupSolve()
std::vector< boost::shared_ptr< AbstractCellBasedSimulationModifier< ELEMENT_DIM, SPACE_DIM > > > * GetSimulationModifiers()
void SetSamplingTimestepMultiple(unsigned samplingTimestepMultiple)
AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > & mrCellPopulation