From efb685127523207c9b46b55bfd0c38fcb177b2de Mon Sep 17 00:00:00 2001 From: Timo Koch Date: Mon, 7 Feb 2022 11:29:13 +0000 Subject: [PATCH 1/3] [typetraits] Remove deprecation helper IsIndexable we use Dune::IsIndexable directly now --- dumux/common/typetraits/typetraits.hh | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/dumux/common/typetraits/typetraits.hh b/dumux/common/typetraits/typetraits.hh index ebc9d1cdcd..5075353672 100644 --- a/dumux/common/typetraits/typetraits.hh +++ b/dumux/common/typetraits/typetraits.hh @@ -35,15 +35,5 @@ namespace Dumux { template struct AlwaysFalse : public std::false_type {}; - /*! \brief We define our own is_indexable type in order - * to avoid several version checks throughout dumux. - * This should be deleted when the deprecation phase is over. - * - * \deprecated Use Dune::IsIndexable instead. Will - * be removed after DuMux 3.4. - */ - template - using IsIndexable [[deprecated("Use Dune::IsIndexable instead. Will be removed after 3.4")]] = typename Dune::IsIndexable; - } // end namespace Dumux #endif -- GitLab From 2de05572b25990fc2e5b5465e76111c4753d5fc2 Mon Sep 17 00:00:00 2001 From: Timo Koch Date: Mon, 7 Feb 2022 12:59:54 +0000 Subject: [PATCH 2/3] [vtk][cleanup] Use Dune::IsIndexable --- dumux/io/vtk/intersectionwriter.hh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dumux/io/vtk/intersectionwriter.hh b/dumux/io/vtk/intersectionwriter.hh index b944226578..f4e74a2f95 100644 --- a/dumux/io/vtk/intersectionwriter.hh +++ b/dumux/io/vtk/intersectionwriter.hh @@ -23,11 +23,11 @@ #include #include +#include #include #include #include #include -#include namespace Dumux::Detail { @@ -179,9 +179,9 @@ public: { if constexpr (std::is_invocable_v) { - if constexpr (IsIndexable(), 0))>>{}) + if constexpr (Dune::IsIndexable(), 0))>>{}) { - if constexpr (IsIndexable(), 0)[0])>>{}) + if constexpr (Dune::IsIndexable(), 0)[0])>>{}) DUNE_THROW(Dune::InvalidStateException, "Invalid field type"); else { @@ -190,10 +190,10 @@ public: } } } - else if constexpr (IsIndexable>{}) + else if constexpr (Dune::IsIndexable>{}) { assert(field.size() == gv.size(1)); - if constexpr (IsIndexable>{}) + if constexpr (Dune::IsIndexable>{}) DUNE_THROW(Dune::InvalidStateException, "Invalid field type"); else components_ = field[0].size(); @@ -215,14 +215,14 @@ public: { if constexpr (std::is_invocable_v) { - if constexpr (IsIndexable>{}) + if constexpr (Dune::IsIndexable>{}) return field_(intersection, idx)[i]; else return field_(intersection, idx); } else { - if constexpr (IsIndexable()[0])>>{}) + if constexpr (Dune::IsIndexable()[0])>>{}) return field_[idx][i]; else return field_[idx]; -- GitLab From e6ed31c164456b88740198fd15a5fb68c8bf07ac Mon Sep 17 00:00:00 2001 From: Timo Koch Date: Mon, 7 Feb 2022 13:00:16 +0000 Subject: [PATCH 3/3] fixup --- dumux/common/typetraits/typetraits.hh | 2 -- 1 file changed, 2 deletions(-) diff --git a/dumux/common/typetraits/typetraits.hh b/dumux/common/typetraits/typetraits.hh index 5075353672..b738171861 100644 --- a/dumux/common/typetraits/typetraits.hh +++ b/dumux/common/typetraits/typetraits.hh @@ -25,8 +25,6 @@ #include -#include - namespace Dumux { /*! * \brief Template which always yields a false value -- GitLab