From 6a361f00b64042cef7fcde09b3d8a59184eff6c8 Mon Sep 17 00:00:00 2001 From: Kilian Weishaupt Date: Tue, 17 Mar 2020 17:33:54 +0100 Subject: [PATCH 1/2] [typetraits][matrix] Add trait for MultiTypeBlockMatrix * use forward declare to remove includes --- dumux/common/typetraits/matrix.hh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/dumux/common/typetraits/matrix.hh b/dumux/common/typetraits/matrix.hh index 630d17946b..bbfce028e1 100644 --- a/dumux/common/typetraits/matrix.hh +++ b/dumux/common/typetraits/matrix.hh @@ -26,7 +26,14 @@ #include -#include +// Forward declare to avoid includes +namespace Dune { +template +class BCRSMatrix; + +template +class MultiTypeBlockMatrix; +} namespace Dumux { @@ -35,7 +42,14 @@ template struct isBCRSMatrix : public std::false_type {}; //! Helper type to determine whether a given type is a Dune::BCRSMatrix template -struct isBCRSMatrix > : public std::true_type {}; +struct isBCRSMatrix> : public std::true_type {}; + +//! Helper type to determine whether a given type is a Dune::MultiTypeBlockMatrix +template struct isMultiTypeBlockMatrix : public std::false_type {}; + +//! Helper type to determine whether a given type is a Dune::MultiTypeBlockMatrix +template +struct isMultiTypeBlockMatrix> : public std::true_type {}; } // end namespace Dumux -- GitLab From 6457835052d54f48c170278d61163a9e57631ec4 Mon Sep 17 00:00:00 2001 From: Timo Koch Date: Tue, 17 Mar 2020 19:57:28 +0100 Subject: [PATCH 2/2] Fixup Update matrix.hh --- dumux/common/typetraits/matrix.hh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dumux/common/typetraits/matrix.hh b/dumux/common/typetraits/matrix.hh index bbfce028e1..dd531bec35 100644 --- a/dumux/common/typetraits/matrix.hh +++ b/dumux/common/typetraits/matrix.hh @@ -33,21 +33,21 @@ class BCRSMatrix; template class MultiTypeBlockMatrix; -} +} // end namespace Dune namespace Dumux { -//! Helper type to determine whether a given type is a Dune::BCRSMatrix -template struct isBCRSMatrix : public std::false_type {}; - //! Helper type to determine whether a given type is a Dune::BCRSMatrix template -struct isBCRSMatrix> : public std::true_type {}; +struct isBCRSMatrix : public std::false_type {}; -//! Helper type to determine whether a given type is a Dune::MultiTypeBlockMatrix -template struct isMultiTypeBlockMatrix : public std::false_type {}; +template +struct isBCRSMatrix> : public std::true_type {}; //! Helper type to determine whether a given type is a Dune::MultiTypeBlockMatrix +template +struct isMultiTypeBlockMatrix : public std::false_type {}; + template struct isMultiTypeBlockMatrix> : public std::true_type {}; -- GitLab