From a16d451ed27c1b9c4db42f00aee7ff77a7494e2a Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Tue, 30 Jun 2009 06:04:39 +0000 Subject: [PATCH] Inhomogeneity was applied in the wrong block when merging constraints. git-svn-id: https://svn.dealii.org/trunk@19004 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/source/constraint_matrix.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deal.II/lac/source/constraint_matrix.cc b/deal.II/lac/source/constraint_matrix.cc index 8f97d2a0cc..2762c836df 100644 --- a/deal.II/lac/source/constraint_matrix.cc +++ b/deal.II/lac/source/constraint_matrix.cc @@ -676,16 +676,16 @@ void ConstraintMatrix::merge (const ConstraintMatrix &other_constraints) { Assert (tmp_other_lines[i]->line == line->entries[i].first, ExcInternalError()); - + const double weight = line->entries[i].second; for (std::vector >::const_iterator j=tmp_other_lines[i]->entries.begin(); j!=tmp_other_lines[i]->entries.end(); ++j) tmp.push_back (std::make_pair(j->first, j->second*weight)); + line->inhomogeneity += tmp_other_lines[i]->inhomogeneity * + line->entries[i].second; }; - line->inhomogeneity += tmp_other_lines[i]->inhomogeneity * - line->entries[i].second; }; // finally exchange old and // newly resolved line -- 2.39.5