diff --git a/dumux/discretization/basegridgeometry.hh b/dumux/discretization/basegridgeometry.hh index e6be4b40ac7fcf874567c28ecbe8b5e9bd0e1bab..6032bf8fb8d287459be45367238afa251a66dbd8 100644 --- a/dumux/discretization/basegridgeometry.hh +++ b/dumux/discretization/basegridgeometry.hh @@ -37,6 +37,9 @@ namespace Dumux { namespace Detail { template<class T> using SpecifiesBaseGridGeometry = typename T::BasicGridGeometry; + +template<class T> +using SpecifiesGeometryHelper = typename T::GeometryHelper; } // end namespace Detail /*! diff --git a/dumux/discretization/box/fvgridgeometry.hh b/dumux/discretization/box/fvgridgeometry.hh index c5e89d288413755155478409ae3aecdabad63723..2ec55d61acd5592f676c2c2054a52bdf5b2c9131 100644 --- a/dumux/discretization/box/fvgridgeometry.hh +++ b/dumux/discretization/box/fvgridgeometry.hh @@ -45,6 +45,15 @@ namespace Dumux { +namespace Detail { +template<class GV, class T> +using BoxGeometryHelper_t = Dune::Std::detected_or_t< + Dumux::BoxGeometryHelper<GV, GV::dimension, typename T::SubControlVolume, typename T::SubControlVolumeFace>, + SpecifiesGeometryHelper, + T +>; +} // end namespace Detail + /*! * \ingroup BoxDiscretization * \brief The default traits for the box finite volume grid geometry @@ -94,9 +103,7 @@ class BoxFVGridGeometry<Scalar, GV, true, Traits> static const int dim = GV::dimension; static const int dimWorld = GV::dimensionworld; - using GeometryHelper = BoxGeometryHelper<GV, dim, - typename Traits::SubControlVolume, - typename Traits::SubControlVolumeFace>; + using GeometryHelper = Detail::BoxGeometryHelper_t<GV, Traits>; public: //! export the discretization method this geometry belongs to diff --git a/dumux/discretization/facecentered/diamond/fvgridgeometry.hh b/dumux/discretization/facecentered/diamond/fvgridgeometry.hh index 3cc239b5e4a4e899b039b5cea2e7fc02f6cfa4e2..2acc7c907a9f42b0070d814cb32f707378c62236 100644 --- a/dumux/discretization/facecentered/diamond/fvgridgeometry.hh +++ b/dumux/discretization/facecentered/diamond/fvgridgeometry.hh @@ -48,6 +48,15 @@ namespace Dumux { +namespace Detail { +template<class GV, class T> +using FaceCenteredDiamondGeometryHelper_t = Dune::Std::detected_or_t< + Dumux::DiamondGeometryHelper<GV, typename T::SubControlVolume, typename T::SubControlVolumeFace>, + SpecifiesGeometryHelper, + T +>; +} // end namespace Detail + /*! * \ingroup DiamondDiscretization * \brief The default traits for the face-centered diamond finite volume grid geometry @@ -80,7 +89,7 @@ class FaceCenteredDiamondFVGridGeometry using GridIndexType = typename IndexTraits<GV>::GridIndex; using LocalIndexType = typename IndexTraits<GV>::SmallLocalIndex; using Element = typename GV::template Codim<0>::Entity; - using GeometryHelper = DiamondGeometryHelper<GV, typename Traits::SubControlVolume, typename Traits::SubControlVolumeFace>; + using GeometryHelper = Detail::FaceCenteredDiamondGeometryHelper_t<GV, Traits>; using Scalar = typename GV::ctype; diff --git a/dumux/discretization/pq1bubble/fvgridgeometry.hh b/dumux/discretization/pq1bubble/fvgridgeometry.hh index caeb7a955d30a8c520bcb1c60dc7623ead660ad2..b9fd991d4cf85c40b64699252f9aee57c85de540 100644 --- a/dumux/discretization/pq1bubble/fvgridgeometry.hh +++ b/dumux/discretization/pq1bubble/fvgridgeometry.hh @@ -49,6 +49,15 @@ namespace Dumux { +namespace Detail { +template<class GV, class T> +using PQ1BubbleGeometryHelper_t = Dune::Std::detected_or_t< + Dumux::PQ1BubbleGeometryHelper<GV, typename T::SubControlVolume, typename T::SubControlVolumeFace>, + SpecifiesGeometryHelper, + T +>; +} // end namespace Detail + template <class GridView> struct PQ1BubbleMapperTraits :public DefaultMapperTraits<GridView> { @@ -106,9 +115,7 @@ class PQ1BubbleFVGridGeometry static const int dim = GV::dimension; static const int dimWorld = GV::dimensionworld; - using GeometryHelper = PQ1BubbleGeometryHelper< - GV, typename Traits::SubControlVolume, typename Traits::SubControlVolumeFace - >; + using GeometryHelper = Detail::PQ1BubbleGeometryHelper_t<GV, Traits>; static_assert(dim > 1, "Only implemented for dim > 1"); diff --git a/dumux/multidomain/facet/box/fvgridgeometry.hh b/dumux/multidomain/facet/box/fvgridgeometry.hh index ea58484d8aa2670a68d126be422ecca478e547e2..6716d1399bf00f37825d49f7597303c253420ac6 100644 --- a/dumux/multidomain/facet/box/fvgridgeometry.hh +++ b/dumux/multidomain/facet/box/fvgridgeometry.hh @@ -46,6 +46,15 @@ namespace Dumux { +namespace Detail { +template<class GV, class T> +using BoxFacetCouplingGeometryHelper_t = Dune::Std::detected_or_t< + Dumux::BoxGeometryHelper<GV, GV::dimension, typename T::SubControlVolume, typename T::SubControlVolumeFace>, + SpecifiesGeometryHelper, + T +>; +} // end namespace Detail + /*! * \ingroup FacetCoupling * \brief The default traits for the finite volume grid geometry @@ -105,7 +114,7 @@ class BoxFacetCouplingFVGridGeometry<Scalar, GV, true, Traits> static const int dim = GV::dimension; static const int dimWorld = GV::dimensionworld; - using GeometryHelper = BoxGeometryHelper<GV, dim, typename Traits::SubControlVolume, typename Traits::SubControlVolumeFace>; + using GeometryHelper = Detail::BoxFacetCouplingGeometryHelper_t<GV, Traits>; public: //! export the discretization method this geometry belongs to diff --git a/dumux/porousmediumflow/boxdfm/fvgridgeometry.hh b/dumux/porousmediumflow/boxdfm/fvgridgeometry.hh index fc4f28f6b17a1cf85a06b3f2591a5720b4397915..b7f6489386d92cb2640ff3dd8d5fbdf98e4c45ef 100644 --- a/dumux/porousmediumflow/boxdfm/fvgridgeometry.hh +++ b/dumux/porousmediumflow/boxdfm/fvgridgeometry.hh @@ -49,6 +49,15 @@ namespace Dumux { +namespace Detail { +template<class GV, class T> +using BoxDfmGeometryHelper_t = Dune::Std::detected_or_t< + Dumux::BoxDfmGeometryHelper<GV, GV::dimension, typename T::SubControlVolume, typename T::SubControlVolumeFace>, + SpecifiesGeometryHelper, + T +>; +} // end namespace Detail + /*! * \ingroup BoxDFMModel * \brief The default traits for the box finite volume grid geometry @@ -109,9 +118,7 @@ class BoxDfmFVGridGeometry<Scalar, GV, true, Traits> static const int dimWorld = GV::dimensionworld; static_assert(dim == 2 || dim == 3, "The box-dfm GridGeometry is only implemented in 2 or 3 dimensions."); - using GeometryHelper = BoxDfmGeometryHelper<GV, dim, - typename Traits::SubControlVolume, - typename Traits::SubControlVolumeFace>; + using GeometryHelper = Detail::BoxDfmGeometryHelper_t<GV, Traits>; public: //! export the discretization method this geometry belongs to