AMDiS 2.10
The Adaptive Multi-Dimensional Simulation Toolbox
AdaptInstationary.hpp
1#pragma once
2
3// std c++ headers
4#include <string>
5
6// AMDiS includes
7#include "AdaptBase.hpp"
8
9namespace AMDiS
10{
11 // forward declarations
12 class AdaptInfo;
13 class ProblemIterationInterface;
14 class ProblemTimeInterface;
15
23 : public AdaptBase
24 {
25 public:
28 AdaptInstationary(std::string const& name,
29 ProblemIterationInterface& problemStat,
30 AdaptInfo& info,
31 ProblemTimeInterface& problemInstat,
32 AdaptInfo& initialInfo);
33
36 {
38 }
39
41 int strategy() const
42 {
43 return strategy_;
44 }
45
47 int adapt() override;
48
49 protected:
59 virtual void oneTimestep();
60
62 virtual void explicitTimeStrategy();
63
65 virtual void implicitTimeStrategy();
66
73
74 protected:
76 int strategy_ = 0;
77
79 double timeDelta1_ = 0.7071;
80
82 double timeDelta2_ = 1.4142;
83
86 bool breakWhenStable_ = false;
87
90 };
91
92} // end namespace AMDiS
Interface for adaption loops.
Definition: AdaptBase.hpp:15
std::string const & name() const
Returns name.
Definition: AdaptBase.hpp:40
Holds adapt parameters and infos about the problem.
Definition: AdaptInfo.hpp:26
AdaptInstationary implements the adaptive procedure for time dependent problems (see ProblemInstat)....
Definition: AdaptInstationary.hpp:24
bool breakWhenStable_
Definition: AdaptInstationary.hpp:86
int strategy_
Strategy for choosing one timestep.
Definition: AdaptInstationary.hpp:76
double timeDelta1_
Parameter used in time step reduction.
Definition: AdaptInstationary.hpp:79
AdaptInstationary(std::string const &name, ProblemIterationInterface &problemStat, AdaptInfo &info, ProblemTimeInterface &problemInstat, AdaptInfo &initialInfo)
Definition: AdaptInstationary.cpp:15
virtual void implicitTimeStrategy()
Implements the implicit time strategy. Used by oneTimestep().
Definition: AdaptInstationary.cpp:57
double timeDelta2_
Parameter used in time step enlargement.
Definition: AdaptInstationary.hpp:82
int strategy() const
Returns strategy.
Definition: AdaptInstationary.hpp:41
int adapt() override
Implementation of AdaptBase::adapt()
Definition: AdaptInstationary.cpp:200
virtual void oneTimestep()
Implements one (maybe adaptive) timestep. Both the explicit and the implicit time strategy are implem...
Definition: AdaptInstationary.cpp:175
virtual void explicitTimeStrategy()
Implements the explit time strategy. Used by oneTimestep().
Definition: AdaptInstationary.cpp:31
void simpleAdaptiveTimeStrategy()
This iteration strategy allows the timestep and the mesh to be adapted after each timestep solution....
Definition: AdaptInstationary.cpp:146
void setStrategy(int strategy)
Sets strategy to aStrategy.
Definition: AdaptInstationary.hpp:35
bool fixedTimestep_
min-timestep == max-timestep
Definition: AdaptInstationary.hpp:89
Interface for master problems needed by the adaption loop. A master problem can handle one single or ...
Definition: ProblemIterationInterface.hpp:30
Interface for time dependent problems. Concrete problems must override all pure virtual methods.
Definition: ProblemTimeInterface.hpp:15