From ca3b8543f1d7b9e761a945484a10e1e50a7c2177 Mon Sep 17 00:00:00 2001 From: kronbichler Date: Fri, 27 Mar 2009 16:44:47 +0000 Subject: [PATCH] Remove unnecessary code. git-svn-id: https://svn.dealii.org/trunk@18519 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/constraint_matrix.h | 21 ------- .../include/lac/constraint_matrix.templates.h | 58 +++++++++---------- 2 files changed, 26 insertions(+), 53 deletions(-) diff --git a/deal.II/lac/include/lac/constraint_matrix.h b/deal.II/lac/include/lac/constraint_matrix.h index 5a6554064c..9e3c9cb6a5 100644 --- a/deal.II/lac/include/lac/constraint_matrix.h +++ b/deal.II/lac/include/lac/constraint_matrix.h @@ -1426,27 +1426,6 @@ class ConstraintMatrix : public Subscriptor * time. */ mutable Threads::ThreadMutex mutex; - - /** - * A temporary array for the function - * distribute_local_to_global() - * that collects column indices for - * values that should be written into - * the same row (so that we can write - * the values collectively into the - * sparse matrix, which is faster). - */ - mutable std::vector column_indices; - - /** - * A temporary array for the function - * distribute_local_to_global() - * that collects values that should be - * written into the same row (so that - * we can write them collectively into - * the sparse matrix, which is faster). - */ - mutable std::vector column_values; }; diff --git a/deal.II/lac/include/lac/constraint_matrix.templates.h b/deal.II/lac/include/lac/constraint_matrix.templates.h index a9b4d1316f..faa035d712 100644 --- a/deal.II/lac/include/lac/constraint_matrix.templates.h +++ b/deal.II/lac/include/lac/constraint_matrix.templates.h @@ -738,37 +738,31 @@ distribute_local_to_global (const Vector &local_vector, // have a special case where there are no // constraints at all, since then we can be // a lot faster - if (lines.size() == 0) - { - for (unsigned int i=0; i::const_iterator - position = std::lower_bound (lines.begin(), - lines.end(), - index_comparison); + const std::vector::const_iterator + position = std::lower_bound (lines.begin(), + lines.end(), + index_comparison); // if the line is not // constrained, then simply @@ -799,12 +793,11 @@ distribute_local_to_global (const Vector &local_vector, // the nodes to which it is // constrained are also // fixed - Assert (position->line == local_dof_indices[i], - ExcInternalError()); - for (unsigned int j=0; jentries.size(); ++j) - global_vector(position->entries[j].first) - += local_vector(i) * position->entries[j].second; - } + Assert (position->line == local_dof_indices[i], + ExcInternalError()); + for (unsigned int j=0; jentries.size(); ++j) + global_vector(position->entries[j].first) + += local_vector(i) * position->entries[j].second; } } @@ -1535,8 +1528,9 @@ distribute_local_to_global (const FullMatrix &local_matrix, // ints (for global columns) and internal // data (containing local columns + // possible jumps from - // constraints). Choosing an STL map - // would be much more expensive here! + // constraints). Choosing an STL map or + // anything else I know of would be much + // more expensive here! typedef std::vector > row_data; row_data my_indices; my_indices.reserve(n_local_dofs); -- 2.39.5