From: Martin Kronbichler Date: Tue, 30 Jun 2009 06:04:39 +0000 (+0000) Subject: Inhomogeneity was applied in the wrong block when merging constraints. X-Git-Tag: v8.0.0~7555 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a16d451ed27c1b9c4db42f00aee7ff77a7494e2a;p=dealii.git Inhomogeneity was applied in the wrong block when merging constraints. git-svn-id: https://svn.dealii.org/trunk@19004 0785d39b-7218-0410-832d-ea1e28bc413d --- 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