TissueSimulationArchiver< DIM, SIM > Class Template Reference

#include <TissueSimulationArchiver.hpp>

List of all members.

Static Public Member Functions

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

Static Private Member Functions

static std::string GetArchivePathname (const std::string &rArchiveDirectory, const double &rTimeStamp)


Detailed Description

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

TissueSimulationArchiver handles the checkpointing (saving and loading) of all the various TissueSimulation objects. It has no explicit constructor (just uses a default one) and no member variables.

Definition at line 53 of file TissueSimulationArchiver.hpp.


Member Function Documentation

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

Loads a saved tissue 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)

Definition at line 117 of file TissueSimulationArchiver.hpp.

References TissueSimulationArchiver< DIM, SIM >::GetArchivePathname(), CellwiseData< DIM >::Instance(), WntConcentration::Instance(), SimulationTime::Instance(), and SimulationTime::IsStartTimeSetUp().

template<unsigned DIM, class SIM>
void TissueSimulationArchiver< DIM, SIM >::Save ( SIM *  pSim  )  [inline, static]

Saves the whole tissue simulation for restarting later.

Puts it in the archive folder under the simulation's OutputDirectory, in the file "tissue_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 155 of file TissueSimulationArchiver.hpp.

References OutputFileHandler::GetOutputDirectoryFullPath(), SimulationTime::GetTime(), CellwiseData< DIM >::Instance(), WntConcentration::Instance(), SimulationTime::Instance(), CellwiseData< DIM >::IsSetUp(), SimulationTime::IsStartTimeSetUp(), and WntConcentration::IsWntSetUp().

template<unsigned DIM, class SIM>
std::string TissueSimulationArchiver< DIM, SIM >::GetArchivePathname ( const std::string &  rArchiveDirectory,
const double &  rTimeStamp 
) [inline, static, private]

Find the right archive (and mesh) to load. The files are contained within the 'archive' folder in rArchiveDirectory, with the archive itself called 'tissue_sim_at_time_`rTimeStamp`.arch'. The path to this file is returned.

The path to the mesh is stored as MeshArchiveInfo::meshPathname for use by the Tissue de-serialization routines.

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)

Definition at line 101 of file TissueSimulationArchiver.hpp.

References OutputFileHandler::GetChasteTestOutputDirectory(), and MeshArchiveInfo::meshPathname.

Referenced by TissueSimulationArchiver< DIM, SIM >::Load().


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

Generated on Wed Mar 18 12:52:56 2009 for Chaste by  doxygen 1.5.5