diff --git a/dune/solvers/solvers/loopsolver.cc b/dune/solvers/solvers/loopsolver.cc index 35f3b22e9f77c8acbd98ccbdbed9cac6c14127f1..62a3b8f527e0865a70bd6720cce153ab31c8a165 100644 --- a/dune/solvers/solvers/loopsolver.cc +++ b/dune/solvers/solvers/loopsolver.cc @@ -84,14 +84,13 @@ void ::LoopSolver<VectorType, BitVectorType>::solve() // Compute error double oldNorm = this->errorNorm_->operator()(oldSolution); - oldSolution -= iterationStep_->getSol(); - double normOfCorrection; double normOfError=std::numeric_limits<double>::quiet_NaN(); - double convRate; - normOfCorrection = this->errorNorm_->operator()(oldSolution); - convRate = normOfCorrection / normOfOldCorrection; + // Please don't replace this call to 'diff' by computing the norm of the difference. + // In some nonlinear DD applications the 'diff' method may be nonlinear. + double normOfCorrection = this->errorNorm_->diff(oldSolution,iterationStep_->getSol()); + double convRate = normOfCorrection / normOfOldCorrection; error = normOfCorrection; normOfOldCorrection = normOfCorrection;