AQUAgpusph 5.0.4
Loading...
Searching...
No Matches
Aqua::InputOutput::TimeManager Class Reference

Simulation time flow manager. More...

#include <TimeManager.hpp>

Public Member Functions

 TimeManager (const ProblemSetup &sim_data)
 ~TimeManager ()
 Destructor.
bool mustStop ()
 Check if the simulation must be finished.
bool mustPrintOutput ()
 Check if a general simulation output must be printed.
unsigned int step () const
 Get the simulation time step index.
float time () const
 Get the simulation time instant.
unsigned int frame () const
 Get the simulation frame.
float dt () const
 Get the simulation time step \( \Delta t \).
float maxTime () const
 Get the total simulation time to compute.
unsigned int maxStep () const
 Get the number of frames to compute.
unsigned int maxFrame () const
 Get the number of frames to compute.
void outputStep (int s)
 Set the last output event time step index.
int outputStep () const
 Get the last output event time step index.
int outputIPF () const
 Get the iterations per output frame.
void outputTime (float t)
 Set the last output event time instant.
float outputTime () const
 Get the last output event time instant.
float outputFPS () const
 Get the output frames per second.

Detailed Description

Simulation time flow manager.

This class controls the time variable \( t \), and more specifically the time events triggers, like the output updates, the number of output frames performed, etc...

See also
Aqua::InputOutput::ProblemSetup::sphTimingParameters

Constructor & Destructor Documentation

◆ TimeManager()

Aqua::InputOutput::TimeManager::TimeManager ( const ProblemSetup & sim_data)

Constructor

Parameters
sim_dataSimulation data
Here is the call graph for this function:

◆ ~TimeManager()

Aqua::InputOutput::TimeManager::~TimeManager ( )

Destructor.

Member Function Documentation

◆ dt()

float Aqua::InputOutput::TimeManager::dt ( ) const
inline

Get the simulation time step \( \Delta t \).

Returns
Simulation time step \( \Delta t \).

◆ frame()

unsigned int Aqua::InputOutput::TimeManager::frame ( ) const
inline

Get the simulation frame.

The frame is the index of the current particles output.

Returns
Simulation frame.

◆ maxFrame()

unsigned int Aqua::InputOutput::TimeManager::maxFrame ( ) const
inline

Get the number of frames to compute.

Returns
Number of frames to compute.

◆ maxStep()

unsigned int Aqua::InputOutput::TimeManager::maxStep ( ) const
inline

Get the number of frames to compute.

Returns
Number of frames to compute.

◆ maxTime()

float Aqua::InputOutput::TimeManager::maxTime ( ) const
inline

Get the total simulation time to compute.

Returns
Total simulation time to compute.

◆ mustPrintOutput()

bool Aqua::InputOutput::TimeManager::mustPrintOutput ( )

Check if a general simulation output must be printed.

Returns
true if an output should be printed, false otherwise.
Warning
This method is returning true just one time per time step (i.e. until update() is called again).
Here is the call graph for this function:

◆ mustStop()

bool Aqua::InputOutput::TimeManager::mustStop ( )

Check if the simulation must be finished.

Returns
true if simulation should finish, false otherwise.
Here is the call graph for this function:

◆ outputFPS()

float Aqua::InputOutput::TimeManager::outputFPS ( ) const
inline

Get the output frames per second.

Returns
Frames per second.

◆ outputIPF()

int Aqua::InputOutput::TimeManager::outputIPF ( ) const
inline

Get the iterations per output frame.

Returns
Iterations per frame.

◆ outputStep() [1/2]

int Aqua::InputOutput::TimeManager::outputStep ( ) const
inline

Get the last output event time step index.

Returns
Last output event time step index.

◆ outputStep() [2/2]

void Aqua::InputOutput::TimeManager::outputStep ( int s)
inline

Set the last output event time step index.

Parameters
slast output event time step index.

◆ outputTime() [1/2]

float Aqua::InputOutput::TimeManager::outputTime ( ) const
inline

Get the last output event time instant.

Returns
Last output event time instant.

◆ outputTime() [2/2]

void Aqua::InputOutput::TimeManager::outputTime ( float t)
inline

Set the last output event time instant.

Parameters
tLast output event time instant.

◆ step()

unsigned int Aqua::InputOutput::TimeManager::step ( ) const
inline

Get the simulation time step index.

Returns
Simulation time step index.

◆ time()

float Aqua::InputOutput::TimeManager::time ( ) const
inline

Get the simulation time instant.

Returns
Simulation time instant.

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