Simulation time flow manager.
More...
#include <TimeManager.h>
|
| 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.
|
|
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
◆ TimeManager()
Aqua::InputOutput::TimeManager::TimeManager |
( |
ProblemSetup & |
sim_data | ) |
|
◆ ~TimeManager()
Aqua::InputOutput::TimeManager::~TimeManager |
( |
| ) |
|
◆ 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
-
dt | Simulation time step \( \Delta t \). |
◆ 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
-
◆ 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).
◆ mustStop()
bool Aqua::InputOutput::TimeManager::mustStop |
( |
| ) |
|
Check if the simulation must be finished.
- Returns
- true if simulation should finish, false otherwise.
◆ 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
-
s | last 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
-
t | Last 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
-
s | Simulation 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
-
t | Simulation time instant. |
◆ update()
void Aqua::InputOutput::TimeManager::update |
( |
float |
dt | ) |
|
Pass to the next time step.
- Parameters
-
dt | Simulation time elapsed in this frame. |
The documentation for this class was generated from the following files: