AMDiS  0.1 The Adaptive Multi-Dimensional Simulation Toolbox

AdaptInstationary implements the adaptive procedure for time dependent problems (see ProblemInstat). It contains a pointer to a ProblemInstat object. More...

#include <AdaptInstationary.hpp>

Public Member Functions

AdaptInstationary (std::string const &name, ProblemIterationInterface &problemStat, AdaptInfo &info, ProblemTimeInterface &problemInstat, AdaptInfo &initialInfo)

void setStrategy (int strategy)
Sets strategy to aStrategy.

int strategy () const
Returns strategy.

int adapt () override

Public Member Functions inherited from AdaptBase
Constructor.

Destructor.

std::string const & name () const
Returns name.

ProblemIterationInterfaceproblemIteration () const
Returns problemIteration.

void setProblemIteration (ProblemIterationInterface *problemIteration)

ProblemTimeInterfaceproblemTime () const
Returns problemTime.

void setProblemTime (ProblemTimeInterface *problemTime)

Protected Member Functions

virtual void oneTimestep ()
Implements one (maybe adaptive) timestep. Both the explicit and the implicit time strategy are implemented. The semi-implicit strategy is only a special case of the implicit strategy with a limited number of iterations (exactly one). The routine uses the parameter strategy to select the strategy: strategy 0: Explicit strategy, strategy 1: Implicit strategy.

virtual void explicitTimeStrategy ()
Implements the explit time strategy. Used by oneTimestep().

virtual void implicitTimeStrategy ()
Implements the implicit time strategy. Used by oneTimestep().

This iteration strategy allows the timestep and the mesh to be adapted after each timestep solution. There are no inner loops for mesh adaption and no refused timesteps.

Protected Attributes

int strategy_ = 0
Strategy for choosing one timestep.

double timeDelta1_ = 0.7071
Parameter $$\delta_1$$ used in time step reduction.

double timeDelta2_ = 1.4142
Parameter $$\delta_2$$ used in time step enlargement.

bool breakWhenStable_ = false

bool fixedTimestep_
min-timestep == max-timestep

Protected Attributes inherited from AdaptBase
std::string name_
Name of the adaption loop.

ProblemIterationInterfaceproblemIteration_
Problem iteration interface.

ProblemTimeInterfaceproblemTime_
problem time interface

Adapt info for initial adapt. Will be given to problemTime->solveInitialProblem().

Detailed Description

AdaptInstationary implements the adaptive procedure for time dependent problems (see ProblemInstat). It contains a pointer to a ProblemInstat object.

Constructor & Destructor Documentation

 AdaptInstationary ( std::string const & name, ProblemIterationInterface & problemStat, AdaptInfo & info, ProblemTimeInterface & problemInstat, AdaptInfo & initialInfo )

Creates a AdaptInstationary object with the given name for the time dependent problem problemInstat.

◆ breakWhenStable_

 bool breakWhenStable_ = false
protected

If this parameter is 1 and the instationary problem is stable, hence the number of solver iterations to solve the problem is zero, the adaption loop will stop.