3.4
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Public Member Functions | List of all members
Dumux::TimeLoopBase< Scalar > Class Template Referenceabstract

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

#include <dumux/common/timeloop.hh>

Inheritance diagram for Dumux::TimeLoopBase< Scalar >:

Description

template<class Scalar>
class Dumux::TimeLoopBase< Scalar >

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.

Note
Time and time step sizes are in units of seconds

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

Constructor & Destructor Documentation

◆ ~TimeLoopBase()

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

Abstract base class needs virtual constructor.

Member Function Documentation

◆ advanceTimeStep()

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

Advance to the next time step.

Implemented in Dumux::TimeLoop< Scalar >, and Dumux::CheckPointTimeLoop< Scalar >.

◆ finished()

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

Returns true if the simulation is finished.

Implemented in Dumux::TimeLoop< Scalar >.

◆ maxTimeStepSize()

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

Get the maximum possible time step size \(\mathrm{[s]}\).

Implemented in Dumux::TimeLoop< Scalar >, and Dumux::CheckPointTimeLoop< Scalar >.

◆ setTimeStepSize()

template<class Scalar >
virtual void Dumux::TimeLoopBase< Scalar >::setTimeStepSize ( Scalar  dt)
pure virtual

Set the current time step size to a given value.

Parameters
dtThe new value for the time step size \(\mathrm{[s]}\)

Implemented in Dumux::TimeLoop< Scalar >.

◆ time()

template<class Scalar >
virtual Scalar Dumux::TimeLoopBase< Scalar >::time ( ) const
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 >.

◆ timeStepSize()

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

Returns the suggested time step length \(\mathrm{[s]}\).

Implemented in Dumux::TimeLoop< Scalar >.


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