Manages the handling of time dependent problems. More...
#include <dumux/common/timeloop.hh>
Manages the handling of time dependent problems.
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 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... | |
virtual bool | finished () const =0 |
Returns true if the simulation is finished. More... | |
|
inlinevirtual |
Abstract base class needs virtual constructor.
|
pure virtual |
Advance to the next time step.
Implemented in Dumux::TimeLoop< Scalar >, and Dumux::CheckPointTimeLoop< Scalar >.
|
pure virtual |
Returns true if the simulation is finished.
Implemented in Dumux::TimeLoop< Scalar >.
|
pure virtual |
Get the maximum possible time step size \(\mathrm{[s]}\).
Implemented in Dumux::TimeLoop< Scalar >, and Dumux::CheckPointTimeLoop< Scalar >.
|
pure virtual |
Set the current time step size to a given value.
dt | The new value for the time step size \(\mathrm{[s]}\) |
Implemented in Dumux::TimeLoop< Scalar >.
|
pure virtual |
Return the time \(\mathrm{[s]}\) before the time integration. To get the time after the time integration you have to add timeStepSize() to time().
Implemented in Dumux::TimeLoop< Scalar >.
|
pure virtual |
Returns the suggested time step length \(\mathrm{[s]}\).
Implemented in Dumux::TimeLoop< Scalar >.