CryptSimulationArchiver< DIM, SIM > Class Template Reference

#include <CryptSimulationArchiver.hpp>

List of all members.

Static Public Member Functions

static SIM * Load (const std::string &rArchiveDirectory, const double &rTimeStamp)
static void Save (SIM *pSim)


Detailed Description

template<unsigned DIM, class SIM>
class CryptSimulationArchiver< DIM, SIM >

CryptSimulationArchiver handles the checkpointing (saving and loading) of all CryptSimulation1d, CryptSimulation2d and VertexCryptSimulation2d objects. It has no explicit constructor (just uses a default one) and no member variables.

Todo:
reduce code duplication with CellBasedSimulationArchiver (#1568)

Definition at line 54 of file CryptSimulationArchiver.hpp.


Member Function Documentation

template<unsigned DIM, class SIM>
SIM * CryptSimulationArchiver< DIM, SIM >::Load ( const std::string &  rArchiveDirectory,
const double &  rTimeStamp 
) [inline, static]

Loads a saved cell-based simulation to run further.

Parameters:
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 84 of file CryptSimulationArchiver.hpp.

References RelativeTo::ChasteTestOutput, ArchiveOpener< Archive, Stream >::GetCommonArchive(), WntConcentration< DIM >::Instance(), SimulationTime::Instance(), SimulationTime::IsStartTimeSetUp(), and ArchiveLocationInfo::SetMeshPathname().

template<unsigned DIM, class SIM>
void CryptSimulationArchiver< DIM, SIM >::Save ( SIM *  pSim  )  [inline, 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.

Parameters:
pSim pointer to the simulation

Definition at line 127 of file CryptSimulationArchiver.hpp.

References RelativeTo::ChasteTestOutput, SimulationTime::GetTime(), WntConcentration< DIM >::Instance(), SimulationTime::Instance(), SimulationTime::IsStartTimeSetUp(), WntConcentration< DIM >::IsWntSetUp(), and ArchiveLocationInfo::SetMeshFilename().


The documentation for this class was generated from the following file:

Generated on Mon Apr 18 11:36:55 2011 for Chaste by  doxygen 1.5.5