#include <CardiacSimulationArchiver.hpp>
Static Public Member Functions | |
static void | Save (PROBLEM_CLASS &simulationToArchive, const std::string &rDirectory, bool clearDirectory=true) |
static PROBLEM_CLASS * | Load (const std::string &rDirectory) |
static PROBLEM_CLASS * | Load (const FileFinder &rDirectory) |
static PROBLEM_CLASS * | Migrate (const FileFinder &rDirectory) |
The class is templated over the class defining the simulation (i.e. MonodomainProblem)
Definition at line 52 of file CardiacSimulationArchiver.hpp.
void CardiacSimulationArchiver< PROBLEM_CLASS >::Save | ( | PROBLEM_CLASS & | simulationToArchive, | |
const std::string & | rDirectory, | |||
bool | clearDirectory = true | |||
) | [inline, static] |
Archives a simulation in the directory specified.
simulationToArchive | object defining the simulation to archive | |
rDirectory | directory where the multiple files defining the checkpoint will be stored (relative to CHASTE_TEST_OUTPUT) | |
clearDirectory | whether the directory needs to be cleared or not. |
Definition at line 114 of file CardiacSimulationArchiver.hpp.
References PetscTools::AmMaster(), PetscTools::Barrier(), RelativeTo::ChasteTestOutput, EXCEPTION, ArchiveOpener< Archive, Stream >::GetCommonArchive(), PetscTools::GetNumProcs(), OutputFileHandler::GetOutputDirectoryFullPath(), and PetscTools::ReplicateBool().
Referenced by CardiacSimulation::CreateAndRun().
PROBLEM_CLASS * CardiacSimulationArchiver< PROBLEM_CLASS >::Load | ( | const std::string & | rDirectory | ) | [inline, static] |
Unarchives a simulation from the directory specified.
Does a migrate if necessary (this is actually just a wrapper around the Migrate method now).
rDirectory | directory where the multiple files defining the checkpoint are located (relative to CHASTE_TEST_OUTPUT) |
Definition at line 162 of file CardiacSimulationArchiver.hpp.
References RelativeTo::ChasteTestOutput, and CardiacSimulationArchiver< PROBLEM_CLASS >::Migrate().
PROBLEM_CLASS * CardiacSimulationArchiver< PROBLEM_CLASS >::Load | ( | const FileFinder & | rDirectory | ) | [inline, static] |
Unarchives a simulation from the directory specified.
Does a migrate if necessary (this is actually just a wrapper around the Migrate method now).
rDirectory | directory where the multiple files defining the checkpoint are located |
Definition at line 169 of file CardiacSimulationArchiver.hpp.
References CardiacSimulationArchiver< PROBLEM_CLASS >::Migrate().
PROBLEM_CLASS * CardiacSimulationArchiver< PROBLEM_CLASS >::Migrate | ( | const FileFinder & | rDirectory | ) | [inline, static] |
Load a simulation, saved by any number of processes, into the correct number of processes for those currently launched.
Uses a dumb partition to work out how to distribute the mesh and cells over the processes. If we are loading on the same number of processes as the simulation was saved on, it uses exactly the same distribution as before.
rDirectory | directory where the multiple files defining the checkpoint are located |
Definition at line 176 of file CardiacSimulationArchiver.hpp.
References EXCEPTION, FileFinder::Exists(), FileFinder::GetAbsolutePath(), ArchiveOpener< Archive, Stream >::GetCommonArchive(), DistributedVectorFactory::GetNumProcs(), PetscTools::GetNumProcs(), DistributedVectorFactory::GetOriginalFactory(), ArchiveLocationInfo::GetProcessUniqueFilePath(), FileFinder::IsDir(), NEVER_REACHED, and DistributedVectorFactory::SetCheckNumberOfProcessesOnLoad().
Referenced by CardiacSimulationArchiver< PROBLEM_CLASS >::Load().