AQUAgpusph 4.1.2
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions
Aqua::InputOutput::Report Class Referenceabstract

Base class for all the report file managers. More...

#include <InputOutput/Report.h>

Inheritance diagram for Aqua::InputOutput::Report:
Inheritance graph
[legend]
Collaboration diagram for Aqua::InputOutput::Report:
Collaboration graph
[legend]

Public Member Functions

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.
 

Protected Member Functions

 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.
 
- Protected Member Functions inherited from Aqua::InputOutput::InputOutput
 InputOutput ()
 Constructor.
 
virtual ~InputOutput ()
 Destructor.
 

Detailed Description

Base class for all the report file managers.

In AQUAgpusph the input/output managers are divided in 3 different types:

  1. The simulation configuration files manager
  2. The report file managers
  3. 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

Constructor & Destructor Documentation

◆ Report()

Aqua::InputOutput::Report::Report ( )
protected

Constructor.

◆ ~Report()

Aqua::InputOutput::Report::~Report ( )
protectedvirtual

Destructor.

Member Function Documentation

◆ 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
basenameThe base name of the file
start_indexFirst index that will be checked
Here is the call graph for this function:

◆ file() [3/3]

void Aqua::InputOutput::Report::file ( std::string  filename)
protected

Set the report file name.

Parameters
filenameThe 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

Save the data.

Parameters
tSimulation time

Implements Aqua::InputOutput::InputOutput.

Implemented in Aqua::InputOutput::Logger.


The documentation for this class was generated from the following files: