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 30 of file TimeStep.h.
#include <TimeStep.h>
Public Member Functions | |
TimeStep (Time const ¤t_time) | |
TimeStep (Time const &previous_time, Time const ¤t_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 | |
Time | previous () const |
return previous time step | |
Time | 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 | |
Time | _previous |
previous time step | |
Time | _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 37 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 51 of file TimeStep.h.
|
default |
copy a time step
|
inline |
return current time step
Definition at line 78 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 80 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 85 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 66 of file TimeStep.h.
References _current, _dt, _previous, _time_step_number, and dt().
|
inline |
return previous time step
Definition at line 76 of file TimeStep.h.
References _previous.
Referenced by NumLib::IterationNumberBasedTimeStepping::next().
|
inline |
Definition at line 84 of file TimeStep.h.
References _is_accepted.
Referenced by NumLib::EvolutionaryPIDcontroller::next().
|
inline |
the time step number
Definition at line 82 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 91 of file TimeStep.h.
Referenced by current(), and operator+=().
|
private |
|
private |
is the timestep accepted
Definition at line 97 of file TimeStep.h.
Referenced by isAccepted(), and setAccepted().
|
private |
previous time step
Definition at line 89 of file TimeStep.h.
Referenced by operator+=(), and previous().
|
private |
the number of time steps
Definition at line 95 of file TimeStep.h.
Referenced by operator+=(), and timeStepNumber().