]> https://gitweb.dealii.org/ - dealii.git/commitdiff
distribute_local_to_global changed from Vector<double> to a template
authorBaerbel Jannsen <baerbel.janssen@gmail.com>
Mon, 22 Mar 2010 18:45:24 +0000 (18:45 +0000)
committerBaerbel Jannsen <baerbel.janssen@gmail.com>
Mon, 22 Mar 2010 18:45:24 +0000 (18:45 +0000)
git-svn-id: https://svn.dealii.org/trunk@20880 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/constraint_matrix.h
deal.II/lac/include/lac/constraint_matrix.templates.h

index d66b846ce57103d8495bf7cfe157c5a2b06aae8c..b31c279d63b18dd934a8e688d3789a35aacf49df 100644 (file)
@@ -1108,11 +1108,11 @@ class ConstraintMatrix : public Subscriptor
                                      * sure that only on process at a time
                                      * calls this function.
                                       */
-    template <typename VectorType>
+    template <class InVector, class OutVector>
     void
-    distribute_local_to_global (const Vector<double>            &local_vector,
+    distribute_local_to_global (const InVector                  &local_vector,
                                 const std::vector<unsigned int> &local_dof_indices,
-                                VectorType                      &global_vector) const;
+                                OutVector                       &global_vector) const;
 
                                      /**
                                       * This function takes a vector of
@@ -2044,13 +2044,13 @@ ConstraintMatrix::is_inhomogeneously_constrained (const unsigned int index) cons
 
 
 
-template <class VectorType>
+template <class InVector, class OutVector>
 inline
 void
 ConstraintMatrix::
-distribute_local_to_global (const Vector<double>            &local_vector,
+distribute_local_to_global (const InVector                  &local_vector,
                             const std::vector<unsigned int> &local_dof_indices,
-                            VectorType                      &global_vector) const
+                            OutVector                       &global_vector) const
 {
   Assert (local_vector.size() == local_dof_indices.size(),
           ExcDimensionMismatch(local_vector.size(), local_dof_indices.size()));
index ff84b0660dacdefbaa40977416ae042736dee5bb..2486511204e4978ea92ec21c4cca44e2f3ea21eb 100644 (file)
@@ -1325,6 +1325,7 @@ namespace internals
                                   // constraints are really empty.
     const unsigned int length = size();
 #ifdef DEBUG
+    //make sure that we are in the range of the vector
     AssertIndexRange (length, total_row_indices.size()+1);
     for (unsigned int i=0; i<length; ++i)
       Assert (total_row_indices[i].constraint_position ==
@@ -1938,11 +1939,11 @@ make_sorted_row_list (const std::vector<unsigned int> &local_dof_indices,
 template <typename MatrixType>
 inline
 void
-ConstraintMatrix::
-make_sorted_row_list (const FullMatrix<double>        &local_matrix,
-                     const std::vector<unsigned int> &local_dof_indices,
-                     MatrixType                      &global_matrix,
-                     internals::GlobalRowsFromLocal  &global_rows) const
+ConstraintMatrix:: make_sorted_row_list (
+    const FullMatrix<double>        &local_matrix,
+    const std::vector<unsigned int> &local_dof_indices,
+    MatrixType                      &global_matrix,
+    internals::GlobalRowsFromLocal  &global_rows) const
 {
   const unsigned int n_local_dofs = local_dof_indices.size();
 

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.