diff --git a/dumux/common/properties.hh b/dumux/common/properties.hh index a0ccd5ffdf1d92ddba88b6463f44cc068ed68ed0..066292109d320ca94438e8c76066311162c81a8d 100644 --- a/dumux/common/properties.hh +++ b/dumux/common/properties.hh @@ -96,7 +96,6 @@ NEW_PROP_TAG(MaxNumNeighborsPerScvf); //!< The maximum number of ne ///////////////////////////////////////////////////////////////// // Additional properties used by the cell-centered mpfa schemes: ///////////////////////////////////////////////////////////////// -NEW_PROP_TAG(MpfaHelper); //!< A Helper class depending on the mpfa method and grid dimension NEW_PROP_TAG(PrimaryInteractionVolume); //!< The primary interaction volume type NEW_PROP_TAG(SecondaryInteractionVolume); //!< The secondary interaction volume type used e.g. on the boundaries NEW_PROP_TAG(DualGridNodalIndexSet); //!< The type used for the nodal index sets of the dual grid diff --git a/dumux/discretization/cellcentered/mpfa/darcyslaw.hh b/dumux/discretization/cellcentered/mpfa/darcyslaw.hh index 8f9a680f885707f9bf75d9a12391ea056acdbc4f..c8efffbee3a48d4fbe0ddbc2ca73ccfae3ecd597 100644 --- a/dumux/discretization/cellcentered/mpfa/darcyslaw.hh +++ b/dumux/discretization/cellcentered/mpfa/darcyslaw.hh @@ -50,7 +50,8 @@ class DarcysLawImplementation<TypeTag, DiscretizationMethods::CCMpfa> using GridView = typename GET_PROP_TYPE(TypeTag, GridView); using Element = typename GridView::template Codim<0>::Entity; - using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView; + using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); + using FVElementGeometry = typename FVGridGeometry::LocalView; using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace; using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables); using ElementFluxVariablesCache = typename GET_PROP_TYPE(TypeTag, ElementFluxVariablesCache); @@ -95,7 +96,7 @@ class DarcysLawImplementation<TypeTag, DiscretizationMethods::CCMpfa> using DualGridNodalIndexSet = typename GET_PROP_TYPE(TypeTag, DualGridNodalIndexSet); using Stencil = typename DualGridNodalIndexSet::GridStencilType; - using MpfaHelper = typename GET_PROP_TYPE(TypeTag, MpfaHelper); + using MpfaHelper = typename FVGridGeometry::MpfaHelper; static constexpr bool considerSecondaryIVs = MpfaHelper::considerSecondaryIVs(); // In the current implementation of the flux variables cache we cannot make a diff --git a/dumux/discretization/cellcentered/mpfa/fickslaw.hh b/dumux/discretization/cellcentered/mpfa/fickslaw.hh index 08765f9385b9eeb9f802d3e4fae447ebdd94ca4c..91518e9edc0e9929d23040214e0681f639eb9c01 100644 --- a/dumux/discretization/cellcentered/mpfa/fickslaw.hh +++ b/dumux/discretization/cellcentered/mpfa/fickslaw.hh @@ -46,7 +46,8 @@ class FicksLawImplementation<TypeTag, DiscretizationMethods::CCMpfa> using GridView = typename GET_PROP_TYPE(TypeTag, GridView); using Element = typename GridView::template Codim<0>::Entity; - using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView; + using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); + using FVElementGeometry = typename FVGridGeometry::LocalView; using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace; using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables); @@ -93,7 +94,7 @@ class FicksLawImplementation<TypeTag, DiscretizationMethods::CCMpfa> using DualGridNodalIndexSet = typename GET_PROP_TYPE(TypeTag, DualGridNodalIndexSet); using Stencil = typename DualGridNodalIndexSet::GridStencilType; - using MpfaHelper = typename GET_PROP_TYPE(TypeTag, MpfaHelper); + using MpfaHelper = typename FVGridGeometry::MpfaHelper; static constexpr bool considerSecondaryIVs = MpfaHelper::considerSecondaryIVs(); // In the current implementation of the flux variables cache we cannot make a diff --git a/dumux/discretization/cellcentered/mpfa/fluxvariablescachefiller.hh b/dumux/discretization/cellcentered/mpfa/fluxvariablescachefiller.hh index b5a8d8c0ad58128a8be15b0624892b4a3ddc85da..b2196d97c716c9657d12b30f28060eafc4d5ec85 100644 --- a/dumux/discretization/cellcentered/mpfa/fluxvariablescachefiller.hh +++ b/dumux/discretization/cellcentered/mpfa/fluxvariablescachefiller.hh @@ -43,11 +43,12 @@ template<class TypeTag> class CCMpfaFluxVariablesCacheFiller { using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using MpfaHelper = typename GET_PROP_TYPE(TypeTag, MpfaHelper); using GridView = typename GET_PROP_TYPE(TypeTag, GridView); using Element = typename GridView::template Codim<0>::Entity; - using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView; + using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); + using FVElementGeometry = typename FVGridGeometry::LocalView; + using MpfaHelper = typename FVGridGeometry::MpfaHelper; using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace; using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables); using ElementFluxVariablesCache = typename GET_PROP_TYPE(TypeTag, ElementFluxVariablesCache); diff --git a/dumux/discretization/cellcentered/mpfa/fourierslaw.hh b/dumux/discretization/cellcentered/mpfa/fourierslaw.hh index 94bf998c4fa8bc570e1401457105f886bdcfabe6..14b59a3fa34806365a5b15edad2e391f6f7be382 100644 --- a/dumux/discretization/cellcentered/mpfa/fourierslaw.hh +++ b/dumux/discretization/cellcentered/mpfa/fourierslaw.hh @@ -49,7 +49,9 @@ class FouriersLawImplementation<TypeTag, DiscretizationMethods::CCMpfa> using Problem = typename GET_PROP_TYPE(TypeTag, Problem); using GridView = typename GET_PROP_TYPE(TypeTag, GridView); using Element = typename GridView::template Codim<0>::Entity; - using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView; + + using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); + using FVElementGeometry = typename FVGridGeometry::LocalView; using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace; using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables); using ElementFluxVarsCache = typename GET_PROP_TYPE(TypeTag, ElementFluxVariablesCache); @@ -91,7 +93,7 @@ class FouriersLawImplementation<TypeTag, DiscretizationMethods::CCMpfa> using DualGridNodalIndexSet = typename GET_PROP_TYPE(TypeTag, DualGridNodalIndexSet); using Stencil = typename DualGridNodalIndexSet::GridStencilType; - using MpfaHelper = typename GET_PROP_TYPE(TypeTag, MpfaHelper); + using MpfaHelper = typename FVGridGeometry::MpfaHelper; static constexpr bool considerSecondaryIVs = MpfaHelper::considerSecondaryIVs(); // In the current implementation of the flux variables cache we cannot make a diff --git a/dumux/discretization/cellcentered/mpfa/fvgridgeometry.hh b/dumux/discretization/cellcentered/mpfa/fvgridgeometry.hh index ef2380333056368c0cbe57402df0934cf4abd0a4..6a6d7f40b5f2750067f629ac747e126c49debbfa 100644 --- a/dumux/discretization/cellcentered/mpfa/fvgridgeometry.hh +++ b/dumux/discretization/cellcentered/mpfa/fvgridgeometry.hh @@ -77,7 +77,7 @@ public: //! export the flip scvf index set type using FlipScvfIndexSet = std::vector<ScvfOutsideGridIndexStorage>; //! export the mpfa helper type - using MpfaHelper = typename Traits::MpfaHelper; + using MpfaHelper = typename Traits::template MpfaHelper<ThisType>; //! export the grid interaction volume index set type using GridIVIndexSets = typename Traits::template GridIvIndexSets<ThisType>; //! export the type to be used for indicators where to use the secondary ivs @@ -426,7 +426,7 @@ public: //! export the flip scvf index set type using FlipScvfIndexSet = std::vector<ScvfOutsideGridIndexStorage>; //! export the mpfa helper type - using MpfaHelper = typename Traits::MpfaHelper; + using MpfaHelper = typename Traits::template MpfaHelper<ThisType>; //! export the grid interaction volume index set type using GridIVIndexSets = typename Traits::template GridIvIndexSets<ThisType>; //! export the type to be used for indicators where to use the secondary ivs diff --git a/dumux/discretization/cellcentered/mpfa/properties.hh b/dumux/discretization/cellcentered/mpfa/properties.hh index c46c778a1a321b6f7ac07957cce2fad6f21ddb5f..57b41148881251259f4f426bb3ea44697b4a3adf 100644 --- a/dumux/discretization/cellcentered/mpfa/properties.hh +++ b/dumux/discretization/cellcentered/mpfa/properties.hh @@ -99,15 +99,6 @@ public: using type = CCMpfaDualGridNodalIndexSet<GV, LI, dim, maxE, maxB>; }; -//! The mpfa helper class -SET_PROP(CCMpfaModel, MpfaHelper) -{ -private: - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); -public: - using type = CCMpfaHelper< FVGridGeometry >; -}; - //! Per default, we use the dynamic mpfa-o interaction volume SET_PROP(CCMpfaModel, PrimaryInteractionVolume) { @@ -142,7 +133,6 @@ private: { using SubControlVolume = CCSubControlVolume<GridView>; using SubControlVolumeFace = CCMpfaSubControlVolumeFace<GridView>; - using MpfaHelper = typename GET_PROP_TYPE(TypeTag, MpfaHelper); using NodalIndexSet = typename GET_PROP_TYPE(TypeTag, DualGridNodalIndexSet); template< class FVGridGeometry > @@ -154,6 +144,9 @@ private: template< class FVGridGeometry, bool enableGeomCache > using LocalView = CCMpfaFVElementGeometry<FVGridGeometry, enableGeomCache>; + template< class FVGridGeometry > + using MpfaHelper = CCMpfaHelper< FVGridGeometry >; + //! Use the correct connectivity map depending on mpfa scheme (obtain from primary iv) template< class FVGridGeometry > using ConnectivityMap = CCMpfaConnectivityMap<FVGridGeometry, FVGridGeometry::GridIVIndexSets::PrimaryInteractionVolume::MpfaMethod>; diff --git a/dumux/porousmediumflow/fluxvariablescache.hh b/dumux/porousmediumflow/fluxvariablescache.hh index 57662df20fb9661fd1d5cc89f29f4df87e46378a..f775ba98a54191ed594749a48b5f2ac79da3b0a7 100644 --- a/dumux/porousmediumflow/fluxvariablescache.hh +++ b/dumux/porousmediumflow/fluxvariablescache.hh @@ -152,7 +152,7 @@ class PorousMediumFluxVariablesCacheImplementation<TypeTag, DiscretizationMethod { using GridIndexType = typename GET_PROP_TYPE(TypeTag, GridView)::IndexSet::IndexType; - using MpfaHelper = typename GET_PROP_TYPE(TypeTag, MpfaHelper); + using MpfaHelper = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::MpfaHelper; static constexpr bool considerSecondary = MpfaHelper::considerSecondaryIVs(); public: //! Returns whether or not this cache has been updated