AQUAgpusph 4.1.2
Loading...
Searching...
No Matches
Public Member Functions
Aqua::InputOutput::FileManager Class Reference

Input/Output files manager. This class acts as a base class, controlling the subclasses which will load/save the files. More...

#include <FileManager.h>

Public Member Functions

 FileManager ()
 Constructor.
 
 ~FileManager ()
 Destructor.
 
void inputFile (std::string path)
 Set the main XML input file path.
 
std::string inputFile ()
 Get the main XML input file path.
 
ProblemSetupproblemSetup ()
 Get the simulation setup, extracted from the XML definition files.
 
CalcServer::CalcServerload ()
 Load the input files, generating the calculation server.
 
void save (float t)
 Save the output data files.
 
void waitForSavers ()
 Wait for the parallel saving threads.
 

Detailed Description

Input/Output files manager. This class acts as a base class, controlling the subclasses which will load/save the files.

See also
Aqua::InputOutput::State
Aqua::InputOutput::Particles
Note
The Log file is controlled by Aqua::InputOutput::Logger

Constructor & Destructor Documentation

◆ FileManager()

Aqua::InputOutput::FileManager::FileManager ( )

Constructor.

◆ ~FileManager()

Aqua::InputOutput::FileManager::~FileManager ( )

Destructor.

Member Function Documentation

◆ inputFile() [1/2]

std::string Aqua::InputOutput::FileManager::inputFile ( )
inline

Get the main XML input file path.

AQUAgpusph simulations are built on top of a XML definition file. Such file can later include another XML definition files, such that modules can be easily created.

Returns
XML input file path.

◆ inputFile() [2/2]

void Aqua::InputOutput::FileManager::inputFile ( std::string  path)

Set the main XML input file path.

AQUAgpusph simulations are built on top of a XML definition file. Such file can later include another XML definition files, such that modules can be easily created.

Parameters
pathXML input file path.

◆ load()

CalcServer::CalcServer * Aqua::InputOutput::FileManager::load ( )

Load the input files, generating the calculation server.

Depends on:

  1. Aqua::InputOutput::State to load the XML definition files, storing the data in Aqua::InputOutput::ProblemSetup.
  2. Aqua::InputOutput::Particles to load the particles fields data, storing it in Aqua::CalcServer::CalcServer.
Returns
The built Calculation server, NULL if errors happened.
Here is the call graph for this function:

◆ problemSetup()

ProblemSetup & Aqua::InputOutput::FileManager::problemSetup ( )
inline

Get the simulation setup, extracted from the XML definition files.

AQUAgpusph simulations are built on top of a XML definition file. Such file can later include another XML definition files, such that modules can be easily created. The simulation data read from such XML files is stored in this Aqua::InputOutput::ProblemSetup structure

Returns
Simualtion data
Warning
The returned Aqua::InputOutput::ProblemSetup static object is in the same scope than this class.

◆ save()

void Aqua::InputOutput::FileManager::save ( float  t)

Save the output data files.

AQUAgpusph is saving both, the XML simulation definition file, and the particles field values in the required formats. This information can be indistinctly used for postprocessing purposes, or as initial condition to resume the simulation.

Parameters
tSimulation time
Warning
If Python scripts are considered at the simulation, the user is responsible to save the state to can eventually resume the simulation
Here is the call graph for this function:

◆ waitForSavers()

void Aqua::InputOutput::FileManager::waitForSavers ( )

Wait for the parallel saving threads.

Some savers may optionally launch parallel threads to save the data, in an asynchronous way, in order to improve the performance. In such a case, AQUAgpusph shall wait them to finish before proceeding to destroy the data

See also
Aqua::InputOutput::VTK::waitForSavers()

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