BioDynaMo
v1.05.120-25dc9790
|
Go to the documentation of this file.
15 #ifndef CORE_SIMULATION_BACKUP_H_
16 #define CORE_SIMULATION_BACKUP_H_
54 void Backup(
size_t completed_simulation_steps)
const {
57 "Requested to backup data, but no backup file given.");
62 std::stringstream tmp_file;
80 rename(tmp_file.str().c_str(),
backup_file.c_str());
86 "Requested to restore data, but no restore file given.");
96 "Restoring simulation executed on a different system!");
102 delete restored_simulation;
126 #endif // CORE_SIMULATION_BACKUP_H_
static const std::string kRuntimeVariableName
SimulationBackup(const std::string &backup_file, const std::string &restore_file)
Automatically close a TFile object using RAII pattern.
void Backup(size_t completed_simulation_steps) const
static void Warning(const std::string &location, const Args &... parts)
Prints warning message.
static void Info(const std::string &location, const Args &... parts)
Prints information message.
size_t GetSimulationStepsFromBackup() const
bool BackupEnabled() const
void Restore(Simulation &&restored)
static void Fatal(const std::string &location, const Args &... parts)
Prints fatal error message.
bool RestoreEnabled() const
static const std::string kSimulationStepName
static const std::string kSimulationName
static Simulation * GetActive()
This function returns the currently active Simulation simulation.
static std::vector< std::function< void()> > after_restore_event_