Commit 10addd30 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

[newton] use new instead of deprecated variable names



git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@14179 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent c5da4577
......@@ -62,14 +62,14 @@ public:
{
// calculate the relative error as the maximum relative
// deflection in any degree of freedom.
this->error_ = 0;
this->shift_ = 0;
for (int i = 0; i < int(uOld.base().size()); ++i) {
Scalar vertErr = std::abs(deltaU.base()[i]/(1.0 + std::abs((uOld.base()[i]) + uOld.base()[i] - deltaU.base()[i])/2));
this->error_ = std::max(this->error_, vertErr);
this->shift_ = std::max(this->shift_, vertErr);
}
this->error_ = this->gridView_().comm().max(this->error_);
this->shift_ = this->gridView_().comm().max(this->shift_);
}
void newtonUpdate(SolutionVector &uCurrentIter,
......
......@@ -206,7 +206,7 @@ public:
if (this->enablePartialReassemble_) {
const Scalar minReasmTol = 1e-2*this->tolerance_;
const Scalar maxReasmTol = 1e1*this->tolerance_;
Scalar reassembleTol = std::max(minReasmTol, std::min(maxReasmTol, this->error_/1e4));
Scalar reassembleTol = std::max(minReasmTol, std::min(maxReasmTol, this->shift_/1e4));
this->model_().jacobianAssembler().updateDiscrepancy(uLastIter, deltaU);
this->model_().jacobianAssembler().computeColors(reassembleTol);
......@@ -232,8 +232,8 @@ public:
if (this->enableResidualCriterion_)
{
SolutionVector tmp(uLastIter);
this->absoluteError_ = this->method().model().globalResidual(tmp, uCurrentIter);
this->absoluteError_ /= this->initialAbsoluteError_;
this->reduction_ = this->method().model().globalResidual(tmp, uCurrentIter);
this->reduction_ /= this->initialResidual_;
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment