27 #ifndef MERCURY3DRESTART_H
28 #define MERCURY3DRESTART_H
79 if (!strcmp(argv[
i],
"-restart") || !strcmp(argv[
i],
"-r"))
84 std::size_t found =
getName().find(
".restart");
85 if (found == std::string::npos)
114 if (gettimeofday(&
time, NULL))
116 logger(
WARN,
"Error in getWallTime: Wall time could not be read");
140 std::stringstream com(
"");
143 std::size_t found =
getName().find(
'.');
144 if (found == std::string::npos)
153 logger(
INFO,
"system output:%", system(com.str().c_str()));
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:4049
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:422
const std::string & getName() const
Returns the name of the file. Does not allow to change it though.
Definition: DPMBase.cc:399
File restartFile
An instance of class File to handle in- and output into a .restart file.
Definition: DPMBase.h:1493
virtual void printTime() const
Displays the current simulation time and the maximum simulation duration.
Definition: DPMBase.cc:1970
void closeFiles()
Closes all files (ene, data, fstat, restart, stat) that were opened to read or write.
Definition: DPMBase.cc:503
virtual void finishStatistics()
Definition: DPMBase.cc:1925
Mdouble getTimeMax() const
Returns the maximum simulation duration.
Definition: DPMBase.cc:888
virtual void actionsAfterSolve()
A virtual function which allows to define operations to be executed after the solve().
Definition: DPMBase.cc:1871
void setAppend(bool newAppendFlag)
Sets whether the "append" option is on or off.
Definition: DPMBase.cc:1522
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:3006
const std::string & getName() const
Allows to access the file name, e.g., "problem.data".
Definition: File.cc:165
Definition: liveStatistics.cpp:32
void setMaxWallTime(Mdouble maxWallTime)
Definition: Mercury3DRestart.h:59
void writeOutputFiles() override
Writes simulation data to all the main Mercury files: .data, .ene, .fstat, .xballs and ....
Definition: Mercury3DRestart.h:128
double maxWallTime_
Definition: Mercury3DRestart.h:166
std::string getClusterCommand() const
Definition: Mercury3DRestart.h:54
std::string clusterCommand_
Definition: Mercury3DRestart.h:161
void setClusterCommand(std::string clusterCommand)
Definition: Mercury3DRestart.h:49
Mdouble getInitialWallTime() const
Definition: Mercury3DRestart.h:69
double time
Definition: liveStatistics.cpp:36
Mercury3DRestart()
Definition: Mercury3DRestart.h:42
double initialWallTime_
Definition: Mercury3DRestart.h:171
bool readNextArgument(int &i, int argc, char *argv[]) override
Definition: Mercury3DRestart.h:77
Mdouble getMaxWallTime() const
Definition: Mercury3DRestart.h:64
double getWallTime() const
Definition: Mercury3DRestart.h:111
This adds on the hierarchical grid code for 3D problems.
Definition: Mercury3D.h:37
bool readNextArgument(int &i, int argc, char *argv[]) override
Reads the next command line argument.
Definition: MercuryBase.cc:402
const std::complex< Mdouble > i
Definition: ExtendedMath.h:51