From 1c75a3b26463469ed21a7b8469830b3aa07ff858 Mon Sep 17 00:00:00 2001 From: Jonathan Youett <youett@math.fu-berlin.de> Date: Fri, 13 Jun 2014 14:15:10 +0200 Subject: [PATCH] Bugfix: If some degree of freedom is truncated, then don't do anything for that component --- dune/solvers/iterationsteps/trustregiongsstep.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dune/solvers/iterationsteps/trustregiongsstep.cc b/dune/solvers/iterationsteps/trustregiongsstep.cc index bc1df55f..6aebc188 100644 --- a/dune/solvers/iterationsteps/trustregiongsstep.cc +++ b/dune/solvers/iterationsteps/trustregiongsstep.cc @@ -74,6 +74,11 @@ void TrustRegionGSStep<MatrixType, VectorType>::iterate() } } else { + + // If the corresponding dof was truncated, then compute no correction + if (diag==0 && r == 0) + continue; + // 1d problem is concave or linear. // Minimum is attained at one of the boundaries field_type lBound = obstacles[i].lower(j); -- GitLab