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

Simulation time flow manager. More...

#include <TimeManager.h>

Public Member Functions

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

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 ( 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() [1/2]

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

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

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

◆ dt() [2/2]

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

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

Parameters
dtSimulation time step \( \Delta t \).
Here is the call graph for this function:

◆ frame() [1/2]

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

Get the simulation frame.

The frame is the index of the current particles output.

Returns
Simulation frame.

◆ frame() [2/2]

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

Set the simulation frame.

The frame is the index of the current particles output.

Parameters
frameSimulation frame.
Here is the call graph for this function:

◆ maxFrame()

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

Get the number of frames to compute.

Returns
Number of frames to compute.

◆ maxStep()

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

Get the number of frames to compute.

Returns
Number of frames to compute.

◆ maxTime()

float Aqua::InputOutput::TimeManager::maxTime ( )
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 ( )
inline

Get the output frames per second.

Returns
Frames per second.

◆ outputIPF()

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

Get the iterations per output frame.

Returns
Iterations per frame.

◆ outputStep() [1/2]

int Aqua::InputOutput::TimeManager::outputStep ( )
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 ( )
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() [1/2]

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

Get the simulation time step index.

Returns
Simulation time step index.

◆ step() [2/2]

void Aqua::InputOutput::TimeManager::step ( unsigned int  s)
inline

Set the simulation time step index.

Parameters
sSimulation time step index.

◆ time() [1/2]

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

Get the simulation time instant.

Returns
Simulation time instant.

◆ time() [2/2]

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

Set the simulation time instant.

Parameters
tSimulation time instant.

◆ update()

void Aqua::InputOutput::TimeManager::update ( float  dt)

Pass to the next time step.

Parameters
dtSimulation time elapsed in this frame.
Here is the call graph for this function:

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