![]() |
LifeV
|
TimeData - Class for handling temporal discretization. More...
#include <TimeData.hpp>
Inheritance diagram for TimeData:
Collaboration diagram for TimeData:Private Attributes | |
| Real | M_initialTime |
| initial time More... | |
| Real | M_endTime |
| end time More... | |
| Real | M_periodTime |
| period time More... | |
| Real | M_time |
| current time More... | |
| Real | M_timeStep |
| time step More... | |
| UInt | M_timeStepNumber |
| iteration number More... | |
Constructors & Destructor | |
| TimeData () | |
| Empty Constructor. More... | |
| TimeData (const GetPot &dataFile, const std::string §ion="time_discretization") | |
| Constructor. More... | |
| TimeData (const TimeData &TimeData) | |
| Copy constructor. More... | |
| virtual | ~TimeData () |
| Virtual destructor. More... | |
Methods | |
| void | setup (const GetPot &dfile, const std::string §ion="time_discretization") |
| Read the dataFile and set all the internal quantities. More... | |
| void | updateTime () |
| Update the time by a timestep. More... | |
| bool | canAdvance () |
| Return if we can make a new timestep. More... | |
| bool | isFirstTimeStep () |
| Return if it is the initial time step. More... | |
| bool | isLastTimeStep () |
| Return if it is the last time step. More... | |
| void | showMe (std::ostream &output=std::cout) const |
| Display general information about the content of the class. More... | |
Utility methods | |
| Real | round (const Real &n, const Int &decimal=10) const |
Set Methods | |
| void | setInitialTime (const Real &initialTime) |
| Set the initial time step. More... | |
| void | setEndTime (const Real &endTime) |
| Set the final time step. More... | |
| void | setTime (const Real &time) |
| Set the present time of the simulation. More... | |
| void | setTimeStep (const Real &timeStep) |
| Set the initial time step. More... | |
| void | setTimeStepNumber (const UInt &timeStepNumber) |
| Set the time step number. More... | |
Get Methods | |
| const Real & | initialTime () const |
| Get the initial time step. More... | |
| const Real & | endTime () const |
| Get the final time step. More... | |
| const Real & | periodTime () const |
| Get the period. More... | |
| const Real & | time () const |
| Get the present time. More... | |
| Real | leftTime () const |
| Get the time left. More... | |
| Real | elapsedTime () const |
| Get the elapsed time. More... | |
| Real | inCycleTime () const |
| Get the present time shifted inside the first cycle (i.e. More... | |
| Real | previousTime () const |
| Get the previous time. More... | |
| Real | nextTime () const |
| Get the next time. More... | |
| const Real & | timeStep () const |
| Get the time step used for advancing. More... | |
| const UInt & | timeStepNumber () const |
| Get the number of time step performed. More... | |
TimeData - Class for handling temporal discretization.
The class is a data container for the time discretization.
Definition at line 61 of file TimeData.hpp.
| TimeData | ( | ) |
Empty Constructor.
Definition at line 46 of file TimeData.cpp.
Constructor.
| dataFile | GetPot data file |
| section | the section on the data file that contains the information on the time discretization |
Definition at line 56 of file TimeData.cpp.
|
inlinevirtual |
Virtual destructor.
Definition at line 85 of file TimeData.hpp.
| void setup | ( | const GetPot & | dfile, |
| const std::string & | section = "time_discretization" |
||
| ) |
Read the dataFile and set all the internal quantities.
| dataFile | data file |
| section | section of the file |
Definition at line 76 of file TimeData.cpp.
Here is the caller graph for this function:
|
inline |
Update the time by a timestep.
Definition at line 101 of file TimeData.hpp.
|
inline |
Return if we can make a new timestep.
Definition at line 111 of file TimeData.hpp.
|
inline |
Return if it is the initial time step.
Definition at line 120 of file TimeData.hpp.
|
inline |
Return if it is the last time step.
Definition at line 129 of file TimeData.hpp.
| void showMe | ( | std::ostream & | output = std::cout | ) | const |
Display general information about the content of the class.
| output | - specify the output format (std::cout by default) |
Definition at line 86 of file TimeData.cpp.
|
inline |
Set the initial time step.
| initialTime | initial time step value |
Definition at line 158 of file TimeData.hpp.
|
inline |
Set the final time step.
| endtime | final time step value |
Definition at line 167 of file TimeData.hpp.
|
inline |
Set the present time of the simulation.
| time | present time value |
Definition at line 176 of file TimeData.hpp.
|
inline |
Set the initial time step.
| timeStep | initial time step value |
Definition at line 185 of file TimeData.hpp.
|
inline |
Set the time step number.
| timeStepNumber | time step number |
Definition at line 194 of file TimeData.hpp.
|
inline |
Get the initial time step.
Definition at line 209 of file TimeData.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get the present time shifted inside the first cycle (i.e.
in the interval (M_initialTime,M_periodTime)). Useful for periodic behavior, e.g. BC.
Definition at line 265 of file TimeData.hpp.
|
inline |
|
inline |
|
inline |
Get the time step used for advancing.
Definition at line 292 of file TimeData.hpp.
|
inline |
Get the number of time step performed.
Definition at line 301 of file TimeData.hpp.
|
private |
initial time
Definition at line 311 of file TimeData.hpp.
|
private |
end time
Definition at line 314 of file TimeData.hpp.
|
private |
period time
Definition at line 317 of file TimeData.hpp.
|
private |
current time
Definition at line 320 of file TimeData.hpp.
|
private |
time step
Definition at line 323 of file TimeData.hpp.
|
private |
iteration number
Definition at line 326 of file TimeData.hpp.