AMDiS 2.10
The Adaptive Multi-Dimensional Simulation Toolbox
AdaptInstationary Class Reference

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

#include <AdaptInstationary.hpp>

Inherits AdaptBase.

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
 Implementation of AdaptBase::adapt() More...
 
- Public Member Functions inherited from AdaptBase
 AdaptBase (std::string const &name, ProblemIterationInterface *problemIteration, AdaptInfo &adaptInfo, ProblemTimeInterface *problemTime=nullptr, AdaptInfo *initialAdaptInfo=nullptr)
 Constructor.
 
virtual ~AdaptBase ()=default
 Destructor.
 
virtual int adapt ()=0
 Pure virtual method. Must be overloaded by sub classes to perform a concrete adaption loop. More...
 
std::string const & name () const
 Returns name.
 
ProblemIterationInterfaceproblemIteration () const
 Returns problemIteration.
 
void setProblemIteration (ProblemIterationInterface *problemIteration)
 
AdaptInfoadaptInfo () const
 Returns adaptInfo.
 
ProblemTimeInterfaceproblemTime () const
 Returns problemTime.
 
void setProblemTime (ProblemTimeInterface *problemTime)
 
AdaptInfoinitialAdaptInfo () const
 Returns initialAdaptInfo.
 

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().
 
void simpleAdaptiveTimeStrategy ()
 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.
 
AdaptInfoadaptInfo_
 Main adapt info.
 
ProblemTimeInterfaceproblemTime_
 problem time interface
 
AdaptInfoinitialAdaptInfo_
 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()

Member Function Documentation

◆ adapt()

Member Data Documentation

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

Referenced by AdaptInstationary::AdaptInstationary(), and AdaptInstationary::adapt().


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