FullRestartSelfTest.cpp File Reference

Classes

class  FullRestartTest
 

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )
153 {
154  FullRestartTest normal;
155  normal.setName("FullRestartSelfTest");
156  normal.setupInitialConditions();
157  normal.writeRestartFile();
159  normal.setName("FullRestartWithCounterSelfTest");
160  logger(INFO, "%", normal.restartFile.getFullName());
161  normal.writeRestartFile();
162 
164  restart.readRestartFile("FullRestartSelfTest.restart");
165  restart.setName("FullRestartSelfTestRestarted");
167  restart.write(std::cout);
168 
169  restart.readRestartFile("FullRestartWithCounterSelfTest.restart.1");
170  restart.setName("FullRestartWithCounterSelfTestRestarted");
172 }
@ MULTIPLE_FILES
each time-step will be written into/read from separate files numbered consecutively: name_....
LL< Log::INFO > INFO
Info log level.
Definition: Logger.cc:55
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:422
File restartFile
An instance of class File to handle in- and output into a .restart file.
Definition: DPMBase.h:1493
virtual void writeRestartFile()
Stores all the particle data for current save time step to a "restart" file, which is a file simply i...
Definition: DPMBase.cc:2942
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 getFullName() const
Also allows to access the file name, however with additional information which is the file counter,...
Definition: File.cc:170
void setFileType(FileType fileType)
Sets the type of file needed to write into or read from. File::fileType_.
Definition: File.cc:215
Definition: FullRestartSelfTest.cpp:48
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: FullRestartSelfTest.cpp:51
void write(std::ostream &os, bool writeAllParticles=true) const override
Writes all data into a restart file.
Definition: MercuryBase.cc:147
Definition: restart2.cpp:29

References File::getFullName(), INFO, logger, MULTIPLE_FILES, DPMBase::readRestartFile(), DPMBase::restartFile, File::setFileType(), DPMBase::setName(), FullRestartTest::setupInitialConditions(), MercuryBase::write(), and DPMBase::writeRestartFile().