Standard implementation of ProblemTimeInterface for a time dependent problems. More...
#include <ProblemInstat.hpp>
Inherits ProblemInstatBase.
Public Member Functions | |
| ProblemInstat (std::string const &name, ProblemType &prob) | |
| Constructs a ProblemInstat with prob as its stationary problem, stored as reference. | |
| ProblemInstat (std::string const &name, ProblemType &prob, ProblemStatBase &initialProb) | |
| Constructor. Stores a reference to prob and initialProb. | |
| void | initialize (Flag initFlag=INIT_NOTHING) |
| Initialisation of the problem. | |
| void | initTimestep (AdaptInfo &adaptInfo) override |
| Implementation of ProblemTimeInterface::initTimestep(). More... | |
| void | closeTimestep (AdaptInfo &adaptInfo) override |
| Implementation of ProblemTimeInterface::closeTimestep(). More... | |
| ProblemType & | problemStat () |
| Returns problemStat. | |
| ProblemType const & | problemStat () const |
| std::shared_ptr< SolutionVector const > | oldSolutionVector () const |
| Returns const-ref of oldSolution. | |
| std::shared_ptr< SolutionVector > | oldSolutionVector () |
| Returns ref of oldSolution. | |
| template<class Range = void, class... Indices> | |
| auto | oldSolution (Indices... ii) const |
| Return a const view to a oldSolution component. More... | |
| void | transferInitialSolution (AdaptInfo &adaptInfo) override |
| Implementation of ProblemTimeInterface::transferInitialSolution(). More... | |
Public Member Functions inherited from ProblemInstatBase | |
| ProblemInstatBase (std::string const &name) | |
| Constructor. | |
| ProblemInstatBase (std::string const &name, ProblemStatBase &initialProblem) | |
| Constructor. Stores a pointer to the provided initialProblem. | |
| ~ProblemInstatBase () override=default | |
| Destructor. | |
| void | setTime (AdaptInfo &adaptInfo) override |
| Implementation of ProblemTimeInterface::setTime(). More... | |
| void | solveInitialProblem (AdaptInfo &adaptInfo) override |
| Implementation of ProblemTimeInterface::solveInitialProblem(). More... | |
| virtual std::string const & | name () const |
| Return the name of the instationary problem name_. | |
| double const & | time () const |
| double const & | tau () const & |
| double const & | invTau () const |
Public Member Functions inherited from ProblemTimeInterface | |
| virtual void | initTimeInterface () |
| Called at the beginning of the adaption loop before any other call. | |
| virtual void | setTime (AdaptInfo &adaptInfo)=0 |
| Executes all needed operations when the simulation time changes. More... | |
| virtual void | initTimestep (AdaptInfo &adaptInfo)=0 |
| Called at the beginning of each timestep. More... | |
| virtual void | closeTimestep (AdaptInfo &adaptInfo)=0 |
| Called at the end of each timestep. More... | |
| virtual void | solveInitialProblem (AdaptInfo &adaptInfo)=0 |
| Solves the initial problem. More... | |
| virtual void | transferInitialSolution (AdaptInfo &adaptInfo)=0 |
| Transfer the initial problem. More... | |
Protected Member Functions | |
| void | createUhOld () |
| Used in initialize() to create the oldSolution_. | |
Protected Attributes | |
| ProblemType * | problemStat_ |
| Space problem solved in each timestep. (non-owning pointer) | |
| std::shared_ptr< SolutionVector > | oldSolution_ |
| Solution of the last timestep. | |
Protected Attributes inherited from ProblemInstatBase | |
| std::string | name_ |
| Name of the instationary problem. | |
| ProblemStatBase * | initialProblem_ = nullptr |
| An initialization problem solved in solveInitialProblem(). non-owning pointer. | |
| double | time_ = 0.0 |
| The current time, set from adaptInfo.time() | |
| double | tau_ = 1.0 |
| Timestep, set from adaptInfo.timestep() | |
| double | invTau_ = 1.0 |
| 1 / timestep, calculated after timestep is set | |
Standard implementation of ProblemTimeInterface for a time dependent problems.
|
overridevirtual |
Implementation of ProblemTimeInterface::closeTimestep().
Implements ProblemTimeInterface.
References AdaptInfo::endTime(), and AdaptInfo::time().
|
overridevirtual |
Implementation of ProblemTimeInterface::initTimestep().
Implements ProblemTimeInterface.
|
inline |
Return a const view to a oldSolution component.
| Range | The range type return by evaluating the view in coordinates. If not specified, it is automatically selected using RangeType_t template. |
References ProblemInstat< Traits >::oldSolution_.
|
overridevirtual |
Implementation of ProblemTimeInterface::transferInitialSolution().
Implements ProblemTimeInterface.
References AdaptInfo::startTime(), and AdaptInfo::time().