OGS
|
Time step object.
TimeStep class contains previous time( \(t_{n}\)), current time ( \(t_{n+1}\)), time step length ( \(\Delta t_{n+1}\)), and the number of time steps ( \(n+1\)).
Definition at line 27 of file TimeStep.h.
#include <TimeStep.h>
Public Member Functions | |
TimeStep (double current_time) | |
TimeStep (double previous_time, double current_time, std::size_t n) | |
TimeStep (const TimeStep &src)=default | |
copy a time step | |
TimeStep & | operator= (const TimeStep &src)=default |
copy a time step | |
TimeStep & | operator+= (const double dt) |
increment time step | |
bool | operator< (TimeStep const &ts) const |
compare current time | |
bool | operator<= (TimeStep const &ts) const |
compare current time | |
bool | operator== (TimeStep const &ts) const |
compare current time | |
double | previous () const |
return previous time step | |
double | current () const |
return current time step | |
double | dt () const |
time step size from _previous | |
std::size_t | timeStepNumber () const |
the time step number | |
void | setAccepted (bool const accepted) |
bool | isAccepted () const |
Private Attributes | |
double | _previous |
previous time step | |
double | _current |
current time step | |
double | _dt |
time step size | |
std::size_t | _time_step_number |
the number of time steps | |
bool | _is_accepted = true |
is the timestep accepted | |
|
inlineexplicit |
Initialize a time step
current_time | current time |
Definition at line 34 of file TimeStep.h.
|
inline |
Initialize a time step
previous_time | previous time |
current_time | current time |
n | the number of time steps |
Definition at line 48 of file TimeStep.h.
|
default |
copy a time step
|
inline |
return current time step
Definition at line 90 of file TimeStep.h.
References _current.
Referenced by NumLib::IterationNumberBasedTimeStepping::getNextTimeStepSize(), NumLib::EvolutionaryPIDcontroller::limitStepSize(), and NumLib::FixedTimeStepping::next().
|
inline |
time step size from _previous
Definition at line 92 of file TimeStep.h.
References _dt.
Referenced by NumLib::canReduceTimestepSize(), NumLib::IterationNumberBasedTimeStepping::getNextTimeStepSize(), NumLib::EvolutionaryPIDcontroller::limitStepSize(), NumLib::EvolutionaryPIDcontroller::next(), NumLib::IterationNumberBasedTimeStepping::next(), and operator+=().
|
inline |
Definition at line 97 of file TimeStep.h.
References _is_accepted.
Referenced by NumLib::IterationNumberBasedTimeStepping::findMultiplier(), NumLib::EvolutionaryPIDcontroller::next(), and NumLib::IterationNumberBasedTimeStepping::next().
|
inline |
increment time step
Definition at line 63 of file TimeStep.h.
References _current, _dt, _previous, _time_step_number, and dt().
|
inline |
|
inline |
|
inline |
|
inline |
return previous time step
Definition at line 88 of file TimeStep.h.
References _previous.
Referenced by NumLib::IterationNumberBasedTimeStepping::next().
|
inline |
Definition at line 96 of file TimeStep.h.
References _is_accepted.
Referenced by NumLib::EvolutionaryPIDcontroller::next().
|
inline |
the time step number
Definition at line 94 of file TimeStep.h.
References _time_step_number.
Referenced by NumLib::IterationNumberBasedTimeStepping::getNextTimeStepSize(), NumLib::EvolutionaryPIDcontroller::next(), NumLib::FixedTimeStepping::next(), and NumLib::IterationNumberBasedTimeStepping::next().
|
private |
current time step
Definition at line 103 of file TimeStep.h.
Referenced by current(), operator+=(), operator<(), operator<=(), and operator==().
|
private |
|
private |
is the timestep accepted
Definition at line 109 of file TimeStep.h.
Referenced by isAccepted(), and setAccepted().
|
private |
previous time step
Definition at line 101 of file TimeStep.h.
Referenced by operator+=(), and previous().
|
private |
the number of time steps
Definition at line 107 of file TimeStep.h.
Referenced by operator+=(), and timeStepNumber().