]> https://gitweb.dealii.org/ - dealii.git/commitdiff
LAC: also allow ConstraintMatrix::distribute for std::complex
authorMatthias Maier <tamiko@43-1.org>
Wed, 16 Nov 2016 04:49:10 +0000 (22:49 -0600)
committerMatthias Maier <tamiko@43-1.org>
Wed, 16 Nov 2016 14:29:04 +0000 (08:29 -0600)
Fix a typetrait check in ConstraintMatrix::distribute such that said class
and method can be used with complex valued vector types.

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

index 8c20a74d700c7dd651a17fb10d2fe1dc8af0440e..06cb05f08e4bea2ac067059d7453bdcfb2370f88 100644 (file)
@@ -852,12 +852,17 @@ ConstraintMatrix::distribute (VectorType &vec) const
   // call compress() finally. the first case here is for the complicated case,
   // the last else is for the simple case (sequential vector)
   const IndexSet vec_owned_elements = vec.locally_owned_elements();
+
+  // FIXME: This has to be refactored into a typetrait
   if ((typeid(vec) != typeid(Vector<double>)) &&
       (typeid(vec) != typeid(Vector<float>)) &&
+      (typeid(vec) != typeid(Vector<std::complex<double> >)) &&
       (typeid(vec) != typeid(BlockVector<double>)) &&
       (typeid(vec) != typeid(BlockVector<float>)) &&
+      (typeid(vec) != typeid(BlockVector<std::complex<double> >)) &&
       (typeid(vec) != typeid(LinearAlgebra::Vector<double>)) &&
-      (typeid(vec) != typeid(LinearAlgebra::Vector<float>)))
+      (typeid(vec) != typeid(LinearAlgebra::Vector<float>)) &&
+      (typeid(vec) != typeid(LinearAlgebra::Vector<std::complex<double> >)))
     {
       // This processor owns only part of the vector. one may think that
       // every processor should be able to simply communicate those elements

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.