6#include <amdis/AdaptInfo.hpp>
7#include <amdis/Flag.hpp>
8#include <amdis/Initfile.hpp>
9#include <amdis/ProblemIterationInterface.hpp>
10#include <amdis/ProblemStatBase.hpp>
14 template <
class ProblemType>
19 using Problem = ProblemType;
21 using SolutionVector =
typename Problem::SolutionVector;
44 msg(
"{:>5} | {:>12} | {:>8} | {:>8} ",
"iter.",
"error",
"red.",
"tol");
46 msg(
"{:5d} | {:12.5e} | {:->8} | {:8.2} ",
49 msg(
"{:5d} | {:12.5e} | {:8.2e} | {:8.2} ",
58 assert(n == 0);
return *
prob_;
72 std::string
const&
name()
const override {
return name_; }
86 template <
class Range = void,
class... Indices>
120 double errOld_ = -1.0;
125#include <amdis/nonlin/NewtonIteration.inc.hpp>
Holds adapt parameters and infos about the problem.
Definition: AdaptInfo.hpp:26
int spaceIteration() const
Returns spaceIteration_.
Definition: AdaptInfo.hpp:165
double spaceTolerance(Key key) const
Returns spaceTolerance.
Definition: AdaptInfo.hpp:404
The Flag class encapsulates flags which represents simple information. Used e.g. while mesh traversal...
Definition: Flag.hpp:14
static std::optional< T > get(std::string const &key)
Get parameter-values from parameter-tree.
Definition: Initfile.hpp:25
Definition: NewtonIteration.hpp:17
int buildCycle_
Build matrix every i'th iteration.
Definition: NewtonIteration.hpp:108
std::shared_ptr< SolutionVector const > stepSolutionVector() const
Returns const-ref of stepSolution_.
Definition: NewtonIteration.hpp:76
ProblemStatBase & problem(int n=0) override
Returns problemStat.
Definition: NewtonIteration.hpp:56
std::string name_
Name of the newton problem, used to access initfile parameters.
Definition: NewtonIteration.hpp:94
std::shared_ptr< SolutionVector > stepSolution_
Solution of the update step.
Definition: NewtonIteration.hpp:100
int numProblems() const override
Implementation of ProblemIterationInterface::numProblems.
Definition: NewtonIteration.hpp:62
Problem * prob_
Problem containing the Jacobian operators and objective function.
Definition: NewtonIteration.hpp:97
std::string const & name() const override
Returns the name of the problem.
Definition: NewtonIteration.hpp:72
ProblemStatBase & problem(std::string const &name) override
Returns the problem with the given name.
Definition: NewtonIteration.hpp:65
NewtonIteration(std::string name, Problem &prob)
Constructs a nonlinear iteration scheme.
Definition: NewtonIteration.hpp:25
auto stepSolution(Indices... ii) const
Return a const view to a stepSolution component.
Definition: NewtonIteration.hpp:87
void endIteration(AdaptInfo &adaptInfo) override
Implementation of ProblemIterationInterface::endIteration.
Definition: NewtonIteration.hpp:42
int norm_
Type of norm to use for estimating the error.
Definition: NewtonIteration.hpp:116
void beginIteration(AdaptInfo &) override
Implementation of ProblemIterationInterface::beginIteration.
Definition: NewtonIteration.hpp:36
Flag oneIteration(AdaptInfo &adaptInfo, Flag toDo) override
Implementation of ProblemIterationInterface::oneIteration.
Definition: NewtonIteration.inc.hpp:9
Interface for master problems needed by the adaption loop. A master problem can handle one single or ...
Definition: ProblemIterationInterface.hpp:30
Interface for time independent problems. Concrete problems must override all pure virtual methods....
Definition: ProblemStatBase.hpp:59