]> https://gitweb.dealii.org/ - dealii.git/commitdiff
change instantiation of constraint matrix functions to allow complex-valued vectors 2222/head
authorDenis Davydov <davydden@gmail.com>
Mon, 22 Feb 2016 12:45:39 +0000 (13:45 +0100)
committerDenis Davydov <davydden@gmail.com>
Mon, 22 Feb 2016 16:05:47 +0000 (17:05 +0100)
doc/news/changes.h
source/lac/constraint_matrix.cc
source/lac/constraint_matrix.inst.in

index 75e448c8c4b0edf0ff4ebb1998f03b77ff7fdfee..6bff97718f5497811f7c829575c45f81c29e3231 100644 (file)
@@ -38,6 +38,11 @@ inconvenience this causes.
 </p>
 
 <ol>
+  <li> Changed: ConstraintMatrix::distribute_local_to_global() now requires
+  matching data types. This is done to correctly handle complex-valued case.
+  <br>
+  (Denis Davydov, 2016/02/22)
+  </li>
 </ol>
 
 
index d105f489aba174644ac4da39dc76dcf0ee94e3b7..214d6023584a5d715de424398d31046b9faecf29 100644 (file)
@@ -1222,17 +1222,18 @@ ConstraintMatrix::resolve_indices (std::vector<types::global_dof_index> &indices
                                                         VectorType       &condensed) const;\
   template void ConstraintMatrix::condense<VectorType >(VectorType &vec) const;\
   template void ConstraintMatrix:: \
-  distribute_local_to_global<VectorType > (const Vector<double>            &, \
+  distribute_local_to_global<VectorType > (const Vector<VectorType::value_type>            &, \
                                            const std::vector<ConstraintMatrix::size_type>  &, \
                                            VectorType                      &, \
-                                           const FullMatrix<double>        &) const
+                                           const FullMatrix<VectorType::value_type>        &) const
+
 
 #define PARALLEL_VECTOR_FUNCTIONS(VectorType) \
   template void ConstraintMatrix:: \
-  distribute_local_to_global<VectorType > (const Vector<double>            &, \
+  distribute_local_to_global<VectorType > (const Vector<VectorType::value_type>            &, \
                                            const std::vector<ConstraintMatrix::size_type>  &, \
                                            VectorType                      &, \
-                                           const FullMatrix<double>        &) const
+                                           const FullMatrix<VectorType::value_type>        &) const
 
 
 #ifdef DEAL_II_WITH_PETSC
index 11418f93fae6f7e1702b42cf7d99a320429507ba..78c03f8d5f35892370c9fb7a9a129505f6060117 100644 (file)
@@ -38,7 +38,7 @@ for (V: EXTERNAL_SEQUENTIAL_VECTORS)
     template void ConstraintMatrix::condense<V >(const V&, V&) const;
     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;
+      const Vector<V::value_type>&, const std::vector<types::global_dof_index> &, V&, const FullMatrix<V::value_type>&) const;
     template void ConstraintMatrix::set_zero<V >(V&) const;
   }
 
@@ -67,3 +67,9 @@ for (Vec : SERIAL_VECTORS)
   {
     template void ConstraintMatrix::distribute<Vec>(Vec &) const;
   }
+  
+for (S: COMPLEX_SCALARS; T : DEAL_II_VEC_TEMPLATES)
+  {
+    template void ConstraintMatrix::distribute<T<S> >(T<S> &) 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.