From: Denis Davydov Date: Thu, 21 Feb 2019 22:20:50 +0000 (+0100) Subject: add internal::has_partitioners_are_compatible<> X-Git-Tag: v9.1.0-rc1~323^2~6 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=071f982eddcacb5d3efcb8fa7d0b1491273e7625;p=dealii.git add internal::has_partitioners_are_compatible<> --- diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index dc97327d07..c7c2d8b890 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -3438,6 +3438,27 @@ namespace internal }; + // same as above to check + // bool T::partitioners_are_compatible(const Utilities::MPI::Partitioner &) + // const + template + struct has_partitioners_are_compatible + { + private: + static void + detect(...); + + template + static decltype(std::declval().partitioners_are_compatible( + std::declval())) + detect(const U &); + + public: + static constexpr bool value = + std::is_same()))>::value; + }; + + // access to generic vectors that have operator (). // FIXME: this is wrong for Trilinos/Petsc MPI vectors template