From: Denis Davydov Date: Thu, 21 Feb 2019 22:32:31 +0000 (+0100) Subject: use has_partitioners_are_compatible in internal::check_vector_compatibility X-Git-Tag: v9.1.0-rc1~323^2~5 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1bb945c23b00c494fb349a98146a8e62176b1bb0;p=dealii.git use has_partitioners_are_compatible in internal::check_vector_compatibility --- 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;