From ac07fc4522a65549d174c80dd1758a904cab6415 Mon Sep 17 00:00:00 2001 From: bangerth Date: Sun, 13 Jan 2013 19:59:59 +0000 Subject: [PATCH] Remove some uses of a deprecated function. git-svn-id: https://svn.dealii.org/trunk@28039 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/lac/constraint_matrix.templates.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/deal.II/include/deal.II/lac/constraint_matrix.templates.h b/deal.II/include/deal.II/lac/constraint_matrix.templates.h index d1ad4d3565..1d21d55f8b 100644 --- a/deal.II/include/deal.II/lac/constraint_matrix.templates.h +++ b/deal.II/include/deal.II/lac/constraint_matrix.templates.h @@ -259,24 +259,26 @@ ConstraintMatrix::condense (const SparseMatrix &uncondensed, // copy entries if column will not // be condensed away, distribute // otherwise - for (unsigned int j=uncondensed_struct.get_rowstart_indices()[row]; - j::const_iterator + p = uncondensed.begin(row); + p != uncondensed.end(row); ++p) + if (new_line[p->column()] != -1) + condensed.add (new_line[row], + new_line[p->column()], + p->value()); else { // let c point to the // constraint of this column std::vector::const_iterator c = lines.begin(); - while (c->line != uncondensed_struct.get_column_numbers()[j]) + while (c->line != p->column()) ++c; for (unsigned int q=0; q!=c->entries.size(); ++q) // distribute to rows with // appropriate weight condensed.add (new_line[row], new_line[c->entries[q].first], - uncondensed.global_entry(j) * c->entries[q].second); + p->value() * c->entries[q].second); // take care of inhomogeneity: // need to subtract this element from the @@ -285,7 +287,7 @@ ConstraintMatrix::condense (const SparseMatrix &uncondensed, // row of the inhomogeneous constraint in // the matrix with Gauss elimination if (use_vectors == true) - condensed_vector(new_line[row]) -= uncondensed.global_entry(j) * + condensed_vector(new_line[row]) -= p->value() * c->inhomogeneity; } -- 2.39.5