![]() |
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 32 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 | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, TimeStep const &ts) |
|
inlineexplicit |
Initialize a time step
| current_time | current time |
Definition at line 39 of file TimeStep.h.
References _current, _dt, _previous, and _time_step_number.
Referenced by TimeStep(), operator+=(), operator<<, and operator=().
|
inline |
Initialize a time step
| previous_time | previous time |
| current_time | current time |
| n | the number of time steps |
Definition at line 53 of file TimeStep.h.
References _current, _dt, _previous, and _time_step_number.
|
default |
copy a time step
References TimeStep().
|
inline |
return current time step
Definition at line 80 of file TimeStep.h.
References _current.
Referenced by NumLib::IterationNumberBasedTimeStepping::getNextTimeStepSize(), NumLib::EvolutionaryPIDcontroller::limitStepSize(), NumLib::FixedTimeStepping::next(), and operator<<.
|
inline |
time step size from _previous
Definition at line 82 of file TimeStep.h.
References _dt.
Referenced by NumLib::canReduceTimestepSize(), NumLib::IterationNumberBasedTimeStepping::getNextTimeStepSize(), NumLib::EvolutionaryPIDcontroller::limitStepSize(), NumLib::EvolutionaryPIDcontroller::next(), NumLib::IterationNumberBasedTimeStepping::next(), operator+=(), and operator<<.
|
inline |
Definition at line 87 of file TimeStep.h.
References _is_accepted.
Referenced by NumLib::IterationNumberBasedTimeStepping::getNextTimeStepSize(), NumLib::EvolutionaryPIDcontroller::next(), NumLib::IterationNumberBasedTimeStepping::next(), and operator<<.
|
inline |
increment time step
Definition at line 68 of file TimeStep.h.
References TimeStep(), _current, _dt, _previous, _time_step_number, and dt().
copy a time step
References TimeStep().
|
inline |
return previous time step
Definition at line 78 of file TimeStep.h.
References _previous.
Referenced by NumLib::IterationNumberBasedTimeStepping::next(), and operator<<.
|
inline |
Definition at line 86 of file TimeStep.h.
References _is_accepted.
Referenced by NumLib::EvolutionaryPIDcontroller::next(), and NumLib::IterationNumberBasedTimeStepping::next().
|
inline |
the time step number
Definition at line 84 of file TimeStep.h.
References _time_step_number.
Referenced by NumLib::IterationNumberBasedTimeStepping::getNextTimeStepSize(), NumLib::EvolutionaryPIDcontroller::next(), NumLib::FixedTimeStepping::next(), NumLib::IterationNumberBasedTimeStepping::next(), and operator<<.
|
friend |
Definition at line 89 of file TimeStep.h.
References TimeStep(), current(), dt(), isAccepted(), previous(), and timeStepNumber().
|
private |
current time step
Definition at line 101 of file TimeStep.h.
Referenced by TimeStep(), TimeStep(), current(), and operator+=().
|
private |
time step size
Definition at line 103 of file TimeStep.h.
Referenced by TimeStep(), TimeStep(), dt(), and operator+=().
|
private |
is the timestep accepted
Definition at line 107 of file TimeStep.h.
Referenced by isAccepted(), and setAccepted().
|
private |
previous time step
Definition at line 99 of file TimeStep.h.
Referenced by TimeStep(), TimeStep(), operator+=(), and previous().
|
private |
the number of time steps
Definition at line 105 of file TimeStep.h.
Referenced by TimeStep(), TimeStep(), operator+=(), and timeStepNumber().