From cd4b51fb199f68c6e9a153c06396db590cd7b3be Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Tue, 15 Nov 2016 22:49:10 -0600 Subject: [PATCH] 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. --- include/deal.II/lac/constraint_matrix.templates.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.39.5