]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove the last function that shrinks linear systems. 529/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 12 Feb 2015 18:35:03 +0000 (12:35 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 12 Feb 2015 18:35:03 +0000 (12:35 -0600)
include/deal.II/lac/constraint_matrix.h
include/deal.II/lac/constraint_matrix.templates.h
source/lac/constraint_matrix.cc
source/lac/constraint_matrix.inst.in

index 1f66ae32a8d3a22c82e335c384075dc188f50fce..9fa5e860254e8d183aa0012b0273ea52bbe64f03 100644 (file)
@@ -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<float>, Vector<double>,
-   * BlockVector<tt><...></tt>, a PETSc or Trilinos vector wrapper class, or
-   * any other type having the same interface.
-   */
-  template <class VectorType>
-  void distribute (const VectorType &condensed,
-                   VectorType       &uncondensed) const;
-
   /**
    * Re-distribute the elements of the vector in-place. The @p VectorType may
    * be a Vector<float>, Vector<double>, BlockVector<tt><...></tt>, a PETSc or
index 81866d21952c1e07501b2756c6d877b9a521a318..f34d1c05e0e44e351ca7d333de9f2c4508a6b86e 100644 (file)
@@ -681,79 +681,6 @@ distribute_local_to_global (const Vector<double>            &local_vector,
 
 
 
-template<class VectorType>
-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<int> old_line;
-
-  old_line.reserve (uncondensed.size());
-
-  std::vector<ConstraintLine>::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; i<n_rows; ++i)
-                old_line.push_back (i-shift);
-              break;
-            }
-        }
-      else
-        old_line.push_back (row-shift);
-
-
-  next_constraint = lines.begin();
-  // note: in this loop we need not check
-  // whether @p next_constraint is a valid
-  // iterator, since @p next_constraint is
-  // only evaluated so often as there are
-  // entries in new_line[*] which tells us
-  // which constraints exist
-  for (size_type line=0; line<uncondensed.size(); ++line)
-    if (old_line[line] != -1)
-      // line was not condensed away
-      uncondensed(line) = condensed(old_line[line]);
-    else
-      {
-        // line was condensed away,
-        // create it newly. first set
-        // it to zero
-        uncondensed(line) = next_constraint->inhomogeneity;
-        // then add the different
-        // contributions
-        for (size_type i=0; i<next_constraint->entries.size(); ++i)
-          uncondensed(line) += (condensed(old_line[next_constraint->entries[i].first]) *
-                                next_constraint->entries[i].second);
-        ++next_constraint;
-      };
-}
-
-
 namespace internal
 {
   namespace
index 43a4a812eceb49a6dab2b784a61ee426ff65f33a..a8d149398f9571b3de71469f167e5d9bde476cce 100644 (file)
@@ -1616,9 +1616,7 @@ ConstraintMatrix::resolve_indices (std::vector<types::global_dof_index> &indices
   distribute_local_to_global<VectorType > (const Vector<double>            &, \
                                            const std::vector<ConstraintMatrix::size_type>  &, \
                                            VectorType                      &, \
-                                           const FullMatrix<double>        &) const; \
-  template void ConstraintMatrix::distribute<VectorType >(const VectorType &condensed,\
-                                                          VectorType       &uncondensed) const
+                                           const FullMatrix<double>        &) const
 
 #define PARALLEL_VECTOR_FUNCTIONS(VectorType) \
   template void ConstraintMatrix:: \
index 6e912d6bde8f9d262255eb21ab695584607afbb3..b805fb822fa79077bcf151b9e611758bc22ab4ad 100644 (file)
@@ -19,7 +19,6 @@ for (S: REAL_SCALARS; T : DEAL_II_VEC_TEMPLATES)
     template void ConstraintMatrix::condense<T<S> >(T<S> &vec) const;
     template void ConstraintMatrix::distribute_local_to_global<T<S> > (
       const Vector<double>&, const std::vector<types::global_dof_index> &, T<S> &, const FullMatrix<double>&) const;
-    template void ConstraintMatrix::distribute<T<S> >(const T<S> &, T<S> &) const;
     template void ConstraintMatrix::set_zero<T<S> >(T<S> &) const;
   }
 
@@ -30,7 +29,6 @@ for (S: REAL_SCALARS; T : DEAL_II_VEC_TEMPLATES)
     template void ConstraintMatrix::condense<parallel::distributed::T<S> >(parallel::distributed::T<S> &vec) const;
     template void ConstraintMatrix::distribute_local_to_global<parallel::distributed::T<S> > (
       const Vector<double>&, const std::vector<types::global_dof_index> &, parallel::distributed::T<S> &, const FullMatrix<double>&) const;
-    template void ConstraintMatrix::distribute<parallel::distributed::T<S> >(const parallel::distributed::T<S> &, parallel::distributed::T<S> &) const;
     template void ConstraintMatrix::set_zero<parallel::distributed::T<S> >(parallel::distributed::T<S> &) const;
   }
 
@@ -41,7 +39,6 @@ for (V: EXTERNAL_SEQUENTIAL_VECTORS)
     template void ConstraintMatrix::condense<V >(V&vec) const;
     template void ConstraintMatrix::distribute_local_to_global<V > (
       const Vector<double>&, const std::vector<types::global_dof_index> &, V&, const FullMatrix<double>&) const;
-    template void ConstraintMatrix::distribute<V >(const V&, V&) const;
     template void ConstraintMatrix::set_zero<V >(V&) const;
   }
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.