36 #ifndef ABSTRACTCELLBASEDSIMULATION_HPP_
37 #define ABSTRACTCELLBASEDSIMULATION_HPP_
40 #include <boost/serialization/vector.hpp>
41 #include <boost/serialization/string.hpp>
45 #include "CellBasedPdeHandler.hpp"
46 #include "AbstractCellKiller.hpp"
47 #include "AbstractCellBasedSimulationModifier.hpp"
48 #include "AbstractForce.hpp"
49 #include "RandomNumberGenerator.hpp"
65 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM=ELEMENT_DIM>
69 friend class TestCryptSimulation2d;
70 friend class TestOffLatticeSimulation3d;
71 friend class TestOffLatticeSimulation;
76 friend class boost::serialization::access;
84 template<
class Archive>
85 void serialize(Archive & archive,
const unsigned int version)
88 archive & p_time_wrapper;
91 archive & p_rng_wrapper;
162 std::vector<boost::shared_ptr<AbstractCellKiller<SPACE_DIM> > >
mCellKillers;
165 std::vector<boost::shared_ptr<AbstractCellBasedSimulationModifier<ELEMENT_DIM, SPACE_DIM> > >
mSimulationModifiers;
285 bool deleteCellPopulationInDestructor=
false,
286 bool initialiseCells=
true);
340 void SetDt(
double dt);
407 std::vector<boost::shared_ptr<AbstractCellBasedSimulationModifier<ELEMENT_DIM, SPACE_DIM> > >*
GetSimulationModifiers();
std::string mSimulationOutputDirectory
bool mUpdateCellPopulation
CellBasedPdeHandler< SPACE_DIM > * GetCellBasedPdeHandler()
virtual unsigned DoCellBirth()
virtual ~AbstractCellBasedSimulation()
virtual bool StoppingEventHasOccurred()
void AddCellKiller(boost::shared_ptr< AbstractCellKiller< SPACE_DIM > > pCellKiller)
CellBasedPdeHandler< SPACE_DIM > * mpCellBasedPdeHandler
bool mDeleteCellPopulationInDestructor
virtual c_vector< double, SPACE_DIM > CalculateCellDivisionVector(CellPtr pParentCell)=0
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
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
virtual void OutputAdditionalSimulationSetup(out_stream &rParamsFile)
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 SetCellBasedPdeHandler(CellBasedPdeHandler< SPACE_DIM > *pCellBasedPdeHandler)
void SetSamplingTimestepMultiple(unsigned samplingTimestepMultiple)
AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > & mrCellPopulation