6 #ifndef MERCURY3DRESTART_H
7 #define MERCURY3DRESTART_H
58 if (!strcmp(argv[
i],
"-restart") || !strcmp(argv[
i],
"-r"))
64 if (
found == std::string::npos)
93 if (gettimeofday(&
time, NULL))
95 logger(
WARN,
"Error in getWallTime: Wall time could not be read");
119 std::stringstream com(
"");
123 if (
found == std::string::npos)
132 logger(
INFO,
"system output:%", system(com.str().c_str()));
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
virtual void writeOutputFiles()
Writes simulation data to all the main Mercury files: .data, .ene, .fstat, .xballs and ....
Definition: DPMBase.cc:4115
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:400
const std::string & getName() const
Returns the name of the file. Does not allow to change it though.
Definition: DPMBase.cc:377
File restartFile
An instance of class File to handle in- and output into a .restart file.
Definition: DPMBase.h:1499
virtual void printTime() const
Displays the current simulation time and the maximum simulation duration.
Definition: DPMBase.cc:1959
void closeFiles()
Closes all files (ene, data, fstat, restart, stat) that were opened to read or write.
Definition: DPMBase.cc:481
virtual void finishStatistics()
Definition: DPMBase.cc:1914
Mdouble getTimeMax() const
Returns the maximum simulation duration.
Definition: DPMBase.cc:879
virtual void actionsAfterSolve()
A virtual function which allows to define operations to be executed after the solve().
Definition: DPMBase.cc:1860
void setAppend(bool newAppendFlag)
Sets whether the "append" option is on or off.
Definition: DPMBase.cc:1513
bool readRestartFile(ReadOptions opt=ReadOptions::ReadAll)
Reads all the particle data corresponding to a given, existing . restart file (for more details regar...
Definition: DPMBase.cc:3043
const std::string & getName() const
Allows to access the file name, e.g., "problem.data".
Definition: File.cc:143
Definition: liveStatistics.cpp:11
void setMaxWallTime(Mdouble maxWallTime)
Definition: Mercury3DRestart.h:38
void writeOutputFiles() override
Writes simulation data to all the main Mercury files: .data, .ene, .fstat, .xballs and ....
Definition: Mercury3DRestart.h:107
double maxWallTime_
Definition: Mercury3DRestart.h:145
std::string getClusterCommand() const
Definition: Mercury3DRestart.h:33
std::string clusterCommand_
Definition: Mercury3DRestart.h:140
void setClusterCommand(std::string clusterCommand)
Definition: Mercury3DRestart.h:28
Mdouble getInitialWallTime() const
Definition: Mercury3DRestart.h:48
double time
Definition: liveStatistics.cpp:15
Mercury3DRestart()
Definition: Mercury3DRestart.h:21
double initialWallTime_
Definition: Mercury3DRestart.h:150
bool readNextArgument(int &i, int argc, char *argv[]) override
Definition: Mercury3DRestart.h:56
Mdouble getMaxWallTime() const
Definition: Mercury3DRestart.h:43
double getWallTime() const
Definition: Mercury3DRestart.h:90
This adds on the hierarchical grid code for 3D problems.
Definition: Mercury3D.h:16
bool readNextArgument(int &i, int argc, char *argv[]) override
Reads the next command line argument.
Definition: MercuryBase.cc:381
bool found
Definition: MergeRestartFiles.py:24
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286