diff --git a/dumux/porousmediumflow/1p/sequential/celldata.hh b/dumux/porousmediumflow/1p/sequential/celldata.hh index 8a5304d49a66c53ed599c8efc41bade33bda4ea5..3df0e2b1325ca6941c5b4a09faa44fe2b20141ed 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 f3f58123ec7008b2d2ead804a2d4f30eff61ded7..b201a1e045211e0e66430a413751dd092da0745f 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 82b3bd2150e570642163a97ef2e0218ce026b56d..51401ae25f1abc835b426c785972f2b83a179bc7 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 310fb78e9f8035e1f1b18dc385bc703b8e9a7553..d82beb34b96a3b587a7aebb38439406b008bd353 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 1cf30fa249d78fd08ab5ce2006b6e11d693a66dd..5a9b0fb324e5532a8b5a3952cdad35e99c3eab03 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 c695676e1f0417d42077c2b973f35954c3b2eb26..57a15cc186371bc71755de4c483cb0d0fd894a54 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 ab373303df5ec545fc9ed9493a83c9a41e607a75..d045c82e87a7b9fdab3d640b278ea888005aa873 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 2761da5f2ffea02591c181296cf7362e7fa5b35c..c2fd3ffbb1e4d4d1901bfc340402bc852f5fbece 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 ac0dcb978d617feec4a5174e21346db7774a85d6..ce03576123f9990adcf61f6c83d8f4182ed6e064 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 d1bb2e53f222fac48548278edf51008213261a30..d9eb5f65b7a76303ff1600f16d0aaa7e70ee9c4a 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 ff757f2bef2679acda9b23b62d6105d5f6fed76c..4fd8f3f058750005cd4013fe301a7580e2c7ef0a 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 14643eb17e831e5ae49a3042e229d2e105156528..c248918fa2540cfaafd971ef7d6661270227dbec 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 7ac3c4991d9b0353108adc15bfa6d675ebce1f4c..6d1d1d3a0542820a5586bc53410c6d6f2583ff46 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 052c1187873bfe316353a30e8b984f7283795334..239fc2d939b81c80a65dd15561244ebd11343c06 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 5ef692bf8888c515dad76aca34535eca4d4daeb4..d98cfb977a727ffa42e870bbfd8d40f20a563157 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 8f1c04c5ac38267bb84aa727212727a56c53f805..82d7242c06b094a798c5c6062916912ebf31d9d5 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 adefdb7259a525e59d373f1cb227d18b705d6a2d..e191cb38f1ebefd3a291c6416fb75959bc893990 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 90abc1fef2b8f882e500a091b5a796b545e2858d..9ed529385e90fedb8e8ff65bac041e2f8a19b0b0 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 39b202f57699cab0a428419558c1e5adc63f99b0..c2779eebb1b3d31b7838767cdbaaed7f07d2b661 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 d28e8321f6e966dd5f2a59a5721e6a1a19c79eae..7d2c4345c09885a1f82f2af3b3671aae2b7d6439 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 8b2004628a231f16bec8294daba668c7a6b2ae3d..f56bf2766a8a7c79b686e9d56ca32f5db5dd4b5a 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 994b9e1a41ad8af8b42696149cea513d9e200ba8..76e7c90d00671d284d80b3997b954307a57cfb0d 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 46525adc85b08d7f583a5ed58f72a4ae74f9871b..896605001e23cba58013eb5495d2c609f3e90fbb 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 a4a28150625b600cf4ea4f2ae5e1df79fb1b3452..095b5ce57759cd092b84aaffc5b20f6beb8fe2c1 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 7f07857640a709c1d7759a9224de6e00ba9e6ed4..14c9a1de0c20af5f761b8bafa5ae12d5b92d1de1 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 2e10f936345af00cdd3d8d4e8ad1ecfe3e4feace..2bec024454d46e4aafcc770d0567650c5f66c33b 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 f59d9b248265aa351c428ae10e88b4213025d5e7..3641886bd40b2891c594c9121bd7312973f89a07 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 fadb4d09835df80585bf67a73a0bb8ff6b5d162b..b3718ade8e3fb2f1c774cd528cc3baf59bdb1318 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 2e3c200d98c3e6ffeae08206e387f254880222de..b9a2d57db74132072d7cfcb462734dc774c2fc57 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 7242a9f201abc8cf148b4c0dcf4adf9db5186b5a..75ec63251ed274446eb1871142fe1b6ac0b29d3c 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 705596d1c0df3f9a09668318c052ec1b18ee6004..ccc682c79d8772662c4ed29dffd1ad9a5f2e24c4 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 e4876e3b595d0a05ac313767543ff46f354c84df..917db183c7f110fff04ba33f7ace1764ce5dfb6b 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 38d9a39fc518d3a22290492e3a3487b8169f0066..2c67e7f9ffb5f451e8776f4be1180b74f418044f 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 d5018dbb5967f39b220cac8e49303abfab7b222f..8ff5bcc224672f9d1bcf0c62db357821d41d5dda 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 ed45176c8053ce40b81c6df941d15821b1340ea8..08c8e3de2362b39d2b33a84034243b73d07ae2e3 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 f0c2933b812783ac73d9e45353b91bd42427c589..34aabd5b767fd018694f08d24aff760490cf77b5 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 830f22e7bb01725e52ee0e4ab41b54ee15ec6ead..68917cbe1a479d67caf7359a92f47b4bcd0ac206 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 eaeff47ada4e7e4420d4fc71f19cbfbf04d6f07e..49275e01010db0acef9a0a4f1fcbb5b0b255fff0 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 15921fb027f4b9cd82a4d531fed4bbd3c08ac1bb..2e380dad438e5ce01d945b56f2f50893ba7f0349 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 710ac8eddb1fc00866453b86e6267812e262b150..5c3668a01f255a58b55b954d30bd1af718d5f3cb 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 3aaf1d1da0174143b07179062f12068bc909e277..a3d5ab464fa3ce682633a968ca5bfe6eb08c5c22 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 5d2b568ae33b1c3fd92d4cd8c88f3c72c424d6f7..a917ea974d2f0d7fc4b4a868b97bd011a22236a3 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 0235a6e949c8b47f78ed7933e35bf366b49ad408..6e15e95d1af26db302cbcfd55dd80036b164489b 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 1e0fea586d7cee44ff22b592a778dbace6cb1399..c8f34bfa51e23638261692dacdf2b2bb4b4a5c81 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 a02dabead6abd5cd1e33ca80814dfaf4b20b0532..5c0338ac3066a576f3f10ff18edd71c8369209e3 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 5fec0d7c8cc09fe946c33912efa3f2982882ab38..34911a336c1e9fa77588766ddf0c785855f36e2f 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 f0d4c8b48a84b12c94f3e13711d90ebf9f7d4505..e76112825b130e8b61e5cc67f13df031ebccc73d 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 ccd7ce51a168cd9a6a075ed554be6598b0981b5a..ad4a6820c5bf6bd9d13c2916333778b3ee104d6c 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 be9ef17571c29ef5be5f5e3d5e4ced3019a7a19c..df093bf1fe471a6f6278192f1cce317ef7310e28 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 351f0a04703f0e1ee2ecde6e4aa65412f5a3d626..516cab9894e4e6e901451b7a79f6637f0bf8ebbf 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 425efd72d3a059e6322fb5a61037bfbcfce4dd4a..40b84b4f52c5686501edc77cd38797b34a048978 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 20ea2455ea8410a394461380ec92948dca0200df..c91b301bcdc3ab762209537bc75fa70efe59b358 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 29b1104dc4e7fc80300d247b4cfc8740f89e6131..77031b3b1a98ba725ee9ec9e52d4e21ce8f72689 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 7cea8d3a6dda3e9cb8d33b0d7f67e5adbf9277cd..38c52be8fbcc6d3a032fa630efa27511a321eb9b 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 254bd79f43e3813c6da8ba4b278c6c0d3fb3b07f..c8b404dac7357556ab09b33f44f3132c24e8ed3f 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 6e3030631b0392bef6ad9ac03a2fe147aaf1b862..316a7bb3fe0dd812712eb06028764e7af0804084 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 27b0306f65e9c179c8fea9997d5739034a881e6f..4b55e44649ff74fa36b2faa0a7537184e506fca5 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 a5ccfb0b96c329c814097e040acaccece0fbc6df..5d1574a0049faebfe125f6b4e7d88effc1326ee1 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 7dd8bf9d344c6becfab60fc9f0812129a0f8155d..e2d24a9c5a0d241f9d469fb2de3852997a4dbc9c 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 6debafab6c0f68beb63a2beb346f8fdecc7e5f9d..128307ac6eb68c8184f30d33bc0c6da9e4cbe001 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 c1d124e6cd038185e472454380f7e981debebaf9..6ac22e725c48503e82e4823aeb29875d8767ad12 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 78eaa2ac443f3de1ae2e15305dc9afb010d3907f..7ce58c1add35f01332b3ec1c14be659ae538238d 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 0b6135a618703230f6c8253e024908a1388b6fc7..8b7bb19eb961b67b5defeeed4dd628a8b16d6196 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 3dd8ad4f54495bcfa0414d619bb1a9bf78d7c49f..65bfa3e4655a02c7ed4f7650b1b337a2e0a17859 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 0a4e9a03dd23510ec2b00da5c8cc5e48138a1298..860f46344d8d2c3bce4992864c67fae18f6ab58b 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 5124fd4d229cbe8009533e4b53f1f03a8367014f..fa06168665ed6ca5c2105520f03e39c264a6b023 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 c04bb16955176d757e932f20827c64ff0515ea7d..4f06dcc0628d9981150a2b2c2ef2efc29b949fa9 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 b370a5779ed9df591db5926aeb16d9e65459d0ee..e91beba12ef72c104ba5b62ce5148f58b15c7b0e 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 6d855aff430e9fa45b90cc6551b46a7ec612ea5a..442e80aaaf5f3faace8ce5b63214abc2ebd3a8c8 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 528b8e8bf68598771f54bf7d68ed8a89bf4ebb8f..e17b9a3f77ceca67dbda63d00b32acad67cacb13 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 0ad2ff21eb45bc8b0417a9bcffc2619ee5f4f87d..4f5a4e2409ceeef505517d039227ba9189890ffd 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 0337f2620e30a2b01c834de167dee907ddc8dfc4..22f4aa7c69d679b81d397afd69a1903cd7a82308 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 84e1fcf77d655de84fb6e4be0d0769240b289830..1caca0183c92ffa4514a00c78846865b32f7501f 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 1e67927844edc9712539024a67a452f82f99370f..683259f569c5bcb2ddbd4f77caf65d87292df718 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 3b9102f765c6d79c3f0994bbf68c32c2864a122c..d26ed2fbec549fce031791bc5382aa6b8cd04555 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 b617d3aa372a97eea9dd0e532c1dd801a3b4db1e..504aa3bdf7e4e918255239b99d6958c3d46268f6 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 6e42075b39f7ef37f9987724085af20ab1364557..5fc987ea1864284ad93d5f2fe0985f676ec7fb8f 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 19abc5709614fd754e5667f52d032e22a7621c77..4522bb07ceceb7540660f3cc9323fd2338683cf6 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 e43d14270a1b46829f9bd7b1a2c6482b1f310f37..589e01f8f23abd0fc453a6a7908796c56476593a 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 4725f9830475b8b4d0ecedafe6a28bd03971b97c..df2c2755bd18e23bba2441479ac552c1cc837fd1 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 5b501f916640f9d82496b138841c5b1b1dae210c..94e366048c8e76b91412ba6156c72b8693333d8a 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 0a369af14d47257bffa8666902960389dfbe0b96..21edb788a976899038d6cbb53cd1482ea809d57a 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 750a3da969403d7b6adf29f7f62dce159c7b9f50..1154d0b265b4593b8aa59cc8a8308cf0d313ac94 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 cbe2b1b257e66cf85d789879a16ebd31ba1e5531..b43013496f087d6f700ff5033ddb77f62715c820 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 57033c6c091f61b73bd115341bd06e113a6db313..081578adec68f391efbbdceb63ab7e2b4fcc943a 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 83ec75b1e1688d97920a6617e88bc5f0832e81bd..9e6bde06d4a3fefa48518ce7c4953979430a9725 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 c53a95c95eebbf3e4a0a8882816c79f203556f88..b758c1c47f8d882956a6c5ca3e46b7056c23ac16 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 fb4d30c2c9e1e9af82a53becd8007d32601f11af..ee38d1b74f26e706c1510fa5d34b46c8811a4d16 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 471f26add49680c1088a60b0699377b7b62787d9..017e39c75560962a1b46a0a43223d8c8bf302f6e 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 78893309d7e9c60c298961081d60f359688d71e2..a3ffe0c2678218d9e19a0ea5fdf5dd4645f7e76b 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 1f583848573c14aa5f04e21ef7cc7318a0149a92..0a3f511e48b9c7868e537ccb0f3a7d7f9343e851 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 083632416d11fa65470aa0a5691e31bb03bc2115..5f0e9efa0d6583695ec70d6ccfe4d258a594d793 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 10a285ed6cfe10d5ae8cebbebe8519e94a2dacce..54fcf8e6c376d802066fbd9356e0440332dabf43 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 436cacfa40736f09723868cb3e056a17f84c86f6..663b66221b81ea4fb1d22884257ed8fba5ae4abc 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 c333c1cd7f30d5d4544cecde992de7306613813f..971df69d4c38629408cf1767e088a95b2df56fc5 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 7c8f6175c6710be20e089c83c908d169a912c02b..03f5bea27ffc6da4024ad81d4615501d3335d020 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 6647d39b08987ebc002f9fd59ba6e9524198e208..df1ce5cb4b06947db1def832740b1d2850f930d2 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 857b796cb7907b6b812c84839f560c931e15c558..4c9502901e609ce184321582890a5970cdb0af18 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 77e549c0f9e448147d7575d5304af7f1c51862df..e0c425bcedbaa9cf9db9c73deeee43c3af790485 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 7537c6ba6350f0b5c4969f37e0c77f122e1d160e..48d8ab8166849498ecfe1b12d773e5f96e58e37a 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 fe0de944016870f7265e4b57a6f233240f7bad54..1d5fc40dc56db9dd62a06caacb39a733a2e46dda 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 964d2f81e96a0a9a753a30e56ec9d394ba1e4258..4af7b80966fa2334b9bc1f141407a0ed82bb42ab 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 9f91f84e1d39d3dae4cbcff2df99b8bf17f198ff..7718c49c15ddb7bca828ebdce878f35630b33461 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 8e3e3b4ee7b0cb2dcaecfd793db8665980b65d6d..b73960b51d107caf481f9b0df67fc1ee8b069926 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 de1c8f961cdd5fe9fc336dbf99e0efdb7cb0169e..e2d98fc6b04061b7c8b86d5c9806f70535bb16ab 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 d0d4b3cdf26643bac6cb13e941ebc43b2b00cea0..78eb12d5931b40b993d1f18331b9c50cbc840838 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 9c674f738407ffc3609c62debd61d2ef355960c4..0d36c0796d42537c6b010382229160329b18f11a 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 425849832f02df04609ff5f94f7a6c9f805dfac7..699d030dd3b08263e5cff9c3d03d17c3a8df4aed 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 b2eee3452bff538e764cdba72cda82be809a35d2..1620faa647906623eb077ba5e37df1bd67b57ac5 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 f7b9ea69fee2f086c8b9a2aafa0b84c06856f55e..6d1de072cc550efe9fa6bcc6f1afec6881c57fb2 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 404615a4e911a66f96620784a77fcdd4ce15d8ce..ef76f33577192e90efc582ff564b0cf18bf28d98 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 de283bb5809f9d4b02671a72993409fd7f253c8d..8710159723aca24f9abe581e3858d3271d40a588 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 a4643e725425754a63c183a062e117bab59e32f4..2ca2edc99160f3737c01370c1e564bd9c5d13ef8 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 f971b30ca3762f20f8212e91394e2a1f04b8a067..4f53f9627ede126617ce3cad3d56d844655ddb59 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 4e13f3bf9492fb99316c4425037397fb4dfd1a8c..e2d6067c726a9ee26d79c463c97d30d9e4487b9f 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());