From af4fcca2a446b8590ddb6327da60f2189e15c097 Mon Sep 17 00:00:00 2001 From: kronbichler Date: Tue, 24 Feb 2009 13:59:41 +0000 Subject: [PATCH] Fixed some more issues with inhomogeneous constraints. git-svn-id: https://svn.dealii.org/trunk@18421 0785d39b-7218-0410-832d-ea1e28bc413d --- .../include/dofs/dof_constraints.templates.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/deal.II/deal.II/include/dofs/dof_constraints.templates.h b/deal.II/deal.II/include/dofs/dof_constraints.templates.h index a8913a81f7..a1ffb952c5 100644 --- a/deal.II/deal.II/include/dofs/dof_constraints.templates.h +++ b/deal.II/deal.II/include/dofs/dof_constraints.templates.h @@ -311,6 +311,13 @@ ConstraintMatrix::condense (const SparseMatrix &uncondensed, uncondensed.global_entry(j) * next_constraint->entries[q].second * c->entries[p].second); + + if (use_vectors == true) + for (unsigned int q=0; q!=next_constraint->entries.size(); ++q) + condensed_vector (new_line[next_constraint->entries[q].first]) + -= uncondensed.global_entry(j) * + next_constraint->entries[q].second * + c->inhomogeneity; }; // condense the vector @@ -406,8 +413,8 @@ ConstraintMatrix::condense (SparseMatrix &uncondensed, // row of the inhomogeneous constraint in // the matrix with Gauss elimination if (use_vectors == true) - vec(column) -= entry->value() * - lines[distribute[column]].inhomogeneity; + vec(row) -= + entry->value() * lines[distribute[column]].inhomogeneity; // set old value to zero entry->value() = 0.; @@ -470,7 +477,7 @@ ConstraintMatrix::condense (SparseMatrix &uncondensed, if (use_vectors == true) vec(lines[distribute[row]].entries[p].first) -= entry->value() * lines[distribute[row]].entries[p].second * - lines[distribute[row]].inhomogeneity; + lines[distribute[column]].inhomogeneity; } // set old entry to correct @@ -604,8 +611,8 @@ ConstraintMatrix::condense (BlockSparseMatrix &uncondensed, // row of the inhomogeneous constraint in // the matrix with Gauss elimination if (use_vectors == true) - vec(global_col) -= entry->value() * - lines[distribute[global_col]].inhomogeneity; + vec(row) -= entry->value() * + lines[distribute[global_col]].inhomogeneity; entry->value() = 0.; } -- 2.39.5