version 3.10-dev
Dumux::TimeLoopBase< S > Class Template Referenceabstract

Manages the handling of time dependent problems. More...

#include <dumux/common/timeloop.hh>

Inheritance diagram for Dumux::TimeLoopBase< S >:

Description

template<class S>
class Dumux::TimeLoopBase< S >

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.

Note
Time and time step sizes are in units of seconds

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...
 

Member Typedef Documentation

◆ Scalar

template<class S >
using Dumux::TimeLoopBase< S >::Scalar = S

Constructor & Destructor Documentation

◆ ~TimeLoopBase()

template<class S >
virtual Dumux::TimeLoopBase< S >::~TimeLoopBase ( )
inlinevirtual

Member Function Documentation

◆ advanceTimeStep()

template<class S >
virtual void Dumux::TimeLoopBase< S >::advanceTimeStep ( )
pure virtual

◆ finished()

template<class S >
virtual bool Dumux::TimeLoopBase< S >::finished ( ) const
pure virtual

Implemented in Dumux::TimeLoop< Scalar >.

◆ maxTimeStepSize()

template<class S >
virtual Scalar Dumux::TimeLoopBase< S >::maxTimeStepSize ( ) const
pure virtual

◆ setTimeStepSize() [1/2]

template<class S >
virtual void Dumux::TimeLoopBase< S >::setTimeStepSize ( Scalar  dt)
pure virtual
Parameters
dtThe new value for the time step size \(\mathrm{[s]}\)

Implemented in Dumux::TimeLoop< Scalar >.

◆ setTimeStepSize() [2/2]

template<class S >
template<class Rep , class Period >
void Dumux::TimeLoopBase< S >::setTimeStepSize ( std::chrono::duration< Rep, Period >  dt)
inline
Parameters
dtThe new value for the time step size \(\mathrm{[s]}\)

◆ time()

template<class S >
virtual Scalar Dumux::TimeLoopBase< S >::time ( ) const
pure virtual

Implemented in Dumux::TimeLoop< Scalar >.

◆ timeStepSize()

template<class S >
virtual Scalar Dumux::TimeLoopBase< S >::timeStepSize ( ) const
pure virtual

Implemented in Dumux::TimeLoop< Scalar >.


The documentation for this class was generated from the following file: