From e0936e0e28da723a8f313c6034c7e5aea1f148f3 Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Wed, 16 Nov 2011 12:03:16 +0000 Subject: [PATCH] Clear the column as well, for great justice With this change, we're back at r4848 (modulo cosmetic changes) Oliver and I agreed that this change does not break anything. Carsten and I agreed that it's not a bad idea. [[Imported from SVN: r4857]] --- dune/solvers/iterationsteps/blockgsstep.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dune/solvers/iterationsteps/blockgsstep.cc b/dune/solvers/iterationsteps/blockgsstep.cc index 66144ef1..8f49cc47 100644 --- a/dune/solvers/iterationsteps/blockgsstep.cc +++ b/dune/solvers/iterationsteps/blockgsstep.cc @@ -64,8 +64,16 @@ void BlockGSStep<OperatorType, DiscFuncType, BitVectorType>::iterate() if ((*this->ignoreNodes_)[i][j]) { r[j] = 0; - for (int k = 0; k < BlockSize; ++k) - matRes[j][k] = (k==j); + for (int k = 0; k < BlockSize; ++k) { + if (k == j) + continue; + + matRes[j][k] = 0; + // Since r[j] is zero anyway, this changes + // nothing but simplifies solving + matRes[k][j] = 0; + } + matRes[j][j] = 1; } } matRes.solve(v, r); -- GitLab