diff --git a/dune/solvers/iterationsteps/obstacletnnmgstep.hh b/dune/solvers/iterationsteps/obstacletnnmgstep.hh index 41e89e07281031238f78b71520a3b8fac9713682..2a6f0f9b21f1a2075cb9fd25b8538102deee5639 100644 --- a/dune/solvers/iterationsteps/obstacletnnmgstep.hh +++ b/dune/solvers/iterationsteps/obstacletnnmgstep.hh @@ -274,9 +274,12 @@ class ObstacleTNNMGStep for (int j = 0; j < blockSize; ++j) { + auto const inverseCoarseCorrection = + field_type(1) / coarseCorrection_[i][j]; + // compute relative defect constraints - defectConstraint.lower(j) /= coarseCorrection_[i][j]; - defectConstraint.upper(j) /= coarseCorrection_[i][j]; + defectConstraint.lower(j) *= inverseCoarseCorrection; + defectConstraint.upper(j) *= inverseCoarseCorrection; // orient relative defect constraints if (defectConstraint.lower(j) > defectConstraint.upper(j))