![]() |
Chaste Commit::333233612e3dcc941d260418acd7b5ccdc30390e
|
#include <CellBasedSimulationArchiver.hpp>
Static Public Member Functions | |
static SIM * | Load (const std::string &rArchiveDirectory, const double &rTimeStamp) |
static void | Save (SIM *pSim) |
CellBasedSimulationArchiver handles the checkpointing (saving and loading) of all the various AbstractCellBasedSimulation objects. It has no explicit constructor (just uses a default one) and no member variables.
Definition at line 59 of file CellBasedSimulationArchiver.hpp.
|
static |
Loads a saved cell-based simulation to run further.
rArchiveDirectory | the name of the simulation to load (specified originally by simulation.SetOutputDirectory("wherever"); ) |
rTimeStamp | the time at which to load the simulation (this must be one of the times at which simulation.Save() was called) |
Find the right archive (and mesh) to load. The files are contained within the 'archive' folder in rArchiveDirectory, with the archive itself called 'cell_population_sim_at_time_`rTimeStamp`.arch'. The path to this file is returned.
The path to the mesh is stored in ArchiveLocationInfo for use by the CellPopulation de-serialization routines.
Definition at line 90 of file CellBasedSimulationArchiver.hpp.
References RelativeTo::ChasteTestOutput, ArchiveOpener< Archive, Stream >::GetCommonArchive(), and ArchiveLocationInfo::SetMeshPathname().
|
static |
Saves the whole cell-based simulation for restarting later.
Puts it in the archive folder under the simulation's OutputDirectory, in the file "cell_population_sim_at_time_<SIMULATION TIME>.arch". The mesh is written to files in the same folder.
First archives simulation time (and other singletons, if used) then the simulation itself.
pSim | pointer to the simulation |
Definition at line 118 of file CellBasedSimulationArchiver.hpp.
References RelativeTo::ChasteTestOutput, ArchiveOpener< Archive, Stream >::GetCommonArchive(), SimulationTime::GetTime(), SimulationTime::Instance(), SimulationTime::IsStartTimeSetUp(), and ArchiveLocationInfo::SetMeshFilename().