diff --git a/dumux/discretization/box/fvgridgeometry.hh b/dumux/discretization/box/fvgridgeometry.hh index 95938a6bd58a8f31eb59b11a72b17943db1afe07..d2ea779d43f3dc72460848e50539000529e59309 100644 --- a/dumux/discretization/box/fvgridgeometry.hh +++ b/dumux/discretization/box/fvgridgeometry.hh @@ -97,8 +97,9 @@ class BoxFVGridGeometry<Scalar, GV, true, Traits> typename Traits::SubControlVolumeFace>; public: - //! export discretization method - static constexpr DiscretizationMethod discMethod = DiscretizationMethod::box; + //! export the discretization method this geometry belongs to + using DiscretizationMethod = DiscretizationMethods::Box; + static constexpr DiscretizationMethod discMethod{}; //! export the type of the fv element geometry (the local view type) using LocalView = typename Traits::template LocalView<ThisType, true>; @@ -385,8 +386,9 @@ class BoxFVGridGeometry<Scalar, GV, false, Traits> using CoordScalar = typename GV::ctype; public: - //! export discretization method - static constexpr DiscretizationMethod discMethod = DiscretizationMethod::box; + //! export the discretization method this geometry belongs to + using DiscretizationMethod = DiscretizationMethods::Box; + static constexpr DiscretizationMethod discMethod{}; //! export the type of the fv element geometry (the local view type) using LocalView = typename Traits::template LocalView<ThisType, false>; diff --git a/dumux/discretization/cellcentered/mpfa/fvgridgeometry.hh b/dumux/discretization/cellcentered/mpfa/fvgridgeometry.hh index f29ba01a9175f47102a3947d0e002118d1ae1439..050e64142aacc735dc9dc93c002f41b2f5852267 100644 --- a/dumux/discretization/cellcentered/mpfa/fvgridgeometry.hh +++ b/dumux/discretization/cellcentered/mpfa/fvgridgeometry.hh @@ -56,7 +56,7 @@ template<class GridView> void checkOverlapSizeCCMpfa(const GridView& gridView) { // Check if the overlap size is what we expect - if (!CheckOverlapSize<DiscretizationMethod::ccmpfa>::isValid(gridView)) + if (!CheckOverlapSize<DiscretizationMethods::ccmpfa>::isValid(gridView)) DUNE_THROW(Dune::InvalidStateException, "The ccmpfa discretization method needs at least an overlap of 1 for parallel computations. " << " Set the parameter \"Grid.Overlap\" in the input file."); } @@ -111,7 +111,8 @@ public: using MpfaHelper = typename Traits::template MpfaHelper<ThisType>; //! export the discretization method this geometry belongs to - static constexpr DiscretizationMethod discMethod = DiscretizationMethod::ccmpfa; + using DiscretizationMethod = DiscretizationMethods::CCMpfa; + static constexpr DiscretizationMethod discMethod{}; //! The maximum admissible stencil size (used for static memory allocation during assembly) static constexpr int maxElementStencilSize = Traits::maxElementStencilSize; @@ -502,7 +503,8 @@ public: using MpfaHelper = typename Traits::template MpfaHelper<ThisType>; //! export the discretization method this geometry belongs to - static constexpr DiscretizationMethod discMethod = DiscretizationMethod::ccmpfa; + using DiscretizationMethod = DiscretizationMethods::CCMpfa; + static constexpr DiscretizationMethod discMethod{}; //! The maximum admissible stencil size (used for static memory allocation during assembly) static constexpr int maxElementStencilSize = Traits::maxElementStencilSize; diff --git a/dumux/discretization/cellcentered/tpfa/fvgridgeometry.hh b/dumux/discretization/cellcentered/tpfa/fvgridgeometry.hh index 538031d5f49b63b829def74a8fbb8aaee110c6a1..80f6442203ab4479c9811e079583eb875e707659 100644 --- a/dumux/discretization/cellcentered/tpfa/fvgridgeometry.hh +++ b/dumux/discretization/cellcentered/tpfa/fvgridgeometry.hh @@ -112,7 +112,8 @@ public: using DofMapper = typename Traits::ElementMapper; //! export the discretization method this geometry belongs to - static constexpr DiscretizationMethod discMethod = DiscretizationMethod::cctpfa; + using DiscretizationMethod = DiscretizationMethods::CCTpfa; + static constexpr DiscretizationMethod discMethod{}; //! The maximum admissible stencil size (used for static memory allocation during assembly) static constexpr int maxElementStencilSize = LocalView::maxNumElementScvfs*Traits::maxNumScvfNeighbors + 1; @@ -125,7 +126,7 @@ public: : ParentType(gridView) { // Check if the overlap size is what we expect - if (!CheckOverlapSize<DiscretizationMethod::cctpfa>::isValid(gridView)) + if (!CheckOverlapSize<DiscretizationMethods::cctpfa>::isValid(gridView)) DUNE_THROW(Dune::InvalidStateException, "The cctpfa discretization method needs at least an overlap of 1 for parallel computations. " << " Set the parameter \"Grid.Overlap\" in the input file."); @@ -418,7 +419,8 @@ public: using DofMapper = typename Traits::ElementMapper; //! Export the discretization method this geometry belongs to - static constexpr DiscretizationMethod discMethod = DiscretizationMethod::cctpfa; + using DiscretizationMethod = DiscretizationMethods::CCTpfa; + static constexpr DiscretizationMethod discMethod{}; //! The maximum admissible stencil size (used for static memory allocation during assembly) static constexpr int maxElementStencilSize = LocalView::maxNumElementScvfs*Traits::maxNumScvfNeighbors + 1; @@ -431,7 +433,7 @@ public: : ParentType(gridView) { // Check if the overlap size is what we expect - if (!CheckOverlapSize<DiscretizationMethod::cctpfa>::isValid(gridView)) + if (!CheckOverlapSize<DiscretizationMethods::cctpfa>::isValid(gridView)) DUNE_THROW(Dune::InvalidStateException, "The cctpfa discretization method needs at least an overlap of 1 for parallel computations. " << " Set the parameter \"Grid.Overlap\" in the input file."); diff --git a/dumux/discretization/facecentered/staggered/fvgridgeometry.hh b/dumux/discretization/facecentered/staggered/fvgridgeometry.hh index 18af7159e96a1d63d70189f4e7ae20ffaff2c0fb..d76b73b76b756a979e6ab0acc8f8b3c21a4edf95 100644 --- a/dumux/discretization/facecentered/staggered/fvgridgeometry.hh +++ b/dumux/discretization/facecentered/staggered/fvgridgeometry.hh @@ -115,8 +115,10 @@ class FaceCenteredStaggeredFVGridGeometry<GV, true, Traits> using ScvCornerStorage = typename Traits::SubControlVolume::Traits::CornerStorage; public: - //! export discretization method - static constexpr DiscretizationMethod discMethod = DiscretizationMethod::fcstaggered; + //! export the discretization method this geometry belongs to + using DiscretizationMethod = DiscretizationMethods::FCStaggered; + static constexpr DiscretizationMethod discMethod{}; + static constexpr bool cachingEnabled = true; //! export the type of the fv element geometry (the local view type) @@ -138,7 +140,7 @@ public: , intersectionMapper_(gridView) { // Check if the overlap size is what we expect - if (!CheckOverlapSize<DiscretizationMethod::fcstaggered>::isValid(gridView)) + if (!CheckOverlapSize<DiscretizationMethods::fcstaggered>::isValid(gridView)) DUNE_THROW(Dune::InvalidStateException, "The staggered discretization method needs at least an overlap of 1 for parallel computations. " << " Set the parameter \"Grid.Overlap\" in the input file."); @@ -564,8 +566,10 @@ class FaceCenteredStaggeredFVGridGeometry<GV, false, Traits> + numFacesPerElement; // number of potential frontal faces on boundary public: - //! export discretization method - static constexpr DiscretizationMethod discMethod = DiscretizationMethod::fcstaggered; + //! export the discretization method this geometry belongs to + using DiscretizationMethod = DiscretizationMethods::FCStaggered; + static constexpr DiscretizationMethod discMethod{}; + static constexpr bool cachingEnabled = false; //! export the type of the fv element geometry (the local view type) @@ -587,7 +591,7 @@ public: , intersectionMapper_(gridView) { // Check if the overlap size is what we expect - if (!CheckOverlapSize<DiscretizationMethod::fcstaggered>::isValid(gridView)) + if (!CheckOverlapSize<DiscretizationMethods::fcstaggered>::isValid(gridView)) DUNE_THROW(Dune::InvalidStateException, "The staggered discretization method needs at least an overlap of 1 for parallel computations. " << " Set the parameter \"Grid.Overlap\" in the input file."); diff --git a/dumux/discretization/fem/fegridgeometry.hh b/dumux/discretization/fem/fegridgeometry.hh index fff2242c474e9650a11f55a7e8ea632c2c6de92b..5a99a1f334ce15593aabe57c4d1d93334b8343cd 100644 --- a/dumux/discretization/fem/fegridgeometry.hh +++ b/dumux/discretization/fem/fegridgeometry.hh @@ -69,8 +69,9 @@ class FEGridGeometry using LocalIndexType = typename IndexTraits<typename FEB::GridView>::LocalIndex; public: - //! export discretization method - static constexpr DiscretizationMethod discMethod = DiscretizationMethod::fem; + //! export the discretization method this geometry belongs to + using DiscretizationMethod = DiscretizationMethods::FEM; + static constexpr DiscretizationMethod discMethod{}; //! export the grid view type using GridView = typename FEB::GridView; @@ -87,7 +88,7 @@ public: , feBasis_(feBasis) { // Check if the overlap size is what we expect - if (!CheckOverlapSize<DiscretizationMethod::fem>::isValid(*feBasis)) + if (!CheckOverlapSize<DiscretizationMethods::fem>::isValid(*feBasis)) DUNE_THROW(Dune::InvalidStateException, "The finite element discretization method only works with zero overlap for parallel computations. " << " Set the parameter \"Grid.Overlap\" in the input file."); } diff --git a/dumux/discretization/porenetwork/gridgeometry.hh b/dumux/discretization/porenetwork/gridgeometry.hh index ee3407341f38b4f77b784aa38526bab0255a5e60..990f17e95a94c2b051a0b14064f8fa62a8c8b183 100644 --- a/dumux/discretization/porenetwork/gridgeometry.hh +++ b/dumux/discretization/porenetwork/gridgeometry.hh @@ -510,8 +510,9 @@ class GridGeometry<Scalar, GV, true, Traits> static const int dimWorld = GV::dimensionworld; public: - //! export discretization method - static constexpr DiscretizationMethod discMethod = DiscretizationMethod::box; + //! export the discretization method this geometry belongs to + using DiscretizationMethod = DiscretizationMethods::Box; + static constexpr DiscretizationMethod discMethod{}; //! export the type of the fv element geometry (the local view type) using LocalView = typename Traits::template LocalView<ThisType, true>; @@ -726,8 +727,9 @@ class GridGeometry<Scalar, GV, false, Traits> using CoordScalar = typename GV::ctype; public: - //! export discretization method - static constexpr DiscretizationMethod discMethod = DiscretizationMethod::box; + //! export the discretization method this geometry belongs to + using DiscretizationMethod = DiscretizationMethods::Box; + static constexpr DiscretizationMethod discMethod{}; //! export the type of the fv element geometry (the local view type) using LocalView = typename Traits::template LocalView<ThisType, false>; diff --git a/dumux/discretization/staggered/fvgridgeometry.hh b/dumux/discretization/staggered/fvgridgeometry.hh index ca051c30715da487b84f2b8a60050ac321fb2cc5..1aea7a1b963ade8786f29e31f64d74eafa43dd21 100644 --- a/dumux/discretization/staggered/fvgridgeometry.hh +++ b/dumux/discretization/staggered/fvgridgeometry.hh @@ -50,7 +50,11 @@ public: //! export the GridView type and the discretization method using GridView = typename ActualGridGeometry::GridView; - static constexpr DiscretizationMethod discMethod = DiscretizationMethod::staggered; + + //! export the discretization method this geometry belongs to + using DiscretizationMethod = DiscretizationMethods::Staggered; + static constexpr DiscretizationMethod discMethod{}; + using LocalView = typename ActualGridGeometry::LocalView; /*! @@ -196,8 +200,10 @@ public: //! export the traits using Traits = typename T::PublicTraits; - //! export discretization method - static constexpr DiscretizationMethod discMethod = DiscretizationMethod::staggered; + //! export the discretization method this geometry belongs to + using DiscretizationMethod = DiscretizationMethods::Staggered; + static constexpr DiscretizationMethod discMethod{}; + static constexpr int upwindSchemeOrder = T::upwindSchemeOrder; static constexpr bool useHigherOrder = upwindSchemeOrder > 1; static constexpr bool cachingEnabled = true; @@ -238,7 +244,7 @@ public: , intersectionMapper_(gridView) { // Check if the overlap size is what we expect - if (!CheckOverlapSize<DiscretizationMethod::staggered>::isValid(gridView)) + if (!CheckOverlapSize<DiscretizationMethods::staggered>::isValid(gridView)) DUNE_THROW(Dune::InvalidStateException, "The staggered discretization method needs at least an overlap of 1 for parallel computations. " << " Set the parameter \"Grid.Overlap\" in the input file."); @@ -493,8 +499,10 @@ public: //! export the traits using Traits = typename T::PublicTraits; - //! export discretization method - static constexpr DiscretizationMethod discMethod = DiscretizationMethod::staggered; + //! export the discretization method this geometry belongs to + using DiscretizationMethod = DiscretizationMethods::Staggered; + static constexpr DiscretizationMethod discMethod{}; + static constexpr int upwindSchemeOrder = T::upwindSchemeOrder; static constexpr bool useHigherOrder = upwindSchemeOrder > 1; static constexpr bool cachingEnabled = false; @@ -537,7 +545,7 @@ public: , intersectionMapper_(gridView) { // Check if the overlap size is what we expect - if (!CheckOverlapSize<DiscretizationMethod::staggered>::isValid(gridView)) + if (!CheckOverlapSize<DiscretizationMethods::staggered>::isValid(gridView)) DUNE_THROW(Dune::InvalidStateException, "The staggered discretization method needs at least an overlap of 1 for parallel computations. " << " Set the parameter \"Grid.Overlap\" in the input file."); diff --git a/dumux/multidomain/facet/box/fvgridgeometry.hh b/dumux/multidomain/facet/box/fvgridgeometry.hh index deff0e2f51b51405a28a1465f0d6f3b67e079477..d6b087a68a670173ea345ed99fe95818f2de442c 100644 --- a/dumux/multidomain/facet/box/fvgridgeometry.hh +++ b/dumux/multidomain/facet/box/fvgridgeometry.hh @@ -109,8 +109,9 @@ class BoxFacetCouplingFVGridGeometry<Scalar, GV, true, Traits> using GeometryHelper = BoxGeometryHelper<GV, dim, typename Traits::SubControlVolume, typename Traits::SubControlVolumeFace>; public: - //! export discretization method - static constexpr DiscretizationMethod discMethod = DiscretizationMethod::box; + //! export the discretization method this geometry belongs to + using DiscretizationMethod = DiscretizationMethods::Box; + static constexpr DiscretizationMethod discMethod{}; //! export the type of the fv element geometry (the local view type) using LocalView = typename Traits::template LocalView<ThisType, true>; @@ -422,8 +423,9 @@ class BoxFacetCouplingFVGridGeometry<Scalar, GV, false, Traits> using CoordScalar = typename GV::ctype; public: - //! export discretization method - static constexpr DiscretizationMethod discMethod = DiscretizationMethod::box; + //! export the discretization method this geometry belongs to + using DiscretizationMethod = DiscretizationMethods::Box; + static constexpr DiscretizationMethod discMethod{}; //! export the type of the fv element geometry (the local view type) using LocalView = typename Traits::template LocalView<ThisType, false>; diff --git a/dumux/porousmediumflow/boxdfm/fvgridgeometry.hh b/dumux/porousmediumflow/boxdfm/fvgridgeometry.hh index 16dd5b706c767b383041da5cacea35b25f5c2a98..5d99c297f54a74fb141504e397697ef09a8fdd72 100644 --- a/dumux/porousmediumflow/boxdfm/fvgridgeometry.hh +++ b/dumux/porousmediumflow/boxdfm/fvgridgeometry.hh @@ -115,8 +115,9 @@ class BoxDfmFVGridGeometry<Scalar, GV, true, Traits> typename Traits::SubControlVolumeFace>; public: - //! Export discretization method - static constexpr DiscretizationMethod discMethod = DiscretizationMethod::box; + //! export the discretization method this geometry belongs to + using DiscretizationMethod = DiscretizationMethods::Box; + static constexpr DiscretizationMethod discMethod{}; //! Export the type of the fv element geometry (the local view type) using LocalView = typename Traits::template LocalView<ThisType, true>; @@ -446,8 +447,9 @@ class BoxDfmFVGridGeometry<Scalar, GV, false, Traits> using CoordScalar = typename GV::ctype; public: - //! export discretization method - static constexpr DiscretizationMethod discMethod = DiscretizationMethod::box; + //! export the discretization method this geometry belongs to + using DiscretizationMethod = DiscretizationMethods::Box; + static constexpr DiscretizationMethod discMethod{}; //! export the type of the fv element geometry (the local view type) using LocalView = typename Traits::template LocalView<ThisType, false>;