From: Wolfgang Bangerth Date: Thu, 12 Feb 2015 18:35:03 +0000 (-0600) Subject: Remove the last function that shrinks linear systems. X-Git-Tag: v8.3.0-rc1~475^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F529%2Fhead;p=dealii.git Remove the last function that shrinks linear systems. --- diff --git a/include/deal.II/lac/constraint_matrix.h b/include/deal.II/lac/constraint_matrix.h index 1f66ae32a8..9fa5e86025 100644 --- a/include/deal.II/lac/constraint_matrix.h +++ b/include/deal.II/lac/constraint_matrix.h @@ -1041,22 +1041,6 @@ public: * @{ */ - /** - * Re-distribute the elements of the vector @p condensed to @p uncondensed. - * It is the user's responsibility to guarantee that all entries of @p - * uncondensed be zero! - * - * This function undoes the action of @p condense somehow, but it should be - * noted that it is not the inverse of @p condense. - * - * The @p VectorType may be a Vector, Vector, - * BlockVector<...>, a PETSc or Trilinos vector wrapper class, or - * any other type having the same interface. - */ - template - void distribute (const VectorType &condensed, - VectorType &uncondensed) const; - /** * Re-distribute the elements of the vector in-place. The @p VectorType may * be a Vector, Vector, BlockVector<...>, a PETSc or diff --git a/include/deal.II/lac/constraint_matrix.templates.h b/include/deal.II/lac/constraint_matrix.templates.h index 81866d2195..f34d1c05e0 100644 --- a/include/deal.II/lac/constraint_matrix.templates.h +++ b/include/deal.II/lac/constraint_matrix.templates.h @@ -681,79 +681,6 @@ distribute_local_to_global (const Vector &local_vector, -template -void -ConstraintMatrix::distribute (const VectorType &condensed, - VectorType &uncondensed) const -{ - Assert (sorted == true, ExcMatrixNotClosed()); - AssertDimension (condensed.size()+n_constraints(), uncondensed.size()); - - // store for each line of the new vector - // its old line number before - // distribution. If the shift is - // -1, this line was condensed away - std::vector old_line; - - old_line.reserve (uncondensed.size()); - - std::vector::const_iterator next_constraint = lines.begin(); - size_type shift = 0; - size_type n_rows = uncondensed.size(); - - if (next_constraint == lines.end()) - // if no constraint is to be handled - for (size_type row=0; row!=n_rows; ++row) - old_line.push_back (row); - else - for (size_type row=0; row!=n_rows; ++row) - if (row == next_constraint->line) - { - // this line is constrained - old_line.push_back (-1); - // note that @p lines is ordered - ++shift; - ++next_constraint; - if (next_constraint == lines.end()) - // nothing more to do; finish rest - // of loop - { - for (size_type i=row+1; iinhomogeneity; - // then add the different - // contributions - for (size_type i=0; ientries.size(); ++i) - uncondensed(line) += (condensed(old_line[next_constraint->entries[i].first]) * - next_constraint->entries[i].second); - ++next_constraint; - }; -} - - namespace internal { namespace diff --git a/source/lac/constraint_matrix.cc b/source/lac/constraint_matrix.cc index 43a4a812ec..a8d149398f 100644 --- a/source/lac/constraint_matrix.cc +++ b/source/lac/constraint_matrix.cc @@ -1616,9 +1616,7 @@ ConstraintMatrix::resolve_indices (std::vector &indices distribute_local_to_global (const Vector &, \ const std::vector &, \ VectorType &, \ - const FullMatrix &) const; \ - template void ConstraintMatrix::distribute(const VectorType &condensed,\ - VectorType &uncondensed) const + const FullMatrix &) const #define PARALLEL_VECTOR_FUNCTIONS(VectorType) \ template void ConstraintMatrix:: \ diff --git a/source/lac/constraint_matrix.inst.in b/source/lac/constraint_matrix.inst.in index 6e912d6bde..b805fb822f 100644 --- a/source/lac/constraint_matrix.inst.in +++ b/source/lac/constraint_matrix.inst.in @@ -19,7 +19,6 @@ for (S: REAL_SCALARS; T : DEAL_II_VEC_TEMPLATES) template void ConstraintMatrix::condense >(T &vec) const; template void ConstraintMatrix::distribute_local_to_global > ( const Vector&, const std::vector &, T &, const FullMatrix&) const; - template void ConstraintMatrix::distribute >(const T &, T &) const; template void ConstraintMatrix::set_zero >(T &) const; } @@ -30,7 +29,6 @@ for (S: REAL_SCALARS; T : DEAL_II_VEC_TEMPLATES) template void ConstraintMatrix::condense >(parallel::distributed::T &vec) const; template void ConstraintMatrix::distribute_local_to_global > ( const Vector&, const std::vector &, parallel::distributed::T &, const FullMatrix&) const; - template void ConstraintMatrix::distribute >(const parallel::distributed::T &, parallel::distributed::T &) const; template void ConstraintMatrix::set_zero >(parallel::distributed::T &) const; } @@ -41,7 +39,6 @@ for (V: EXTERNAL_SEQUENTIAL_VECTORS) template void ConstraintMatrix::condense(V&vec) const; template void ConstraintMatrix::distribute_local_to_global ( const Vector&, const std::vector &, V&, const FullMatrix&) const; - template void ConstraintMatrix::distribute(const V&, V&) const; template void ConstraintMatrix::set_zero(V&) const; }