27 #ifndef OUTPUTFILES_H_
28 #define OUTPUTFILES_H_
147 const std::string&
getName()
const;
152 void setName(
const std::string& name);
157 void setName(
const char* name);
183 void read(std::istream& is);
187 void write(std::ostream& os)
const;
Every simulation requires data files to store all the information necessary for visualisation and ana...
void setNextSavedTimeStep(unsigned int nextSavedTimeStep)
Sets the next time step for all the files (ene, data, fstat, restart, stat) at which the data is to b...
MERCURY_DEPRECATED File & getDataFile()
The non const version. Allows one to edit the File::dataFile.
File restartFile
An instance of class File to handle in- and output into a .restart file.
void closeFiles()
Closes all files (ene, data, fstat, restart, stat) that were opened to read or write.
MERCURY_DEPRECATED File & getStatFile()
The non const version. Allows to edit the File::statFile.
void setFileType(FileType fileType)
Sets File::fileType_ for all files (ene, data, fstat, restart, stat)
#define MERCURY_DEPRECATED
FileType
With FileType options, one is able to choose if data is to be read/written from/into no or single or ...
void setOpenMode(std::fstream::openmode openMode)
Sets File::openMode_ for all files (ene, data, fstat, restart, stat)
MERCURY_DEPRECATED File & getFStatFile()
The non const version. Allows to edit the File::fStatFile.
virtual ~Files()
A destructor, watch out its a virtual destructor.
std::string name_
the name of the problem, used, e.g., for the files
File eneFile
An instance of class File to handle in- and output into a .ene file.
void openFiles()
Opens all the files (ene, data, fstat, restart, stat) for reading and writing purposes.
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
void resetFileCounter()
Resets the file counter for each file i.e. for ene, data, fstat, restart, stat)
MERCURY_DEPRECATED File & getEneFile()
The non const version. Allows to edit the File::eneFile.
File fStatFile
An instance of class File to handle in- and output into a .fstat file.
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
File dataFile
An instance of class File to handle in- and output into a .data file.
void write(std::ostream &os) const
Writes data into a file from the member variables name_, restartFile, dataFile etc.
void read(std::istream &is)
Extracts data from the input stream (which is basically a file you want to read from) into name_...
File statFile
An instance of class File to handle in- and output into a .stat file.
const std::string & getName() const
Returns the name of the file. Does not allow to change it though.
MERCURY_DEPRECATED File & getRestartFile()
The non const version. Allows to edit the File::restartFile.