From 071f982eddcacb5d3efcb8fa7d0b1491273e7625 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 21 Feb 2019 23:20:50 +0100 Subject: [PATCH] add internal::has_partitioners_are_compatible<> --- include/deal.II/matrix_free/fe_evaluation.h | 21 +++++++++++++++++++ .../matrix_free/fe_evaluation_type_traits.cc | 11 ++++++++++ ...tion_type_traits.with_trilinos=true.output | 3 +++ 3 files changed, 35 insertions(+) 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