diff --git a/exercises/exercise-basic/injection2p2cproblem.hh b/exercises/exercise-basic/injection2p2cproblem.hh index d2cc518950ebd6f9ac7599d33127800d7f29935d..f564bffe04205ab4d8a137a1fd7a255c22bf9886 100644 --- a/exercises/exercise-basic/injection2p2cproblem.hh +++ b/exercises/exercise-basic/injection2p2cproblem.hh @@ -55,9 +55,15 @@ template<class TypeTag> struct Problem<TypeTag, TTag::Injection2p2c> { using type = Injection2p2cProblem<TypeTag>; }; // Set the spatial parameters -SET_TYPE_PROP(Injection2p2c, SpatialParams, - InjectionSpatialParams<GetPropType<TypeTag, Properties::FVGridGeometry>, - GetPropType<TypeTag, Properties::Scalar>>); +template<class TypeTag> +struct SpatialParams<TypeTag, TTag::Injection2p2c> +{ +private: + using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; +public: + using type = InjectionSpatialParams<FVGridGeometry, Scalar>; +}; // Set fluid configuration template<class TypeTag> diff --git a/exercises/exercise-basic/injection2pniproblem.hh b/exercises/exercise-basic/injection2pniproblem.hh index 8f0bd5d4ca245806d189621b91c59acef63af23f..c6ee453a0d1f4299a08824ff32c53b0db748488d 100644 --- a/exercises/exercise-basic/injection2pniproblem.hh +++ b/exercises/exercise-basic/injection2pniproblem.hh @@ -61,9 +61,15 @@ template<class TypeTag> struct Problem<TypeTag, TTag::Injection2pNITypeTag> { using type = InjectionProblem2PNI<TypeTag>; }; // Set the spatial parameters -SET_TYPE_PROP(Injection2pNITypeTag, SpatialParams, - InjectionSpatialParams<GetPropType<TypeTag, Properties::FVGridGeometry>, - GetPropType<TypeTag, Properties::Scalar>>); +template<class TypeTag> +struct SpatialParams<TypeTag, TTag::Injection2pNITypeTag> +{ +private: + using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; +public: + using type = InjectionSpatialParams<FVGridGeometry, Scalar>; +}; // Set fluid configuration template<class TypeTag> diff --git a/exercises/exercise-basic/injection2pproblem.hh b/exercises/exercise-basic/injection2pproblem.hh index 49257b1232682541981047ee238bb3a7a2a39cce..a4f762b51cb01f347ca5cb2dd2815dcbcc2cae78 100644 --- a/exercises/exercise-basic/injection2pproblem.hh +++ b/exercises/exercise-basic/injection2pproblem.hh @@ -57,9 +57,15 @@ template<class TypeTag> struct Problem<TypeTag, TTag::Injection2p> { using type = InjectionProblem2P<TypeTag>; }; // Set the spatial parameters -SET_TYPE_PROP(Injection2p, SpatialParams, - InjectionSpatialParams<GetPropType<TypeTag, Properties::FVGridGeometry>, - GetPropType<TypeTag, Properties::Scalar>>); +template<class TypeTag> +struct SpatialParams<TypeTag, TTag::Injection2p> +{ +private: + using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; +public: + using type = InjectionSpatialParams<FVGridGeometry, Scalar>; +}; // Set fluid configuration template<class TypeTag> diff --git a/exercises/exercise-coupling-ff-pm/models/ex_models_pmproblem.hh b/exercises/exercise-coupling-ff-pm/models/ex_models_pmproblem.hh index 31fdc8a3383e7c52a5271291133b10d179751568..29402f3e135d2d6f3cfc92c604c50d7469a5bb7a 100644 --- a/exercises/exercise-coupling-ff-pm/models/ex_models_pmproblem.hh +++ b/exercises/exercise-coupling-ff-pm/models/ex_models_pmproblem.hh @@ -70,9 +70,9 @@ template<class TypeTag> struct ReplaceCompEqIdx<TypeTag, TTag::DarcyOnePNC> { static constexpr int value = 3; }; //! Use a model with constant tortuosity for the effective diffusivity -SET_TYPE_PROP(DarcyOnePNC, EffectiveDiffusivityModel, - DiffusivityConstantTortuosity<GetPropType<TypeTag, Properties::Scalar>>); - +template<class TypeTag> +struct EffectiveDiffusivityModel<TypeTag, DarcyOnePNC> +{ using type = DiffusivityConstantTortuosity<GetPropType<TypeTag, Properties::Scalar>>; }; // Set the grid type template<class TypeTag> struct Grid<TypeTag, TTag::DarcyOnePNC> { using type = Dune::YaspGrid<2>; }; diff --git a/exercises/exercise-fluidsystem/2p2cproblem.hh b/exercises/exercise-fluidsystem/2p2cproblem.hh index d89d54e12dcab874d79bb8344ba45d9e7f093cb0..1a395ad9f76b329e9ccb5e4e9e2a179442b04a7a 100644 --- a/exercises/exercise-fluidsystem/2p2cproblem.hh +++ b/exercises/exercise-fluidsystem/2p2cproblem.hh @@ -58,9 +58,15 @@ template<class TypeTag> struct Problem<TypeTag, TTag::ExerciseFluidsystemTwoPTwoC> { using type = ExerciseFluidsystemProblemTwoPTwoC<TypeTag>; }; // Set the spatial parameters -SET_TYPE_PROP(ExerciseFluidsystemTwoPTwoC, SpatialParams, - ExerciseFluidsystemSpatialParams<GetPropType<TypeTag, Properties::FVGridGeometry>, - GetPropType<TypeTag, Properties::Scalar>>); +template<class TypeTag> +struct SpatialParams<TypeTag, TTag::ExerciseFluidsystemTwoPTwoC> +{ +private: + using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; +public: + using type = ExerciseFluidsystemSpatialParams<FVGridGeometry, Scalar>; +}; // Set grid and the grid creator to be used template<class TypeTag> diff --git a/exercises/exercise-fluidsystem/2pproblem.hh b/exercises/exercise-fluidsystem/2pproblem.hh index f0f257204a8f7d7527eb79e3ad23b79a5df0b654..2787caccd351d34cb32d6ad7fd2f58adb55a3326 100644 --- a/exercises/exercise-fluidsystem/2pproblem.hh +++ b/exercises/exercise-fluidsystem/2pproblem.hh @@ -72,9 +72,15 @@ template<class TypeTag> struct Problem<TypeTag, TTag::ExerciseFluidsystemTwoP> { using type = ExerciseFluidsystemProblemTwoP<TypeTag>; }; // Set the spatial parameters -SET_TYPE_PROP(ExerciseFluidsystemTwoP, SpatialParams, - ExerciseFluidsystemSpatialParams<GetPropType<TypeTag, Properties::FVGridGeometry>, - GetPropType<TypeTag, Properties::Scalar>>); +template<class TypeTag> +struct SpatialParams<TypeTag, TTag::ExerciseFluidsystemTwoP> +{ +private: + using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; +public: + using type = ExerciseFluidsystemSpatialParams<FVGridGeometry, Scalar>; +}; // Set grid to be used template<class TypeTag> diff --git a/exercises/exercise-grids/injection2pproblem.hh b/exercises/exercise-grids/injection2pproblem.hh index b99e7eb79b21a05c0c6f09cc1a6910bdef5d82bd..910b2ff8a5dfebe6ca14442bd7ae7ddc5f3190f6 100644 --- a/exercises/exercise-grids/injection2pproblem.hh +++ b/exercises/exercise-grids/injection2pproblem.hh @@ -60,9 +60,15 @@ template<class TypeTag> struct Problem<TypeTag, TTag::Injection2p> { using type = InjectionProblem2P<TypeTag>; }; // Set the spatial parameters -SET_TYPE_PROP(Injection2p, SpatialParams, - InjectionSpatialParams<GetPropType<TypeTag, Properties::FVGridGeometry>, - GetPropType<TypeTag, Properties::Scalar>>); +template<class TypeTag> +struct SpatialParams<TypeTag, TTag::Injection2p> +{ +private: + using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; +public: + using type = InjectionSpatialParams<FVGridGeometry, Scalar>; +}; // Set fluid configuration template<class TypeTag> diff --git a/exercises/exercise-runtimeparams/injection2pproblem.hh b/exercises/exercise-runtimeparams/injection2pproblem.hh index cdae77bfb6ea1f566a33dd4c2022423bfc9bf67b..ea353268dfbe27f1bdffed38d1b0d2985dd416d0 100644 --- a/exercises/exercise-runtimeparams/injection2pproblem.hh +++ b/exercises/exercise-runtimeparams/injection2pproblem.hh @@ -57,9 +57,15 @@ template<class TypeTag> struct Problem<TypeTag, TTag::Injection2p> { using type = InjectionProblem2P<TypeTag>; }; // Set the spatial parameters -SET_TYPE_PROP(Injection2p, SpatialParams, - InjectionSpatialParams<GetPropType<TypeTag, Properties::FVGridGeometry>, - GetPropType<TypeTag, Properties::Scalar>>); +template<class TypeTag> +struct SpatialParams<TypeTag, TTag::Injection2p> +{ +private: + using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; +public: + using type = InjectionSpatialParams<FVGridGeometry, Scalar>; +}; // Set fluid configuration template<class TypeTag> diff --git a/exercises/solution/exercise-basic/injection2pniproblem.hh b/exercises/solution/exercise-basic/injection2pniproblem.hh index 6c9c835857a3bfc1445c5d1b7e46dd56dc4dc33e..1a668c7a839a3008ea3a7401a616772de443b6e6 100644 --- a/exercises/solution/exercise-basic/injection2pniproblem.hh +++ b/exercises/solution/exercise-basic/injection2pniproblem.hh @@ -56,13 +56,29 @@ template<class TypeTag> struct Problem<TypeTag, TTag::Injection2pNITypeTag> { using type = InjectionProblem2PNI<TypeTag>; }; // Set the spatial parameters -SET_TYPE_PROP(Injection2pNITypeTag, SpatialParams, - InjectionSpatialParams<GetPropType<TypeTag, Properties::FVGridGeometry>, - GetPropType<TypeTag, Properties::Scalar>>); +template<class TypeTag> +struct SpatialParams<TypeTag, TTag::Injection2pNITypeTag> +{ +private: + using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; +public: + using type = InjectionSpatialParams<FVGridGeometry, Scalar>; +}; + +// the fluid system for incompressible tests +template<class TypeTag> +struct FluidSystem<TypeTag, TTag::Injection2pNITypeTag> +{ +private: + using Scalar = GetPropType<TypeTag, Properties::Scalar>; +public: + using type = FluidSystems::OnePLiquid<Scalar, Components::SimpleH2O<Scalar> >; +}; // Set fluid configuration -SET_TYPE_PROP(Injection2pNITypeTag, FluidSystem, - FluidSystems::H2ON2<GetPropType<TypeTag, Properties::Scalar>, FluidSystems::H2ON2DefaultPolicy</*fastButSimplifiedRelations=*/ true>>); +template<class TypeTag> +struct FluidSystem<TypeTag, TTag::Injection2pNITypeTag> { using type = FluidSystems::H2ON2<GetPropType<TypeTag, Properties::Scalar>, FluidSystems::H2ON2DefaultPolicy</*fastButSimplifiedRelations=*/ true>>; }; } // end namespace Properties /*! diff --git a/exercises/solution/exercise-coupling-ff-pm/models/ex_models_pmproblem.hh b/exercises/solution/exercise-coupling-ff-pm/models/ex_models_pmproblem.hh index aec17c64c9cd62ea0800480ae8a3e4dee6015c00..73771923b2a2c838df5399b70508df4d0ad5ffb6 100644 --- a/exercises/solution/exercise-coupling-ff-pm/models/ex_models_pmproblem.hh +++ b/exercises/solution/exercise-coupling-ff-pm/models/ex_models_pmproblem.hh @@ -83,9 +83,9 @@ template<class TypeTag> struct ReplaceCompEqIdx<TypeTag, TTag::DarcyOnePNC> { static constexpr int value = 3; }; //! Use a model with constant tortuosity for the effective diffusivity -SET_TYPE_PROP(DarcyOnePNC, EffectiveDiffusivityModel, - DiffusivityConstantTortuosity<GetPropType<TypeTag, Properties::Scalar>>); - +template<class TypeTag> +struct EffectiveDiffusivityModel<TypeTag, TTag::DarcyOnePNC> +{ using type = DiffusivityConstantTortuosity<GetPropType<TypeTag, Properties::Scalar>>; }; // Set the grid type template<class TypeTag> struct Grid<TypeTag, TTag::DarcyOnePNC> { using type = Dune::YaspGrid<2>; }; diff --git a/exercises/solution/exercise-fluidsystem/2p2cproblem.hh b/exercises/solution/exercise-fluidsystem/2p2cproblem.hh index 09221c49e68b0eeb5faac71b70db0cf4a95a04c1..0f0602f1fcd6e5435211f9e5ab1e9b19be3a24a5 100644 --- a/exercises/solution/exercise-fluidsystem/2p2cproblem.hh +++ b/exercises/solution/exercise-fluidsystem/2p2cproblem.hh @@ -58,9 +58,15 @@ template<class TypeTag> struct Problem<TypeTag, TTag::ExerciseFluidsystemTwoPTwoC> { using type = ExerciseFluidsystemProblemTwoPTwoC<TypeTag>; }; // Set the spatial parameters -SET_TYPE_PROP(ExerciseFluidsystemTwoPTwoC, SpatialParams, - ExerciseFluidsystemSpatialParams<GetPropType<TypeTag, Properties::FVGridGeometry>, - GetPropType<TypeTag, Properties::Scalar>>); +template<class TypeTag> +struct SpatialParams<TypeTag, TTag::ExerciseFluidsystemTwoPTwoC> +{ +private: + using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; +public: + using type = ExerciseFluidsystemSpatialParams<FVGridGeometry, Scalar>; +}; // Set grid and the grid creator to be used template<class TypeTag> diff --git a/exercises/solution/exercise-fluidsystem/2pproblem.hh b/exercises/solution/exercise-fluidsystem/2pproblem.hh index e289f9d8340d2284d2930f34a259907aa16b73eb..b292a43df9d096c3f6720ebc82668483455b0b29 100644 --- a/exercises/solution/exercise-fluidsystem/2pproblem.hh +++ b/exercises/solution/exercise-fluidsystem/2pproblem.hh @@ -72,9 +72,15 @@ template<class TypeTag> struct Problem<TypeTag, TTag::ExerciseFluidsystemTwoP> { using type = ExerciseFluidsystemProblemTwoP<TypeTag>; }; // Set the spatial parameters -SET_TYPE_PROP(ExerciseFluidsystemTwoP, SpatialParams, - ExerciseFluidsystemSpatialParams<GetPropType<TypeTag, Properties::FVGridGeometry>, - GetPropType<TypeTag, Properties::Scalar>>); +template<class TypeTag> +struct SpatialParams<TypeTag, TTag::ExerciseFluidsystemTwoP> +{ +private: + using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; +public: + using type = ExerciseFluidsystemSpatialParams<FVGridGeometry, Scalar>; +}; // Set grid to be used template<class TypeTag> diff --git a/exercises/solution/exercise-grids/injection2pproblem.hh b/exercises/solution/exercise-grids/injection2pproblem.hh index 91d8701572610dc726ab0888d26d0d3c99cdaa48..101c0379150b600d40dbe7404ec669f03e0b3da2 100644 --- a/exercises/solution/exercise-grids/injection2pproblem.hh +++ b/exercises/solution/exercise-grids/injection2pproblem.hh @@ -68,9 +68,15 @@ template<class TypeTag> struct Problem<TypeTag, TTag::Injection2p> { using type = InjectionProblem2P<TypeTag>; }; // Set the spatial parameters -SET_TYPE_PROP(Injection2p, SpatialParams, - InjectionSpatialParams<GetPropType<TypeTag, Properties::FVGridGeometry>, - GetPropType<TypeTag, Properties::Scalar>>); +template<class TypeTag> +struct SpatialParams<TypeTag, TTag::Injection2p> +{ +private: + using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; +public: + using type = InjectionSpatialParams<FVGridGeometry, Scalar>; +}; // Set fluid configuration template<class TypeTag> diff --git a/exercises/solution/exercise-runtimeparams/injection2pproblem.hh b/exercises/solution/exercise-runtimeparams/injection2pproblem.hh index d0ca6596626c23491b6b5b026222aec094b2b5c4..b2d79304a3f0a2778f1b075ad5b7b41241c7d30f 100644 --- a/exercises/solution/exercise-runtimeparams/injection2pproblem.hh +++ b/exercises/solution/exercise-runtimeparams/injection2pproblem.hh @@ -57,9 +57,15 @@ template<class TypeTag> struct Problem<TypeTag, TTag::Injection2p> { using type = InjectionProblem2P<TypeTag>; }; // Set the spatial parameters -SET_TYPE_PROP(Injection2p, SpatialParams, - InjectionSpatialParams<GetPropType<TypeTag, Properties::FVGridGeometry>, - GetPropType<TypeTag, Properties::Scalar>>); +template<class TypeTag> +struct SpatialParams<TypeTag, TTag::Injection2p> +{ +private: + using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; +public: + using type = InjectionSpatialParams<FVGridGeometry, Scalar>; +}; // Set fluid configuration template<class TypeTag>