Base class for all the report file managers.
More...
#include <InputOutput/Report.h>
|
virtual void | save (float t)=0 |
| Save the data.
|
|
virtual void | load () |
| Load the data.
|
|
std::string | file () |
| Get the used output file path.
|
|
virtual void | save (float t)=0 |
| Save the data.
|
|
virtual void | load ()=0 |
| Load the data.
|
|
|
| Report () |
| Constructor.
|
|
virtual | ~Report () |
| Destructor.
|
|
void | file (std::string filename) |
| Set the report file name.
|
|
void | file (std::string basename, unsigned int start_index) |
| Look for the first non-existing file name.
|
|
| InputOutput () |
| Constructor.
|
|
virtual | ~InputOutput () |
| Destructor.
|
|
Base class for all the report file managers.
In AQUAgpusph the input/output managers are divided in 3 different types:
- The simulation configuration files manager
- The report file managers
- The particles output file managers
The reports are just output files that are relatively low hard disk demanding.
This class allows the inherited ones to force the output file name (see file(const char* filename)) or to look the first file name which is not already existing in the system (see file(const char* basename, unsigned int startindex)).
- See also
- Aqua::InputOutput::InputOutput
-
Aqua::InputOutput::State
-
Aqua::InputOutput::Particles
◆ Report()
Aqua::InputOutput::Report::Report |
( |
| ) |
|
|
protected |
◆ ~Report()
Aqua::InputOutput::Report::~Report |
( |
| ) |
|
|
protectedvirtual |
◆ file() [1/3]
std::string Aqua::InputOutput::Report::file |
( |
| ) |
|
|
inline |
Get the used output file path.
- Returns
- The report file, NULL if it is not a file.
◆ file() [2/3]
void Aqua::InputOutput::Report::file |
( |
std::string |
basename, |
|
|
unsigned int |
start_index |
|
) |
| |
|
protected |
Look for the first non-existing file name.
Several scape strings can be applied to look for the appropriate name:
"%d"
/"{index}"
will be replaced by the first integer which results in a non-existing file path
"{mpi_rank}"
will be replaced by the process identifier index
- Parameters
-
basename | The base name of the file |
start_index | First index that will be checked |
◆ file() [3/3]
void Aqua::InputOutput::Report::file |
( |
std::string |
filename | ) |
|
|
protected |
Set the report file name.
- Parameters
-
filename | The file name. Optionally <strong class= = null can be set in order to clear the stored file name. |
◆ load()
virtual void Aqua::InputOutput::Report::load |
( |
| ) |
|
|
inlinevirtual |
Load the data.
Since the reports are mainly output files, the load method should be useless, and therefore this class provide a way to can omit it in the inherited ones.
Implements Aqua::InputOutput::InputOutput.
◆ save()
virtual void Aqua::InputOutput::Report::save |
( |
float |
t | ) |
|
|
pure virtual |
The documentation for this class was generated from the following files:
- /home/pepe/SPH/Code/aquagpusph/include/InputOutput/Report.h
- /home/pepe/SPH/Code/aquagpusph/src/InputOutput/Report.cpp