From: Matthias Maier Date: Wed, 16 Nov 2016 04:49:10 +0000 (-0600) Subject: LAC: also allow ConstraintMatrix::distribute for std::complex X-Git-Tag: v8.5.0-rc1~392^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd4b51fb199f68c6e9a153c06396db590cd7b3be;p=dealii.git LAC: also allow ConstraintMatrix::distribute for std::complex Fix a typetrait check in ConstraintMatrix::distribute such that said class and method can be used with complex valued vector types. --- diff --git a/include/deal.II/lac/constraint_matrix.templates.h b/include/deal.II/lac/constraint_matrix.templates.h index 8c20a74d70..06cb05f08e 100644 --- a/include/deal.II/lac/constraint_matrix.templates.h +++ b/include/deal.II/lac/constraint_matrix.templates.h @@ -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)) && (typeid(vec) != typeid(Vector)) && + (typeid(vec) != typeid(Vector >)) && (typeid(vec) != typeid(BlockVector)) && (typeid(vec) != typeid(BlockVector)) && + (typeid(vec) != typeid(BlockVector >)) && (typeid(vec) != typeid(LinearAlgebra::Vector)) && - (typeid(vec) != typeid(LinearAlgebra::Vector))) + (typeid(vec) != typeid(LinearAlgebra::Vector)) && + (typeid(vec) != typeid(LinearAlgebra::Vector >))) { // This processor owns only part of the vector. one may think that // every processor should be able to simply communicate those elements