From 1bb945c23b00c494fb349a98146a8e62176b1bb0 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 21 Feb 2019 23:32:31 +0100 Subject: [PATCH] use has_partitioners_are_compatible in internal::check_vector_compatibility --- include/deal.II/matrix_free/fe_evaluation.h | 30 +++++++++------------ 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index c7c2d8b890..8da043d70b 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -40,15 +40,6 @@ DEAL_II_NAMESPACE_OPEN -// forward declarations -namespace LinearAlgebra -{ - namespace distributed - { - template - class Vector; - } -} // namespace LinearAlgebra namespace internal { DeclException0(ExcAccessToUninitializedField); @@ -3487,9 +3478,13 @@ namespace internal // this is to make sure that the parallel partitioning in VectorType - // is really the same as stored in MatrixFree + // is really the same as stored in MatrixFree. + // version below is when has_partitioners_are_compatible == false // FIXME: this is incorrect for PETSc/Trilinos MPI vectors - template + template < + typename VectorType, + typename std::enable_if::value, + VectorType>::type * = nullptr> inline void check_vector_compatibility( const VectorType & vec, @@ -3502,14 +3497,15 @@ namespace internal } - // this is to make sure that the parallel partitioning in the - // LinearAlgebra::distributed::Vector is really the same as stored in - // MatrixFree - template + // same as above for has_partitioners_are_compatible == true + template < + typename VectorType, + typename std::enable_if::value, + VectorType>::type * = nullptr> inline void check_vector_compatibility( - const LinearAlgebra::distributed::Vector &vec, - const internal::MatrixFreeFunctions::DoFInfo & dof_info) + const VectorType & vec, + const internal::MatrixFreeFunctions::DoFInfo &dof_info) { (void)vec; (void)dof_info; -- 2.39.5