3#include <amdis/Integrate.hpp>
4#include <amdis/operations/Arithmetic.hpp>
8template <
class Problem>
11 if (!toDo.
isSet(SOLVE))
15 if (iter <= 0 || (buildCycle_ > 0 && (iter-1) % buildCycle_ == 0)) {
16 prob_->buildAfterAdapt(adaptInfo, 0,
true,
true);
17 prob_->solver()->init(prob_->systemMatrix()->impl());
20 prob_->buildAfterAdapt(adaptInfo, 0,
false,
true);
24 stepSolution_->resizeZero();
27 Dune::InverseOperatorResult stat;
28 prob_->solver()->apply(stepSolution_->impl(), prob_->rhsVector()->impl(), stat);
31 Recursive::transform(prob_->solutionVector()->impl(),
32 Operation::Plus{}, prob_->solutionVector()->impl(), stepSolution_->impl());
35 err_ = integrate(sqr(this->stepSolution()), prob_->gridView());
37 err_ += integrate(unary_dot(
gradientOf(this->stepSolution())), prob_->gridView());
38 err_ = std::sqrt(err_);
Holds adapt parameters and infos about the problem.
Definition: AdaptInfo.hpp:26
int spaceIteration() const
Returns spaceIteration_.
Definition: AdaptInfo.hpp:165
void setEstSum(double e, Key key)
Sets est_sum.
Definition: AdaptInfo.hpp:285
The Flag class encapsulates flags which represents simple information. Used e.g. while mesh traversal...
Definition: Flag.hpp:14
constexpr bool isSet(Flag const &f) const
Checks whether all set bits of f.flags_ are set in flags_ too.
Definition: Flag.hpp:156
Flag oneIteration(AdaptInfo &adaptInfo, Flag toDo) override
Implementation of ProblemIterationInterface::oneIteration.
Definition: NewtonIteration.inc.hpp:9
auto gradientOf(Expr const &expr)
Definition: DerivativeGridFunction.hpp:185
Functor that represents A+B.
Definition: Arithmetic.hpp:20