Manages the handling of time dependent problems. More...
#include <dumux/common/timeloop.hh>
This class facilitates the time management of the simulation. It doesn't manage any user data, but keeps track of what the current time, time step size and "episode" of the simulation is. It triggers the initialization of the problem and is responsible for the time control of a simulation run.
The time manager allows to specify a sequence of "episodes" which determine the boundary conditions of a problem. This approach is handy if the problem is not static, i.e. the boundary conditions change over time.
An episode is a span of simulated time in which the problem behaves in a specific way. It is characterized by the (simulation) time it starts, its length and a consecutive index starting at 0.
Public Types | |
using | Scalar = S |
Public Member Functions | |
virtual | ~TimeLoopBase () |
Abstract base class needs virtual constructor. More... | |
virtual Scalar | time () const =0 |
Return the time \(\mathrm{[s]}\) before the time integration. To get the time after the time integration you have to add timeStepSize() to time(). More... | |
virtual Scalar | timeStepSize () const =0 |
Returns the suggested time step length \(\mathrm{[s]}\). More... | |
virtual Scalar | maxTimeStepSize () const =0 |
Get the maximum possible time step size \(\mathrm{[s]}\). More... | |
virtual void | advanceTimeStep ()=0 |
Advance to the next time step. More... | |
virtual void | setTimeStepSize (Scalar dt)=0 |
Set the current time step size to a given value. More... | |
template<class Rep , class Period > | |
void | setTimeStepSize (std::chrono::duration< Rep, Period > dt) |
Set the current time step size to a given value. More... | |
virtual bool | finished () const =0 |
Returns true if the simulation is finished. More... | |
using Dumux::TimeLoopBase< S >::Scalar = S |
|
inlinevirtual |
|
pure virtual |
Implemented in Dumux::TimeLoop< Scalar >, and Dumux::CheckPointTimeLoop< Scalar >.
|
pure virtual |
Implemented in Dumux::TimeLoop< Scalar >.
|
pure virtual |
Implemented in Dumux::TimeLoop< Scalar >, and Dumux::CheckPointTimeLoop< Scalar >.
|
pure virtual |
dt | The new value for the time step size \(\mathrm{[s]}\) |
Implemented in Dumux::TimeLoop< Scalar >.
|
inline |
dt | The new value for the time step size \(\mathrm{[s]}\) |
|
pure virtual |
Implemented in Dumux::TimeLoop< Scalar >.
|
pure virtual |
Implemented in Dumux::TimeLoop< Scalar >.