From 14246401c6ba22c647c3d7123ac44eb05067b866 Mon Sep 17 00:00:00 2001 From: Kilian Weishaupt <kilian.weishaupt@iws.uni-stuttgart.de> Date: Tue, 3 Dec 2019 10:29:51 +0100 Subject: [PATCH] [sequential] Replace property system macros --- .../1p/sequential/celldata.hh | 2 +- .../diffusion/cellcentered/pressure.hh | 16 ++-- .../cellcentered/pressureproperties.hh | 16 +++- .../cellcentered/pressurevelocity.hh | 4 +- .../diffusion/cellcentered/velocity.hh | 16 ++-- .../1p/sequential/diffusion/problem.hh | 13 +-- .../1p/sequential/diffusion/properties.hh | 5 +- .../1p/sequential/fluxdata.hh | 4 +- .../1p/sequential/properties.hh | 29 ++++-- .../2p/sequential/celldata.hh | 20 ++-- .../2p/sequential/celldataadaptive.hh | 10 +- .../diffusion/cellcentered/pressure.hh | 32 +++---- .../cellcentered/pressureadaptive.hh | 28 +++--- .../cellcentered/pressureproperties.hh | 16 +++- .../pressurepropertiesadaptive.hh | 14 ++- .../cellcentered/pressurevelocity.hh | 4 +- .../diffusion/cellcentered/velocity.hh | 32 +++---- .../cellcentered/velocityadaptive.hh | 26 +++--- .../diffusion/mimetic/croperator.hh | 6 +- .../diffusion/mimetic/croperatoradaptive.hh | 6 +- .../diffusion/mimetic/localstiffness.hh | 10 +- .../sequential/diffusion/mimetic/mimetic.hh | 26 +++--- .../diffusion/mimetic/mimeticadaptive.hh | 26 +++--- .../sequential/diffusion/mimetic/operator.hh | 24 ++--- .../diffusion/mimetic/operatoradaptive.hh | 24 ++--- .../sequential/diffusion/mimetic/pressure.hh | 34 +++---- .../diffusion/mimetic/pressureadaptive.hh | 34 +++---- .../diffusion/mimetic/pressureproperties.hh | 11 ++- .../mimetic/pressurepropertiesadaptive.hh | 11 ++- .../diffusion/mpfa/lmethod/2dpressure.hh | 34 +++---- .../mpfa/lmethod/2dpressureadaptive.hh | 34 +++---- .../mpfa/lmethod/2dpressureproperties.hh | 11 ++- .../lmethod/2dpressurepropertiesadaptive.hh | 11 ++- .../mpfa/lmethod/2dpressurevelocity.hh | 26 +++--- .../lmethod/2dpressurevelocityadaptive.hh | 26 +++--- .../lmethod/2dtransmissibilitycalculator.hh | 6 +- .../diffusion/mpfa/lmethod/2dvelocity.hh | 30 +++--- .../mpfa/lmethod/2dvelocityadaptive.hh | 24 ++--- .../lmethod/3dinteractionvolumecontainer.hh | 15 +-- .../3dinteractionvolumecontaineradaptive.hh | 12 +-- .../diffusion/mpfa/lmethod/3dpressure.hh | 36 ++++---- .../mpfa/lmethod/3dpressureadaptive.hh | 36 ++++---- .../mpfa/lmethod/3dpressureproperties.hh | 19 ++-- .../lmethod/3dpressurepropertiesadaptive.hh | 17 +++- .../mpfa/lmethod/3dpressurevelocity.hh | 28 +++--- .../lmethod/3dpressurevelocityadaptive.hh | 28 +++--- .../lmethod/3dtransmissibilitycalculator.hh | 8 +- .../diffusion/mpfa/lmethod/3dvelocity.hh | 34 +++---- .../mpfa/lmethod/3dvelocityadaptive.hh | 34 +++---- .../diffusion/mpfa/omethod/2dpressure.hh | 34 +++---- .../mpfa/omethod/2dpressureproperties.hh | 11 ++- .../mpfa/omethod/2dpressurevelocity.hh | 26 +++--- .../diffusion/mpfa/omethod/2dvelocity.hh | 30 +++--- .../2p/sequential/diffusion/problem.hh | 12 +-- .../2p/sequential/diffusion/properties.hh | 8 +- .../2p/sequential/fluxdata.hh | 8 +- .../sequential/impes/gridadaptionindicator.hh | 12 +-- .../impes/gridadaptionindicatorlocal.hh | 16 ++-- .../2p/sequential/impes/problem.hh | 10 +- .../2p/sequential/impes/properties.hh | 5 +- .../2p/sequential/impes/propertiesadaptive.hh | 20 ++-- .../2p/sequential/properties.hh | 59 +++++++----- .../cellcentered/capillarydiffusion.hh | 22 ++--- .../transport/cellcentered/convectivepart.hh | 6 +- .../transport/cellcentered/diffusivepart.hh | 6 +- .../transport/cellcentered/evalcflflux.hh | 4 +- .../cellcentered/evalcflfluxcoats.hh | 28 +++--- .../cellcentered/evalcflfluxdefault.hh | 12 +-- .../transport/cellcentered/gravitypart.hh | 20 ++-- .../transport/cellcentered/properties.hh | 25 +++-- .../transport/cellcentered/saturation.hh | 40 ++++---- .../2p/sequential/transport/problem.hh | 19 ++-- .../2p/sequential/transport/properties.hh | 11 ++- .../2p2c/sequential/adaptiveproperties.hh | 28 ++++-- .../2p2c/sequential/celldata.hh | 10 +- .../2p2c/sequential/celldataadaptive.hh | 14 +-- .../2p2c/sequential/celldatamultiphysics.hh | 8 +- .../2p2c/sequential/fluxdata.hh | 10 +- .../2p2c/sequential/fv2dpressureadaptive.hh | 20 ++-- .../2p2c/sequential/fv2dtransportadaptive.hh | 24 ++--- .../2p2c/sequential/fv3dpressureadaptive.hh | 50 +++++----- .../2p2c/sequential/fv3dtransportadaptive.hh | 32 +++---- ...fal3dinteractionvolumecontaineradaptive.hh | 14 +-- .../2p2c/sequential/fvpressure.hh | 38 ++++---- .../sequential/fvpressurecompositional.hh | 36 ++++---- .../2p2c/sequential/fvpressuremultiphysics.hh | 32 +++---- .../2p2c/sequential/fvtransport.hh | 62 ++++++------- .../sequential/fvtransportmultiphysics.hh | 18 ++-- .../2p2c/sequential/problem.hh | 16 ++-- .../2p2c/sequential/properties.hh | 67 ++++++++------ .../2p2c/sequential/variableclassadaptive.hh | 8 +- .../cellcentered/mpfa/linteractionvolume.hh | 10 +- .../cellcentered/mpfa/linteractionvolume3d.hh | 12 +-- .../mpfa/linteractionvolume3dadaptive.hh | 12 +-- .../cellcentered/mpfa/ointeractionvolume.hh | 10 +- .../cellcentered/mpfa/properties.hh | 25 +++-- .../cellcentered/mpfa/velocityintransport.hh | 6 +- .../sequential/cellcentered/pressure.hh | 26 +++--- .../sequential/cellcentered/transport.hh | 18 ++-- .../sequential/cellcentered/velocity.hh | 6 +- .../cellcentered/velocitydefault.hh | 6 +- .../porousmediumflow/sequential/gridadapt.hh | 18 ++-- .../gridadaptinitializationindicator.hh | 16 ++-- ...gridadaptinitializationindicatordefault.hh | 6 +- .../sequential/gridadaptproperties.hh | 38 +++++--- dumux/porousmediumflow/sequential/impet.hh | 8 +- .../sequential/impetproblem.hh | 28 +++--- .../sequential/impetproperties.hh | 10 +- .../sequential/mimetic/properties.hh | 10 +- .../sequential/onemodelproblem.hh | 18 ++-- .../sequential/pressureproperties.hh | 30 ++++-- .../porousmediumflow/sequential/properties.hh | 91 ++++++++++++------- .../sequential/transportproperties.hh | 13 ++- .../sequential/variableclass.hh | 6 +- .../sequential/variableclassadaptive.hh | 8 +- 115 files changed, 1267 insertions(+), 1063 deletions(-) diff --git a/dumux/porousmediumflow/1p/sequential/celldata.hh b/dumux/porousmediumflow/1p/sequential/celldata.hh index 8a5304d49a..3df0e2b132 100644 --- a/dumux/porousmediumflow/1p/sequential/celldata.hh +++ b/dumux/porousmediumflow/1p/sequential/celldata.hh @@ -47,7 +47,7 @@ template<class TypeTag> class CellData1P { private: - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; using FluxData = FluxData1P<TypeTag>; private: diff --git a/dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/pressure.hh b/dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/pressure.hh index f3f58123ec..b201a1e045 100644 --- a/dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/pressure.hh +++ b/dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/pressure.hh @@ -57,18 +57,18 @@ template<class TypeTag> class FVPressure1P: public FVPressure<TypeTag> { using ParentType = FVPressure<TypeTag>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; using ScalarSolutionType = typename SolutionTypes::ScalarSolution; enum diff --git a/dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/pressureproperties.hh b/dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/pressureproperties.hh index 82b3bd2150..51401ae25f 100644 --- a/dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/pressureproperties.hh +++ b/dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/pressureproperties.hh @@ -26,7 +26,7 @@ #define DUMUX_FVPRESSUREPORPERTIES1P_SEQUENTIAL_HH //Dumux-includes -#include <dumux/common/properties/propertysystemmacros.hh> +#include <dumux/common/properties.hh> #include <dumux/porousmediumflow/1p/sequential/diffusion/properties.hh> namespace Dumux { @@ -45,7 +45,10 @@ namespace Properties { ////////////////////////////////////////////////////////////////// //! The type tag for the one-phase problems using a standard finite volume model -NEW_TYPE_TAG(FVPressureOneP, INHERITS_FROM(PressureOneP)); +// Create new type tags +namespace TTag { +struct FVPressureOneP { using InheritsFrom = std::tuple<PressureOneP>; }; +} // end namespace TTag ////////////////////////////////////////////////////////////////// // Property tags @@ -63,11 +66,14 @@ namespace Properties { // Properties ////////////////////////////////////////////////////////////////// //! Set velocity reconstruction implementation standard cell centered finite volume schemes as default -SET_TYPE_PROP( FVPressureOneP, Velocity, FVVelocity1P<TypeTag> ); +template<class TypeTag> +struct Velocity<TypeTag, TTag:: FVPressureOneP> { using type = FVVelocity1P<TypeTag> ; }; //! Set finite volume implementation of the one-phase pressure equation as default pressure model -SET_TYPE_PROP(FVPressureOneP, PressureModel, FVPressure1P<TypeTag>); +template<class TypeTag> +struct PressureModel<TypeTag, TTag::FVPressureOneP> { using type = FVPressure1P<TypeTag>; }; //! Allow assembling algorithm for the pressure matrix to assemble only from one side of a cell-cell interface -SET_BOOL_PROP(FVPressureOneP, VisitFacesOnlyOnce, true); +template<class TypeTag> +struct VisitFacesOnlyOnce<TypeTag, TTag::FVPressureOneP> { static constexpr bool value = true; }; // \} } // end namespace Properties } // end namespace Dumux diff --git a/dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/pressurevelocity.hh b/dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/pressurevelocity.hh index 310fb78e9f..d82beb34b9 100644 --- a/dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/pressurevelocity.hh +++ b/dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/pressurevelocity.hh @@ -56,7 +56,7 @@ namespace Dumux { template<class TypeTag> class FVPressureVelocity1P: public FVPressure1P<TypeTag> { using ParentType = FVPressure1P<TypeTag>; - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using Problem = GetPropType<TypeTag, Properties::Problem>; public: /*! * \brief Initializes the pressure model @@ -105,7 +105,7 @@ public: {} private: - FVVelocity<TypeTag, typename GET_PROP_TYPE(TypeTag, Velocity) > velocity_; + FVVelocity<TypeTag, GetPropType<TypeTag, Properties::Velocity> > velocity_; }; } // end namespace Dumux diff --git a/dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/velocity.hh b/dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/velocity.hh index 1cf30fa249..5a9b0fb324 100644 --- a/dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/velocity.hh +++ b/dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/velocity.hh @@ -47,18 +47,18 @@ namespace Dumux { template<class TypeTag> class FVVelocity1P { - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; using Element = typename GridView::Traits::template Codim<0>::Entity; using Intersection = typename GridView::Intersection; diff --git a/dumux/porousmediumflow/1p/sequential/diffusion/problem.hh b/dumux/porousmediumflow/1p/sequential/diffusion/problem.hh index c695676e1f..57a15cc186 100644 --- a/dumux/porousmediumflow/1p/sequential/diffusion/problem.hh +++ b/dumux/porousmediumflow/1p/sequential/diffusion/problem.hh @@ -32,7 +32,8 @@ namespace Dumux { namespace Properties { -SET_TYPE_PROP(PressureOneP, Model, typename GET_PROP_TYPE(TypeTag, PressureModel)); +template<class TypeTag> +struct Model<TypeTag, TTag::PressureOneP> { using type = GetPropType<TypeTag, Properties::PressureModel>; }; } /*! * \ingroup SequentialOnePModel @@ -43,17 +44,17 @@ SET_TYPE_PROP(PressureOneP, Model, typename GET_PROP_TYPE(TypeTag, PressureModel template<class TypeTag> class DiffusionProblem1P: public OneModelProblem<TypeTag> { - using Implementation = typename GET_PROP_TYPE(TypeTag, Problem); + using Implementation = GetPropType<TypeTag, Properties::Problem>; using ParentType = OneModelProblem<TypeTag>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; using Grid = typename GridView::Grid; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; - using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); + using TimeManager = GetPropType<TypeTag, Properties::TimeManager>; // material properties - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using Element = typename GridView::Traits::template Codim<0>::Entity; diff --git a/dumux/porousmediumflow/1p/sequential/diffusion/properties.hh b/dumux/porousmediumflow/1p/sequential/diffusion/properties.hh index ab373303df..d045c82e87 100644 --- a/dumux/porousmediumflow/1p/sequential/diffusion/properties.hh +++ b/dumux/porousmediumflow/1p/sequential/diffusion/properties.hh @@ -38,7 +38,10 @@ namespace Properties { ////////////////////////////////////////////////////////////////// //! The type tag for 1p pressure models -NEW_TYPE_TAG(PressureOneP, INHERITS_FROM(Pressure, SequentialOneP)); +// Create new type tags +namespace TTag { +struct PressureOneP { using InheritsFrom = std::tuple<SequentialOneP, Pressure>; }; +} // end namespace TTag ////////////////////////////////////////////////////////////////// // Property tags diff --git a/dumux/porousmediumflow/1p/sequential/fluxdata.hh b/dumux/porousmediumflow/1p/sequential/fluxdata.hh index 2761da5f2f..c2fd3ffbb1 100644 --- a/dumux/porousmediumflow/1p/sequential/fluxdata.hh +++ b/dumux/porousmediumflow/1p/sequential/fluxdata.hh @@ -41,8 +41,8 @@ template<class TypeTag> class FluxData1P { private: - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { diff --git a/dumux/porousmediumflow/1p/sequential/properties.hh b/dumux/porousmediumflow/1p/sequential/properties.hh index ac0dcb978d..ce03576123 100644 --- a/dumux/porousmediumflow/1p/sequential/properties.hh +++ b/dumux/porousmediumflow/1p/sequential/properties.hh @@ -47,12 +47,16 @@ namespace Properties { ////////////////////////////////////////////////////////////////// //! The type tag for the single-phase problem -NEW_TYPE_TAG(SequentialOneP, INHERITS_FROM(SequentialModel)); +// Create new type tags +namespace TTag { +struct SequentialOneP { using InheritsFrom = std::tuple<SequentialModel>; }; +} // end namespace TTag ////////////////////////////////////////////////////////////////// // Property tags ////////////////////////////////////////////////////////////////// -NEW_PROP_TAG( Fluid ); // The fluid for one-phase models +template<class TypeTag, class MyTypeTag> +struct Fluid { using type = UndefinedProperty; }; // The fluid for one-phase models } // end namespace Properties } // end namespace Dumux @@ -68,25 +72,32 @@ namespace Properties { ////////////////////////////////////////////////////////////////// //! Set number of equations to 1 for isothermal one-phase models -SET_INT_PROP(SequentialOneP, NumEq, 1); +template<class TypeTag> +struct NumEq<TypeTag, TTag::SequentialOneP> { static constexpr int value = 1; }; //! Set number of phases to 1 for one-phase models -SET_INT_PROP(SequentialOneP, NumPhases, 1); +template<class TypeTag> +struct NumPhases<TypeTag, TTag::SequentialOneP> { static constexpr int value = 1; }; //! Each phase consists of 1 pure component -SET_INT_PROP(SequentialOneP, NumComponents, 1); +template<class TypeTag> +struct NumComponents<TypeTag, TTag::SequentialOneP> { static constexpr int value = 1; }; //! Chose the set of indices for the one-phase formulation -SET_TYPE_PROP(SequentialOneP, Indices, SequentialOnePCommonIndices); +template<class TypeTag> +struct Indices<TypeTag, TTag::SequentialOneP> { using type = SequentialOnePCommonIndices; }; //! Set general sequential VariableClass as default -SET_TYPE_PROP(SequentialOneP, Variables, VariableClass<TypeTag>); +template<class TypeTag> +struct Variables<TypeTag, TTag::SequentialOneP> { using type = VariableClass<TypeTag>; }; //! Set standart CellData of immiscible one-phase models as default -SET_TYPE_PROP(SequentialOneP, CellData, CellData1P<TypeTag>); +template<class TypeTag> +struct CellData<TypeTag, TTag::SequentialOneP> { using type = CellData1P<TypeTag>; }; //! The spatial parameters to be employed. Use BoxSpatialParams by default. -SET_TYPE_PROP(SequentialOneP, SpatialParams, SequentialFVSpatialParamsOneP<TypeTag>); +template<class TypeTag> +struct SpatialParams<TypeTag, TTag::SequentialOneP> { using type = SequentialFVSpatialParamsOneP<TypeTag>; }; } // end namespace Properties } // end namespace Dumux #endif diff --git a/dumux/porousmediumflow/2p/sequential/celldata.hh b/dumux/porousmediumflow/2p/sequential/celldata.hh index d1bb2e53f2..d9eb5f65b7 100644 --- a/dumux/porousmediumflow/2p/sequential/celldata.hh +++ b/dumux/porousmediumflow/2p/sequential/celldata.hh @@ -62,17 +62,17 @@ template<class TypeTag> class CellData2P<TypeTag, false> { private: - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using GridView = GetPropType<TypeTag, Properties::GridView>; using FluxData = FluxData2P<TypeTag>; - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidState = GetPropType<TypeTag, Properties::FluidState>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; enum { @@ -80,7 +80,7 @@ private: }; enum { - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; private: Scalar saturation_[numPhases]; @@ -404,17 +404,17 @@ template<class TypeTag> class CellData2P<TypeTag, true> { private: - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using GridView = GetPropType<TypeTag, Properties::GridView>; using FluxData = FluxData2P<TypeTag>; - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidState = GetPropType<TypeTag, Properties::FluidState>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; enum { @@ -422,7 +422,7 @@ private: }; enum { - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; private: Scalar potential_[numPhases]; diff --git a/dumux/porousmediumflow/2p/sequential/celldataadaptive.hh b/dumux/porousmediumflow/2p/sequential/celldataadaptive.hh index ff757f2bef..4fd8f3f058 100644 --- a/dumux/porousmediumflow/2p/sequential/celldataadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/celldataadaptive.hh @@ -38,18 +38,18 @@ namespace Dumux { * \tparam TypeTag The problem TypeTag * \tparam bool Used for specialization for case of compressible flow (<tt>true</tt>) or incompressible flow (<tt>false</tt>) */ -template<class TypeTag, bool enableCompressibility = GET_PROP_VALUE(TypeTag, EnableCompressibility)> +template<class TypeTag, bool enableCompressibility = getPropValue<TypeTag, Properties::EnableCompressibility>()> class CellData2PAdaptive: public CellData2P<TypeTag, enableCompressibility> { private: - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using GridView = GetPropType<TypeTag, Properties::GridView>; using Grid = typename GridView::Grid; - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using Problem = GetPropType<TypeTag, Properties::Problem>; using Element = typename GridView::Traits::template Codim<0>::Entity; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; enum { diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressure.hh b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressure.hh index 14643eb17e..c248918fa2 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressure.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressure.hh @@ -114,25 +114,25 @@ template<class TypeTag> class FVPressure2P: public FVPressure<TypeTag> using ParentType = FVPressure<TypeTag>; //the model implementation - using Implementation = typename GET_PROP_TYPE(TypeTag, PressureModel); + using Implementation = GetPropType<TypeTag, Properties::PressureModel>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); - using PressureSolutionVector = typename GET_PROP_TYPE(TypeTag, PressureSolutionVector); + using CellData = GetPropType<TypeTag, Properties::CellData>; + using PressureSolutionVector = GetPropType<TypeTag, Properties::PressureSolutionVector>; using ScalarSolutionType = typename SolutionTypes::ScalarSolution; @@ -154,7 +154,7 @@ template<class TypeTag> class FVPressure2P: public FVPressure<TypeTag> }; enum { - wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx, numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx, numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; using Element = typename GridView::Traits::template Codim<0>::Entity; @@ -594,11 +594,11 @@ private: int vtkOutputLevel_; - static const bool compressibility_ = GET_PROP_VALUE(TypeTag, EnableCompressibility); + static const bool compressibility_ = getPropValue<TypeTag, Properties::EnableCompressibility>(); //! Gives kind of pressure used (\f$p_w\f$, \f$p_n\f$, \f$p_{global}\f$) - static const int pressureType_ = GET_PROP_VALUE(TypeTag, PressureFormulation); + static const int pressureType_ = getPropValue<TypeTag, Properties::PressureFormulation>(); //! Gives kind of saturation used (\f$S_w\f$, \f$S_n\f$) - static const int saturationType_ = GET_PROP_VALUE(TypeTag, SaturationFormulation); + static const int saturationType_ = getPropValue<TypeTag, Properties::SaturationFormulation>(); }; /*! diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressureadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressureadaptive.hh index 7ac3c4991d..6d1d1d3a05 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressureadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressureadaptive.hh @@ -45,18 +45,18 @@ template<class TypeTag> class FVPressure2PAdaptive: public FVPressure2P<TypeTag> { using ParentType = FVPressure2P<TypeTag>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; enum { @@ -72,7 +72,7 @@ template<class TypeTag> class FVPressure2PAdaptive: public FVPressure2P<TypeTag> }; enum { - wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx, numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx, numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; using Intersection = typename GridView::Intersection; @@ -231,17 +231,17 @@ public: private: Problem& problem_; - FVVelocity<TypeTag, typename GET_PROP_TYPE(TypeTag, Velocity)> velocity_; + FVVelocity<TypeTag, GetPropType<TypeTag, Properties::Velocity>> velocity_; const GravityVector& gravity_; //!< vector including the gravity constant Scalar density_[numPhases]; Scalar viscosity_[numPhases]; - static const bool compressibility_ = GET_PROP_VALUE(TypeTag, EnableCompressibility); + static const bool compressibility_ = getPropValue<TypeTag, Properties::EnableCompressibility>(); //! gives kind of pressure used (\f$p_w\f$, \f$p_n\f$, \f$p_{global}\f$) - static const int pressureType_ = GET_PROP_VALUE(TypeTag, PressureFormulation); + static const int pressureType_ = getPropValue<TypeTag, Properties::PressureFormulation>(); //! gives kind of saturation used (\f$S_w\f$, \f$S_n\f$) - static const int saturationType_ = GET_PROP_VALUE(TypeTag, SaturationFormulation); + static const int saturationType_ = getPropValue<TypeTag, Properties::SaturationFormulation>(); }; /*! @@ -264,7 +264,7 @@ void FVPressure2PAdaptive<TypeTag>::getFlux(EntryType& entry, const Intersection ParentType::getFlux(entry, intersection, cellData, first); // add the entry only once in case the VisitFacesOnlyOnce option is enabled!!! - if (GET_PROP_VALUE(TypeTag, VisitFacesOnlyOnce) && elementI.level() < elementJ.level()) + if (getPropValue<TypeTag, Properties::VisitFacesOnlyOnce>() && elementI.level() < elementJ.level()) { entry = 0.; } diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressureproperties.hh b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressureproperties.hh index 052c118787..239fc2d939 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressureproperties.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressureproperties.hh @@ -25,7 +25,7 @@ #define DUMUX_FVPRESSUREPORPERTIES2P_SEQUENTIAL_HH //Dumux-includes -#include <dumux/common/properties/propertysystemmacros.hh> +#include <dumux/common/properties.hh> #include <dumux/porousmediumflow/2p/sequential/diffusion/properties.hh> namespace Dumux { @@ -43,7 +43,10 @@ namespace Properties { ////////////////////////////////////////////////////////////////// //! The type tag for two-phase problems using a standard finite volume model -NEW_TYPE_TAG(FVPressureTwoP, INHERITS_FROM(PressureTwoP)); +// Create new type tags +namespace TTag { +struct FVPressureTwoP { using InheritsFrom = std::tuple<PressureTwoP>; }; +} // end namespace TTag ////////////////////////////////////////////////////////////////// // Property tags @@ -61,11 +64,14 @@ namespace Properties { // Properties ////////////////////////////////////////////////////////////////// //! Set velocity reconstruction implementation standard cell centered finite volume schemes as default -SET_TYPE_PROP( FVPressureTwoP, Velocity, FVVelocity2P<TypeTag> ); +template<class TypeTag> +struct Velocity<TypeTag, TTag:: FVPressureTwoP> { using type = FVVelocity2P<TypeTag> ; }; //! Set finite volume implementation of the two-phase pressure equation as default pressure model -SET_TYPE_PROP(FVPressureTwoP, PressureModel, FVPressure2P<TypeTag>); +template<class TypeTag> +struct PressureModel<TypeTag, TTag::FVPressureTwoP> { using type = FVPressure2P<TypeTag>; }; //! Allow assembling algorithm for the pressure matrix to assemble only from one side of a cell-cell interface -SET_BOOL_PROP(FVPressureTwoP, VisitFacesOnlyOnce, true); +template<class TypeTag> +struct VisitFacesOnlyOnce<TypeTag, TTag::FVPressureTwoP> { static constexpr bool value = true; }; } // end namespace Properties } // end namespace Dumux diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressurepropertiesadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressurepropertiesadaptive.hh index 5ef692bf88..d98cfb977a 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressurepropertiesadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressurepropertiesadaptive.hh @@ -42,7 +42,10 @@ namespace Properties { ////////////////////////////////////////////////////////////////// //! The type tag for two-phase problems using a grid-adaptive finite volume model -NEW_TYPE_TAG(FVPressureTwoPAdaptive, INHERITS_FROM(PressureTwoP)); +// Create new type tags +namespace TTag { +struct FVPressureTwoPAdaptive { using InheritsFrom = std::tuple<PressureTwoP>; }; +} // end namespace TTag ////////////////////////////////////////////////////////////////// // Property tags @@ -61,11 +64,14 @@ namespace Properties { ////////////////////////////////////////////////////////////////// //! Set velocity reconstruction implementation for grid-adaptive cell centered finite volume schemes as default -SET_TYPE_PROP( FVPressureTwoPAdaptive, Velocity, FVVelocity2PAdaptive<TypeTag> ); +template<class TypeTag> +struct Velocity<TypeTag, TTag:: FVPressureTwoPAdaptive> { using type = FVVelocity2PAdaptive<TypeTag> ; }; //! Set finite volume implementation of the two-phase pressure equation which allows hanging nodes as default pressure model -SET_TYPE_PROP(FVPressureTwoPAdaptive, PressureModel, FVPressure2PAdaptive<TypeTag>); +template<class TypeTag> +struct PressureModel<TypeTag, TTag::FVPressureTwoPAdaptive> { using type = FVPressure2PAdaptive<TypeTag>; }; //! Allow assembling algorithm for the pressure matrix to assemble only from one side of a cell-cell interface -SET_BOOL_PROP(FVPressureTwoPAdaptive, VisitFacesOnlyOnce, true); +template<class TypeTag> +struct VisitFacesOnlyOnce<TypeTag, TTag::FVPressureTwoPAdaptive> { static constexpr bool value = true; }; } // end namespace Properties } // end namespace Dumnux diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressurevelocity.hh b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressurevelocity.hh index 8f1c04c5ac..82d7242c06 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressurevelocity.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressurevelocity.hh @@ -39,7 +39,7 @@ namespace Dumux { template<class TypeTag> class FVPressureVelocity2P: public FVPressure2P<TypeTag> { using ParentType = FVPressure2P<TypeTag>; - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using Problem = GetPropType<TypeTag, Properties::Problem>; public: /*! * \brief Initializes the pressure model @@ -88,7 +88,7 @@ public: {} private: - FVVelocity<TypeTag, typename GET_PROP_TYPE(TypeTag, Velocity) > velocity_; + FVVelocity<TypeTag, GetPropType<TypeTag, Properties::Velocity> > velocity_; }; } // end namespace Dumux diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/velocity.hh b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/velocity.hh index adefdb7259..e191cb38f1 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/velocity.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/velocity.hh @@ -59,22 +59,22 @@ namespace Dumux { template<class TypeTag> class FVVelocity2P { - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; using Element = typename GridView::Traits::template Codim<0>::Entity; using Intersection = typename GridView::Intersection; @@ -106,7 +106,7 @@ class FVVelocity2P }; enum { - wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx, numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx, numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; using GlobalPosition = typename Element::Geometry::GlobalCoordinate; @@ -121,7 +121,7 @@ public: FVVelocity2P(Problem& problem) : problem_(problem), gravity_(problem.gravity()) { - if (GET_PROP_VALUE(TypeTag, EnableCompressibility) && velocityType_ == vt) + if (getPropValue<TypeTag, Properties::EnableCompressibility>() && velocityType_ == vt) { DUNE_THROW(Dune::NotImplemented, "Total velocity - global pressure - model cannot be used with compressible fluids!"); @@ -314,12 +314,12 @@ private: int vtkOutputLevel_; //! Gives kind of velocity used (\f$ 0 = v_w\f$, \f$ 1 = v_n\f$, \f$ 2 = v_t\f$) - static const int velocityType_ = GET_PROP_VALUE(TypeTag, VelocityFormulation); - static const bool compressibility_ = GET_PROP_VALUE(TypeTag, EnableCompressibility); + static const int velocityType_ = getPropValue<TypeTag, Properties::VelocityFormulation>(); + static const bool compressibility_ = getPropValue<TypeTag, Properties::EnableCompressibility>(); //! Gives kind of pressure used (\f$p_w\f$, \f$p_n\f$, \f$p_{global}\f$) - static const int pressureType_ = GET_PROP_VALUE(TypeTag, PressureFormulation); + static const int pressureType_ = getPropValue<TypeTag, Properties::PressureFormulation>(); //! Gives kind of saturation used (\f$S_w\f$, \f$S_n\f$) - static const int saturationType_ = GET_PROP_VALUE(TypeTag, SaturationFormulation); + static const int saturationType_ = getPropValue<TypeTag, Properties::SaturationFormulation>(); }; /*! diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/velocityadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/velocityadaptive.hh index 90abc1fef2..9ed529385e 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/velocityadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/velocityadaptive.hh @@ -40,17 +40,17 @@ class FVVelocity2PAdaptive: public FVVelocity2P<TypeTag> { using ParentType = FVVelocity2P<TypeTag>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; using Intersection = typename GridView::Intersection; @@ -72,7 +72,7 @@ class FVVelocity2PAdaptive: public FVVelocity2P<TypeTag> }; enum { - wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx, numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx, numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; using Element = typename GridView::template Codim<0>::Entity; @@ -89,7 +89,7 @@ public: FVVelocity2PAdaptive(Problem& problem) : ParentType(problem), problem_(problem), gravity_(problem.gravity()) { - if (GET_PROP_VALUE(TypeTag, EnableCompressibility) && velocityType_ == vt) + if (getPropValue<TypeTag, Properties::EnableCompressibility>() && velocityType_ == vt) { DUNE_THROW(Dune::NotImplemented, "Total velocity - global pressure - model cannot be used with compressible fluids!"); } @@ -146,12 +146,12 @@ private: Scalar viscosity_[numPhases]; //! Gives kind of velocity used (\f$ 0 = v_w\f$, \f$ 1 = v_n\f$, \f$ 2 = v_t\f$) - static const int velocityType_ = GET_PROP_VALUE(TypeTag, VelocityFormulation); - static const bool compressibility_ = GET_PROP_VALUE(TypeTag, EnableCompressibility); + static const int velocityType_ = getPropValue<TypeTag, Properties::VelocityFormulation>(); + static const bool compressibility_ = getPropValue<TypeTag, Properties::EnableCompressibility>(); //! Gives kind of pressure used (\f$p_w\f$, \f$p_n\f$, \f$p_{global}\f$) - static const int pressureType_ = GET_PROP_VALUE(TypeTag, PressureFormulation); + static const int pressureType_ = getPropValue<TypeTag, Properties::PressureFormulation>(); //! Gives kind of saturation used (\f$S_w\f$, \f$S_n\f$) - static const int saturationType_ = GET_PROP_VALUE(TypeTag, SaturationFormulation); + static const int saturationType_ = getPropValue<TypeTag, Properties::SaturationFormulation>(); }; /*! diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/croperator.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/croperator.hh index 39b202f576..c2779eebb1 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/croperator.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/croperator.hh @@ -72,8 +72,8 @@ class CROperatorAssemblerTwoP return gt.dim() == dim-1; } }; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using GridView = GetPropType<TypeTag, Properties::GridView>; enum {dim=GridView::dimension}; using IS = typename GridView::IndexSet; using BlockType = Dune::FieldMatrix<Scalar, 1, 1>; @@ -85,7 +85,7 @@ class CROperatorAssemblerTwoP using SatType = Dune::BlockVector< Dune::FieldVector<double, 1> >; using FaceMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; enum { pressureEqIdx = Indices::pressureEqIdx, diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/croperatoradaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/croperatoradaptive.hh index d28e8321f6..7d2c4345c0 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/croperatoradaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/croperatoradaptive.hh @@ -67,8 +67,8 @@ namespace Dumux { template<class TypeTag> class CROperatorAssemblerTwoPAdaptive { - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; enum {dim=GridView::dimension}; using Element = typename GridView::template Codim<0>::Entity; using IS = typename GridView::IndexSet; @@ -81,7 +81,7 @@ class CROperatorAssemblerTwoPAdaptive using SatType = Dune::BlockVector< Dune::FieldVector<double, 1> >; using IntersectionMapper = Dumux::IntersectionMapper<GridView>; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; enum { diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/localstiffness.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/localstiffness.hh index 8b2004628a..f56bf2766a 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/localstiffness.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/localstiffness.hh @@ -58,8 +58,8 @@ namespace Dumux { template<class TypeTag, int m> class LocalStiffness { - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; // grid types using Entity = typename GridView::template Codim<0>::Entity; enum {n=GridView::dimension}; @@ -69,7 +69,7 @@ public: using MBlockType = Dune::FieldMatrix<Scalar, m, m>; // one entry in the stiffness matrix using VBlockType = Dune::FieldVector<Scalar, m>; // one entry in the global vectors using BCBlockType = std::array<BoundaryConditions::Flags, m>; // componentwise boundary conditions - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; virtual ~LocalStiffness () { @@ -266,8 +266,8 @@ protected: template<class TypeTag, int m> class LinearLocalStiffness : public LocalStiffness<TypeTag,m> { - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; // grid types using Entity = typename GridView::template Codim<0>::Entity; diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/mimetic.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/mimetic.hh index 994b9e1a41..76e7c90d00 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/mimetic.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/mimetic.hh @@ -51,11 +51,11 @@ namespace Dumux { template<class TypeTag> class MimeticTwoPLocalStiffness: public LocalStiffness<TypeTag, 1> { - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; // grid types enum @@ -70,7 +70,7 @@ class MimeticTwoPLocalStiffness: public LocalStiffness<TypeTag, 1> saturationIdx = Indices::saturationIdx, pressureEqIdx = Indices::pressureEqIdx, satEqIdx = Indices::satEqIdx, - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; enum { @@ -82,21 +82,21 @@ class MimeticTwoPLocalStiffness: public LocalStiffness<TypeTag, 1> vw = Indices::velocityW, vn = Indices::velocityNw, //! gives kind of pressure used (\f$ 0 = p_w\f$, \f$ 1 = p_n\f$, \f$ 2 = p_{global}\f$) - pressureType = GET_PROP_VALUE(TypeTag, PressureFormulation), + pressureType = getPropValue<TypeTag, Properties::PressureFormulation>(), //! gives kind of saturation used (\f$ 0 = S_w\f$, \f$ 1 = S_n\f$) - saturationType = GET_PROP_VALUE(TypeTag, SaturationFormulation) + saturationType = getPropValue<TypeTag, Properties::SaturationFormulation>() }; using Grid = typename GridView::Grid; using Element = typename GridView::Traits::template Codim<0>::Entity; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); - using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw); + using CellData = GetPropType<TypeTag, Properties::CellData>; + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; + using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>; public: // define the number of components of your system, this is used outside diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/mimeticadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/mimeticadaptive.hh index 46525adc85..896605001e 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/mimeticadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/mimeticadaptive.hh @@ -53,11 +53,11 @@ namespace Dumux { template<class TypeTag> class MimeticTwoPLocalStiffnessAdaptive: public LocalStiffness<TypeTag, 1> { - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; // grid types enum @@ -72,7 +72,7 @@ class MimeticTwoPLocalStiffnessAdaptive: public LocalStiffness<TypeTag, 1> saturationIdx = Indices::saturationIdx, pressureEqIdx = Indices::pressureEqIdx, satEqIdx = Indices::satEqIdx, - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; enum { @@ -84,21 +84,21 @@ class MimeticTwoPLocalStiffnessAdaptive: public LocalStiffness<TypeTag, 1> vw = Indices::velocityW, vn = Indices::velocityNw, //! gives kind of pressure used (\f$ 0 = p_w\f$, \f$ 1 = p_n\f$, \f$ 2 = p_{global}\f$) - pressureType = GET_PROP_VALUE(TypeTag, PressureFormulation), + pressureType = getPropValue<TypeTag, Properties::PressureFormulation>(), //! gives kind of saturation used (\f$ 0 = S_w\f$, \f$ 1 = S_n\f$) - saturationType = GET_PROP_VALUE(TypeTag, SaturationFormulation) + saturationType = getPropValue<TypeTag, Properties::SaturationFormulation>() }; using Grid = typename GridView::Grid; using Element = typename GridView::Traits::template Codim<0>::Entity; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); - using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw); + using CellData = GetPropType<TypeTag, Properties::CellData>; + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; + using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>; using IntersectionMapper = Dumux::IntersectionMapper<GridView>; diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/operator.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/operator.hh index a4a2815062..095b5ce577 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/operator.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/operator.hh @@ -45,32 +45,32 @@ class MimeticOperatorAssemblerTwoP: public CROperatorAssemblerTwoP<TypeTag> { using ParentType = CROperatorAssemblerTwoP<TypeTag>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld, }; - using LocalStiffness = typename GET_PROP_TYPE(TypeTag, LocalStiffness); + using LocalStiffness = GetPropType<TypeTag, Properties::LocalStiffness>; using Element = typename GridView::template Codim<0>::Entity; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); - using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw); - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using CellData = GetPropType<TypeTag, Properties::CellData>; + using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>; + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; enum { pw = Indices::pressureW, pn = Indices::pressureNw, - pressureType = GET_PROP_VALUE(TypeTag, PressureFormulation), + pressureType = getPropValue<TypeTag, Properties::PressureFormulation>(), wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx, saturationIdx = Indices::saturationIdx, diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/operatoradaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/operatoradaptive.hh index 7f07857640..14c9a1de0c 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/operatoradaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/operatoradaptive.hh @@ -45,34 +45,34 @@ class MimeticOperatorAssemblerTwoPAdaptive : public CROperatorAssemblerTwoPAdapt { using ParentType = CROperatorAssemblerTwoPAdaptive<TypeTag>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; enum { dim=GridView::dimension, dimWorld=GridView::dimensionworld }; - using LocalStiffness = typename GET_PROP_TYPE(TypeTag, LocalStiffness); + using LocalStiffness = GetPropType<TypeTag, Properties::LocalStiffness>; using Element = typename GridView::template Codim<0>::Entity; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); - using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw); - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using CellData = GetPropType<TypeTag, Properties::CellData>; + using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>; + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; enum { pw = Indices::pressureW, pn = Indices::pressureNw, - pressureType = GET_PROP_VALUE(TypeTag, PressureFormulation), + pressureType = getPropValue<TypeTag, Properties::PressureFormulation>(), wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx, saturationIdx = Indices::saturationIdx, diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressure.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressure.hh index 2e10f93634..2bec024454 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressure.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressure.hh @@ -60,17 +60,17 @@ namespace Dumux { */ template<class TypeTag> class MimeticPressure2P { - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; enum { @@ -86,14 +86,14 @@ template<class TypeTag> class MimeticPressure2P vw = Indices::velocityW, vn = Indices::velocityNw, //! gives kind of pressure used (\f$ 0 = p_w\f$, \f$ 1 = p_n\f$, \f$ 2 = p_{global}\f$) - pressureType = GET_PROP_VALUE(TypeTag, PressureFormulation), + pressureType = getPropValue<TypeTag, Properties::PressureFormulation>(), //! gives kind of saturation used (\f$ 0 = S_w\f$, \f$ 1 = S_n\f$) - saturationType = GET_PROP_VALUE(TypeTag, SaturationFormulation), + saturationType = getPropValue<TypeTag, Properties::SaturationFormulation>(), }; enum { wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx, - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; using Element = typename GridView::Traits::template Codim<0>::Entity; @@ -102,16 +102,16 @@ template<class TypeTag> class MimeticPressure2P using Geometry = typename Element::Geometry; using JacobianTransposed = typename Geometry::JacobianTransposed ; - using LocalStiffness = typename GET_PROP_TYPE(TypeTag, LocalStiffness); + using LocalStiffness = GetPropType<TypeTag, Properties::LocalStiffness>; using TraceType = Dune::BlockVector<Dune::FieldVector<Scalar, 1> >; using OperatorAssembler = MimeticOperatorAssemblerTwoP<TypeTag>; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using CellData = GetPropType<TypeTag, Properties::CellData>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using ScalarSolutionType = typename SolutionTypes::ScalarSolution; - using Matrix = typename GET_PROP_TYPE(TypeTag, PressureCoefficientMatrix); - using Vector = typename GET_PROP_TYPE(TypeTag, PressureRHSVector); + using Matrix = GetPropType<TypeTag, Properties::PressureCoefficientMatrix>; + using Vector = GetPropType<TypeTag, Properties::PressureRHSVector>; using DimVector = Dune::FieldVector<Scalar, dim>; @@ -458,7 +458,7 @@ public: { DUNE_THROW(Dune::NotImplemented, "Saturation type not supported!"); } - if (GET_PROP_VALUE(TypeTag, EnableCompressibility)) + if (getPropValue<TypeTag, Properties::EnableCompressibility>()) { DUNE_THROW(Dune::NotImplemented, "Compressibility not supported!"); } @@ -488,7 +488,7 @@ private: template<class TypeTag> void MimeticPressure2P<TypeTag>::solve() { - using Solver = typename GET_PROP_TYPE(TypeTag, LinearSolver); + using Solver = GetPropType<TypeTag, Properties::LinearSolver>; auto verboseLevelSolver = getParam<int>("LinearSolver.Verbosity"); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressureadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressureadaptive.hh index f59d9b2482..3641886bd4 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressureadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressureadaptive.hh @@ -60,17 +60,17 @@ namespace Dumux { */ template<class TypeTag> class MimeticPressure2PAdaptive { - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; enum { @@ -86,15 +86,15 @@ template<class TypeTag> class MimeticPressure2PAdaptive vw = Indices::velocityW, vn = Indices::velocityNw, //! gives kind of pressure used (\f$ 0 = p_w\f$, \f$ 1 = p_n\f$, \f$ 2 = p_{global}\f$) - pressureType = GET_PROP_VALUE(TypeTag, PressureFormulation), + pressureType = getPropValue<TypeTag, Properties::PressureFormulation>(), //! gives kind of saturation used (\f$ 0 = S_w\f$, \f$ 1 = S_n\f$) - saturationType = GET_PROP_VALUE(TypeTag, SaturationFormulation), + saturationType = getPropValue<TypeTag, Properties::SaturationFormulation>(), }; enum { wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx, - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; using Element = typename GridView::Traits::template Codim<0>::Entity; @@ -105,16 +105,16 @@ template<class TypeTag> class MimeticPressure2PAdaptive using DimVector = Dune::FieldVector<Scalar, dim>; - using LocalStiffness = typename GET_PROP_TYPE(TypeTag, LocalStiffness); + using LocalStiffness = GetPropType<TypeTag, Properties::LocalStiffness>; using TraceType = Dune::BlockVector<Dune::FieldVector<Scalar, 1> >; using OperatorAssembler = MimeticOperatorAssemblerTwoPAdaptive<TypeTag>; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using CellData = GetPropType<TypeTag, Properties::CellData>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using ScalarSolutionType = typename SolutionTypes::ScalarSolution; - using Matrix = typename GET_PROP_TYPE(TypeTag, PressureCoefficientMatrix); - using Vector = typename GET_PROP_TYPE(TypeTag, PressureRHSVector); + using Matrix = GetPropType<TypeTag, Properties::PressureCoefficientMatrix>; + using Vector = GetPropType<TypeTag, Properties::PressureRHSVector>; //! Initializes the matrix to store the system of equations void initializeMatrix(); @@ -472,7 +472,7 @@ public: { DUNE_THROW(Dune::NotImplemented, "Saturation type not supported!"); } - if (GET_PROP_VALUE(TypeTag, EnableCompressibility)) + if (getPropValue<TypeTag, Properties::EnableCompressibility>()) { DUNE_THROW(Dune::NotImplemented, "Compressibility not supported!"); } @@ -502,7 +502,7 @@ private: template<class TypeTag> void MimeticPressure2PAdaptive<TypeTag>::solve() { - using Solver = typename GET_PROP_TYPE(TypeTag, LinearSolver); + using Solver = GetPropType<TypeTag, Properties::LinearSolver>; int verboseLevelSolver = getParam<int>("LinearSolver.Verbosity"); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressureproperties.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressureproperties.hh index fadb4d0983..b3718ade8e 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressureproperties.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressureproperties.hh @@ -42,7 +42,10 @@ namespace Properties { ////////////////////////////////////////////////////////////////// //! The type tag for the two-phase problems -NEW_TYPE_TAG(MimeticPressureTwoP, INHERITS_FROM(PressureTwoP, Mimetic)); +// Create new type tags +namespace TTag { +struct MimeticPressureTwoP { using InheritsFrom = std::tuple<Mimetic, PressureTwoP>; }; +} // end namespace TTag ////////////////////////////////////////////////////////////////// // Property tags @@ -55,8 +58,10 @@ NEW_TYPE_TAG(MimeticPressureTwoP, INHERITS_FROM(PressureTwoP, Mimetic)); namespace Dumux { namespace Properties { -SET_TYPE_PROP(MimeticPressureTwoP, PressureModel, MimeticPressure2P<TypeTag>); -SET_TYPE_PROP(MimeticPressureTwoP, LocalStiffness, MimeticTwoPLocalStiffness<TypeTag>); +template<class TypeTag> +struct PressureModel<TypeTag, TTag::MimeticPressureTwoP> { using type = MimeticPressure2P<TypeTag>; }; +template<class TypeTag> +struct LocalStiffness<TypeTag, TTag::MimeticPressureTwoP> { using type = MimeticTwoPLocalStiffness<TypeTag>; }; } // end namespace Properties } // end namespace Dumux diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressurepropertiesadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressurepropertiesadaptive.hh index 2e3c200d98..b9a2d57db7 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressurepropertiesadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressurepropertiesadaptive.hh @@ -42,7 +42,10 @@ namespace Properties { ////////////////////////////////////////////////////////////////// //! The type tag for the two-phase problems -NEW_TYPE_TAG(MimeticPressureTwoPAdaptive, INHERITS_FROM(PressureTwoP, Mimetic)); +// Create new type tags +namespace TTag { +struct MimeticPressureTwoPAdaptive { using InheritsFrom = std::tuple<Mimetic, PressureTwoP>; }; +} // end namespace TTag ////////////////////////////////////////////////////////////////// // Property tags @@ -55,8 +58,10 @@ NEW_TYPE_TAG(MimeticPressureTwoPAdaptive, INHERITS_FROM(PressureTwoP, Mimetic)); namespace Dumux { namespace Properties { -SET_TYPE_PROP(MimeticPressureTwoPAdaptive, PressureModel, MimeticPressure2PAdaptive<TypeTag>); -SET_TYPE_PROP(MimeticPressureTwoPAdaptive, LocalStiffness, MimeticTwoPLocalStiffnessAdaptive<TypeTag>); +template<class TypeTag> +struct PressureModel<TypeTag, TTag::MimeticPressureTwoPAdaptive> { using type = MimeticPressure2PAdaptive<TypeTag>; }; +template<class TypeTag> +struct LocalStiffness<TypeTag, TTag::MimeticPressureTwoPAdaptive> { using type = MimeticTwoPLocalStiffnessAdaptive<TypeTag>; }; } // end namespace Properties } // end namespace Dumux diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressure.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressure.hh index 7242a9f201..75ec63251e 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressure.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressure.hh @@ -71,35 +71,35 @@ template<class TypeTag> class FvMpfaL2dPressure2p: public FVPressure<TypeTag> { using ParentType = FVPressure<TypeTag>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; using ReferenceElements = Dune::ReferenceElements<Scalar, dim>; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using CellData = GetPropType<TypeTag, Properties::CellData>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; using ScalarSolutionType = typename SolutionTypes::ScalarSolution; - using GridTypeIndices = typename GET_PROP_TYPE(TypeTag, GridTypeIndices); + using GridTypeIndices = GetPropType<TypeTag, Properties::GridTypeIndices>; enum { @@ -116,7 +116,7 @@ class FvMpfaL2dPressure2p: public FVPressure<TypeTag> saturationIdx = Indices::saturationIdx, pressEqIdx = Indices::pressureEqIdx, satEqIdx = Indices::satEqIdx, - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; enum { @@ -421,7 +421,7 @@ public: { DUNE_THROW(Dune::NotImplemented, "Saturation type not supported!"); } - if (GET_PROP_VALUE(TypeTag, EnableCompressibility)) + if (getPropValue<TypeTag, Properties::EnableCompressibility>()) { DUNE_THROW(Dune::NotImplemented, "Compressibility not supported!"); } @@ -467,11 +467,11 @@ private: static constexpr Scalar threshold_ = 1e-15; //! gives kind of pressure used (\f$ 0 = p_w\f$, \f$ 1 = p_n\f$, \f$ 2 = p_{global}\f$) - static const int pressureType_ = GET_PROP_VALUE(TypeTag, PressureFormulation); + static const int pressureType_ = getPropValue<TypeTag, Properties::PressureFormulation>(); //! gives kind of saturation used (\f$ 0 = S_w\f$, \f$ 1 = S_n\f$) - static const int saturationType_ = GET_PROP_VALUE(TypeTag, SaturationFormulation); + static const int saturationType_ = getPropValue<TypeTag, Properties::SaturationFormulation>(); //! gives kind of velocity used (\f$ 0 = v_w\f$, \f$ 1 = v_n\f$, \f$ 2 = v_t\f$) - static const int velocityType_ = GET_PROP_VALUE(TypeTag, VelocityFormulation); + static const int velocityType_ = getPropValue<TypeTag, Properties::VelocityFormulation>(); /*! * \brief Volume correction term @@ -540,7 +540,7 @@ typename FvMpfaL2dPressure2p<TypeTag>::Intersection auto nextIsIt = ++tempIsIt; // get 'nextIsIt' - switch (GET_PROP_VALUE(TypeTag, GridImplementation)) + switch (getPropValue<TypeTag, Properties::GridImplementation>()) { // for YaspGrid case GridTypeIndices::yaspGrid: diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressureadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressureadaptive.hh index 705596d1c0..ccc682c79d 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressureadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressureadaptive.hh @@ -74,35 +74,35 @@ template<class TypeTag> class FvMpfaL2dPressure2pAdaptive: public FVPressure<TypeTag> { using ParentType = FVPressure<TypeTag>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; using ReferenceElements = Dune::ReferenceElements<Scalar, dim>; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using CellData = GetPropType<TypeTag, Properties::CellData>; - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; using ScalarSolutionType = typename SolutionTypes::ScalarSolution; - using GridTypeIndices = typename GET_PROP_TYPE(TypeTag, GridTypeIndices); + using GridTypeIndices = GetPropType<TypeTag, Properties::GridTypeIndices>; enum { @@ -119,7 +119,7 @@ class FvMpfaL2dPressure2pAdaptive: public FVPressure<TypeTag> saturationIdx = Indices::saturationIdx, pressEqIdx = Indices::pressureEqIdx, satEqIdx = Indices::satEqIdx, - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; enum { @@ -462,7 +462,7 @@ public: // Hence warning is not thrown if the file is not used from compositional modules // that require 2p2cproperties.hh. #ifndef DUMUX_2P2CPROPERTIES_HH - if (GET_PROP_VALUE(TypeTag, EnableCompressibility)) + if (getPropValue<TypeTag, Properties::EnableCompressibility>()) { DUNE_THROW(Dune::NotImplemented, "Compressibility not supported!"); } @@ -508,11 +508,11 @@ private: static constexpr Scalar threshold_ = 1e-15; //! gives kind of pressure used (\f$ 0 = p_w\f$, \f$ 1 = p_n\f$, \f$ 2 = p_{global}\f$) - static const int pressureType_ = GET_PROP_VALUE(TypeTag, PressureFormulation); + static const int pressureType_ = getPropValue<TypeTag, Properties::PressureFormulation>(); //! gives kind of saturation used (\f$ 0 = S_w\f$, \f$ 1 = S_n\f$) - static const int saturationType_ = GET_PROP_VALUE(TypeTag, SaturationFormulation); + static const int saturationType_ = getPropValue<TypeTag, Properties::SaturationFormulation>(); //! gives kind of velocity used (\f$ 0 = v_w\f$, \f$ 1 = v_n\f$, \f$ 2 = v_t\f$) - static const int velocityType_ = GET_PROP_VALUE(TypeTag, VelocityFormulation); + static const int velocityType_ = getPropValue<TypeTag, Properties::VelocityFormulation>(); // TODO doc me! Scalar evaluateErrorTerm_(CellData& cellData) @@ -563,7 +563,7 @@ typename FvMpfaL2dPressure2pAdaptive<TypeTag>::Intersection auto nextIsIt = ++tempIsIt; // get 'nextIsIt' - switch (GET_PROP_VALUE(TypeTag, GridImplementation)) + switch (getPropValue<TypeTag, Properties::GridImplementation>()) { // for ALUGrid and UGGrid case GridTypeIndices::aluGrid: diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressureproperties.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressureproperties.hh index e4876e3b59..917db183c7 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressureproperties.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressureproperties.hh @@ -30,7 +30,10 @@ namespace Dumux { namespace Properties { -NEW_TYPE_TAG(FvMpfaL2dPressureTwoP, INHERITS_FROM(PressureTwoP, MPFAProperties)); +// Create new type tags +namespace TTag { +struct FvMpfaL2dPressureTwoP { using InheritsFrom = std::tuple<MPFAProperties, PressureTwoP>; }; +} // end namespace TTag } // end namespace Properties } // end namespace Dumux @@ -39,9 +42,11 @@ NEW_TYPE_TAG(FvMpfaL2dPressureTwoP, INHERITS_FROM(PressureTwoP, MPFAProperties)) namespace Dumux { namespace Properties { -SET_TYPE_PROP(FvMpfaL2dPressureTwoP, PressureModel, FvMpfaL2dPressureVelocity2p<TypeTag>); +template<class TypeTag> +struct PressureModel<TypeTag, TTag::FvMpfaL2dPressureTwoP> { using type = FvMpfaL2dPressureVelocity2p<TypeTag>; }; //! Set velocity reconstruction implementation standard cell centered finite volume schemes as default -SET_TYPE_PROP( FvMpfaL2dPressureTwoP, Velocity, FvMpfaVelocityInTransport<TypeTag> ); +template<class TypeTag> +struct Velocity<TypeTag, TTag:: FvMpfaL2dPressureTwoP> { using type = FvMpfaVelocityInTransport<TypeTag> ; }; } // end namespace Properties } // end namespace Dumux #endif diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurepropertiesadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurepropertiesadaptive.hh index 38d9a39fc5..2c67e7f9ff 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurepropertiesadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurepropertiesadaptive.hh @@ -30,7 +30,10 @@ namespace Dumux { namespace Properties { -NEW_TYPE_TAG(FvMpfaL2dPressureTwoPAdaptive, INHERITS_FROM(PressureTwoP, MPFAProperties)); +// Create new type tags +namespace TTag { +struct FvMpfaL2dPressureTwoPAdaptive { using InheritsFrom = std::tuple<MPFAProperties, PressureTwoP>; }; +} // end namespace TTag } // end namespace Properties } // end namespace Dumux @@ -39,9 +42,11 @@ NEW_TYPE_TAG(FvMpfaL2dPressureTwoPAdaptive, INHERITS_FROM(PressureTwoP, MPFAProp namespace Dumux { namespace Properties { -SET_TYPE_PROP(FvMpfaL2dPressureTwoPAdaptive, PressureModel, FvMpfaL2dPressureVelocity2pAdaptive<TypeTag>); +template<class TypeTag> +struct PressureModel<TypeTag, TTag::FvMpfaL2dPressureTwoPAdaptive> { using type = FvMpfaL2dPressureVelocity2pAdaptive<TypeTag>; }; //! Set velocity reconstruction implementation standard cell centered finite volume schemes as default -SET_TYPE_PROP( FvMpfaL2dPressureTwoPAdaptive, Velocity, FvMpfaVelocityInTransport<TypeTag> ); +template<class TypeTag> +struct Velocity<TypeTag, TTag:: FvMpfaL2dPressureTwoPAdaptive> { using type = FvMpfaVelocityInTransport<TypeTag> ; }; } // end namespace Properties } // end namespace Dumux #endif diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocity.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocity.hh index d5018dbb59..8ff5bcc224 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocity.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocity.hh @@ -46,29 +46,29 @@ template<class TypeTag> class FvMpfaL2dPressureVelocity2p: public FvMpfaL2dPress { using ParentType = FvMpfaL2dPressure2p<TypeTag>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; + using CellData = GetPropType<TypeTag, Properties::CellData>; + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; using ReferenceElements = Dune::ReferenceElements<Scalar, dim>; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; using IndexSet = typename GridView::IndexSet; using Intersection = typename GridView::Intersection; @@ -87,7 +87,7 @@ template<class TypeTag> class FvMpfaL2dPressureVelocity2p: public FvMpfaL2dPress saturationIdx = Indices::saturationIdx, pressEqIdx = Indices::pressureEqIdx, satEqIdx = Indices::satEqIdx, - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; using Element = typename GridView::template Codim<0>::Entity; @@ -205,9 +205,9 @@ private: bool calcVelocityInTransport_; //! gives kind of pressure used (\f$ 0 = p_w\f$, \f$ 1 = p_n\f$, \f$ 2 = p_{global}\f$) - static const int pressureType_ = GET_PROP_VALUE(TypeTag, PressureFormulation); + static const int pressureType_ = getPropValue<TypeTag, Properties::PressureFormulation>(); //! gives kind of saturation used (\f$ 0 = S_w\f$, \f$ 1 = S_n\f$) - static const int saturationType_ = GET_PROP_VALUE(TypeTag, SaturationFormulation); + static const int saturationType_ = getPropValue<TypeTag, Properties::SaturationFormulation>(); }; // end of template diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocityadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocityadaptive.hh index ed45176c80..08c8e3de23 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocityadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocityadaptive.hh @@ -48,29 +48,29 @@ template<class TypeTag> class FvMpfaL2dPressureVelocity2pAdaptive: public FvMpfa { using ParentType = FvMpfaL2dPressure2pAdaptive<TypeTag>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; + using CellData = GetPropType<TypeTag, Properties::CellData>; + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; using ReferenceElements = Dune::ReferenceElements<Scalar, dim>; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; using Grid = typename GridView::Grid; using IndexSet = typename GridView::IndexSet; @@ -96,7 +96,7 @@ template<class TypeTag> class FvMpfaL2dPressureVelocity2pAdaptive: public FvMpfa saturationIdx = Indices::saturationIdx, pressEqIdx = Indices::pressureEqIdx, satEqIdx = Indices::satEqIdx, - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; using Element = typename GridView::template Codim<0>::Entity; @@ -215,9 +215,9 @@ private: bool calcVelocityInTransport_; //! gives kind of pressure used (\f$ 0 = p_w\f$, \f$ 1 = p_n\f$, \f$ 2 = p_{global}\f$) - static const int pressureType_ = GET_PROP_VALUE(TypeTag, PressureFormulation); + static const int pressureType_ = getPropValue<TypeTag, Properties::PressureFormulation>(); //! gives kind of saturation used (\f$ 0 = S_w\f$, \f$ 1 = S_n\f$) - static const int saturationType_ = GET_PROP_VALUE(TypeTag, SaturationFormulation); + static const int saturationType_ = getPropValue<TypeTag, Properties::SaturationFormulation>(); }; // end of template diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dtransmissibilitycalculator.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dtransmissibilitycalculator.hh index f0c2933b81..34aabd5b76 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dtransmissibilitycalculator.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dtransmissibilitycalculator.hh @@ -42,15 +42,15 @@ namespace Dumux { template<class TypeTag> class FvMpfaL2dTransmissibilityCalculator { - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; using Element = typename GridView::template Codim<0>::Entity; diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dvelocity.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dvelocity.hh index 830f22e7bb..68917cbe1a 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dvelocity.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dvelocity.hh @@ -56,29 +56,29 @@ namespace Dumux { */ template<class TypeTag> class FvMpfaL2dVelocity2p { - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; using ReferenceElements = Dune::ReferenceElements<Scalar, dim>; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; using Element = typename GridView::Traits::template Codim<0>::Entity; using Grid = typename GridView::Grid; @@ -87,7 +87,7 @@ template<class TypeTag> class FvMpfaL2dVelocity2p using Geometry = typename Element::Geometry; using JacobianTransposed = typename Geometry::JacobianTransposed ; - using GridTypeIndices = typename GET_PROP_TYPE(TypeTag, GridTypeIndices); + using GridTypeIndices = GetPropType<TypeTag, Properties::GridTypeIndices>; using InteractionVolume = FVMPFALInteractionVolume<TypeTag>; using TransmissibilityCalculator = FvMpfaL2dTransmissibilityCalculator<TypeTag>; @@ -112,7 +112,7 @@ template<class TypeTag> class FvMpfaL2dVelocity2p saturationIdx = Indices::saturationIdx, pressureEqIdx = Indices::pressureEqIdx, satEqIdx = Indices::satEqIdx, - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; using LocalPosition = Dune::FieldVector<Scalar, dim>; @@ -254,11 +254,11 @@ protected: static constexpr Scalar threshold_ = 1e-15; //! gives kind of velocity used (\f$ 0 = v_w\f$, \f$ 1 = v_n\f$, \f$ 2 = v_t\f$) - static const int velocityType_ = GET_PROP_VALUE(TypeTag, VelocityFormulation); + static const int velocityType_ = getPropValue<TypeTag, Properties::VelocityFormulation>(); //! gives kind of pressure used (\f$ 0 = p_w\f$, \f$ 1 = p_n\f$, \f$ 2 = p_{global}\f$) - static const int pressureType_ = GET_PROP_VALUE(TypeTag, PressureFormulation); + static const int pressureType_ = getPropValue<TypeTag, Properties::PressureFormulation>(); //! gives kind of saturation used (\f$ 0 = S_w\f$, \f$ 1 = S_n\f$) - static const int saturationType_ = GET_PROP_VALUE(TypeTag, SaturationFormulation); + static const int saturationType_ = getPropValue<TypeTag, Properties::SaturationFormulation>(); }; // end of template diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dvelocityadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dvelocityadaptive.hh index eaeff47ada..49275e0101 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dvelocityadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dvelocityadaptive.hh @@ -53,27 +53,27 @@ namespace Dumux { template<class TypeTag> class FvMpfaL2dVelocity2pAdaptive : public FvMpfaL2dVelocity2p<TypeTag> { using ParentType = FvMpfaL2dVelocity2p<TypeTag>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; using Element = typename GridView::Traits::template Codim<0>::Entity; using Grid = typename GridView::Grid; @@ -82,7 +82,7 @@ template<class TypeTag> class FvMpfaL2dVelocity2pAdaptive : public FvMpfaL2dVelo using Geometry = typename Element::Geometry; using JacobianTransposed = typename Geometry::JacobianTransposed ; - using GridTypeIndices = typename GET_PROP_TYPE(TypeTag, GridTypeIndices); + using GridTypeIndices = GetPropType<TypeTag, Properties::GridTypeIndices>; using InteractionVolume = FVMPFALInteractionVolume<TypeTag>; using InnerBoundaryVolumeFaces = std::vector<Dune::FieldVector<bool, 2*dim> >; @@ -107,7 +107,7 @@ template<class TypeTag> class FvMpfaL2dVelocity2pAdaptive : public FvMpfaL2dVelo saturationIdx = Indices::saturationIdx, pressureEqIdx = Indices::pressureEqIdx, satEqIdx = Indices::satEqIdx, - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; using DimMatrix = Dune::FieldMatrix<Scalar, dim, dim>; diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dinteractionvolumecontainer.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dinteractionvolumecontainer.hh index 15921fb027..2e380dad43 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dinteractionvolumecontainer.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dinteractionvolumecontainer.hh @@ -44,22 +44,23 @@ namespace Dumux { template<class TypeTag> class FvMpfaL3dInteractionVolumeContainer { - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Implementation = typename GET_PROP_TYPE(TypeTag, MPFAInteractionVolumeContainer); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Implementation = GetPropType<TypeTag, Properties::MPFAInteractionVolumeContainer>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; using ReferenceElements = Dune::ReferenceElements<Scalar, dim>; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; using Element = typename GridView::Traits::template Codim<0>::Entity; @@ -90,7 +91,7 @@ class FvMpfaL3dInteractionVolumeContainer public: //! Type for storing an MPFA-interaction-volume. (Usually of type FvMpfaL3dInteractionVolume or FvMpfaL3dInteractionVolumeAdaptive) - using InteractionVolume = typename GET_PROP_TYPE(TypeTag, MPFAInteractionVolume); + using InteractionVolume = GetPropType<TypeTag, Properties::MPFAInteractionVolume>; private: using GlobalInteractionVolumeVector = std::vector<InteractionVolume>; diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dinteractionvolumecontaineradaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dinteractionvolumecontaineradaptive.hh index 710ac8eddb..5c3668a01f 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dinteractionvolumecontaineradaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dinteractionvolumecontaineradaptive.hh @@ -47,19 +47,19 @@ class FvMpfaL3dInteractionVolumeContainerAdaptive: public FvMpfaL3dInteractionVo { friend class FvMpfaL3dInteractionVolumeContainer<TypeTag>; using ParentType = FvMpfaL3dInteractionVolumeContainer<TypeTag>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; using ReferenceElements = Dune::ReferenceElements<Scalar, dim>; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; using Element = typename GridView::Traits::template Codim<0>::Entity; using Vertex = typename GridView::Traits::template Codim<dim>::Entity; @@ -81,7 +81,7 @@ class FvMpfaL3dInteractionVolumeContainerAdaptive: public FvMpfaL3dInteractionVo public: //! Type for storing an MPFA-interaction-volume. //! (Usually of type FvMpfaL3dInteractionVolume or FvMpfaL3dInteractionVolumeAdaptive) - using InteractionVolume = typename GET_PROP_TYPE(TypeTag, MPFAInteractionVolume); + using InteractionVolume = GetPropType<TypeTag, Properties::MPFAInteractionVolume>; private: @@ -120,7 +120,7 @@ public: } private: - using Implementation = typename GET_PROP_TYPE(TypeTag, MPFAInteractionVolumeContainer); + using Implementation = GetPropType<TypeTag, Properties::MPFAInteractionVolumeContainer>; //! Returns the implementation of the problem (i.e. static polymorphism) Implementation &asImp_() diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressure.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressure.hh index 3aaf1d1da0..a3d5ab464f 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressure.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressure.hh @@ -73,29 +73,29 @@ template<class TypeTag> class FvMpfaL3dPressure2p: public FVPressure<TypeTag> { using ParentType = FVPressure<TypeTag>; - using Implementation = typename GET_PROP_TYPE(TypeTag, PressureModel); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Implementation = GetPropType<TypeTag, Properties::PressureModel>; + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using CellData = GetPropType<TypeTag, Properties::CellData>; - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; using ScalarSolutionType = typename SolutionTypes::ScalarSolution; @@ -118,7 +118,7 @@ class FvMpfaL3dPressure2p: public FVPressure<TypeTag> saturationIdx = Indices::saturationIdx, pressureEqIdx = Indices::pressureEqIdx, satEqIdx = Indices::satEqIdx, - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; enum { @@ -146,13 +146,13 @@ class FvMpfaL3dPressure2p: public FVPressure<TypeTag> using DimVector = Dune::FieldVector<Scalar, dim>; - using InteractionVolumeContainer = typename GET_PROP_TYPE(TypeTag, MPFAInteractionVolumeContainer); + using InteractionVolumeContainer = GetPropType<TypeTag, Properties::MPFAInteractionVolumeContainer>; using TransmissibilityCalculator = FvMpfaL3dTransmissibilityCalculator<TypeTag>; public: //! Type including methods for calculation of MPFA transmissibilities using TransmissibilityType = typename TransmissibilityCalculator::TransmissibilityType; //! Type for storing interaction volume information - using InteractionVolume = typename GET_PROP_TYPE(TypeTag, MPFAInteractionVolume); + using InteractionVolume = GetPropType<TypeTag, Properties::MPFAInteractionVolume>; protected: //! initializes the matrix to store the system of equations friend class FVPressure<TypeTag>; @@ -480,7 +480,7 @@ public: { DUNE_THROW(Dune::NotImplemented, "Saturation type not supported!"); } - if (GET_PROP_VALUE(TypeTag, EnableCompressibility)) + if (getPropValue<TypeTag, Properties::EnableCompressibility>()) { DUNE_THROW(Dune::NotImplemented, "Compressibility not supported!"); } @@ -533,11 +533,11 @@ private: static constexpr Scalar threshold_ = 1e-15; //! gives kind of pressure used (\f$ 0 = p_w\f$, \f$ 1 = p_n\f$, \f$ 2 = p_{global}\f$) - static const int pressureType_ = GET_PROP_VALUE(TypeTag, PressureFormulation); + static const int pressureType_ = getPropValue<TypeTag, Properties::PressureFormulation>(); //! gives kind of saturation used (\f$ 0 = S_w\f$, \f$ 1 = S_n\f$) - static const int saturationType_ = GET_PROP_VALUE(TypeTag, SaturationFormulation); + static const int saturationType_ = getPropValue<TypeTag, Properties::SaturationFormulation>(); //! gives kind of velocity used (\f$ 0 = v_w\f$, \f$ 1 = v_n\f$, \f$ 2 = v_t\f$) - static const int velocityType_ = GET_PROP_VALUE(TypeTag, VelocityFormulation); + static const int velocityType_ = getPropValue<TypeTag, Properties::VelocityFormulation>(); }; //! Initializes the sparse matrix for the pressure solution diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressureadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressureadaptive.hh index 5d2b568ae3..a917ea974d 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressureadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressureadaptive.hh @@ -77,29 +77,29 @@ template<class TypeTag> class FvMpfaL3dPressure2pAdaptive: public FvMpfaL3dPressure2p<TypeTag> { using ParentType = FvMpfaL3dPressure2p<TypeTag>; - using Implementation = typename GET_PROP_TYPE(TypeTag, PressureModel); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Implementation = GetPropType<TypeTag, Properties::PressureModel>; + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using CellData = GetPropType<TypeTag, Properties::CellData>; - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; using ScalarSolutionType = typename SolutionTypes::ScalarSolution; @@ -122,7 +122,7 @@ class FvMpfaL3dPressure2pAdaptive: public FvMpfaL3dPressure2p<TypeTag> saturationIdx = Indices::saturationIdx, pressureEqIdx = Indices::pressureEqIdx, satEqIdx = Indices::satEqIdx, - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; enum { @@ -149,13 +149,13 @@ class FvMpfaL3dPressure2pAdaptive: public FvMpfaL3dPressure2p<TypeTag> using DimVector = Dune::FieldVector<Scalar, dim>; - using InteractionVolumeContainer = typename GET_PROP_TYPE(TypeTag, MPFAInteractionVolumeContainer); + using InteractionVolumeContainer = GetPropType<TypeTag, Properties::MPFAInteractionVolumeContainer>; using TransmissibilityCalculator = FvMpfaL3dTransmissibilityCalculator<TypeTag>; public: //! Type including methods for calculation of MPFA transmissibilities using TransmissibilityType = typename TransmissibilityCalculator::TransmissibilityType; //! Type for storing interaction volume information - using InteractionVolume = typename GET_PROP_TYPE(TypeTag, MPFAInteractionVolume); + using InteractionVolume = GetPropType<TypeTag, Properties::MPFAInteractionVolume>; protected: //initializes the matrix to store the system of equations @@ -227,7 +227,7 @@ public: { DUNE_THROW(Dune::NotImplemented, "Saturation type not supported!"); } - if (GET_PROP_VALUE(TypeTag, EnableCompressibility)) + if (getPropValue<TypeTag, Properties::EnableCompressibility>()) { DUNE_THROW(Dune::NotImplemented, "Compressibility not supported!"); } @@ -260,11 +260,11 @@ private: static constexpr Scalar threshold_ = 1e-15; //! gives kind of pressure used (\f$ 0 = p_w\f$, \f$ 1 = p_n\f$, \f$ 2 = p_{global}\f$) - static const int pressureType_ = GET_PROP_VALUE(TypeTag, PressureFormulation); + static const int pressureType_ = getPropValue<TypeTag, Properties::PressureFormulation>(); //! gives kind of saturation used (\f$ 0 = S_w\f$, \f$ 1 = S_n\f$) - static const int saturationType_ = GET_PROP_VALUE(TypeTag, SaturationFormulation); + static const int saturationType_ = getPropValue<TypeTag, Properties::SaturationFormulation>(); //! gives kind of velocity used (\f$ 0 = v_w\f$, \f$ 1 = v_n\f$, \f$ 2 = v_t\f$) - static const int velocityType_ = GET_PROP_VALUE(TypeTag, VelocityFormulation); + static const int velocityType_ = getPropValue<TypeTag, Properties::VelocityFormulation>(); }; //! Initializes the sparse matrix for the pressure solution diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressureproperties.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressureproperties.hh index 0235a6e949..6e15e95d1a 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressureproperties.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressureproperties.hh @@ -25,13 +25,16 @@ #define DUMUX_FVMPFAL3DPROPERTIES2P_HH // dumux environment -#include <dumux/common/properties/propertysystemmacros.hh> +#include <dumux/common/properties.hh> #include <dumux/porousmediumflow/2p/sequential/diffusion/properties.hh> #include <dumux/porousmediumflow/sequential/cellcentered/mpfa/properties.hh> namespace Dumux { namespace Properties { -NEW_TYPE_TAG(FvMpfaL3dPressureTwoP, INHERITS_FROM(PressureTwoP, MPFAProperties)); +// Create new type tags +namespace TTag { +struct FvMpfaL3dPressureTwoP { using InheritsFrom = std::tuple<MPFAProperties, PressureTwoP>; }; +} // end namespace TTag } // end namespace Properties } // end namespace Dumux @@ -40,10 +43,14 @@ NEW_TYPE_TAG(FvMpfaL3dPressureTwoP, INHERITS_FROM(PressureTwoP, MPFAProperties)) namespace Dumux { namespace Properties { -SET_TYPE_PROP(FvMpfaL3dPressureTwoP, MPFAInteractionVolume, FvMpfaL3dInteractionVolume<TypeTag>); -SET_TYPE_PROP(FvMpfaL3dPressureTwoP, MPFAInteractionVolumeContainer, FvMpfaL3dInteractionVolumeContainer<TypeTag>); -SET_TYPE_PROP(FvMpfaL3dPressureTwoP, PressureModel, FvMpfaL3dPressureVelocity2p<TypeTag>); -SET_TYPE_PROP( FvMpfaL3dPressureTwoP, Velocity, FvMpfaVelocityInTransport<TypeTag> ); +template<class TypeTag> +struct MPFAInteractionVolume<TypeTag, TTag::FvMpfaL3dPressureTwoP> { using type = FvMpfaL3dInteractionVolume<TypeTag>; }; +template<class TypeTag> +struct MPFAInteractionVolumeContainer<TypeTag, TTag::FvMpfaL3dPressureTwoP> { using type = FvMpfaL3dInteractionVolumeContainer<TypeTag>; }; +template<class TypeTag> +struct PressureModel<TypeTag, TTag::FvMpfaL3dPressureTwoP> { using type = FvMpfaL3dPressureVelocity2p<TypeTag>; }; +template<class TypeTag> +struct Velocity<TypeTag, TTag:: FvMpfaL3dPressureTwoP> { using type = FvMpfaVelocityInTransport<TypeTag> ; }; } // end namespace Properties } // end namespace Dumux #endif diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurepropertiesadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurepropertiesadaptive.hh index 1e0fea586d..c8f34bfa51 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurepropertiesadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurepropertiesadaptive.hh @@ -30,7 +30,10 @@ namespace Dumux { namespace Properties { -NEW_TYPE_TAG(FvMpfaL3dPressureTwoPAdaptive, INHERITS_FROM(PressureTwoP, MPFAProperties)); +// Create new type tags +namespace TTag { +struct FvMpfaL3dPressureTwoPAdaptive { using InheritsFrom = std::tuple<MPFAProperties, PressureTwoP>; }; +} // end namespace TTag } // end namespace Properties } // end namespace Dumux @@ -39,10 +42,14 @@ NEW_TYPE_TAG(FvMpfaL3dPressureTwoPAdaptive, INHERITS_FROM(PressureTwoP, MPFAProp namespace Dumux { namespace Properties { -SET_TYPE_PROP(FvMpfaL3dPressureTwoPAdaptive, MPFAInteractionVolume, FvMpfaL3dInteractionVolumeAdaptive<TypeTag>); -SET_TYPE_PROP(FvMpfaL3dPressureTwoPAdaptive, MPFAInteractionVolumeContainer, FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>); -SET_TYPE_PROP(FvMpfaL3dPressureTwoPAdaptive, PressureModel, FvMpfaL3dPressureVelocity2pAdaptive<TypeTag>); -SET_TYPE_PROP( FvMpfaL3dPressureTwoPAdaptive, Velocity, FvMpfaVelocityInTransport<TypeTag> ); +template<class TypeTag> +struct MPFAInteractionVolume<TypeTag, TTag::FvMpfaL3dPressureTwoPAdaptive> { using type = FvMpfaL3dInteractionVolumeAdaptive<TypeTag>; }; +template<class TypeTag> +struct MPFAInteractionVolumeContainer<TypeTag, TTag::FvMpfaL3dPressureTwoPAdaptive> { using type = FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>; }; +template<class TypeTag> +struct PressureModel<TypeTag, TTag::FvMpfaL3dPressureTwoPAdaptive> { using type = FvMpfaL3dPressureVelocity2pAdaptive<TypeTag>; }; +template<class TypeTag> +struct Velocity<TypeTag, TTag:: FvMpfaL3dPressureTwoPAdaptive> { using type = FvMpfaVelocityInTransport<TypeTag> ; }; } // end namespace Properties } // end namespace Dumux #endif diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocity.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocity.hh index a02dabead6..5c0338ac30 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocity.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocity.hh @@ -44,15 +44,15 @@ template<class TypeTag> class FvMpfaL3dPressureVelocity2p: public FvMpfaL3dPress { using ParentType = FvMpfaL3dPressure2p<TypeTag>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; enum { @@ -66,22 +66,22 @@ template<class TypeTag> class FvMpfaL3dPressureVelocity2p: public FvMpfaL3dPress saturationIdx = Indices::saturationIdx, pressEqIdx = Indices::pressureEqIdx, satEqIdx = Indices::satEqIdx, - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using Problem = GetPropType<TypeTag, Properties::Problem>; + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; + using CellData = GetPropType<TypeTag, Properties::CellData>; + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; using ReferenceElements = Dune::ReferenceElements<Scalar, dim>; - using InteractionVolume = typename GET_PROP_TYPE(TypeTag, MPFAInteractionVolume); + using InteractionVolume = GetPropType<TypeTag, Properties::MPFAInteractionVolume>; using Intersection = typename GridView::Intersection; using Element = typename GridView::template Codim<0>::Entity; @@ -203,9 +203,9 @@ private: bool calcVelocityInTransport_; //! gives kind of pressure used (\f$ 0 = p_w\f$, \f$ 1 = p_n\f$, \f$ 2 = p_{global}\f$) - static const int pressureType_ = GET_PROP_VALUE(TypeTag, PressureFormulation); + static const int pressureType_ = getPropValue<TypeTag, Properties::PressureFormulation>(); //! gives kind of saturation used (\f$ 0 = S_w\f$, \f$ 1 = S_n\f$) - static const int saturationType_ = GET_PROP_VALUE(TypeTag, SaturationFormulation); + static const int saturationType_ = getPropValue<TypeTag, Properties::SaturationFormulation>(); }; // end of template diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocityadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocityadaptive.hh index 5fec0d7c8c..34911a336c 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocityadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocityadaptive.hh @@ -45,16 +45,16 @@ namespace Dumux { template<class TypeTag> class FvMpfaL3dPressureVelocity2pAdaptive: public FvMpfaL3dPressure2pAdaptive<TypeTag> { using ParentType = FvMpfaL3dPressure2pAdaptive<TypeTag>; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; enum { @@ -68,20 +68,20 @@ template<class TypeTag> class FvMpfaL3dPressureVelocity2pAdaptive: public FvMpfa saturationIdx = Indices::saturationIdx, pressEqIdx = Indices::pressureEqIdx, satEqIdx = Indices::satEqIdx, - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using Problem = GetPropType<TypeTag, Properties::Problem>; + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; + using CellData = GetPropType<TypeTag, Properties::CellData>; + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using InteractionVolume = typename GET_PROP_TYPE(TypeTag, MPFAInteractionVolume); + using InteractionVolume = GetPropType<TypeTag, Properties::MPFAInteractionVolume>; using Intersection = typename GridView::Intersection; using Element = typename GridView::template Codim<0>::Entity; @@ -201,9 +201,9 @@ private: bool calcVelocityInTransport_; //! gives kind of pressure used (\f$ 0 = p_w\f$, \f$ 1 = p_n\f$, \f$ 2 = p_{global}\f$) - static const int pressureType_ = GET_PROP_VALUE(TypeTag, PressureFormulation); + static const int pressureType_ = getPropValue<TypeTag, Properties::PressureFormulation>(); //! gives kind of saturation used (\f$ 0 = S_w\f$, \f$ 1 = S_n\f$) - static const int saturationType_ = GET_PROP_VALUE(TypeTag, SaturationFormulation); + static const int saturationType_ = getPropValue<TypeTag, Properties::SaturationFormulation>(); }; // end of template diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dtransmissibilitycalculator.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dtransmissibilitycalculator.hh index f0d4c8b48a..e76112825b 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dtransmissibilitycalculator.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dtransmissibilitycalculator.hh @@ -49,7 +49,7 @@ namespace Dumux { template<class TypeTag> class FvMpfaL3dTransmissibilityCalculator { - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { @@ -61,8 +61,8 @@ class FvMpfaL3dTransmissibilityCalculator sDiff = 0, sSum = 1 }; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; using Element = typename GridView::template Codim<0>::Entity; @@ -71,7 +71,7 @@ class FvMpfaL3dTransmissibilityCalculator using DimVector = Dune::FieldVector<Scalar, dim>; - using InteractionVolume = typename GET_PROP_TYPE(TypeTag, MPFAInteractionVolume); + using InteractionVolume = GetPropType<TypeTag, Properties::MPFAInteractionVolume>; public: diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dvelocity.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dvelocity.hh index ccd7ce51a1..ad4a6820c5 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dvelocity.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dvelocity.hh @@ -53,29 +53,29 @@ namespace Dumux { */ template<class TypeTag> class FvMpfaL3dVelocity2p { - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; using ReferenceElements = Dune::ReferenceElements<Scalar, dim>; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using CellData = GetPropType<TypeTag, Properties::CellData>; - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; using Element = typename GridView::Traits::template Codim<0>::Entity; @@ -85,10 +85,10 @@ template<class TypeTag> class FvMpfaL3dVelocity2p using Geometry = typename Element::Geometry; using JacobianTransposed = typename Geometry::JacobianTransposed ; - using GridTypeIndices = typename GET_PROP_TYPE(TypeTag, GridTypeIndices); + using GridTypeIndices = GetPropType<TypeTag, Properties::GridTypeIndices>; - using InteractionVolume = typename GET_PROP_TYPE(TypeTag, MPFAInteractionVolume); - using InteractionVolumeContainer = typename GET_PROP_TYPE(TypeTag, MPFAInteractionVolumeContainer); + using InteractionVolume = GetPropType<TypeTag, Properties::MPFAInteractionVolume>; + using InteractionVolumeContainer = GetPropType<TypeTag, Properties::MPFAInteractionVolumeContainer>; using TransmissibilityCalculator = FvMpfaL3dTransmissibilityCalculator<TypeTag>; using TransmissibilityType = typename TransmissibilityCalculator::TransmissibilityType; @@ -111,7 +111,7 @@ template<class TypeTag> class FvMpfaL3dVelocity2p saturationIdx = Indices::saturationIdx, pressureEqIdx = Indices::pressureEqIdx, satEqIdx = Indices::satEqIdx, - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; enum { @@ -265,11 +265,11 @@ private: static constexpr Scalar threshold_ = 1e-15; //! gives kind of velocity used (\f$ 0 = v_w\f$, \f$ 1 = v_n\f$, \f$ 2 = v_t\f$) - static const int velocityType_ = GET_PROP_VALUE(TypeTag, VelocityFormulation); + static const int velocityType_ = getPropValue<TypeTag, Properties::VelocityFormulation>(); //! gives kind of pressure used (\f$ 0 = p_w\f$, \f$ 1 = p_n\f$, \f$ 2 = p_{global}\f$) - static const int pressureType_ = GET_PROP_VALUE(TypeTag, PressureFormulation); + static const int pressureType_ = getPropValue<TypeTag, Properties::PressureFormulation>(); //! gives kind of saturation used (\f$ 0 = S_w\f$, \f$ 1 = S_n\f$) - static const int saturationType_ = GET_PROP_VALUE(TypeTag, SaturationFormulation); + static const int saturationType_ = getPropValue<TypeTag, Properties::SaturationFormulation>(); }; // end of template diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dvelocityadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dvelocityadaptive.hh index be9ef17571..df093bf1fe 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dvelocityadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dvelocityadaptive.hh @@ -54,39 +54,39 @@ template<class TypeTag> class FvMpfaL3dVelocity2pAdaptive: public FvMpfaL3dVeloc { using ParentType = FvMpfaL3dVelocity2p<TypeTag>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; using Element = typename GridView::Traits::template Codim<0>::Entity; using Grid = typename GridView::Grid; using IndexSet = typename GridView::IndexSet; - using GridTypeIndices = typename GET_PROP_TYPE(TypeTag, GridTypeIndices); + using GridTypeIndices = GetPropType<TypeTag, Properties::GridTypeIndices>; - using InteractionVolume = typename GET_PROP_TYPE(TypeTag, MPFAInteractionVolume); - using InteractionVolumeContainer = typename GET_PROP_TYPE(TypeTag, MPFAInteractionVolumeContainer); + using InteractionVolume = GetPropType<TypeTag, Properties::MPFAInteractionVolume>; + using InteractionVolumeContainer = GetPropType<TypeTag, Properties::MPFAInteractionVolumeContainer>; using TransmissibilityCalculator = FvMpfaL3dTransmissibilityCalculator<TypeTag>; using TransmissibilityType = typename TransmissibilityCalculator::TransmissibilityType; @@ -110,7 +110,7 @@ template<class TypeTag> class FvMpfaL3dVelocity2pAdaptive: public FvMpfaL3dVeloc saturationIdx = Indices::saturationIdx, pressureEqIdx = Indices::pressureEqIdx, satEqIdx = Indices::satEqIdx, - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; enum { @@ -189,11 +189,11 @@ private: static constexpr Scalar threshold_ = 1e-15; //! gives kind of velocity used (\f$ 0 = v_w\f$, \f$ 1 = v_n\f$, \f$ 2 = v_t\f$) - static const int velocityType_ = GET_PROP_VALUE(TypeTag, VelocityFormulation); + static const int velocityType_ = getPropValue<TypeTag, Properties::VelocityFormulation>(); //! gives kind of pressure used (\f$ 0 = p_w\f$, \f$ 1 = p_n\f$, \f$ 2 = p_{global}\f$) - static const int pressureType_ = GET_PROP_VALUE(TypeTag, PressureFormulation); + static const int pressureType_ = getPropValue<TypeTag, Properties::PressureFormulation>(); //! gives kind of saturation used (\f$ 0 = S_w\f$, \f$ 1 = S_n\f$) - static const int saturationType_ = GET_PROP_VALUE(TypeTag, SaturationFormulation); + static const int saturationType_ = getPropValue<TypeTag, Properties::SaturationFormulation>(); }; // end of template diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressure.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressure.hh index 351f0a0470..516cab9894 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressure.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressure.hh @@ -66,33 +66,33 @@ template<class TypeTag> class FvMpfaO2dPressure2p: public FVPressure<TypeTag> { using ParentType = FVPressure<TypeTag>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; using ReferenceElements = Dune::ReferenceElements<Scalar, dim>; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using CellData = GetPropType<TypeTag, Properties::CellData>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; using ScalarSolutionType = typename SolutionTypes::ScalarSolution; - using GridTypeIndices = typename GET_PROP_TYPE(TypeTag, GridTypeIndices); + using GridTypeIndices = GetPropType<TypeTag, Properties::GridTypeIndices>; enum { @@ -109,7 +109,7 @@ class FvMpfaO2dPressure2p: public FVPressure<TypeTag> saturationIdx = Indices::saturationIdx, pressEqIdx = Indices::pressureEqIdx, satEqIdx = Indices::satEqIdx, - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; enum { @@ -406,7 +406,7 @@ public: { DUNE_THROW(Dune::NotImplemented, "Saturation type not supported!"); } - if (GET_PROP_VALUE(TypeTag, EnableCompressibility)) + if (getPropValue<TypeTag, Properties::EnableCompressibility>()) { DUNE_THROW(Dune::NotImplemented, "Compressibility not supported!"); } @@ -499,11 +499,11 @@ private: static constexpr Scalar threshold_ = 1e-15; //! gives kind of pressure used (\f$ 0 = p_w\f$, \f$ 1 = p_n\f$, \f$ 2 = p_{global}\f$) - static const int pressureType_ = GET_PROP_VALUE(TypeTag, PressureFormulation); + static const int pressureType_ = getPropValue<TypeTag, Properties::PressureFormulation>(); //! gives kind of saturation used (\f$ 0 = S_w\f$, \f$ 1 = S_n\f$) - static const int saturationType_ = GET_PROP_VALUE(TypeTag, SaturationFormulation); + static const int saturationType_ = getPropValue<TypeTag, Properties::SaturationFormulation>(); //! gives kind of velocity used (\f$ 0 = v_w\f$, \f$ 1 = v_n\f$, \f$ 2 = v_t\f$) - static const int velocityType_ = GET_PROP_VALUE(TypeTag, VelocityFormulation); + static const int velocityType_ = getPropValue<TypeTag, Properties::VelocityFormulation>(); }; // TODO doc me! @@ -519,7 +519,7 @@ typename FvMpfaO2dPressure2p<TypeTag>::Intersection auto nextIsIt = ++tempIsIt; // get 'nextIsIt' - switch (GET_PROP_VALUE(TypeTag, GridImplementation)) + switch (getPropValue<TypeTag, Properties::GridImplementation>()) { // for YaspGrid case GridTypeIndices::yaspGrid: diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressureproperties.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressureproperties.hh index 425efd72d3..40b84b4f52 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressureproperties.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressureproperties.hh @@ -30,7 +30,10 @@ namespace Dumux { namespace Properties { -NEW_TYPE_TAG(FvMpfaO2dPressureTwoP, INHERITS_FROM(PressureTwoP, MPFAProperties)); +// Create new type tags +namespace TTag { +struct FvMpfaO2dPressureTwoP { using InheritsFrom = std::tuple<MPFAProperties, PressureTwoP>; }; +} // end namespace TTag } // end namespace Properties } // end namespace Dumux @@ -39,9 +42,11 @@ NEW_TYPE_TAG(FvMpfaO2dPressureTwoP, INHERITS_FROM(PressureTwoP, MPFAProperties)) namespace Dumux { namespace Properties { -SET_TYPE_PROP(FvMpfaO2dPressureTwoP, PressureModel, FvMpfaO2dPressureVelocity2p<TypeTag>); +template<class TypeTag> +struct PressureModel<TypeTag, TTag::FvMpfaO2dPressureTwoP> { using type = FvMpfaO2dPressureVelocity2p<TypeTag>; }; //! Set velocity reconstruction implementation standard cell centered finite volume schemes as default -SET_TYPE_PROP( FvMpfaO2dPressureTwoP, Velocity, FvMpfaVelocityInTransport<TypeTag> ); +template<class TypeTag> +struct Velocity<TypeTag, TTag:: FvMpfaO2dPressureTwoP> { using type = FvMpfaVelocityInTransport<TypeTag> ; }; } // end namespace Properties } // end namespace Dumux #endif diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressurevelocity.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressurevelocity.hh index 20ea2455ea..c91b301bcd 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressurevelocity.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressurevelocity.hh @@ -44,25 +44,25 @@ template<class TypeTag> class FvMpfaO2dPressureVelocity2p: public FvMpfaO2dPress { using ParentType = FvMpfaO2dPressure2p<TypeTag>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; + using CellData = GetPropType<TypeTag, Properties::CellData>; + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; using Vertex = typename GridView::Traits::template Codim<dim>::Entity; using Intersection = typename GridView::Intersection; @@ -71,7 +71,7 @@ template<class TypeTag> class FvMpfaO2dPressureVelocity2p: public FvMpfaO2dPress using InteractionVolume = FVMPFAOInteractionVolume<TypeTag>; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; enum { wPhaseIdx = Indices::wPhaseIdx, @@ -86,7 +86,7 @@ template<class TypeTag> class FvMpfaO2dPressureVelocity2p: public FvMpfaO2dPress saturationIdx = Indices::saturationIdx, pressEqIdx = Indices::pressureEqIdx, satEqIdx = Indices::satEqIdx, - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; using Element = typename GridView::template Codim<0>::Entity; @@ -207,9 +207,9 @@ private: Scalar viscosity_[numPhases]; bool calcVelocityInTransport_; //! gives kind of pressure used (\f$ 0 = p_w\f$, \f$ 1 = p_n\f$, \f$ 2 = p_{global}\f$) - static const int pressureType_ = GET_PROP_VALUE(TypeTag, PressureFormulation); + static const int pressureType_ = getPropValue<TypeTag, Properties::PressureFormulation>(); //! gives kind of saturation used (\f$ 0 = S_w\f$, \f$ 1 = S_n\f$) - static const int saturationType_ = GET_PROP_VALUE(TypeTag, SaturationFormulation); + static const int saturationType_ = getPropValue<TypeTag, Properties::SaturationFormulation>(); }; // end of template diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dvelocity.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dvelocity.hh index 29b1104dc4..77031b3b1a 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dvelocity.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dvelocity.hh @@ -54,29 +54,29 @@ namespace Dumux { */ template<class TypeTag> class FvMpfaO2dVelocity2P { - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; using ReferenceElements = Dune::ReferenceElements<Scalar, dim>; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; using Element = typename GridView::Traits::template Codim<0>::Entity; using Grid = typename GridView::Grid; @@ -85,7 +85,7 @@ template<class TypeTag> class FvMpfaO2dVelocity2P using Geometry = typename Element::Geometry; using JacobianTransposed = typename Geometry::JacobianTransposed ; - using GridTypeIndices = typename GET_PROP_TYPE(TypeTag, GridTypeIndices); + using GridTypeIndices = GetPropType<TypeTag, Properties::GridTypeIndices>; using InteractionVolume = FVMPFAOInteractionVolume<TypeTag>; using InnerBoundaryVolumeFaces = std::vector<Dune::FieldVector<bool, 2*dim> >; @@ -109,7 +109,7 @@ template<class TypeTag> class FvMpfaO2dVelocity2P saturationIdx = Indices::saturationIdx, pressureEqIdx = Indices::pressureEqIdx, satEqIdx = Indices::satEqIdx, - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; using LocalPosition = Dune::FieldVector<Scalar, dim>; @@ -248,11 +248,11 @@ private: static constexpr Scalar threshold_ = 1e-15; //! gives kind of velocity used (\f$ 0 = v_w\f$, \f$ 1 = v_n\f$, \f$ 2 = v_t\f$) - static const int velocityType_ = GET_PROP_VALUE(TypeTag, VelocityFormulation); + static const int velocityType_ = getPropValue<TypeTag, Properties::VelocityFormulation>(); //! gives kind of pressure used (\f$ 0 = p_w\f$, \f$ 1 = p_n\f$, \f$ 2 = p_{global}\f$) - static const int pressureType_ = GET_PROP_VALUE(TypeTag, PressureFormulation); + static const int pressureType_ = getPropValue<TypeTag, Properties::PressureFormulation>(); //! gives kind of saturation used (\f$ 0 = S_w\f$, \f$ 1 = S_n\f$) - static const int saturationType_ = GET_PROP_VALUE(TypeTag, SaturationFormulation); + static const int saturationType_ = getPropValue<TypeTag, Properties::SaturationFormulation>(); }; // end of template diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/problem.hh b/dumux/porousmediumflow/2p/sequential/diffusion/problem.hh index 7cea8d3a6d..38c52be8fb 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/problem.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/problem.hh @@ -38,18 +38,18 @@ namespace Dumux { template<class TypeTag> class DiffusionProblem2P: public OneModelProblem<TypeTag> { - using Implementation = typename GET_PROP_TYPE(TypeTag, Problem); + using Implementation = GetPropType<TypeTag, Properties::Problem>; using ParentType = OneModelProblem<TypeTag>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; using Grid = typename GridView::Grid; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; - using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); - using PressureModel = typename GET_PROP_TYPE(TypeTag, PressureModel); + using TimeManager = GetPropType<TypeTag, Properties::TimeManager>; + using PressureModel = GetPropType<TypeTag, Properties::PressureModel>; // material properties - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using Element = typename GridView::Traits::template Codim<0>::Entity; diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/properties.hh b/dumux/porousmediumflow/2p/sequential/diffusion/properties.hh index 254bd79f43..c8b404dac7 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/properties.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/properties.hh @@ -36,7 +36,10 @@ namespace Properties { ////////////////////////////////////////////////////////////////// //! The type tag for models based on the diffusion-scheme -NEW_TYPE_TAG(PressureTwoP, INHERITS_FROM(Pressure, SequentialTwoP)); +// Create new type tags +namespace TTag { +struct PressureTwoP { using InheritsFrom = std::tuple<SequentialTwoP, Pressure>; }; +} // end namespace TTag ////////////////////////////////////////////////////////////////// // Property tags @@ -49,7 +52,8 @@ namespace Properties { ////////////////////////////////////////////////////////////////// // Property tags ////////////////////////////////////////////////////////////////// -SET_TYPE_PROP(PressureTwoP, Model, typename GET_PROP_TYPE(TypeTag, PressureModel)); +template<class TypeTag> +struct Model<TypeTag, TTag::PressureTwoP> { using type = GetPropType<TypeTag, Properties::PressureModel>; }; } // end namespace Properties } // end namespace Dumux diff --git a/dumux/porousmediumflow/2p/sequential/fluxdata.hh b/dumux/porousmediumflow/2p/sequential/fluxdata.hh index 6e3030631b..316a7bb3fe 100644 --- a/dumux/porousmediumflow/2p/sequential/fluxdata.hh +++ b/dumux/porousmediumflow/2p/sequential/fluxdata.hh @@ -40,15 +40,15 @@ template<class TypeTag> class FluxData2P { private: - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { dim = GridView::dimension }; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; enum { @@ -57,7 +57,7 @@ private: enum { - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; using DimVector = Dune::FieldVector<Scalar, dim>; diff --git a/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicator.hh b/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicator.hh index 27b0306f65..4b55e44649 100644 --- a/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicator.hh +++ b/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicator.hh @@ -40,16 +40,16 @@ template<class TypeTag> class GridAdaptionIndicator2P { private: - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using Problem = GetPropType<TypeTag, Properties::Problem>; + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; using Element = typename GridView::Traits::template Codim<0>::Entity; - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using ScalarSolutionType = typename SolutionTypes::ScalarSolution; using ElementMapper = typename SolutionTypes::ElementMapper; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; enum { @@ -213,7 +213,7 @@ protected: Scalar refineBound_; Scalar coarsenBound_; ScalarSolutionType indicatorVector_; - static const int saturationType_ = GET_PROP_VALUE(TypeTag, SaturationFormulation); + static const int saturationType_ = getPropValue<TypeTag, Properties::SaturationFormulation>(); }; } // end namespace Dumux diff --git a/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicatorlocal.hh b/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicatorlocal.hh index a5ccfb0b96..5d1574a004 100644 --- a/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicatorlocal.hh +++ b/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicatorlocal.hh @@ -39,18 +39,18 @@ template<class TypeTag> class GridAdaptionIndicator2PLocal { private: - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using Problem = GetPropType<TypeTag, Properties::Problem>; + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; using Element = typename GridView::Traits::template Codim<0>::Entity; - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using ScalarSolutionType = typename SolutionTypes::ScalarSolution; - using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); + using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>; + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; enum { @@ -303,7 +303,7 @@ private: Scalar refineBound_; Scalar coarsenBound_; ScalarSolutionType indicatorVector_; - static const int saturationType_ = GET_PROP_VALUE(TypeTag, SaturationFormulation); + static const int saturationType_ = getPropValue<TypeTag, Properties::SaturationFormulation>(); bool refineAtDirichletBC_; // switch for refinement at Dirichlet BC's bool refineAtFluxBC_; // switch for refinement at Neumann BC's bool refineAtSource_; // switch for refinement at sources diff --git a/dumux/porousmediumflow/2p/sequential/impes/problem.hh b/dumux/porousmediumflow/2p/sequential/impes/problem.hh index 7dd8bf9d34..e2d24a9c5a 100644 --- a/dumux/porousmediumflow/2p/sequential/impes/problem.hh +++ b/dumux/porousmediumflow/2p/sequential/impes/problem.hh @@ -39,17 +39,17 @@ namespace Dumux { template<class TypeTag> class IMPESProblem2P : public IMPETProblem<TypeTag> { - using Implementation = typename GET_PROP_TYPE(TypeTag, Problem); + using Implementation = GetPropType<TypeTag, Properties::Problem>; using ParentType = IMPETProblem<TypeTag>; - using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); + using TimeManager = GetPropType<TypeTag, Properties::TimeManager>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; using Grid = typename GridView::Grid; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; // material properties - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; enum { diff --git a/dumux/porousmediumflow/2p/sequential/impes/properties.hh b/dumux/porousmediumflow/2p/sequential/impes/properties.hh index 6debafab6c..128307ac6e 100644 --- a/dumux/porousmediumflow/2p/sequential/impes/properties.hh +++ b/dumux/porousmediumflow/2p/sequential/impes/properties.hh @@ -35,7 +35,10 @@ namespace Properties { ////////////////////////////////////////////////////////////////// //! TypeTag for the two-phase IMPES scheme -NEW_TYPE_TAG(IMPESTwoP, INHERITS_FROM(IMPET, SequentialTwoP)); +// Create new type tags +namespace TTag { +struct IMPESTwoP { using InheritsFrom = std::tuple<SequentialTwoP, IMPET>; }; +} // end namespace TTag ////////////////////////////////////////////////////////////////// // Property tags diff --git a/dumux/porousmediumflow/2p/sequential/impes/propertiesadaptive.hh b/dumux/porousmediumflow/2p/sequential/impes/propertiesadaptive.hh index c1d124e6cd..6ac22e725c 100644 --- a/dumux/porousmediumflow/2p/sequential/impes/propertiesadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/impes/propertiesadaptive.hh @@ -39,7 +39,10 @@ namespace Properties { ////////////////////////////////////////////////////////////////// //! TypeTag for grid-adaptive two-phase IMPES scheme -NEW_TYPE_TAG(IMPESTwoPAdaptive, INHERITS_FROM(IMPET, SequentialTwoP)); +// Create new type tags +namespace TTag { +struct IMPESTwoPAdaptive { using InheritsFrom = std::tuple<SequentialTwoP, IMPET>; }; +} // end namespace TTag ////////////////////////////////////////////////////////////////// // Property tags @@ -56,15 +59,20 @@ NEW_TYPE_TAG(IMPESTwoPAdaptive, INHERITS_FROM(IMPET, SequentialTwoP)); namespace Dumux { namespace Properties { //! Enable adaptive grid -SET_BOOL_PROP(IMPESTwoPAdaptive, AdaptiveGrid, true); +template<class TypeTag> +struct AdaptiveGrid<TypeTag, TTag::IMPESTwoPAdaptive> { static constexpr bool value = true; }; //! Set variable class for adaptive impet schemes -SET_TYPE_PROP(IMPESTwoPAdaptive, Variables, VariableClassAdaptive<TypeTag>); +template<class TypeTag> +struct Variables<TypeTag, TTag::IMPESTwoPAdaptive> { using type = VariableClassAdaptive<TypeTag>; }; //! Set cell data class for adaptive two-phase IMPES schemes -SET_TYPE_PROP(IMPESTwoPAdaptive, CellData, CellData2PAdaptive<TypeTag>); +template<class TypeTag> +struct CellData<TypeTag, TTag::IMPESTwoPAdaptive> { using type = CellData2PAdaptive<TypeTag>; }; //! Set the standard indicator class of two-phase models for adaption or coarsening -SET_TYPE_PROP(IMPESTwoPAdaptive, AdaptionIndicator, GridAdaptionIndicator2P<TypeTag>); +template<class TypeTag> +struct AdaptionIndicator<TypeTag, TTag::IMPESTwoPAdaptive> { using type = GridAdaptionIndicator2P<TypeTag>; }; //! Set default class for adaptation initialization indicator -SET_TYPE_PROP(IMPESTwoPAdaptive, AdaptionInitializationIndicator, GridAdaptInitializationIndicator<TypeTag>); +template<class TypeTag> +struct AdaptionInitializationIndicator<TypeTag, TTag::IMPESTwoPAdaptive> { using type = GridAdaptInitializationIndicator<TypeTag>; }; } // end namespace Properties } // end namespace Dumux diff --git a/dumux/porousmediumflow/2p/sequential/properties.hh b/dumux/porousmediumflow/2p/sequential/properties.hh index 78eaa2ac44..7ce58c1add 100644 --- a/dumux/porousmediumflow/2p/sequential/properties.hh +++ b/dumux/porousmediumflow/2p/sequential/properties.hh @@ -45,14 +45,20 @@ namespace Properties { ////////////////////////////////////////////////////////////////// //! The TypeTag for sequential two-phase problems -NEW_TYPE_TAG(SequentialTwoP, INHERITS_FROM(SequentialModel)); +// Create new type tags +namespace TTag { +struct SequentialTwoP { using InheritsFrom = std::tuple<SequentialModel>; }; +} // end namespace TTag ////////////////////////////////////////////////////////////////// // Property tags ////////////////////////////////////////////////////////////////// -NEW_PROP_TAG( SaturationFormulation); //!< The formulation of the saturation model -NEW_PROP_TAG( VelocityFormulation); //!< The type of velocity reconstructed for the transport model -NEW_PROP_TAG( EnableCompressibility);//!< Returns whether compressibility is allowed +template<class TypeTag, class MyTypeTag> +struct SaturationFormulation { using type = UndefinedProperty; }; //!< The formulation of the saturation model +template<class TypeTag, class MyTypeTag> +struct VelocityFormulation { using type = UndefinedProperty; }; //!< The type of velocity reconstructed for the transport model +template<class TypeTag, class MyTypeTag> +struct EnableCompressibility { using type = UndefinedProperty; };//!< Returns whether compressibility is allowed } // end namespace Properties } // end namespace Dumux @@ -67,61 +73,66 @@ namespace Properties { // Properties ////////////////////////////////////////////////////////////////// //! Set number of equations to 2 for isothermal two-phase models -SET_INT_PROP(SequentialTwoP, NumEq, 2); +template<class TypeTag> +struct NumEq<TypeTag, TTag::SequentialTwoP> { static constexpr int value = 2; }; //! Set number of phases to 2 for two-phase models -SET_INT_PROP(SequentialTwoP, NumPhases, 2);//!< The number of phases in the 2p model is 2 +template<class TypeTag> +struct NumPhases<TypeTag, TTag::SequentialTwoP> { static constexpr int value = 2; };//!< The number of phases in the 2p model is 2 //! Set number of components to 1 for immiscible two-phase models -SET_INT_PROP(SequentialTwoP, NumComponents, 1); //!< Each phase consists of 1 pure component +template<class TypeTag> +struct NumComponents<TypeTag, TTag::SequentialTwoP> { static constexpr int value = 1; }; //!< Each phase consists of 1 pure component //! Set \f$p_w\f$-\f$S_w\f$ formulation as default two-phase formulation -SET_INT_PROP(SequentialTwoP, Formulation, SequentialTwoPCommonIndices::pwsw); +template<class TypeTag> +struct Formulation<TypeTag, TTag::SequentialTwoP> { static constexpr int value = SequentialTwoPCommonIndices::pwsw; }; //! Chose the set of indices depending on the chosen formulation template<class TypeTag> struct Indices<TypeTag, TTag::SequentialTwoP> { - using type = SequentialTwoPIndices<GET_PROP_VALUE(TypeTag, Formulation), 0>; + using type = SequentialTwoPIndices<getPropValue<TypeTag, Properties::Formulation>(), 0>; }; //! Set the default pressure formulation according to the chosen two-phase formulation -SET_INT_PROP(SequentialTwoP, - PressureFormulation, - GET_PROP_TYPE(TypeTag, Indices)::pressureType); +template<class TypeTag> +struct PressureFormulation<TypeTag, TTag::SequentialTwoP> { static constexpr int value = GetPropType<TypeTag, Properties::Indices>::pressureType; }; //! Set the default saturation formulation according to the chosen two-phase formulation -SET_INT_PROP(SequentialTwoP, - SaturationFormulation, - GET_PROP_TYPE(TypeTag, Indices)::saturationType); +template<class TypeTag> +struct SaturationFormulation<TypeTag, TTag::SequentialTwoP> { static constexpr int value = GetPropType<TypeTag, Properties::Indices>::saturationType; }; //! Set the default velocity formulation according to the chosen two-phase formulation -SET_INT_PROP(SequentialTwoP, - VelocityFormulation, - GET_PROP_TYPE(TypeTag, Indices)::velocityDefault); +template<class TypeTag> +struct VelocityFormulation<TypeTag, TTag::SequentialTwoP> { static constexpr int value = GetPropType<TypeTag, Properties::Indices>::velocityDefault; }; //! Disable compressibility by default -SET_BOOL_PROP(SequentialTwoP, EnableCompressibility, false); +template<class TypeTag> +struct EnableCompressibility<TypeTag, TTag::SequentialTwoP> { static constexpr bool value = false; }; //! Set general sequential VariableClass as default -SET_TYPE_PROP(SequentialTwoP, Variables, VariableClass<TypeTag>); +template<class TypeTag> +struct Variables<TypeTag, TTag::SequentialTwoP> { using type = VariableClass<TypeTag>; }; //! Set standart CellData of immiscible two-phase models as default -SET_TYPE_PROP(SequentialTwoP, CellData, CellData2P<TypeTag, GET_PROP_VALUE(TypeTag, EnableCompressibility)>); +template<class TypeTag> +struct CellData<TypeTag, TTag::SequentialTwoP> { using type = CellData2P<TypeTag, getPropValue<TypeTag, Properties::EnableCompressibility>()>; }; //! Set default fluid state template<class TypeTag> struct FluidState<TypeTag, TTag::SequentialTwoP> { private: - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; public: using type = IsothermalImmiscibleFluidState<Scalar, FluidSystem>; }; //! The spatial parameters to be employed. Use SequentialFVSpatialParams by default. -SET_TYPE_PROP(SequentialTwoP, SpatialParams, SequentialFVSpatialParams<TypeTag>); +template<class TypeTag> +struct SpatialParams<TypeTag, TTag::SequentialTwoP> { using type = SequentialFVSpatialParams<TypeTag>; }; // \} } // end namespace Properties } // end namespace Dumux diff --git a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/capillarydiffusion.hh b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/capillarydiffusion.hh index 0b6135a618..8b7bb19eb9 100644 --- a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/capillarydiffusion.hh +++ b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/capillarydiffusion.hh @@ -48,21 +48,21 @@ template<class TypeTag> class CapillaryDiffusion: public DiffusivePart<TypeTag> { private: - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; enum @@ -231,7 +231,7 @@ public: * \param problem A problem class object */ CapillaryDiffusion (Problem& problem) - : DiffusivePart<TypeTag>(problem), problem_(problem), preComput_(GET_PROP_VALUE(TypeTag, PrecomputedConstRels)) + : DiffusivePart<TypeTag>(problem), problem_(problem), preComput_(getPropValue<TypeTag, Properties::PrecomputedConstRels>()) {} private: diff --git a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/convectivepart.hh b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/convectivepart.hh index 3dd8ad4f54..65bfa3e465 100644 --- a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/convectivepart.hh +++ b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/convectivepart.hh @@ -38,9 +38,9 @@ template<class TypeTag> class ConvectivePart { private: - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; enum{dimWorld = GridView::dimensionworld}; using Intersection = typename GridView::Intersection; diff --git a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/diffusivepart.hh b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/diffusivepart.hh index 0a4e9a03dd..860f46344d 100644 --- a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/diffusivepart.hh +++ b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/diffusivepart.hh @@ -37,9 +37,9 @@ template<class TypeTag> class DiffusivePart { private: - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; enum{dim = GridView::dimension}; using Intersection = typename GridView::Intersection; diff --git a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/evalcflflux.hh b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/evalcflflux.hh index 5124fd4d22..fa06168665 100644 --- a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/evalcflflux.hh +++ b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/evalcflflux.hh @@ -51,8 +51,8 @@ template<class TypeTag> class EvalCflFlux { private: - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; using Intersection = typename GridView::Intersection; using Element = typename GridView::Traits::template Codim<0>::Entity; diff --git a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/evalcflfluxcoats.hh b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/evalcflfluxcoats.hh index c04bb16955..4f06dcc062 100644 --- a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/evalcflfluxcoats.hh +++ b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/evalcflfluxcoats.hh @@ -39,21 +39,21 @@ template<class TypeTag> class EvalCflFluxCoats: public EvalCflFlux<TypeTag> { private: - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; enum { @@ -64,7 +64,7 @@ private: wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx, eqIdxPress = Indices::pressureEqIdx, eqIdxSat = Indices::satEqIdx, - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; enum @@ -255,9 +255,9 @@ private: Scalar fluxIn_; bool rejectForTimeStepping_; Scalar density_[numPhases]; - static const int pressureType_ = GET_PROP_VALUE(TypeTag, PressureFormulation); - static const int velocityType_ = GET_PROP_VALUE(TypeTag, VelocityFormulation); - static const int saturationType_ = GET_PROP_VALUE(TypeTag, SaturationFormulation); + static const int pressureType_ = getPropValue<TypeTag, Properties::PressureFormulation>(); + static const int velocityType_ = getPropValue<TypeTag, Properties::VelocityFormulation>(); + static const int saturationType_ = getPropValue<TypeTag, Properties::SaturationFormulation>(); const Scalar epsDerivative_; const Scalar threshold_; Scalar porosityThreshold_; diff --git a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/evalcflfluxdefault.hh b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/evalcflfluxdefault.hh index b370a5779e..e91beba12e 100644 --- a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/evalcflfluxdefault.hh +++ b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/evalcflfluxdefault.hh @@ -40,11 +40,11 @@ template<class TypeTag> class EvalCflFluxDefault: public EvalCflFlux<TypeTag> { private: - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; enum { @@ -226,8 +226,8 @@ private: Scalar fluxOut_; Scalar fluxIn_; Scalar porosityThreshold_; - static const int velocityType_ = GET_PROP_VALUE(TypeTag, VelocityFormulation); - static const int saturationType_ = GET_PROP_VALUE(TypeTag, SaturationFormulation); + static const int velocityType_ = getPropValue<TypeTag, Properties::VelocityFormulation>(); + static const int saturationType_ = getPropValue<TypeTag, Properties::SaturationFormulation>(); }; //! Returns the CFL flux-function diff --git a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/gravitypart.hh b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/gravitypart.hh index 6d855aff43..442e80aaaf 100644 --- a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/gravitypart.hh +++ b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/gravitypart.hh @@ -48,18 +48,18 @@ template<class TypeTag> class GravityPart: public ConvectivePart<TypeTag> { private: - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; enum { @@ -67,7 +67,7 @@ private: }; enum { - wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx, numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx, numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; using Intersection = typename GridView::Intersection; @@ -200,7 +200,7 @@ public: * \param problem A problem class object */ GravityPart (Problem& problem) - : ConvectivePart<TypeTag>(problem), problem_(problem), preComput_(GET_PROP_VALUE(TypeTag, PrecomputedConstRels)) + : ConvectivePart<TypeTag>(problem), problem_(problem), preComput_(getPropValue<TypeTag, Properties::PrecomputedConstRels>()) {} //! For initialization diff --git a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/properties.hh b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/properties.hh index 528b8e8bf6..e17b9a3f77 100644 --- a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/properties.hh +++ b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/properties.hh @@ -24,7 +24,7 @@ #ifndef DUMUX_FV_TRANSPORT_PROPERTIES_2P_HH #define DUMUX_FV_TRANSPORT_PROPERTIES_2P_HH -#include <dumux/common/properties/propertysystemmacros.hh> +#include <dumux/common/properties.hh> #include <dumux/porousmediumflow/2p/sequential/transport/properties.hh> namespace Dumux { @@ -36,14 +36,18 @@ namespace Properties { ////////////////////////////////////////////////////////////////// //! The type tag for two-phase problems using a standard finite volume model -NEW_TYPE_TAG(FVTransportTwoP, INHERITS_FROM(TransportTwoP)); +// Create new type tags +namespace TTag { +struct FVTransportTwoP { using InheritsFrom = std::tuple<TransportTwoP>; }; +} // end namespace TTag ////////////////////////////////////////////////////////////////// // Property tags ////////////////////////////////////////////////////////////////// //! Bool property which tells the transport model if it should use constitutive relations which //! are precomputed at the begin of the time step or if it should recompute the relations -NEW_PROP_TAG( PrecomputedConstRels ); +template<class TypeTag, class MyTypeTag> +struct PrecomputedConstRels { using type = UndefinedProperty; }; } // end namespace Properties } // end namespace Dumux @@ -55,15 +59,20 @@ NEW_PROP_TAG( PrecomputedConstRels ); namespace Dumux { namespace Properties { //! Set the default implementation of the cfl-condition -SET_TYPE_PROP(FVTransportTwoP, EvalCflFluxFunction, EvalCflFluxDefault<TypeTag>); +template<class TypeTag> +struct EvalCflFluxFunction<TypeTag, TTag::FVTransportTwoP> { using type = EvalCflFluxDefault<TypeTag>; }; //! Set the default implementation of a diffusive flux -> diffusive flux dissabled -SET_TYPE_PROP(FVTransportTwoP, CapillaryFlux, DiffusivePart<TypeTag>); +template<class TypeTag> +struct CapillaryFlux<TypeTag, TTag::FVTransportTwoP> { using type = DiffusivePart<TypeTag>; }; //! Set the default implementation of an additional convective flux -> additional convective flux dissabled -SET_TYPE_PROP(FVTransportTwoP, GravityFlux, ConvectivePart<TypeTag>); +template<class TypeTag> +struct GravityFlux<TypeTag, TTag::FVTransportTwoP> { using type = ConvectivePart<TypeTag>; }; //! Set PrecomputedConstRels flag <tt>true</tt> as default -SET_BOOL_PROP( FVTransportTwoP, PrecomputedConstRels, true); +template<class TypeTag> +struct PrecomputedConstRels<TypeTag, TTag:: FVTransportTwoP> { static constexpr bool value = true; }; //! Set finite volume implementation of the two-phase saturation equation as default saturation model -SET_TYPE_PROP(FVTransportTwoP, TransportModel, FVSaturation2P<TypeTag>); +template<class TypeTag> +struct TransportModel<TypeTag, TTag::FVTransportTwoP> { using type = FVSaturation2P<TypeTag>; }; } // end namespace Properties } // end namespace Dumux diff --git a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/saturation.hh b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/saturation.hh index 0ad2ff21eb..4f5a4e2409 100644 --- a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/saturation.hh +++ b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/saturation.hh @@ -75,36 +75,36 @@ template<class TypeTag> class FVSaturation2P: public FVTransport<TypeTag> { using ParentType = FVTransport<TypeTag>; - using Implementation = typename GET_PROP_TYPE(TypeTag, TransportModel); + using Implementation = GetPropType<TypeTag, Properties::TransportModel>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using Velocity = typename GET_PROP_TYPE(TypeTag, Velocity); - using CapillaryFlux = typename GET_PROP_TYPE(TypeTag, CapillaryFlux); - using GravityFlux = typename GET_PROP_TYPE(TypeTag, GravityFlux); + using Velocity = GetPropType<TypeTag, Properties::Velocity>; + using CapillaryFlux = GetPropType<TypeTag, Properties::CapillaryFlux>; + using GravityFlux = GetPropType<TypeTag, Properties::GravityFlux>; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; enum { @@ -123,10 +123,10 @@ class FVSaturation2P: public FVTransport<TypeTag> nPhaseIdx = Indices::nPhaseIdx, saturationIdx = Indices::saturationIdx, satEqIdx = Indices::satEqIdx, - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; - using TransportSolutionType = typename GET_PROP_TYPE(TypeTag, TransportSolutionType); + using TransportSolutionType = GetPropType<TypeTag, Properties::TransportSolutionType>; using Element = typename GridView::Traits::template Codim<0>::Entity; using Intersection = typename GridView::Intersection; @@ -514,10 +514,10 @@ private: int vtkOutputLevel_; Scalar porosityThreshold_; - static const bool compressibility_ = GET_PROP_VALUE(TypeTag, EnableCompressibility); - static const int saturationType_ = GET_PROP_VALUE(TypeTag, SaturationFormulation); - static const int velocityType_ = GET_PROP_VALUE(TypeTag, VelocityFormulation); - static const int pressureType_ = GET_PROP_VALUE(TypeTag, PressureFormulation); + static const bool compressibility_ = getPropValue<TypeTag, Properties::EnableCompressibility>(); + static const int saturationType_ = getPropValue<TypeTag, Properties::SaturationFormulation>(); + static const int velocityType_ = getPropValue<TypeTag, Properties::VelocityFormulation>(); + static const int pressureType_ = getPropValue<TypeTag, Properties::PressureFormulation>(); Scalar density_[numPhases]; Scalar viscosity_[numPhases]; diff --git a/dumux/porousmediumflow/2p/sequential/transport/problem.hh b/dumux/porousmediumflow/2p/sequential/transport/problem.hh index 0337f2620e..22f4aa7c69 100644 --- a/dumux/porousmediumflow/2p/sequential/transport/problem.hh +++ b/dumux/porousmediumflow/2p/sequential/transport/problem.hh @@ -34,10 +34,11 @@ namespace Properties { template<class TypeTag> struct Model<TypeTag, TTag::TransportTwoP> { - using type = typename GET_PROP_TYPE(TypeTag, TransportModel); + using type = GetPropType<TypeTag, Properties::TransportModel>; }; //this Property should be set by the pressure model, only for a pure transport it is set here for the transportproblem! -SET_TYPE_PROP(TransportTwoP, Velocity, FVVelocityDefault<TypeTag>); +template<class TypeTag> +struct Velocity<TypeTag, TTag::TransportTwoP> { using type = FVVelocityDefault<TypeTag>; }; } // end namespace Properties /*! @@ -49,24 +50,24 @@ SET_TYPE_PROP(TransportTwoP, Velocity, FVVelocityDefault<TypeTag>); template<class TypeTag> class TransportProblem2P : public OneModelProblem<TypeTag> { - using Implementation = typename GET_PROP_TYPE(TypeTag, Problem); + using Implementation = GetPropType<TypeTag, Properties::Problem>; using ParentType = OneModelProblem<TypeTag>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; using Grid = typename GridView::Grid; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; - using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); + using TimeManager = GetPropType<TypeTag, Properties::TimeManager>; // material properties - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using Solution = typename SolutionTypes::ScalarSolution; using Element = typename GridView::Traits::template Codim<0>::Entity; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; enum { dim = Grid::dimension, diff --git a/dumux/porousmediumflow/2p/sequential/transport/properties.hh b/dumux/porousmediumflow/2p/sequential/transport/properties.hh index 84e1fcf77d..1caca0183c 100644 --- a/dumux/porousmediumflow/2p/sequential/transport/properties.hh +++ b/dumux/porousmediumflow/2p/sequential/transport/properties.hh @@ -36,13 +36,18 @@ namespace Properties { ////////////////////////////////////////////////////////////////// //! The type tag for transport part of a sequential two-phase model -NEW_TYPE_TAG(TransportTwoP, INHERITS_FROM(Transport, SequentialTwoP)); +// Create new type tags +namespace TTag { +struct TransportTwoP { using InheritsFrom = std::tuple<SequentialTwoP, Transport>; }; +} // end namespace TTag ////////////////////////////////////////////////////////////////// // Property tags ////////////////////////////////////////////////////////////////// -NEW_PROP_TAG(CapillaryFlux); //!< The type of the diffusive part in a transport equation -NEW_PROP_TAG(GravityFlux); //!< The type of a convective part in a transport equation +template<class TypeTag, class MyTypeTag> +struct CapillaryFlux { using type = UndefinedProperty; }; //!< The type of the diffusive part in a transport equation +template<class TypeTag, class MyTypeTag> +struct GravityFlux { using type = UndefinedProperty; }; //!< The type of a convective part in a transport equation } // end namespace Properties } // end namespace Dumux diff --git a/dumux/porousmediumflow/2p2c/sequential/adaptiveproperties.hh b/dumux/porousmediumflow/2p2c/sequential/adaptiveproperties.hh index 1e67927844..683259f569 100644 --- a/dumux/porousmediumflow/2p2c/sequential/adaptiveproperties.hh +++ b/dumux/porousmediumflow/2p2c/sequential/adaptiveproperties.hh @@ -24,7 +24,7 @@ #ifndef DUMUX_2P2CADAPTIVE_PROPERTIES_HH #define DUMUX_2P2CADAPTIVE_PROPERTIES_HH -#include <dumux/common/properties/propertysystemmacros.hh> +#include <dumux/common/properties.hh> #include <dumux/porousmediumflow/2p2c/sequential/properties.hh> #include <dumux/porousmediumflow/sequential/cellcentered/mpfa/properties.hh> @@ -47,7 +47,10 @@ namespace Properties { // Type tags ////////////////////////////////////////////////////////////////// //! The type tag for the compositional two-phase problems -NEW_TYPE_TAG(SequentialTwoPTwoCAdaptive, INHERITS_FROM(SequentialTwoPTwoC)); +// Create new type tags +namespace TTag { +struct SequentialTwoPTwoCAdaptive { using InheritsFrom = std::tuple<SequentialTwoPTwoC>; }; +} // end namespace TTag }} //Dumux includes @@ -63,15 +66,22 @@ namespace Properties { ////////////////////////////////////////////////////////////////// // Properties ////////////////////////////////////////////////////////////////// -SET_BOOL_PROP(SequentialTwoPTwoCAdaptive, AdaptiveGrid, true); -SET_TYPE_PROP(SequentialTwoPTwoCAdaptive, GridTypeIndices, GridTypes); //!< Property not used but default necessary for mpfa2p +template<class TypeTag> +struct AdaptiveGrid<TypeTag, TTag::SequentialTwoPTwoCAdaptive> { static constexpr bool value = true; }; +template<class TypeTag> +struct GridTypeIndices<TypeTag, TTag::SequentialTwoPTwoCAdaptive> { using type = GridTypes; }; //!< Property not used but default necessary for mpfa2p -SET_TYPE_PROP(SequentialTwoPTwoCAdaptive, CellData, CellData2P2CAdaptive<TypeTag>); -SET_TYPE_PROP(SequentialTwoPTwoCAdaptive, Variables, VariableClass2P2CAdaptive<TypeTag>); -SET_TYPE_PROP(SequentialTwoPTwoCAdaptive, Indices, SequentialTwoPTwoCIndicesAdaptive<TypeTag>); +template<class TypeTag> +struct CellData<TypeTag, TTag::SequentialTwoPTwoCAdaptive> { using type = CellData2P2CAdaptive<TypeTag>; }; +template<class TypeTag> +struct Variables<TypeTag, TTag::SequentialTwoPTwoCAdaptive> { using type = VariableClass2P2CAdaptive<TypeTag>; }; +template<class TypeTag> +struct Indices<TypeTag, TTag::SequentialTwoPTwoCAdaptive> { using type = SequentialTwoPTwoCIndicesAdaptive<TypeTag>; }; // Set the model properties -SET_TYPE_PROP(SequentialTwoPTwoCAdaptive, TransportModel, FV2dTransport2P2CAdaptive<TypeTag>); -SET_TYPE_PROP(SequentialTwoPTwoCAdaptive, PressureModel, FV2dPressure2P2CAdaptive<TypeTag>); +template<class TypeTag> +struct TransportModel<TypeTag, TTag::SequentialTwoPTwoCAdaptive> { using type = FV2dTransport2P2CAdaptive<TypeTag>; }; +template<class TypeTag> +struct PressureModel<TypeTag, TTag::SequentialTwoPTwoCAdaptive> { using type = FV2dPressure2P2CAdaptive<TypeTag>; }; } diff --git a/dumux/porousmediumflow/2p2c/sequential/celldata.hh b/dumux/porousmediumflow/2p2c/sequential/celldata.hh index 3b9102f765..d26ed2fbec 100644 --- a/dumux/porousmediumflow/2p2c/sequential/celldata.hh +++ b/dumux/porousmediumflow/2p2c/sequential/celldata.hh @@ -43,11 +43,11 @@ template<class TypeTag> class CellData2P2C { private: - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; using FluxData = FluxData2P2C<TypeTag>; - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidState = GetPropType<TypeTag, Properties::FluidState>; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; enum { @@ -57,8 +57,8 @@ private: }; enum { - numPhases = GET_PROP_VALUE(TypeTag, NumPhases), - numComponents = GET_PROP_VALUE(TypeTag, NumComponents) + numPhases = getPropValue<TypeTag, Properties::NumPhases>(), + numComponents = getPropValue<TypeTag, Properties::NumComponents>() }; protected: // primary variable (phase pressure has to be stored in fluidstate) diff --git a/dumux/porousmediumflow/2p2c/sequential/celldataadaptive.hh b/dumux/porousmediumflow/2p2c/sequential/celldataadaptive.hh index b617d3aa37..504aa3bdf7 100644 --- a/dumux/porousmediumflow/2p2c/sequential/celldataadaptive.hh +++ b/dumux/porousmediumflow/2p2c/sequential/celldataadaptive.hh @@ -44,18 +44,18 @@ template<class TypeTag> class CellData2P2CAdaptive: public CellData2P2CMultiPhysics<TypeTag> { private: - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using GridView = GetPropType<TypeTag, Properties::GridView>; using Grid = typename GridView::Grid; - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using Problem = GetPropType<TypeTag, Properties::Problem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; enum { dim = GridView::dimension }; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; enum { @@ -64,12 +64,12 @@ private: }; enum { - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; using Element = typename GridView::Traits::template Codim<0>::Entity; //! gives kind of pressure used (\f$ 0 = p_w \f$, \f$ 1 = p_n \f$, \f$ 2 = p_{global} \f$) - static constexpr int pressureType = GET_PROP_VALUE(TypeTag, PressureFormulation); + static constexpr int pressureType = getPropValue<TypeTag, Properties::PressureFormulation>(); int upwindError_[numPhases]; public: diff --git a/dumux/porousmediumflow/2p2c/sequential/celldatamultiphysics.hh b/dumux/porousmediumflow/2p2c/sequential/celldatamultiphysics.hh index 6e42075b39..5fc987ea18 100644 --- a/dumux/porousmediumflow/2p2c/sequential/celldatamultiphysics.hh +++ b/dumux/porousmediumflow/2p2c/sequential/celldatamultiphysics.hh @@ -44,12 +44,12 @@ template<class TypeTag> class CellData2P2CMultiPhysics : public CellData2P2C<TypeTag> { private: - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; using SimpleFluidState = PseudoOnePTwoCFluidState<Scalar, FluidSystem>; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; enum { diff --git a/dumux/porousmediumflow/2p2c/sequential/fluxdata.hh b/dumux/porousmediumflow/2p2c/sequential/fluxdata.hh index 19abc57096..4522bb07ce 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fluxdata.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fluxdata.hh @@ -42,9 +42,9 @@ template<class TypeTag> class FluxData2P2C { private: - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; enum { @@ -53,7 +53,7 @@ private: enum { - numEquations = GET_PROP_VALUE(TypeTag, NumEq) + numEquations = getPropValue<TypeTag, Properties::NumEq>() }; enum @@ -64,7 +64,7 @@ private: enum { - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; typename Dune::BlockVector<typename Dune::FieldVector<bool, numEquations>> isUpwindCell_; diff --git a/dumux/porousmediumflow/2p2c/sequential/fv2dpressureadaptive.hh b/dumux/porousmediumflow/2p2c/sequential/fv2dpressureadaptive.hh index e43d14270a..589e01f8f2 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fv2dpressureadaptive.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fv2dpressureadaptive.hh @@ -77,16 +77,16 @@ template<class TypeTag> class FV2dPressure2P2CAdaptive : public FVPressure2P2C<TypeTag> { //the model implementation - using Implementation = typename GET_PROP_TYPE(TypeTag, PressureModel); + using Implementation = GetPropType<TypeTag, Properties::PressureModel>; using BaseType = FVPressure<TypeTag>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld @@ -114,10 +114,10 @@ template<class TypeTag> class FV2dPressure2P2CAdaptive using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; using TransmissivityMatrix = Dune::FieldVector<Scalar,dim+1>; using DimMatrix = Dune::FieldMatrix<Scalar, dim, dim>; - using PhaseVector = Dune::FieldVector<Scalar, GET_PROP_VALUE(TypeTag, NumPhases)>; + using PhaseVector = Dune::FieldVector<Scalar, getPropValue<TypeTag, Properties::NumPhases>()>; // the typenames used for the stiffness matrix and solution vector - using Matrix = typename GET_PROP_TYPE(TypeTag, PressureCoefficientMatrix); + using Matrix = GetPropType<TypeTag, Properties::PressureCoefficientMatrix>; using TransmissibilityCalculator = FvMpfaL2dTransmissibilityCalculator<TypeTag>; protected: @@ -411,7 +411,7 @@ void FV2dPressure2P2CAdaptive<TypeTag>::assemble(bool first) // calculate only from one side, but add matrix entries for both sides // the last condition is needed to properly assemble in the presence // of ghost elements - if (GET_PROP_VALUE(TypeTag, VisitFacesOnlyOnce) + if (getPropValue<TypeTag, Properties::VisitFacesOnlyOnce>() && (globalIdxI > globalIdxJ) && haveSameLevel && elementNeighbor.partitionType() == Dune::InteriorEntity) continue; @@ -436,7 +436,7 @@ void FV2dPressure2P2CAdaptive<TypeTag>::assemble(bool first) this->A_[globalIdxI][globalIdxJ] -= entries[matrix]; // The second condition is needed to not spoil the ghost element entries - if (GET_PROP_VALUE(TypeTag, VisitFacesOnlyOnce) + if (getPropValue<TypeTag, Properties::VisitFacesOnlyOnce>() && elementNeighbor.partitionType() == Dune::InteriorEntity) { this->f_[globalIdxJ] += entries[rhs]; diff --git a/dumux/porousmediumflow/2p2c/sequential/fv2dtransportadaptive.hh b/dumux/porousmediumflow/2p2c/sequential/fv2dtransportadaptive.hh index 4725f98304..df2c2755bd 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fv2dtransportadaptive.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fv2dtransportadaptive.hh @@ -55,20 +55,20 @@ namespace Dumux { template<class TypeTag> class FV2dTransport2P2CAdaptive : public FVTransport2P2C<TypeTag> { - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; - using TransportSolutionType = typename GET_PROP_TYPE(TypeTag, TransportSolutionType); + using TransportSolutionType = GetPropType<TypeTag, Properties::TransportSolutionType>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld, - NumPhases = GET_PROP_VALUE(TypeTag, NumPhases) + NumPhases = getPropValue<TypeTag, Properties::NumPhases>() }; enum { @@ -88,7 +88,7 @@ class FV2dTransport2P2CAdaptive : public FVTransport2P2C<TypeTag> using DimMatrix = Dune::FieldMatrix<Scalar, dim, dim>; using TransmissivityMatrix = Dune::FieldVector<Scalar,dim+1>; using PhaseVector = Dune::FieldVector<Scalar, NumPhases>; - using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); + using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>; //! Acess function for the current problem Problem& problem() @@ -126,7 +126,7 @@ protected: bool enableMPFA; //!> Specifies if the MPFA is used on hanging nodes //! gives kind of pressure used (\f$ 0 = p_w \f$, \f$ 1 = p_n \f$, \f$ 2 = p_{global} \f$) - static const int pressureType = GET_PROP_VALUE(TypeTag, PressureFormulation); + static const int pressureType = getPropValue<TypeTag, Properties::PressureFormulation>(); }; /*! @@ -158,7 +158,7 @@ void FV2dTransport2P2CAdaptive<TypeTag>::update(const Scalar t, Scalar& dt, Tran // resize update vector and set to zero unsigned int size_ = problem_.gridView().size(0); - updateVec.resize(GET_PROP_VALUE(TypeTag, NumComponents)); + updateVec.resize(getPropValue<TypeTag, Properties::NumComponents>()); updateVec[wCompIdx].resize(size_); updateVec[nCompIdx].resize(size_); updateVec[wCompIdx] = 0; @@ -180,7 +180,7 @@ void FV2dTransport2P2CAdaptive<TypeTag>::update(const Scalar t, Scalar& dt, Tran for (int i = 0; i< problem().gridView().size(0); i++) { CellData& cellDataI = problem().variables().cellData(i); - for(int compIdx = 0; compIdx < GET_PROP_VALUE(TypeTag, NumComponents); compIdx++) + for(int compIdx = 0; compIdx < getPropValue<TypeTag, Properties::NumComponents>(); compIdx++) { this->totalConcentration_[compIdx][i] = cellDataI.totalConcentration(compIdx); @@ -303,7 +303,7 @@ void FV2dTransport2P2CAdaptive<TypeTag>::update(const Scalar t, Scalar& dt, Tran #if HAVE_MPI // communicate updated values - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using ElementMapper = typename SolutionTypes::ElementMapper; using DataHandle = VectorExchange<ElementMapper, Dune::BlockVector<Dune::FieldVector<Scalar, 1> > >; for (int i = 0; i < updateVec.size(); i++) diff --git a/dumux/porousmediumflow/2p2c/sequential/fv3dpressureadaptive.hh b/dumux/porousmediumflow/2p2c/sequential/fv3dpressureadaptive.hh index 5b501f9166..94e366048c 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fv3dpressureadaptive.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fv3dpressureadaptive.hh @@ -43,8 +43,10 @@ namespace Dumux { namespace Properties { -SET_TYPE_PROP(SequentialTwoPTwoCAdaptive, MPFAInteractionVolume, FvMpfaL3dInteractionVolumeAdaptive<TypeTag>); -SET_TYPE_PROP(SequentialTwoPTwoCAdaptive, MPFAInteractionVolumeContainer, FvMpfaL3d2P2CInteractionVolumeContainerAdaptive<TypeTag>); +template<class TypeTag> +struct MPFAInteractionVolume<TypeTag, TTag::SequentialTwoPTwoCAdaptive> { using type = FvMpfaL3dInteractionVolumeAdaptive<TypeTag>; }; +template<class TypeTag> +struct MPFAInteractionVolumeContainer<TypeTag, TTag::SequentialTwoPTwoCAdaptive> { using type = FvMpfaL3d2P2CInteractionVolumeContainerAdaptive<TypeTag>; }; } // end namespace Properties /*! @@ -77,29 +79,29 @@ template<class TypeTag> class FV3dPressure2P2CAdaptive : public FVPressure2P2CMultiPhysics<TypeTag> { //the model implementation - using Implementation = typename GET_PROP_TYPE(TypeTag, PressureModel); + using Implementation = GetPropType<TypeTag, Properties::PressureModel>; using ParentType = FVPressure2P2CMultiPhysics<TypeTag>; using BaseType = FVPressure<TypeTag>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld, - NumPhases = GET_PROP_VALUE(TypeTag, NumPhases), NumComponents = GET_PROP_VALUE(TypeTag, NumComponents) + NumPhases = getPropValue<TypeTag, Properties::NumPhases>(), NumComponents = getPropValue<TypeTag, Properties::NumComponents>() }; enum { @@ -133,16 +135,16 @@ template<class TypeTag> class FV3dPressure2P2CAdaptive using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; using TransmissivityMatrix = Dune::FieldVector<Scalar,dim+1>; using DimMatrix = Dune::FieldMatrix<Scalar, dim, dim>; - using PhaseVector = Dune::FieldVector<Scalar, GET_PROP_VALUE(TypeTag, NumPhases)>; - using ComponentVector = Dune::FieldVector<Scalar, GET_PROP_VALUE(TypeTag, NumComponents)>; - using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); + using PhaseVector = Dune::FieldVector<Scalar, getPropValue<TypeTag, Properties::NumPhases>()>; + using ComponentVector = Dune::FieldVector<Scalar, getPropValue<TypeTag, Properties::NumComponents>()>; + using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>; // the typenames used for the stiffness matrix and solution vector - using Matrix = typename GET_PROP_TYPE(TypeTag, PressureCoefficientMatrix); - using RHSVector = typename GET_PROP_TYPE(TypeTag, PressureRHSVector); + using Matrix = GetPropType<TypeTag, Properties::PressureCoefficientMatrix>; + using RHSVector = GetPropType<TypeTag, Properties::PressureRHSVector>; // Dumux MPFA types - using InteractionVolumeContainer = typename GET_PROP_TYPE(TypeTag, MPFAInteractionVolumeContainer); + using InteractionVolumeContainer = GetPropType<TypeTag, Properties::MPFAInteractionVolumeContainer>; using InteractionVolume = typename InteractionVolumeContainer::InteractionVolume; protected: @@ -228,9 +230,9 @@ public: } #if HAVE_MPI // communicate updated values - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using ElementMapper = typename SolutionTypes::ElementMapper; - using PressureSolution = typename GET_PROP_TYPE(TypeTag, PressureSolutionVector); + using PressureSolution = GetPropType<TypeTag, Properties::PressureSolutionVector>; using DataHandle = VectorExchange<ElementMapper, PressureSolution>; DataHandle dataHandle(problem().variables().elementMapper(), this->pressure()); @@ -692,7 +694,7 @@ void FV3dPressure2P2CAdaptive<TypeTag>::assemble(bool first) // calculate only from one side, but add matrix entries for both sides // the last condition is needed to properly assemble in the presence // of ghost elements - if (GET_PROP_VALUE(TypeTag, VisitFacesOnlyOnce) + if (getPropValue<TypeTag, Properties::VisitFacesOnlyOnce>() && (eIdxGlobalI > eIdxGlobalJ) && haveSameLevel && neighbor.partitionType() == Dune::InteriorEntity) continue; @@ -734,7 +736,7 @@ void FV3dPressure2P2CAdaptive<TypeTag>::assemble(bool first) this->A_[eIdxGlobalI][eIdxGlobalJ] -= entries[matrix]; // The second condition is needed to not spoil the ghost element entries - if (GET_PROP_VALUE(TypeTag, VisitFacesOnlyOnce) + if (getPropValue<TypeTag, Properties::VisitFacesOnlyOnce>() && neighbor.partitionType() == Dune::InteriorEntity) { this->f_[eIdxGlobalJ] += entries[rhs]; diff --git a/dumux/porousmediumflow/2p2c/sequential/fv3dtransportadaptive.hh b/dumux/porousmediumflow/2p2c/sequential/fv3dtransportadaptive.hh index 0a369af14d..21edb788a9 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fv3dtransportadaptive.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fv3dtransportadaptive.hh @@ -52,27 +52,27 @@ namespace Dumux { template<class TypeTag> class FV3dTransport2P2CAdaptive : public FVTransport2P2C<TypeTag> { - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; - using TransportSolutionType = typename GET_PROP_TYPE(TypeTag, TransportSolutionType); + using TransportSolutionType = GetPropType<TypeTag, Properties::TransportSolutionType>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld, - NumPhases = GET_PROP_VALUE(TypeTag, NumPhases) + NumPhases = getPropValue<TypeTag, Properties::NumPhases>() }; enum { @@ -97,7 +97,7 @@ class FV3dTransport2P2CAdaptive : public FVTransport2P2C<TypeTag> using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; using DimMatrix = Dune::FieldMatrix<Scalar, dim, dim>; using PhaseVector = Dune::FieldVector<Scalar, NumPhases>; - using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); + using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>; //! Acess function for the current problem Problem& problem() @@ -135,7 +135,7 @@ protected: bool enableMPFA; //!> Specifies if the MPFA is used on hanging nodes //! gives kind of pressure used (\f$ 0 = p_w \f$, \f$ 1 = p_n \f$, \f$ 2 = p_{global} \f$) - static const int pressureType = GET_PROP_VALUE(TypeTag, PressureFormulation); + static const int pressureType = getPropValue<TypeTag, Properties::PressureFormulation>(); }; /*! @@ -170,7 +170,7 @@ void FV3dTransport2P2CAdaptive<TypeTag>::update(const Scalar t, Scalar& dt, // resize update vector and set to zero int size_ = problem_.gridView().size(0); - updateVec.resize(GET_PROP_VALUE(TypeTag, NumComponents)); + updateVec.resize(getPropValue<TypeTag, Properties::NumComponents>()); updateVec[wCompIdx].resize(size_); updateVec[nCompIdx].resize(size_); updateVec[wCompIdx] = 0; @@ -185,7 +185,7 @@ void FV3dTransport2P2CAdaptive<TypeTag>::update(const Scalar t, Scalar& dt, for (int i = 0; i< problem().gridView().size(0); i++) { CellData& cellDataI = problem().variables().cellData(i); - for(int compIdx = 0; compIdx < GET_PROP_VALUE(TypeTag, NumComponents); compIdx++) + for(int compIdx = 0; compIdx < getPropValue<TypeTag, Properties::NumComponents>(); compIdx++) { this->totalConcentration_[compIdx][i] = cellDataI.totalConcentration(compIdx); @@ -301,7 +301,7 @@ void FV3dTransport2P2CAdaptive<TypeTag>::update(const Scalar t, Scalar& dt, #if HAVE_MPI // communicate updated values - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using ElementMapper = typename SolutionTypes::ElementMapper; using DataHandle = VectorExchange<ElementMapper, Dune::BlockVector<Dune::FieldVector<Scalar, 1> > >; for (int i = 0; i < updateVec.size(); i++) diff --git a/dumux/porousmediumflow/2p2c/sequential/fvmpfal3dinteractionvolumecontaineradaptive.hh b/dumux/porousmediumflow/2p2c/sequential/fvmpfal3dinteractionvolumecontaineradaptive.hh index 750a3da969..1154d0b265 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fvmpfal3dinteractionvolumecontaineradaptive.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fvmpfal3dinteractionvolumecontaineradaptive.hh @@ -46,21 +46,21 @@ template<class TypeTag> class FvMpfaL3d2P2CInteractionVolumeContainerAdaptive : public FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag> { using ParentType = FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using Scalar = GetPropType<TypeTag, Properties::Scalar>;using Problem = GetPropType<TypeTag, Properties::Problem>; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using PrimaryVariables = typename GET_PROP(TypeTag, SolutionTypes)::PrimaryVariables; + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using PrimaryVariables = typename GetProp<TypeTag, Properties::SolutionTypes>::PrimaryVariables; - using GridTypeIndices = typename GET_PROP_TYPE(TypeTag, GridTypeIndices); + using GridTypeIndices = GetPropType<TypeTag, Properties::GridTypeIndices>; using Element = typename GridView::Traits::template Codim<0>::Entity; using ElementGeometry = typename Element::Geometry; @@ -90,7 +90,7 @@ class FvMpfaL3d2P2CInteractionVolumeContainerAdaptive : public FvMpfaL3dInteract public: //! Type for storing an MPFA-interaction-volume. (Usually of type FvMpfaL3dInteractionVolume or FvMpfaL3dInteractionVolumeAdaptive) - using InteractionVolume = typename GET_PROP_TYPE(TypeTag, MPFAInteractionVolume); + using InteractionVolume = GetPropType<TypeTag, Properties::MPFAInteractionVolume>; using GlobalInteractionVolumeVector = std::vector<InteractionVolume>; using FaceAreaVector = std::vector<Dune::FieldVector<Dune::FieldVector<Scalar, 2>, 2*dim> >; diff --git a/dumux/porousmediumflow/2p2c/sequential/fvpressure.hh b/dumux/porousmediumflow/2p2c/sequential/fvpressure.hh index cbe2b1b257..b43013496f 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fvpressure.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fvpressure.hh @@ -72,22 +72,22 @@ template<class TypeTag> class FVPressure2P2C : public FVPressureCompositional<TypeTag> { //the model implementation - using Implementation = typename GET_PROP_TYPE(TypeTag, PressureModel); + using Implementation = GetPropType<TypeTag, Properties::PressureModel>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld @@ -125,11 +125,11 @@ template<class TypeTag> class FVPressure2P2C // convenience shortcuts for Vectors/Matrices using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; using DimMatrix = Dune::FieldMatrix<Scalar, dim, dim>; - using PhaseVector = Dune::FieldVector<Scalar, GET_PROP_VALUE(TypeTag, NumPhases)>; - using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); + using PhaseVector = Dune::FieldVector<Scalar, getPropValue<TypeTag, Properties::NumPhases>()>; + using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>; // the typenames used for the stiffness matrix and solution vector - using Matrix = typename GET_PROP_TYPE(TypeTag, PressureCoefficientMatrix); + using Matrix = GetPropType<TypeTag, Properties::PressureCoefficientMatrix>; protected: //! @copydoc FVPressure::EntryType @@ -169,7 +169,7 @@ public: ErrorTermUpperBound_ = getParam<Scalar>("Impet.ErrorTermUpperBound"); enableVolumeIntegral = getParam<bool>("Impet.EnableVolumeIntegral"); - regulateBoundaryPermeability = GET_PROP_VALUE(TypeTag, RegulateBoundaryPermeability); + regulateBoundaryPermeability = getPropValue<TypeTag, Properties::RegulateBoundaryPermeability>(); if(regulateBoundaryPermeability) { minimalBoundaryPermeability = getParam<Scalar>("SpatialParams.MinBoundaryPermeability"); @@ -187,7 +187,7 @@ protected: Scalar ErrorTermLowerBound_; //!< Handling of error term: lower bound for error dampening Scalar ErrorTermUpperBound_; //!< Handling of error term: upper bound for error dampening //! gives kind of pressure used (\f$ 0 = p_w \f$, \f$ 1 = p_n \f$, \f$ 2 = p_{global} \f$) - static constexpr int pressureType = GET_PROP_VALUE(TypeTag, PressureFormulation); + static constexpr int pressureType = getPropValue<TypeTag, Properties::PressureFormulation>(); private: //! Returns the implementation of the problem (i.e. static polymorphism) Implementation &asImp_() @@ -288,7 +288,7 @@ void FVPressure2P2C<TypeTag>::getStorage(Dune::FieldVector<Scalar, 2>& storageEn if (isnan(compress_term) || isinf(compress_term)) DUNE_THROW(Dune::MathError, "Compressibility term leads to NAN matrix entry at index " << eIdxGlobalI); - if(!GET_PROP_VALUE(TypeTag, EnableCompressibility)) + if(!getPropValue<TypeTag, Properties::EnableCompressibility>()) DUNE_THROW(Dune::NotImplemented, "Compressibility is switched off???"); } @@ -744,14 +744,14 @@ void FVPressure2P2C<TypeTag>::getFluxOnBoundary(Dune::FieldVector<Scalar, 2>& en FluidSystem::viscosity(BCfluidState, nPhaseIdx); // mobility at the boundary - if(GET_PROP_VALUE(TypeTag, BoundaryMobility) == Indices::satDependent) + if(getPropValue<TypeTag, Properties::BoundaryMobility>() == Indices::satDependent) { lambdaWBound = BCfluidState.saturation(wPhaseIdx) / viscosityWBound; lambdaNWBound = BCfluidState.saturation(nPhaseIdx) / viscosityNWBound; } - else if(GET_PROP_VALUE(TypeTag, BoundaryMobility) == Indices::permDependent) + else if(getPropValue<TypeTag, Properties::BoundaryMobility>() == Indices::permDependent) { lambdaWBound = MaterialLaw::krw(problem().spatialParams().materialLawParams(elementI), @@ -953,7 +953,7 @@ void FVPressure2P2C<TypeTag>::updateMaterialLawsInElement(const Element& element PhaseVector pressure; CompositionalFlash<Scalar, FluidSystem> flashSolver; - if(GET_PROP_VALUE(TypeTag, EnableCapillarity)) // iterate capillary pressure and saturation + if(getPropValue<TypeTag, Properties::EnableCapillarity>()) // iterate capillary pressure and saturation { unsigned int maxiter = 6; Scalar pc = cellData.capillaryPressure(); // initial guess for pc from last TS diff --git a/dumux/porousmediumflow/2p2c/sequential/fvpressurecompositional.hh b/dumux/porousmediumflow/2p2c/sequential/fvpressurecompositional.hh index 57033c6c09..081578adec 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fvpressurecompositional.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fvpressurecompositional.hh @@ -66,23 +66,23 @@ template<class TypeTag> class FVPressureCompositional : public FVPressure<TypeTag> { //the model implementation - using Implementation = typename GET_PROP_TYPE(TypeTag, PressureModel); + using Implementation = GetPropType<TypeTag, Properties::PressureModel>; using ParentType = FVPressure<TypeTag>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using TransportSolutionType = typename GET_PROP_TYPE(TypeTag, TransportSolutionType); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using TransportSolutionType = GetPropType<TypeTag, Properties::TransportSolutionType>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; ///@cond false - using MaterialLaw = typename GET_PROP_TYPE(TypeTag, SpatialParams)::MaterialLaw; + using MaterialLaw = typename GetPropType<TypeTag, Properties::SpatialParams>::MaterialLaw; ///@endcond - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld @@ -100,8 +100,8 @@ template<class TypeTag> class FVPressureCompositional }; enum { - numPhases = GET_PROP_VALUE(TypeTag, NumPhases), - numComponents = GET_PROP_VALUE(TypeTag, NumComponents) + numPhases = getPropValue<TypeTag, Properties::NumPhases>(), + numComponents = getPropValue<TypeTag, Properties::NumComponents>() }; // using declarations to abbreviate a dune class... @@ -171,7 +171,7 @@ public: template<class MultiWriter> void addOutputVtkFields(MultiWriter &writer) { - using ScalarSolutionType = typename GET_PROP(TypeTag, SolutionTypes)::ScalarSolution; + using ScalarSolutionType = typename GetProp<TypeTag, Properties::SolutionTypes>::ScalarSolution; int size = problem_.gridView().size(0); ScalarSolutionType *pressureW = writer.allocateManagedBuffer(size); ScalarSolutionType *pressureN = writer.allocateManagedBuffer(size); @@ -375,8 +375,8 @@ public: problem_(problem), initializationOutputWriter_(problem.gridView(),"initOutput2p2c"), maxError_(0.0), incp_(1.0e1) { - updateEstimate_.resize(GET_PROP_VALUE(TypeTag, NumPhases)); - for (int i=0; i<GET_PROP_VALUE(TypeTag, NumPhases); i++) + updateEstimate_.resize(getPropValue<TypeTag, Properties::NumPhases>()); + for (int i=0; i<getPropValue<TypeTag, Properties::NumPhases>(); i++) updateEstimate_[i].resize(problem.gridView().size(0)); ErrorTermFactor_ = getParam<Scalar>("Impet.ErrorTermFactor"); @@ -401,7 +401,7 @@ protected: Scalar ErrorTermLowerBound_; //!< Handling of error term: lower bound for error dampening Scalar ErrorTermUpperBound_; //!< Handling of error term: upper bound for error dampening //! gives kind of pressure used (\f$ 0 = p_w \f$, \f$ 1 = p_n \f$, \f$ 2 = p_{global} \f$) - static constexpr int pressureType = GET_PROP_VALUE(TypeTag, PressureFormulation); + static constexpr int pressureType = getPropValue<TypeTag, Properties::PressureFormulation>(); private: Problem& problem() @@ -578,7 +578,7 @@ void FVPressureCompositional<TypeTag>::initialMaterialLaws(bool compositional) //get saturation, determine pc sat_0 = problem_.initSat(element); Scalar pc=0.; - if(GET_PROP_VALUE(TypeTag, EnableCapillarity)) + if(getPropValue<TypeTag, Properties::EnableCapillarity>()) { pc = MaterialLaw::pc(problem_.spatialParams().materialLawParams(element), sat_0); @@ -612,7 +612,7 @@ void FVPressureCompositional<TypeTag>::initialMaterialLaws(bool compositional) // This may affect pc and hence p_alpha and hence again saturation -> iteration. // iterations in case of enabled capillary pressure - if(GET_PROP_VALUE(TypeTag, EnableCapillarity)) + if(getPropValue<TypeTag, Properties::EnableCapillarity>()) { //start with pc from last TS Scalar pc(cellData.capillaryPressure()); diff --git a/dumux/porousmediumflow/2p2c/sequential/fvpressuremultiphysics.hh b/dumux/porousmediumflow/2p2c/sequential/fvpressuremultiphysics.hh index 83ec75b1e1..9e6bde06d4 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fvpressuremultiphysics.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fvpressuremultiphysics.hh @@ -69,21 +69,21 @@ template<class TypeTag> class FVPressure2P2CMultiPhysics : public FVPressure2P2C<TypeTag> { using ParentType = FVPressure2P2C<TypeTag>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld @@ -107,8 +107,8 @@ class FVPressure2P2CMultiPhysics : public FVPressure2P2C<TypeTag> // convenience shortcuts for Vectors/Matrices using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; using DimMatrix = Dune::FieldMatrix<Scalar, dim, dim>; - using PhaseVector = Dune::FieldVector<Scalar, GET_PROP_VALUE(TypeTag, NumPhases)>; - using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); + using PhaseVector = Dune::FieldVector<Scalar, getPropValue<TypeTag, Properties::NumPhases>()>; + using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>; //! @copydoc FVPressure::EntryType using EntryType = Dune::FieldVector<Scalar, 2>; @@ -230,7 +230,7 @@ protected: Dune::BlockVector<Dune::FieldVector<int,1> > nextSubdomain; //!< vector holding next subdomain const GlobalPosition& gravity_; //!< vector including the gravity constant //! gives kind of pressure used (\f$ 0 = p_w \f$, \f$ 1 = p_n \f$, \f$ 2 = p_{global} \f$) - static constexpr int pressureType = GET_PROP_VALUE(TypeTag, PressureFormulation); + static constexpr int pressureType = getPropValue<TypeTag, Properties::PressureFormulation>(); Dune::Timer timer_; //!< A timer for the time spent on the multiphysics framework. /*! @@ -464,7 +464,7 @@ void FVPressure2P2CMultiPhysics<TypeTag>::get1pStorage(Dune::FieldVector<Scalar, if (isnan(compress_term) ||isinf(compress_term)) DUNE_THROW(Dune::MathError, "Compressibility term leads to NAN matrix entry at index " << eIdxGlobalI); - if(!GET_PROP_VALUE(TypeTag, EnableCompressibility)) + if(!getPropValue<TypeTag, Properties::EnableCompressibility>()) DUNE_THROW(Dune::NotImplemented, "Compressibility is switched off???"); } @@ -698,7 +698,7 @@ void FVPressure2P2CMultiPhysics<TypeTag>::get1pFluxOnBoundary(Dune::FieldVector< // mobility at the boundary Scalar lambdaBound = 0.; - switch (GET_PROP_VALUE(TypeTag, BoundaryMobility)) + switch (getPropValue<TypeTag, Properties::BoundaryMobility>()) { case Indices::satDependent: { @@ -936,7 +936,7 @@ void FVPressure2P2CMultiPhysics<TypeTag>::update1pMaterialLawsInElement(const El // the next 2p subdomain PhaseVector pressure(0.); Scalar pc = 0; - if(GET_PROP_VALUE(TypeTag, EnableCapillarity)) + if(getPropValue<TypeTag, Properties::EnableCapillarity>()) pc = MaterialLaw::pc(problem().spatialParams().materialLawParams(elementI), ((presentPhaseIdx == wPhaseIdx) ? 1. : 0.)); // assign sw = 1 if wPhase present, else 0 if(pressureType == wPhaseIdx) diff --git a/dumux/porousmediumflow/2p2c/sequential/fvtransport.hh b/dumux/porousmediumflow/2p2c/sequential/fvtransport.hh index c53a95c95e..b758c1c47f 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fvtransport.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fvtransport.hh @@ -58,23 +58,23 @@ namespace Dumux { template<class TypeTag> class FVTransport2P2C { - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using Implementation = typename GET_PROP_TYPE(TypeTag, TransportModel); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; + using Implementation = GetPropType<TypeTag, Properties::TransportModel>; - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; using MaterialLaw = typename SpatialParams::MaterialLaw; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; + using FluidState = GetPropType<TypeTag, Properties::FluidState>; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; - using TransportSolutionType = typename GET_PROP_TYPE(TypeTag, TransportSolutionType); + using TransportSolutionType = GetPropType<TypeTag, Properties::TransportSolutionType>; enum { @@ -90,8 +90,8 @@ class FVTransport2P2C wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx, wCompIdx = Indices::wPhaseIdx, nCompIdx = Indices::nPhaseIdx, contiWEqIdx=Indices::contiWEqIdx, contiNEqIdx=Indices::contiNEqIdx, - NumPhases = GET_PROP_VALUE(TypeTag, NumPhases), - NumComponents = GET_PROP_VALUE(TypeTag, NumComponents) + NumPhases = getPropValue<TypeTag, Properties::NumPhases>(), + NumComponents = getPropValue<TypeTag, Properties::NumComponents>() }; using Element = typename GridView::Traits::template Codim<0>::Entity; @@ -101,7 +101,7 @@ class FVTransport2P2C using DimMatrix = Dune::FieldMatrix<Scalar, dim, dim>; using PhaseVector = Dune::FieldVector<Scalar, NumPhases>; using ComponentVector = Dune::FieldVector<Scalar, NumComponents>; - using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); + using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>; public: //! @copydoc FVPressure::EntryType @@ -154,7 +154,7 @@ public: void initialize() { // resize update vector and set to zero - int transportedQuantities = GET_PROP_VALUE(TypeTag, NumEq) - 1; // NumEq - 1 pressure Eq + int transportedQuantities = getPropValue<TypeTag, Properties::NumEq>() - 1; // NumEq - 1 pressure Eq totalConcentration_.resize(transportedQuantities); for (int eqNumber = 0; eqNumber < transportedQuantities; eqNumber++) { @@ -172,7 +172,7 @@ public: { if(problem().vtkOutputLevel()>3) { - using ScalarSolutionType = typename GET_PROP(TypeTag, SolutionTypes)::ScalarSolution; + using ScalarSolutionType = typename GetProp<TypeTag, Properties::SolutionTypes>::ScalarSolution; int size = problem_.gridView().size(0); ScalarSolutionType *totalC1PV = writer.allocateManagedBuffer(size); ScalarSolutionType *totalC2PV = writer.allocateManagedBuffer(size); @@ -212,8 +212,8 @@ public: void getTransportedQuantity(TransportSolutionType& transportedQuantity) { // resize update vector and set to zero - transportedQuantity.resize((GET_PROP_VALUE(TypeTag, NumEq) - 1)); - for(int compIdx = 0; compIdx < (GET_PROP_VALUE(TypeTag, NumEq) - 1); compIdx++) + transportedQuantity.resize((getPropValue<TypeTag, Properties::NumEq>() - 1)); + for(int compIdx = 0; compIdx < (getPropValue<TypeTag, Properties::NumEq>() - 1); compIdx++) transportedQuantity[compIdx].resize(problem_.gridView().size(0)); transportedQuantity = totalConcentration_; @@ -245,7 +245,7 @@ public: template<class DataEntry> bool inPhysicalRange(DataEntry& entry) { - int numComp = GET_PROP_VALUE(TypeTag, NumEq) - 1; + int numComp = getPropValue<TypeTag, Properties::NumEq>() - 1; for(int compIdx = 0; compIdx < numComp; compIdx++) { if (entry[compIdx] < -1.0e-6) @@ -276,7 +276,7 @@ public: dtThreshold_(1e-6), subCFLFactor_(1.0) { restrictFluxInTransport_ = getParam<int>("Impet.RestrictFluxInTransport", 0); - regulateBoundaryPermeability = GET_PROP_VALUE(TypeTag, RegulateBoundaryPermeability); + regulateBoundaryPermeability = getPropValue<TypeTag, Properties::RegulateBoundaryPermeability>(); if(regulateBoundaryPermeability) minimalBoundaryPermeability = getParam<Scalar>("SpatialParams.MinBoundaryPermeability"); @@ -303,7 +303,7 @@ protected: int averagedFaces_; //!< number of faces were flux was restricted //! gives kind of pressure used (\f$ 0 = p_w \f$, \f$ 1 = p_n \f$, \f$ 2 = p_{global} \f$) - static const int pressureType = GET_PROP_VALUE(TypeTag, PressureFormulation); + static const int pressureType = getPropValue<TypeTag, Properties::PressureFormulation>(); //! Restriction of flux on new pressure field if direction reverses from the pressure equation int restrictFluxInTransport_; //! Enables regulation of permeability in the direction of a Dirichlet Boundary Condition @@ -377,7 +377,7 @@ void FVTransport2P2C<TypeTag>::update(const Scalar t, Scalar& dt, averagedFaces_ = 0; // resize update vector and set to zero - updateVec.resize(GET_PROP_VALUE(TypeTag, NumComponents)); + updateVec.resize(getPropValue<TypeTag, Properties::NumComponents>()); updateVec[wCompIdx].resize(problem_.gridView().size(0)); updateVec[nCompIdx].resize(problem_.gridView().size(0)); updateVec[wCompIdx] = 0; @@ -477,7 +477,7 @@ void FVTransport2P2C<TypeTag>::update(const Scalar t, Scalar& dt, #if HAVE_MPI // communicate updated values - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using ElementMapper = typename SolutionTypes::ElementMapper; using DataHandle = VectorExchange<ElementMapper, Dune::BlockVector<Dune::FieldVector<Scalar, 1> > >; for (int i = 0; i < updateVec.size(); i++) @@ -551,7 +551,7 @@ void FVTransport2P2C<TypeTag>::updateConcentrations(TransportSolutionType& updat for (int i = 0; i< problem().gridView().size(0); i++) { CellData& cellDataI = problem().variables().cellData(i); - for(int compIdx = 0; compIdx < GET_PROP_VALUE(TypeTag, NumComponents); compIdx++) + for(int compIdx = 0; compIdx < getPropValue<TypeTag, Properties::NumComponents>(); compIdx++) { totalConcentration_[compIdx][i] += (updateVector[compIdx][i]*=dt); cellDataI.setMassConcentration(compIdx, totalConcentration_[compIdx][i]); @@ -967,7 +967,7 @@ void FVTransport2P2C<TypeTag>::getFluxOnBoundary(ComponentVector& fluxEntries, Scalar densityNWBound = BCfluidState.density(nPhaseIdx); Scalar viscosityWBound = FluidSystem::viscosity(BCfluidState, wPhaseIdx); Scalar viscosityNWBound = FluidSystem::viscosity(BCfluidState, nPhaseIdx); - if(GET_PROP_VALUE(TypeTag, EnableCapillarity)) + if(getPropValue<TypeTag, Properties::EnableCapillarity>()) pcBound = (BCfluidState.pressure(nPhaseIdx) - BCfluidState.pressure(wPhaseIdx)); // average double densityW_mean = (densityWI + densityWBound) / 2; @@ -1007,7 +1007,7 @@ void FVTransport2P2C<TypeTag>::getFluxOnBoundary(ComponentVector& fluxEntries, lambda[wPhaseIdx] = cellDataI.mobility(wPhaseIdx); else { - if(GET_PROP_VALUE(TypeTag, BoundaryMobility)==Indices::satDependent) + if(getPropValue<TypeTag, Properties::BoundaryMobility>()==Indices::satDependent) lambda[wPhaseIdx] = BCfluidState.saturation(wPhaseIdx) / viscosityWBound; else lambda[wPhaseIdx] = MaterialLaw::krw( @@ -1018,7 +1018,7 @@ void FVTransport2P2C<TypeTag>::getFluxOnBoundary(ComponentVector& fluxEntries, lambda[nPhaseIdx] = cellDataI.mobility(nPhaseIdx); else { - if(GET_PROP_VALUE(TypeTag, BoundaryMobility)==Indices::satDependent) + if(getPropValue<TypeTag, Properties::BoundaryMobility>()==Indices::satDependent) lambda[nPhaseIdx] = BCfluidState.saturation(nPhaseIdx) / viscosityNWBound; else lambda[nPhaseIdx] = MaterialLaw::krn( @@ -1123,7 +1123,7 @@ void FVTransport2P2C<TypeTag>::evalBoundary(GlobalPosition globalPosFace, if (bcType == Indices::saturation) { Scalar satBound = primaryVariablesOnBoundary[contiWEqIdx]; - if(GET_PROP_VALUE(TypeTag, EnableCapillarity)) + if(getPropValue<TypeTag, Properties::EnableCapillarity>()) { Scalar pcBound = MaterialLaw::pc(problem().spatialParams().materialLawParams(element), satBound); @@ -1157,7 +1157,7 @@ void FVTransport2P2C<TypeTag>::evalBoundary(GlobalPosition globalPosFace, flashSolver.concentrationFlash2p2c(BCfluidState, Z0Bound, pressBound, problem().spatialParams().porosity(element), problem().temperatureAtPos(globalPosFace)); - if(GET_PROP_VALUE(TypeTag, EnableCapillarity)) + if(getPropValue<TypeTag, Properties::EnableCapillarity>()) { Scalar pcBound = MaterialLaw::pc(problem().spatialParams().materialLawParams(element), BCfluidState.saturation(wPhaseIdx)); @@ -1316,7 +1316,7 @@ void FVTransport2P2C<TypeTag>::updatedTargetDt_(Scalar &dt) #if HAVE_MPI // communicate updated values - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using ElementMapper = typename SolutionTypes::ElementMapper; using TimeDataHandle = VectorExchange<ElementMapper, std::vector<LocalTimesteppingData> >; @@ -1361,7 +1361,7 @@ void FVTransport2P2C<TypeTag>::innerUpdate(TransportSolutionType& updateVec) for (int i = 0; i < size; i++) { EntryType newVal(0); - int transportedQuantities = GET_PROP_VALUE(TypeTag, NumEq) - 1; // NumEq - 1 pressure Eq + int transportedQuantities = getPropValue<TypeTag, Properties::NumEq>() - 1; // NumEq - 1 pressure Eq for (int eqNumber = 0; eqNumber < transportedQuantities; eqNumber++) { newVal[eqNumber] = totalConcentration_[eqNumber][i]; diff --git a/dumux/porousmediumflow/2p2c/sequential/fvtransportmultiphysics.hh b/dumux/porousmediumflow/2p2c/sequential/fvtransportmultiphysics.hh index fb4d30c2c9..ee38d1b74f 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fvtransportmultiphysics.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fvtransportmultiphysics.hh @@ -54,15 +54,15 @@ namespace Dumux { template<class TypeTag> class FVTransport2P2CMultiPhysics : public FVTransport2P2C<TypeTag> { - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; - using TransportSolutionType = typename GET_PROP_TYPE(TypeTag, TransportSolutionType); + using TransportSolutionType = GetPropType<TypeTag, Properties::TransportSolutionType>; enum { @@ -75,7 +75,7 @@ class FVTransport2P2CMultiPhysics : public FVTransport2P2C<TypeTag> }; using PhaseVector = Dune::FieldVector<Scalar, 2>; - using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); + using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>; //! Acess function for the current problem Problem& problem() @@ -132,7 +132,7 @@ void FVTransport2P2CMultiPhysics<TypeTag>::update(const Scalar t, Scalar& dt, Tr this->averagedFaces_ = 0.; // resize update vector and set to zero - updateVec.resize(GET_PROP_VALUE(TypeTag, NumComponents)); + updateVec.resize(getPropValue<TypeTag, Properties::NumComponents>()); updateVec[wCompIdx].resize(problem().gridView().size(0)); updateVec[nCompIdx].resize(problem().gridView().size(0)); updateVec[wCompIdx] = 0; @@ -234,7 +234,7 @@ void FVTransport2P2CMultiPhysics<TypeTag>::update(const Scalar t, Scalar& dt, Tr #if HAVE_MPI // communicate updated values - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using ElementMapper = typename SolutionTypes::ElementMapper; using DataHandle = VectorExchange<ElementMapper, Dune::BlockVector<Dune::FieldVector<Scalar, 1> > >; for (int i = 0; i < updateVec.size(); i++) diff --git a/dumux/porousmediumflow/2p2c/sequential/problem.hh b/dumux/porousmediumflow/2p2c/sequential/problem.hh index 471f26add4..017e39c755 100644 --- a/dumux/porousmediumflow/2p2c/sequential/problem.hh +++ b/dumux/porousmediumflow/2p2c/sequential/problem.hh @@ -42,22 +42,22 @@ template<class TypeTag> class IMPETProblem2P2C : public IMPESProblem2P<TypeTag> { using ParentType = IMPESProblem2P<TypeTag>; - using Implementation = typename GET_PROP_TYPE(TypeTag, Problem); - using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Implementation = GetPropType<TypeTag, Properties::Problem>; + using TimeManager = GetPropType<TypeTag, Properties::TimeManager>; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; using Grid = typename GridView::Grid; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; using Element = typename GridView::Traits::template Codim<0>::Entity; // material properties - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; enum { - adaptiveGrid = GET_PROP_VALUE(TypeTag, AdaptiveGrid) + adaptiveGrid = getPropValue<TypeTag, Properties::AdaptiveGrid>() }; enum { dimWorld = Grid::dimensionworld @@ -196,7 +196,7 @@ private: protected: //! Sets entries of the primary variable vector to zero - void setZero(typename GET_PROP_TYPE(TypeTag, PrimaryVariables) &values, const int equation = -1) const + void setZero(GetPropType<TypeTag, Properties::PrimaryVariables> &values, const int equation = -1) const { if (equation == Indices::pressureEqIdx) { diff --git a/dumux/porousmediumflow/2p2c/sequential/properties.hh b/dumux/porousmediumflow/2p2c/sequential/properties.hh index 78893309d7..a3ffe0c267 100644 --- a/dumux/porousmediumflow/2p2c/sequential/properties.hh +++ b/dumux/porousmediumflow/2p2c/sequential/properties.hh @@ -52,15 +52,21 @@ namespace Properties { // Type tags ////////////////////////////////////////////////////////////////// //! The type tag for the compositional two-phase problems -NEW_TYPE_TAG(SequentialTwoPTwoC, INHERITS_FROM(Pressure, Transport, IMPET)); +// Create new type tags +namespace TTag { +struct SequentialTwoPTwoC { using InheritsFrom = std::tuple<Transport, IMPET, Pressure>; }; +} // end namespace TTag ////////////////////////////////////////////////////////////////// // Property tags ////////////////////////////////////////////////////////////////// -NEW_PROP_TAG( EnableCapillarity); //!< Returns whether capillarity is regarded -NEW_PROP_TAG( BoundaryMobility ); //!< Returns whether mobility or saturation is used for Dirichlet B.C. +template<class TypeTag, class MyTypeTag> +struct EnableCapillarity { using type = UndefinedProperty; }; //!< Returns whether capillarity is regarded +template<class TypeTag, class MyTypeTag> +struct BoundaryMobility { using type = UndefinedProperty; }; //!< Returns whether mobility or saturation is used for Dirichlet B.C. //! A minimum permeability can be assigned via the runtime-Parameter SpatialParams.minBoundaryPermeability -NEW_PROP_TAG( RegulateBoundaryPermeability ); +template<class TypeTag, class MyTypeTag> +struct RegulateBoundaryPermeability { using type = UndefinedProperty; }; }} //DUMUX includes @@ -73,9 +79,11 @@ namespace Properties { // Properties ////////////////////////////////////////////////////////////////// -SET_TYPE_PROP(SequentialTwoPTwoC, Indices,SequentialTwoPTwoCIndices<TypeTag>); +template<class TypeTag> +struct Indices<TypeTag, TTag::SequentialTwoPTwoC> { using type = SequentialTwoPTwoCIndices<TypeTag>; }; -SET_INT_PROP(SequentialTwoPTwoC, NumEq, 3); +template<class TypeTag> +struct NumEq<TypeTag, TTag::SequentialTwoPTwoC> { static constexpr int value = 3; }; // set fluid/component information template<class TypeTag> @@ -83,7 +91,7 @@ struct NumPhases<TypeTag, TTag::SequentialTwoPTwoC> //!< The number of phases in { // the property is declared in dumux/porousmediumflow/sequential/properties.hh private: - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; public: static const int value = FluidSystem::numPhases; @@ -95,7 +103,7 @@ template<class TypeTag> struct NumComponents<TypeTag, TTag::SequentialTwoPTwoC> //!< The number of components in the 2p2c model is 2 { private: - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; public: static const int value = FluidSystem::numComponents; @@ -104,44 +112,49 @@ public: }; //! Set the default formulation -SET_INT_PROP(SequentialTwoPTwoC, - PressureFormulation, - GET_PROP_TYPE(TypeTag, Indices)::pressureN); +template<class TypeTag> +struct PressureFormulation<TypeTag, TTag::SequentialTwoPTwoC> { static constexpr int value = GetPropType<TypeTag, Properties::Indices>::pressureN; }; //!< Compositional models are very likely compressible -SET_INT_PROP(SequentialTwoPTwoC, - SaturationFormulation, - GET_PROP_TYPE(TypeTag, Indices)::saturationW); +template<class TypeTag> +struct SaturationFormulation<TypeTag, TTag::SequentialTwoPTwoC> { static constexpr int value = GetPropType<TypeTag, Properties::Indices>::saturationW; }; //!< Compositional models are very likely compressible -SET_INT_PROP(SequentialTwoPTwoC, - VelocityFormulation, - GET_PROP_TYPE(TypeTag, Indices)::velocityW); +template<class TypeTag> +struct VelocityFormulation<TypeTag, TTag::SequentialTwoPTwoC> { static constexpr int value = GetPropType<TypeTag, Properties::Indices>::velocityW; }; //!< Compositional models are very likely compressible template<class TypeTag> struct TransportSolutionType<TypeTag, TTag::SequentialTwoPTwoC> { - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; //! type for vector of vector (of scalars) using type = Dune::BlockVector<Dune::BlockVector<Dune::FieldVector<Scalar,1> > >; }; -SET_BOOL_PROP(SequentialTwoPTwoC, EnableCompressibility, true); //!< Compositional models are very likely compressible -SET_BOOL_PROP(SequentialTwoPTwoC, VisitFacesOnlyOnce, false); //!< Faces are regarded from both sides -SET_BOOL_PROP(SequentialTwoPTwoC, EnableCapillarity, false); //!< Capillarity is enabled +template<class TypeTag> +struct EnableCompressibility<TypeTag, TTag::SequentialTwoPTwoC> { static constexpr bool value = true; }; //!< Compositional models are very likely compressible +template<class TypeTag> +struct VisitFacesOnlyOnce<TypeTag, TTag::SequentialTwoPTwoC> { static constexpr bool value = false; }; //!< Faces are regarded from both sides +template<class TypeTag> +struct EnableCapillarity<TypeTag, TTag::SequentialTwoPTwoC> { static constexpr bool value = false; }; //!< Capillarity is enabled template<class TypeTag> struct BoundaryMobility<TypeTag, TTag::SequentialTwoPTwoC> //!< Saturation scales flux on Dirichlet B.C. { static const int value = SequentialTwoPTwoCIndices<TypeTag>::satDependent;}; -SET_TYPE_PROP(SequentialTwoPTwoC, Variables, VariableClass<TypeTag>); -SET_TYPE_PROP(SequentialTwoPTwoC, CellData, CellData2P2C<TypeTag>); -SET_TYPE_PROP(SequentialTwoPTwoC, FluidState, CompositionalFluidState<typename GET_PROP_TYPE(TypeTag, Scalar), typename GET_PROP_TYPE(TypeTag, FluidSystem)>); +template<class TypeTag> +struct Variables<TypeTag, TTag::SequentialTwoPTwoC> { using type = VariableClass<TypeTag>; }; +template<class TypeTag> +struct CellData<TypeTag, TTag::SequentialTwoPTwoC> { using type = CellData2P2C<TypeTag>; }; +template<class TypeTag> +struct FluidState<TypeTag, TTag::SequentialTwoPTwoC> { using type = CompositionalFluidState<GetPropType<TypeTag, Properties::Scalar>, GetPropType<TypeTag, Properties::FluidSystem>>; }; //! The spatial parameters to be employed. -SET_TYPE_PROP(SequentialTwoPTwoC, SpatialParams, SequentialFVSpatialParams<TypeTag>); +template<class TypeTag> +struct SpatialParams<TypeTag, TTag::SequentialTwoPTwoC> { using type = SequentialFVSpatialParams<TypeTag>; }; //! Switch off permeability regularization at Dirichlet boundaries by default. -SET_BOOL_PROP(SequentialTwoPTwoC, RegulateBoundaryPermeability, false); +template<class TypeTag> +struct RegulateBoundaryPermeability<TypeTag, TTag::SequentialTwoPTwoC> { static constexpr bool value = false; }; } /*! @@ -156,7 +169,7 @@ template <class TypeTag> struct SequentialTwoPTwoCIndices : public SequentialTwoPCommonIndices { private: - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); + using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; public: // Component indices diff --git a/dumux/porousmediumflow/2p2c/sequential/variableclassadaptive.hh b/dumux/porousmediumflow/2p2c/sequential/variableclassadaptive.hh index 1f58384857..0a3f511e48 100644 --- a/dumux/porousmediumflow/2p2c/sequential/variableclassadaptive.hh +++ b/dumux/porousmediumflow/2p2c/sequential/variableclassadaptive.hh @@ -49,10 +49,10 @@ private: using ParentType = VariableClassAdaptive<TypeTag>; using BaseType = VariableClass<TypeTag>; - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using Problem = GetPropType<TypeTag, Properties::Problem>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using GridView = GetPropType<TypeTag, Properties::GridView>; + using CellData = GetPropType<TypeTag, Properties::CellData>; using AdaptedValues = typename CellData::AdaptedValues; using Grid = typename GridView::Grid; diff --git a/dumux/porousmediumflow/sequential/cellcentered/mpfa/linteractionvolume.hh b/dumux/porousmediumflow/sequential/cellcentered/mpfa/linteractionvolume.hh index 083632416d..5f0e9efa0d 100644 --- a/dumux/porousmediumflow/sequential/cellcentered/mpfa/linteractionvolume.hh +++ b/dumux/porousmediumflow/sequential/cellcentered/mpfa/linteractionvolume.hh @@ -40,9 +40,9 @@ template<class TypeTag> class FVMPFALInteractionVolume { private: - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Grid = typename GET_PROP_TYPE(TypeTag, Grid); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Grid = GetPropType<TypeTag, Properties::Grid>; + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { @@ -52,8 +52,8 @@ private: using Element = typename GridView::template Codim<0>::Entity; using ElementSeed = typename Grid::template Codim<0>::EntitySeed; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; using DimVector = Dune::FieldVector<Scalar, dim>; diff --git a/dumux/porousmediumflow/sequential/cellcentered/mpfa/linteractionvolume3d.hh b/dumux/porousmediumflow/sequential/cellcentered/mpfa/linteractionvolume3d.hh index 10a285ed6c..54fcf8e6c3 100644 --- a/dumux/porousmediumflow/sequential/cellcentered/mpfa/linteractionvolume3d.hh +++ b/dumux/porousmediumflow/sequential/cellcentered/mpfa/linteractionvolume3d.hh @@ -114,10 +114,10 @@ template<class TypeTag> class FvMpfaL3dInteractionVolume { private: - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Grid = typename GET_PROP_TYPE(TypeTag, Grid); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Grid = GetPropType<TypeTag, Properties::Grid>; + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Problem = GetPropType<TypeTag, Properties::Problem>; enum { @@ -128,8 +128,8 @@ private: using Element = typename GridView::template Codim<0>::Entity; using ElementSeed = typename Grid::template Codim<0>::EntitySeed; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; using DimVector = Dune::FieldVector<Scalar, dim>; diff --git a/dumux/porousmediumflow/sequential/cellcentered/mpfa/linteractionvolume3dadaptive.hh b/dumux/porousmediumflow/sequential/cellcentered/mpfa/linteractionvolume3dadaptive.hh index 436cacfa40..663b66221b 100644 --- a/dumux/porousmediumflow/sequential/cellcentered/mpfa/linteractionvolume3dadaptive.hh +++ b/dumux/porousmediumflow/sequential/cellcentered/mpfa/linteractionvolume3dadaptive.hh @@ -192,10 +192,10 @@ class FvMpfaL3dInteractionVolumeAdaptive:public FvMpfaL3dInteractionVolume<TypeT { private: using ParentType = FvMpfaL3dInteractionVolume<TypeTag>; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Grid = typename GET_PROP_TYPE(TypeTag, Grid); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Grid = GetPropType<TypeTag, Properties::Grid>; + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Problem = GetPropType<TypeTag, Properties::Problem>; enum { @@ -206,8 +206,8 @@ private: using Element = typename GridView::template Codim<0>::Entity; using ElementSeed = typename Grid::template Codim<0>::EntitySeed; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; using DimVector = Dune::FieldVector<Scalar, dim>; diff --git a/dumux/porousmediumflow/sequential/cellcentered/mpfa/ointeractionvolume.hh b/dumux/porousmediumflow/sequential/cellcentered/mpfa/ointeractionvolume.hh index c333c1cd7f..971df69d4c 100644 --- a/dumux/porousmediumflow/sequential/cellcentered/mpfa/ointeractionvolume.hh +++ b/dumux/porousmediumflow/sequential/cellcentered/mpfa/ointeractionvolume.hh @@ -37,9 +37,9 @@ template<class TypeTag> class FVMPFAOInteractionVolume { private: - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Grid = typename GET_PROP_TYPE(TypeTag, Grid); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Grid = GetPropType<TypeTag, Properties::Grid>; + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { @@ -49,8 +49,8 @@ private: using Element = typename GridView::template Codim<0>::Entity; using ElementSeed = typename Grid::template Codim<0>::EntitySeed; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; using DimVector = Dune::FieldVector<Scalar, dim>; diff --git a/dumux/porousmediumflow/sequential/cellcentered/mpfa/properties.hh b/dumux/porousmediumflow/sequential/cellcentered/mpfa/properties.hh index 7c8f6175c6..03f5bea27f 100644 --- a/dumux/porousmediumflow/sequential/cellcentered/mpfa/properties.hh +++ b/dumux/porousmediumflow/sequential/cellcentered/mpfa/properties.hh @@ -28,6 +28,7 @@ #define DUMUX_FVMPFAPROPERTIES_HH // dumux environment +#include <dumux/common/properties.hh> #include <dumux/porousmediumflow/sequential/properties.hh> #include <dune/grid/yaspgrid.hh> #if HAVE_DUNE_ALUGRID @@ -89,13 +90,20 @@ struct GridImp<Dune::UGGrid<dim>, dim> namespace Properties { //! Basic Type tag for MFPA models -NEW_TYPE_TAG(MPFAProperties); +namespace TTag { +struct MPFAProperties {}; +} -NEW_PROP_TAG( GridTypeIndices );//!< The grid type indices to decide which grid is used -NEW_PROP_TAG( GridImplementation ); //!< Gives kind of grid implementation in form of a GridType -NEW_PROP_TAG( MPFAInteractionVolume ); //!< Type of the data container for one interaction volume -NEW_PROP_TAG( MPFAInteractionVolumeContainer ); //!< Type of the data container for one interaction volume -NEW_PROP_TAG( MPFATransmissibilityCalculator ); //!< Type defining the transmissibility calculation +template<class TypeTag, class MyTypeTag> +struct GridTypeIndices { using type = UndefinedProperty; };//!< The grid type indices to decide which grid is used +template<class TypeTag, class MyTypeTag> +struct GridImplementation { using type = UndefinedProperty; }; //!< Gives kind of grid implementation in form of a GridType +template<class TypeTag, class MyTypeTag> +struct MPFAInteractionVolume { using type = UndefinedProperty; }; //!< Type of the data container for one interaction volume +template<class TypeTag, class MyTypeTag> +struct MPFAInteractionVolumeContainer { using type = UndefinedProperty; }; //!< Type of the data container for one interaction volume +template<class TypeTag, class MyTypeTag> +struct MPFATransmissibilityCalculator { using type = UndefinedProperty; }; //!< Type defining the transmissibility calculation } } @@ -109,14 +117,15 @@ template<class TypeTag> struct GridImplementation<TypeTag, TTag::MPFAProperties> { private: - using Grid = typename GET_PROP_TYPE(TypeTag, Grid); + using Grid = GetPropType<TypeTag, Properties::Grid>; public: static const int value = GridImp<Grid, Grid::dimension>::imp; }; //! \endcond //! Set grid type indices -SET_TYPE_PROP(MPFAProperties, GridTypeIndices, GridTypes); +template<class TypeTag> +struct GridTypeIndices<TypeTag, TTag::MPFAProperties> { using type = GridTypes; }; } }// end of Dune namespace #endif diff --git a/dumux/porousmediumflow/sequential/cellcentered/mpfa/velocityintransport.hh b/dumux/porousmediumflow/sequential/cellcentered/mpfa/velocityintransport.hh index 6647d39b08..df1ce5cb4b 100644 --- a/dumux/porousmediumflow/sequential/cellcentered/mpfa/velocityintransport.hh +++ b/dumux/porousmediumflow/sequential/cellcentered/mpfa/velocityintransport.hh @@ -40,10 +40,10 @@ namespace Dumux template<class TypeTag> class FvMpfaVelocityInTransport { - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Problem = GetPropType<TypeTag, Properties::Problem>; + using GridView = GetPropType<TypeTag, Properties::GridView>; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; using Intersection = typename GridView::Intersection; diff --git a/dumux/porousmediumflow/sequential/cellcentered/pressure.hh b/dumux/porousmediumflow/sequential/cellcentered/pressure.hh index 857b796cb7..4c9502901e 100644 --- a/dumux/porousmediumflow/sequential/cellcentered/pressure.hh +++ b/dumux/porousmediumflow/sequential/cellcentered/pressure.hh @@ -47,26 +47,26 @@ namespace Dumux template<class TypeTag> class FVPressure { //the model implementation - using Implementation = typename GET_PROP_TYPE(TypeTag, PressureModel); + using Implementation = GetPropType<TypeTag, Properties::PressureModel>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; + using CellData = GetPropType<TypeTag, Properties::CellData>; // using declarations to abbreviate several dune classes... using Element = typename GridView::Traits::template Codim<0>::Entity; using Intersection = typename GridView::Intersection; // the typenames used for the stiffness matrix and solution vector - using Matrix = typename GET_PROP_TYPE(TypeTag, PressureCoefficientMatrix); - using RHSVector = typename GET_PROP_TYPE(TypeTag, PressureRHSVector); - using PressureSolution = typename GET_PROP_TYPE(TypeTag, PressureSolutionVector); + using Matrix = GetPropType<TypeTag, Properties::PressureCoefficientMatrix>; + using RHSVector = GetPropType<TypeTag, Properties::PressureRHSVector>; + using PressureSolution = GetPropType<TypeTag, Properties::PressureSolutionVector>; - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; protected: @@ -436,7 +436,7 @@ void FVPressure<TypeTag>::assemble(bool first) // calculate only from one side (except for hanging nodes), but add matrix entries for both sides // the last condition is needed to properly assemble in the presence // of ghost elements - if (GET_PROP_VALUE(TypeTag, VisitFacesOnlyOnce) + if (getPropValue<TypeTag, Properties::VisitFacesOnlyOnce>() && (eIdxGlobalI > eIdxGlobalJ) && haveSameLevel && elementNeighbor.partitionType() == Dune::InteriorEntity) continue; @@ -454,7 +454,7 @@ void FVPressure<TypeTag>::assemble(bool first) A_[eIdxGlobalI][eIdxGlobalJ] -= entries[matrix]; // The second condition is needed to not spoil the ghost element entries - if (GET_PROP_VALUE(TypeTag, VisitFacesOnlyOnce) + if (getPropValue<TypeTag, Properties::VisitFacesOnlyOnce>() && elementNeighbor.partitionType() == Dune::InteriorEntity) { f_[eIdxGlobalJ] += entries[rhs]; @@ -525,7 +525,7 @@ getSolver(const Problem& problem) template<class TypeTag> void FVPressure<TypeTag>::solve() { - using Solver = typename GET_PROP_TYPE(TypeTag, LinearSolver); + using Solver = GetPropType<TypeTag, Properties::LinearSolver>; int verboseLevelSolver = getParam<int>("LinearSolver.Verbosity"); diff --git a/dumux/porousmediumflow/sequential/cellcentered/transport.hh b/dumux/porousmediumflow/sequential/cellcentered/transport.hh index 77e549c0f9..e0c425bced 100644 --- a/dumux/porousmediumflow/sequential/cellcentered/transport.hh +++ b/dumux/porousmediumflow/sequential/cellcentered/transport.hh @@ -50,22 +50,22 @@ namespace Dumux template<class TypeTag> class FVTransport { - using Implementation = typename GET_PROP_TYPE(TypeTag, TransportModel); + using Implementation = GetPropType<TypeTag, Properties::TransportModel>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using TransportSolutionType = typename GET_PROP_TYPE(TypeTag, TransportSolutionType); - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using TransportSolutionType = GetPropType<TypeTag, Properties::TransportSolutionType>; + using CellData = GetPropType<TypeTag, Properties::CellData>; - using EvalCflFluxFunction = typename GET_PROP_TYPE(TypeTag, EvalCflFluxFunction); + using EvalCflFluxFunction = GetPropType<TypeTag, Properties::EvalCflFluxFunction>; using Element = typename GridView::Traits::template Codim<0>::Entity; using Intersection = typename GridView::Intersection; @@ -414,7 +414,7 @@ void FVTransport<TypeTag>::update(const Scalar t, Scalar& dt, TransportSolutionT #if HAVE_MPI // communicate updated values - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using ElementMapper = typename SolutionTypes::ElementMapper; using DataHandle = VectorExchange<ElementMapper, Dune::BlockVector<Dune::FieldVector<Scalar, 1> > >; DataHandle dataHandle(problem_.elementMapper(), updateVec); @@ -547,7 +547,7 @@ void FVTransport<TypeTag>::updatedTargetDt_(Scalar &dt) #if HAVE_MPI // communicate updated values - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using ElementMapper = typename SolutionTypes::ElementMapper; using TimeDataHandle = VectorExchange<ElementMapper, std::vector<LocalTimesteppingData> >; diff --git a/dumux/porousmediumflow/sequential/cellcentered/velocity.hh b/dumux/porousmediumflow/sequential/cellcentered/velocity.hh index 7537c6ba63..48d8ab8166 100644 --- a/dumux/porousmediumflow/sequential/cellcentered/velocity.hh +++ b/dumux/porousmediumflow/sequential/cellcentered/velocity.hh @@ -46,10 +46,10 @@ namespace Dumux */ template<class TypeTag, class Velocity> class FVVelocity { - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Problem = GetPropType<TypeTag, Properties::Problem>; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; public: //!Initialize velocity implementation diff --git a/dumux/porousmediumflow/sequential/cellcentered/velocitydefault.hh b/dumux/porousmediumflow/sequential/cellcentered/velocitydefault.hh index fe0de94401..1d5fc40dc5 100644 --- a/dumux/porousmediumflow/sequential/cellcentered/velocitydefault.hh +++ b/dumux/porousmediumflow/sequential/cellcentered/velocitydefault.hh @@ -40,10 +40,10 @@ namespace Dumux template<class TypeTag> class FVVelocityDefault { - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Problem = GetPropType<TypeTag, Properties::Problem>; + using GridView = GetPropType<TypeTag, Properties::GridView>; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using CellData = GetPropType<TypeTag, Properties::CellData>; using Intersection = typename GridView::Intersection; diff --git a/dumux/porousmediumflow/sequential/gridadapt.hh b/dumux/porousmediumflow/sequential/gridadapt.hh index 964d2f81e9..4af7b80966 100644 --- a/dumux/porousmediumflow/sequential/gridadapt.hh +++ b/dumux/porousmediumflow/sequential/gridadapt.hh @@ -45,17 +45,17 @@ namespace Dumux template<class TypeTag, bool adaptive> class GridAdapt { - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; + using GridView = GetPropType<TypeTag, Properties::GridView>; using Grid = typename GridView::Grid; using LeafGridView = typename Grid::LeafGridView; using Element = typename Grid::template Codim<0>::Entity; - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); - using AdaptionIndicator = typename GET_PROP_TYPE(TypeTag, AdaptionIndicator); - using AdaptionInitializationIndicator = typename GET_PROP_TYPE(TypeTag, AdaptionInitializationIndicator); + using CellData = GetPropType<TypeTag, Properties::CellData>; + using AdaptionIndicator = GetPropType<TypeTag, Properties::AdaptionIndicator>; + using AdaptionInitializationIndicator = GetPropType<TypeTag, Properties::AdaptionInitializationIndicator>; using IdSet = typename Grid::Traits::LocalIdSet; using IdType = typename IdSet::IdType; @@ -458,9 +458,9 @@ private: template<class TypeTag> class GridAdapt<TypeTag, false> { - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using ScalarSolutionType = typename SolutionTypes::ScalarSolution; public: diff --git a/dumux/porousmediumflow/sequential/gridadaptinitializationindicator.hh b/dumux/porousmediumflow/sequential/gridadaptinitializationindicator.hh index 9f91f84e1d..7718c49c15 100644 --- a/dumux/porousmediumflow/sequential/gridadaptinitializationindicator.hh +++ b/dumux/porousmediumflow/sequential/gridadaptinitializationindicator.hh @@ -40,23 +40,23 @@ template<class TypeTag> class GridAdaptInitializationIndicator { private: - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using Problem = GetPropType<TypeTag, Properties::Problem>; + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; using Element = typename GridView::Traits::template Codim<0>::Entity; using Intersection = typename GridView::Intersection; - using AdaptionIndicator = typename GET_PROP_TYPE(TypeTag, AdaptionIndicator); + using AdaptionIndicator = GetPropType<TypeTag, Properties::AdaptionIndicator>; - using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); + using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>; + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld, - numEq = GET_PROP_VALUE(TypeTag, NumEq), - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) + numEq = getPropValue<TypeTag, Properties::NumEq>(), + numPhases = getPropValue<TypeTag, Properties::NumPhases>() }; enum diff --git a/dumux/porousmediumflow/sequential/gridadaptinitializationindicatordefault.hh b/dumux/porousmediumflow/sequential/gridadaptinitializationindicatordefault.hh index 8e3e3b4ee7..b73960b51d 100644 --- a/dumux/porousmediumflow/sequential/gridadaptinitializationindicatordefault.hh +++ b/dumux/porousmediumflow/sequential/gridadaptinitializationindicatordefault.hh @@ -41,10 +41,10 @@ template<class TypeTag> class GridAdaptInitializationIndicatorDefault { private: - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; using Element = typename GridView::Traits::template Codim<0>::Entity; - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using AdaptionIndicator = typename GET_PROP_TYPE(TypeTag, AdaptionIndicator); + using Problem = GetPropType<TypeTag, Properties::Problem>; + using AdaptionIndicator = GetPropType<TypeTag, Properties::AdaptionIndicator>; public: /*! \brief Calculates the indicator used for refinement/coarsening for each grid cell. diff --git a/dumux/porousmediumflow/sequential/gridadaptproperties.hh b/dumux/porousmediumflow/sequential/gridadaptproperties.hh index de1c8f961c..e2d98fc6b0 100644 --- a/dumux/porousmediumflow/sequential/gridadaptproperties.hh +++ b/dumux/porousmediumflow/sequential/gridadaptproperties.hh @@ -43,38 +43,50 @@ class GridAdapt; namespace Properties { //! Grid adaption type tag for all sequential models. -NEW_TYPE_TAG(GridAdapt); +namespace TTag { +struct GridAdapt {}; +} //! Defines if the grid is h-adaptive -NEW_PROP_TAG( AdaptiveGrid); +template<class TypeTag, class MyTypeTag> +struct AdaptiveGrid { using type = UndefinedProperty; }; //! The type of grid adaptation -NEW_PROP_TAG( GridAdaptModel ); +template<class TypeTag, class MyTypeTag> +struct GridAdaptModel { using type = UndefinedProperty; }; //! Class defining the refinement/coarsening indicator -NEW_PROP_TAG(AdaptionIndicator); +template<class TypeTag, class MyTypeTag> +struct AdaptionIndicator { using type = UndefinedProperty; }; //! Class defining the refinement/coarsening indicator for grid initialization -NEW_PROP_TAG(AdaptionInitializationIndicator); +template<class TypeTag, class MyTypeTag> +struct AdaptionInitializationIndicator { using type = UndefinedProperty; }; //! Tolerance for refinement -NEW_PROP_TAG(GridAdaptRefineThreshold); +template<class TypeTag, class MyTypeTag> +struct GridAdaptRefineThreshold { using type = UndefinedProperty; }; //! Tolerance for coarsening -NEW_PROP_TAG(GridAdaptCoarsenThreshold); +template<class TypeTag, class MyTypeTag> +struct GridAdaptCoarsenThreshold { using type = UndefinedProperty; }; //no adaptive grid -SET_BOOL_PROP(GridAdapt, AdaptiveGrid, false); +template<class TypeTag> +struct AdaptiveGrid<TypeTag, TTag::GridAdapt> { static constexpr bool value = false; }; //Set default class for adaptation initialization indicator -SET_TYPE_PROP(GridAdapt, AdaptionInitializationIndicator, GridAdaptInitializationIndicatorDefault<TypeTag>); +template<class TypeTag> +struct AdaptionInitializationIndicator<TypeTag, TTag::GridAdapt> { using type = GridAdaptInitializationIndicatorDefault<TypeTag>; }; //Set default class for adaptation -SET_TYPE_PROP(GridAdapt, GridAdaptModel, GridAdapt<TypeTag, GET_PROP_VALUE(TypeTag, AdaptiveGrid)>); - +template<class TypeTag> +struct GridAdaptModel<TypeTag, TTag::GridAdapt> { using type = GridAdapt<TypeTag, getPropValue<TypeTag, Properties::AdaptiveGrid>()>; }; //standard setting -SET_SCALAR_PROP(GridAdapt, GridAdaptRefineThreshold, 0.0); -SET_SCALAR_PROP(GridAdapt, GridAdaptCoarsenThreshold, 0.0); +template<class TypeTag> +struct GridAdaptRefineThreshold<TypeTag, TTag::GridAdapt> { static constexpr auto value = 0.0; }; +template<class TypeTag> +struct GridAdaptCoarsenThreshold<TypeTag, TTag::GridAdapt> { static constexpr auto value = 0.0; }; } // namespace Properties } // namespace Dumux diff --git a/dumux/porousmediumflow/sequential/impet.hh b/dumux/porousmediumflow/sequential/impet.hh index d0d4b3cdf2..78eb12d593 100644 --- a/dumux/porousmediumflow/sequential/impet.hh +++ b/dumux/porousmediumflow/sequential/impet.hh @@ -47,12 +47,12 @@ namespace Dumux */ template<class TypeTag> class IMPET { - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using Problem = GetPropType<TypeTag, Properties::Problem>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using ElementMapper = typename SolutionTypes::ElementMapper; - using TransportSolutionType = typename GET_PROP_TYPE(TypeTag, TransportSolutionType); + using TransportSolutionType = GetPropType<TypeTag, Properties::TransportSolutionType>; enum IterationType { diff --git a/dumux/porousmediumflow/sequential/impetproblem.hh b/dumux/porousmediumflow/sequential/impetproblem.hh index 9c674f7384..0d36c0796d 100644 --- a/dumux/porousmediumflow/sequential/impetproblem.hh +++ b/dumux/porousmediumflow/sequential/impetproblem.hh @@ -45,26 +45,26 @@ template<class TypeTag> class IMPETProblem { private: - using Implementation = typename GET_PROP_TYPE(TypeTag, Problem); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Grid = typename GET_PROP_TYPE(TypeTag, Grid); + using Implementation = GetPropType<TypeTag, Properties::Problem>; + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Grid = GetPropType<TypeTag, Properties::Grid>; - using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); + using TimeManager = GetPropType<TypeTag, Properties::TimeManager>; using VtkMultiWriter = Dumux::VtkMultiWriter<GridView>; - using Variables = typename GET_PROP_TYPE(TypeTag, Variables); + using Variables = GetPropType<TypeTag, Properties::Variables>; - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using VertexMapper = typename SolutionTypes::VertexMapper; using ElementMapper = typename SolutionTypes::ElementMapper; - using IMPETModel = typename GET_PROP_TYPE(TypeTag, Model); - using TransportSolutionType = typename GET_PROP_TYPE(TypeTag, TransportSolutionType); - using PressureModel = typename GET_PROP_TYPE(TypeTag, PressureModel); - using TransportModel = typename GET_PROP_TYPE(TypeTag, TransportModel); + using IMPETModel = GetPropType<TypeTag, Properties::Model>; + using TransportSolutionType = GetPropType<TypeTag, Properties::TransportSolutionType>; + using PressureModel = GetPropType<TypeTag, Properties::PressureModel>; + using TransportModel = GetPropType<TypeTag, Properties::TransportModel>; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; enum { @@ -74,17 +74,17 @@ private: enum { wetting = 0, nonwetting = 1, - adaptiveGrid = GET_PROP_VALUE(TypeTag, AdaptiveGrid) + adaptiveGrid = getPropValue<TypeTag, Properties::AdaptiveGrid>() }; using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; using Element = typename GridView::Traits::template Codim<0>::Entity; using Intersection = typename GridView::Intersection; // The module to adapt grid. If adaptiveGrid is false, this model does nothing. - using GridAdaptModel = typename GET_PROP_TYPE(TypeTag, GridAdaptModel); + using GridAdaptModel = GetPropType<TypeTag, Properties::GridAdaptModel>; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; //private!! copy constructor IMPETProblem(const IMPETProblem&) diff --git a/dumux/porousmediumflow/sequential/impetproperties.hh b/dumux/porousmediumflow/sequential/impetproperties.hh index 425849832f..699d030dd3 100644 --- a/dumux/porousmediumflow/sequential/impetproperties.hh +++ b/dumux/porousmediumflow/sequential/impetproperties.hh @@ -19,7 +19,7 @@ #ifndef DUMUX_IMPET_PROPERTIES_HH #define DUMUX_IMPET_PROPERTIES_HH -#include <dumux/common/properties/propertysystemmacros.hh> +#include <dumux/common/properties.hh> #include <dumux/porousmediumflow/sequential/properties.hh> #include <dumux/porousmediumflow/sequential/pressureproperties.hh> #include <dumux/porousmediumflow/sequential/transportproperties.hh> @@ -52,7 +52,10 @@ namespace Properties ////////////////////////////////////////////////////////////////// //! The type tag for models based on the diffusion-scheme -NEW_TYPE_TAG(IMPET, INHERITS_FROM(SequentialModel)); +// Create new type tags +namespace TTag { +struct IMPET { using InheritsFrom = std::tuple<SequentialModel>; }; +} // end namespace TTag } } @@ -63,7 +66,8 @@ namespace Dumux namespace Properties { //set impet model -SET_TYPE_PROP(IMPET, Model, IMPET<TypeTag>); +template<class TypeTag> +struct Model<TypeTag, TTag::IMPET> { using type = IMPET<TypeTag>; }; } } diff --git a/dumux/porousmediumflow/sequential/mimetic/properties.hh b/dumux/porousmediumflow/sequential/mimetic/properties.hh index b2eee3452b..1620faa647 100644 --- a/dumux/porousmediumflow/sequential/mimetic/properties.hh +++ b/dumux/porousmediumflow/sequential/mimetic/properties.hh @@ -30,6 +30,7 @@ #define DUMUX_MIMETICPROPERTIES_SEQUENTIAL_HH //Dumux-includes +#include <dumux/common/properties.hh> #include <dumux/porousmediumflow/sequential/properties.hh> namespace Dumux { @@ -49,13 +50,16 @@ namespace Properties ////////////////////////////////////////////////////////////////// //! The type tag for models using a mimetic method -NEW_TYPE_TAG(Mimetic) -; +namespace TTag { +struct Mimetic {}; +} + ////////////////////////////////////////////////////////////////// // Property tags ////////////////////////////////////////////////////////////////// -NEW_PROP_TAG( LocalStiffness); //!< The local mimetic operator +template<class TypeTag, class MyTypeTag> +struct LocalStiffness { using type = UndefinedProperty; }; } } diff --git a/dumux/porousmediumflow/sequential/onemodelproblem.hh b/dumux/porousmediumflow/sequential/onemodelproblem.hh index f7b9ea69fe..6d1de072cc 100644 --- a/dumux/porousmediumflow/sequential/onemodelproblem.hh +++ b/dumux/porousmediumflow/sequential/onemodelproblem.hh @@ -21,7 +21,7 @@ #define DUMUX_ONE_MODEL_PROBLEM_HH #include <dune/common/shared_ptr.hh> -#include <dumux/common/properties/propertysystemmacros.hh> +#include <dumux/common/properties.hh> #include <dumux/porousmediumflow/sequential/properties.hh> #include <dumux/io/vtkmultiwriter.hh> #include <dumux/io/restart.hh> @@ -45,21 +45,21 @@ template<class TypeTag> class OneModelProblem { private: - using Implementation = typename GET_PROP_TYPE(TypeTag, Problem); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Implementation = GetPropType<TypeTag, Properties::Problem>; + using GridView = GetPropType<TypeTag, Properties::GridView>; using Grid = typename GridView::Grid; - using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); + using TimeManager = GetPropType<TypeTag, Properties::TimeManager>; using VtkMultiWriter = Dumux::VtkMultiWriter<GridView>; - using Variables = typename GET_PROP_TYPE(TypeTag, Variables); + using Variables = GetPropType<TypeTag, Properties::Variables>; - using Model = typename GET_PROP_TYPE(TypeTag, Model); + using Model = GetPropType<TypeTag, Properties::Model>; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using VertexMapper = typename SolutionTypes::VertexMapper; using ElementMapper = typename SolutionTypes::ElementMapper; @@ -78,7 +78,7 @@ private: using Intersection = typename GridView::Intersection; using PrimaryVariables = typename SolutionTypes::PrimaryVariables; - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; // private!! copy constructor OneModelProblem(const OneModelProblem&) diff --git a/dumux/porousmediumflow/sequential/pressureproperties.hh b/dumux/porousmediumflow/sequential/pressureproperties.hh index 404615a4e9..ef76f33577 100644 --- a/dumux/porousmediumflow/sequential/pressureproperties.hh +++ b/dumux/porousmediumflow/sequential/pressureproperties.hh @@ -51,15 +51,21 @@ namespace Properties ////////////////////////////////////////////////////////////////// //! The type tag for models based on the diffusion-scheme -NEW_TYPE_TAG(Pressure, INHERITS_FROM(SequentialModel)); +// Create new type tags +namespace TTag { +struct Pressure { using InheritsFrom = std::tuple<SequentialModel>; }; +} // end namespace TTag ////////////////////////////////////////////////////////////////// // Property tags ////////////////////////////////////////////////////////////////// //Properties for linear solvers -NEW_PROP_TAG(PressureRHSVector);//!< Type of the right hand side vector given to the linear solver -NEW_PROP_TAG(PressureSolutionVector);//!Type of solution vector or pressure system -NEW_PROP_TAG(VisitFacesOnlyOnce); //!< Indicates if faces are only regarded from one side +template<class TypeTag, class MyTypeTag> +struct PressureRHSVector { using type = UndefinedProperty; };//!< Type of the right hand side vector given to the linear solver +template<class TypeTag, class MyTypeTag> +struct PressureSolutionVector { using type = UndefinedProperty; };//!Type of solution vector or pressure system +template<class TypeTag, class MyTypeTag> +struct VisitFacesOnlyOnce { using type = UndefinedProperty; }; //!< Indicates if faces are only regarded from one side } } @@ -70,14 +76,15 @@ namespace Dumux namespace Properties { //! Faces are only regarded from one side and not from both cells -SET_BOOL_PROP(Pressure, VisitFacesOnlyOnce, false); +template<class TypeTag> +struct VisitFacesOnlyOnce<TypeTag, TTag::Pressure> { static constexpr bool value = false; }; //Set defaults template<class TypeTag> struct PressureCoefficientMatrix<TypeTag, TTag::Pressure> { private: - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; using MB = Dune::FieldMatrix<Scalar, 1, 1>; public: @@ -87,18 +94,21 @@ template<class TypeTag> struct PressureRHSVector<TypeTag, TTag::Pressure> { private: - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; public: using type = Dune::BlockVector<Dune::FieldVector<Scalar, 1> >; }; -SET_TYPE_PROP(Pressure, PressureSolutionVector, typename GET_PROP(TypeTag, SolutionTypes)::ScalarSolution); +template<class TypeTag> +struct PressureSolutionVector<TypeTag, TTag::Pressure> { using type = typename GetProp<TypeTag, SolutionTypes>::ScalarSolution; }; // use the stabilized BiCG solver preconditioned by the ILU-0 by default -SET_TYPE_PROP(Pressure, LinearSolver, ILU0BiCGSTABBackend ); +template<class TypeTag> +struct LinearSolver<TypeTag, TTag::Pressure> { using type = ILU0BiCGSTABBackend ; }; -SET_TYPE_PROP( Pressure, Velocity, FVVelocityDefault<TypeTag>); +template<class TypeTag> +struct Velocity<TypeTag, TTag:: Pressure> { using type = FVVelocityDefault<TypeTag>; }; } } diff --git a/dumux/porousmediumflow/sequential/properties.hh b/dumux/porousmediumflow/sequential/properties.hh index de283bb580..8710159723 100644 --- a/dumux/porousmediumflow/sequential/properties.hh +++ b/dumux/porousmediumflow/sequential/properties.hh @@ -46,7 +46,10 @@ namespace Properties ////////////////////////////////////////////////////////////////// //! Create a type tag for all sequential models -NEW_TYPE_TAG(SequentialModel, INHERITS_FROM(ModelProperties, GridAdapt, GridProperties)); +// Create new type tags +namespace TTag { +struct SequentialModel { using InheritsFrom = std::tuple<GridAdapt, GridProperties, ModelProperties>; }; +} // end namespace TTag ////////////////////////////////////////////////////////////////// // Property tags @@ -55,23 +58,37 @@ NEW_TYPE_TAG(SequentialModel, INHERITS_FROM(ModelProperties, GridAdapt, GridProp //! Property tag for types associated with the solution of the PDE. //! This means vectors of primary variables, solution functions on the //! grid, and elements, and shape functions. -NEW_PROP_TAG( SolutionTypes); -NEW_PROP_TAG( Indices); +template<class TypeTag, class MyTypeTag> +struct SolutionTypes { using type = UndefinedProperty; }; +template<class TypeTag, class MyTypeTag> +struct Indices { using type = UndefinedProperty; }; // Some properties that have been removed from numeric model -NEW_PROP_TAG( Model ); //!< The type of the mode -NEW_PROP_TAG( DiscretizationMethod ); //!< The type of discretization method - -NEW_PROP_TAG( PressureModel ); //!< The type of the discretization of a pressure model -NEW_PROP_TAG( TransportModel ); //!< The type of the discretization of a transport model -NEW_PROP_TAG( Velocity ); //!< The type velocity reconstruction -NEW_PROP_TAG( NumEq ); //!< Number of equations in the system of PDEs -NEW_PROP_TAG( NumPhases); //!< Number of phases in the system -NEW_PROP_TAG( NumComponents); //!< Number of components in the system -NEW_PROP_TAG( Variables); //!< The type of the container of global variables -NEW_PROP_TAG( CellData );//!< Defines data object to be stored -NEW_PROP_TAG( MaxIntersections ); //!< Gives maximum number of intersections of an element and neighboring elements -NEW_PROP_TAG( PressureCoefficientMatrix ); //!< Gives maximum number of intersections of an element and neighboring elements +template<class TypeTag, class MyTypeTag> +struct Model { using type = UndefinedProperty; }; //!< The type of the mode +template<class TypeTag, class MyTypeTag> +struct DiscretizationMethod { using type = UndefinedProperty; }; //!< The type of discretization method + +template<class TypeTag, class MyTypeTag> +struct PressureModel { using type = UndefinedProperty; }; //!< The type of the discretization of a pressure model +template<class TypeTag, class MyTypeTag> +struct TransportModel { using type = UndefinedProperty; }; //!< The type of the discretization of a transport model +template<class TypeTag, class MyTypeTag> +struct Velocity { using type = UndefinedProperty; }; //!< The type velocity reconstruction +template<class TypeTag, class MyTypeTag> +struct NumEq { using type = UndefinedProperty; }; //!< Number of equations in the system of PDEs +template<class TypeTag, class MyTypeTag> +struct NumPhases { using type = UndefinedProperty; }; //!< Number of phases in the system +template<class TypeTag, class MyTypeTag> +struct NumComponents { using type = UndefinedProperty; }; //!< Number of components in the system +template<class TypeTag, class MyTypeTag> +struct Variables { using type = UndefinedProperty; }; //!< The type of the container of global variables +template<class TypeTag, class MyTypeTag> +struct CellData { using type = UndefinedProperty; };//!< Defines data object to be stored +template<class TypeTag, class MyTypeTag> +struct MaxIntersections { using type = UndefinedProperty; }; //!< Gives maximum number of intersections of an element and neighboring elements +template<class TypeTag, class MyTypeTag> +struct PressureCoefficientMatrix { using type = UndefinedProperty; }; //!< Gives maximum number of intersections of an element and neighboring elements } } @@ -97,7 +114,8 @@ namespace Properties ////////////////////////////////////////////////////////////////// //! Type of the jacobian matrix needed for compatibility with implicit models for the amg backend -SET_TYPE_PROP(SequentialModel, JacobianMatrix, typename GET_PROP_TYPE(TypeTag, PressureCoefficientMatrix)); +template<class TypeTag> +struct JacobianMatrix<TypeTag, TTag::SequentialModel> { using type = GetPropType<TypeTag, Properties::PressureCoefficientMatrix>; }; //! Dummy model traits for compatibility with the rest of dumux //! until the sequential models are incorporated into the general framework @@ -107,8 +125,8 @@ struct ModelTraits<TypeTag, TTag::SequentialModel> private: struct DummyTraits { - using Indices = typename GET_PROP_TYPE(TypeTag, Indices); - static constexpr int numEq() { return GET_PROP_VALUE(TypeTag, NumEq); } + using Indices = GetPropType<TypeTag, Properties::Indices>; + static constexpr int numEq() { return getPropValue<TypeTag, Properties::NumEq>(); } }; public: using type = DummyTraits; @@ -119,7 +137,7 @@ template<class TypeTag> struct GridView<TypeTag, TTag::SequentialModel> { private: - using Grid = typename GET_PROP_TYPE(TypeTag, Grid); + using Grid = GetPropType<TypeTag, Properties::Grid>; public: using type = typename Grid::LeafGridView; @@ -130,7 +148,7 @@ template<class TypeTag> struct MaxIntersections<TypeTag, TTag::SequentialModel> { private: - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; enum { dim = GridView::dimension @@ -151,10 +169,10 @@ template<class TypeTag> struct FVGridGeometry<TypeTag, TTag::SequentialModel> { struct MockFVGridGeometry - : public DefaultMapperTraits<typename GET_PROP_TYPE(TypeTag, GridView)> + : public DefaultMapperTraits<GetPropType<TypeTag, Properties::GridView>> { static constexpr Dumux::DiscretizationMethod discMethod = Dumux::DiscretizationMethod::cctpfa; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using GridView = GetPropType<TypeTag, Properties::GridView>; }; public: @@ -167,7 +185,7 @@ template<class TypeTag> struct SolutionVector<TypeTag, TTag::SequentialModel> { public: - using type = typename GET_PROP(TypeTag, SolutionTypes)::ScalarSolution; + using type = typename GetProp<TypeTag, SolutionTypes>::ScalarSolution; }; /*! @@ -178,18 +196,18 @@ public: template<class TypeTag> struct SolutionTypes<TypeTag, TTag::SequentialModel> { - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using GridView = GetPropType<TypeTag, Properties::GridView>; using Grid = typename GridView::Grid; - using Variables = typename GET_PROP_TYPE(TypeTag, Variables); + using Variables = GetPropType<TypeTag, Properties::Variables>; enum { dim = GridView::dimension, - numEq = GET_PROP_VALUE(TypeTag, NumEq), - numPhases = GET_PROP_VALUE(TypeTag, NumPhases), - numComponents = GET_PROP_VALUE(TypeTag, NumComponents), - maxIntersections = GET_PROP_VALUE(TypeTag, MaxIntersections) + numEq = getPropValue<TypeTag, Properties::NumEq>(), + numPhases = getPropValue<TypeTag, Properties::NumPhases>(), + numComponents = getPropValue<TypeTag, Properties::NumComponents>(), + maxIntersections = getPropValue<TypeTag, Properties::MaxIntersections>() }; public: @@ -223,12 +241,15 @@ public: using DimVecElemFace = Dune::BlockVector<Dune::FieldVector<Dune::FieldVector<Scalar, dim>, maxIntersections> >; }; -SET_TYPE_PROP(SequentialModel, Variables, VariableClass<TypeTag>); +template<class TypeTag> +struct Variables<TypeTag, TTag::SequentialModel> { using type = VariableClass<TypeTag>; }; -SET_TYPE_PROP(SequentialModel, PrimaryVariables, typename GET_PROP(TypeTag, SolutionTypes)::PrimaryVariables); +template<class TypeTag> +struct PrimaryVariables<TypeTag, TTag::SequentialModel> { using type = typename GetProp<TypeTag, SolutionTypes>::PrimaryVariables; }; //! Set the default type for the time manager -SET_TYPE_PROP(SequentialModel, TimeManager, Dumux::TimeManager<TypeTag>); +template<class TypeTag> +struct TimeManager<TypeTag, TTag::SequentialModel> { using type = Dumux::TimeManager<TypeTag>; }; /*! * \brief Boundary types at a single degree of freedom. @@ -236,7 +257,7 @@ SET_TYPE_PROP(SequentialModel, TimeManager, Dumux::TimeManager<TypeTag>); template<class TypeTag> struct BoundaryTypes<TypeTag, TTag::SequentialModel> { private: - enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) }; + enum { numEq = getPropValue<TypeTag, Properties::NumEq>() }; public: using type = Dumux::BoundaryTypes<numEq>; }; diff --git a/dumux/porousmediumflow/sequential/transportproperties.hh b/dumux/porousmediumflow/sequential/transportproperties.hh index a4643e7254..2ca2edc991 100644 --- a/dumux/porousmediumflow/sequential/transportproperties.hh +++ b/dumux/porousmediumflow/sequential/transportproperties.hh @@ -41,13 +41,18 @@ namespace Properties ////////////////////////////////////////////////////////////////// //! The type tag for models based on the diffusion-scheme -NEW_TYPE_TAG(Transport, INHERITS_FROM(SequentialModel)); +// Create new type tags +namespace TTag { +struct Transport { using InheritsFrom = std::tuple<SequentialModel>; }; +} // end namespace TTag ////////////////////////////////////////////////////////////////// // Property tags ////////////////////////////////////////////////////////////////// -NEW_PROP_TAG(TransportSolutionType); -NEW_PROP_TAG(EvalCflFluxFunction); //!< Type of the evaluation of the CFL-condition +template<class TypeTag, class MyTypeTag> +struct TransportSolutionType { using type = UndefinedProperty; }; +template<class TypeTag, class MyTypeTag> +struct EvalCflFluxFunction { using type = UndefinedProperty; }; //!< Type of the evaluation of the CFL-condition /*! * \brief Default implementation for the Vector of the transportet quantity @@ -60,7 +65,7 @@ template<class TypeTag> struct TransportSolutionType<TypeTag, TTag::Transport> { private: - using SolutionType = typename GET_PROP(TypeTag, SolutionTypes); + using SolutionType = GetProp<TypeTag, Properties::SolutionTypes>; public: using type = typename SolutionType::ScalarSolution;//!<type for vector of scalar properties diff --git a/dumux/porousmediumflow/sequential/variableclass.hh b/dumux/porousmediumflow/sequential/variableclass.hh index f971b30ca3..4f53f9627e 100644 --- a/dumux/porousmediumflow/sequential/variableclass.hh +++ b/dumux/porousmediumflow/sequential/variableclass.hh @@ -48,9 +48,9 @@ template<class TypeTag> class VariableClass { private: - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using GridView = GetPropType<TypeTag, Properties::GridView>; + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; + using CellData = GetPropType<TypeTag, Properties::CellData>; enum { diff --git a/dumux/porousmediumflow/sequential/variableclassadaptive.hh b/dumux/porousmediumflow/sequential/variableclassadaptive.hh index 4e13f3bf94..e2d6067c72 100644 --- a/dumux/porousmediumflow/sequential/variableclassadaptive.hh +++ b/dumux/porousmediumflow/sequential/variableclassadaptive.hh @@ -48,9 +48,9 @@ class VariableClassAdaptive: public VariableClass<TypeTag> private: using ParentType = VariableClass<TypeTag>; - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using CellData = typename GET_PROP_TYPE(TypeTag, CellData); + using Problem = GetPropType<TypeTag, Properties::Problem>; + using GridView = GetPropType<TypeTag, Properties::GridView>; + using CellData = GetPropType<TypeTag, Properties::CellData>; using AdaptedValues = typename CellData::AdaptedValues; using Grid = typename GridView::Grid; @@ -198,7 +198,7 @@ public: #if HAVE_MPI // communicate ghost data - using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using SolutionTypes = GetProp<TypeTag, Properties::SolutionTypes>; using ElementMapper = typename SolutionTypes::ElementMapper; using DataHandle = VectorExchange<ElementMapper, std::vector<CellData> >; DataHandle dataHandle(problem.elementMapper(), this->cellDataGlobal()); -- GitLab