diff --git a/exercises/exercise-coupling-ff-pm/1pspatialparams.hh b/exercises/exercise-coupling-ff-pm/1pspatialparams.hh index e95c24917d05382c77b53c769357a61ee41a9994..a042388f1eac51bb38ef980cb0f183756aaf6362 100644 --- a/exercises/exercise-coupling-ff-pm/1pspatialparams.hh +++ b/exercises/exercise-coupling-ff-pm/1pspatialparams.hh @@ -26,27 +26,20 @@ #include <dumux/material/spatialparams/fv1p.hh> -namespace Dumux -{ +namespace Dumux { /*! * \ingroup OnePModel - * \ingroup ImplicitTestProblems * * \brief The spatial parameters class for the test problem using the * 1p cc model */ -template<class TypeTag> +template<class FVGridGeometry, class Scalar> class OnePSpatialParams -: public FVSpatialParamsOneP<GetPropType<TypeTag, Properties::FVGridGeometry>, - GetPropType<TypeTag, Properties::Scalar>, - OnePSpatialParams<TypeTag>> +: public FVSpatialParamsOneP<FVGridGeometry, Scalar, OnePSpatialParams<FVGridGeometry, Scalar>> { - using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>; - using Scalar = GetPropType<TypeTag, Properties::Scalar>; - using Problem = GetPropType<TypeTag, Properties::Problem>; - using GridView = GetPropType<TypeTag, Properties::GridView>; - using ParentType = FVSpatialParamsOneP<FVGridGeometry, Scalar, OnePSpatialParams<TypeTag>>; + using GridView = typename FVGridGeometry::GridView; + using ParentType = FVSpatialParamsOneP<FVGridGeometry, Scalar, OnePSpatialParams<FVGridGeometry, Scalar>>; using Element = typename GridView::template Codim<0>::Entity; using GlobalPosition = typename Element::Geometry::GlobalCoordinate; @@ -56,7 +49,7 @@ public: using PermeabilityType = Scalar; OnePSpatialParams(std::shared_ptr<const FVGridGeometry> fvGridGeometry) - : ParentType(fvGridGeometry) + : ParentType(fvGridGeometry) { permeability_ = getParam<Scalar>("Darcy.SpatialParams.Permeability"); porosity_ = getParam<Scalar>("Darcy.SpatialParams.Porosity"); diff --git a/exercises/exercise-coupling-ff-pm/2pspatialparams.hh b/exercises/exercise-coupling-ff-pm/2pspatialparams.hh index 948b7a7b7ce4e00bbba83f88b399b8889eee7177..622e4f59ca7837281111f6a79435d0fb74c1cddb 100644 --- a/exercises/exercise-coupling-ff-pm/2pspatialparams.hh +++ b/exercises/exercise-coupling-ff-pm/2pspatialparams.hh @@ -29,29 +29,22 @@ #include <dumux/material/fluidmatrixinteractions/2p/regularizedvangenuchten.hh> #include <dumux/material/fluidmatrixinteractions/2p/thermalconductivitysomerton.hh> -namespace Dumux -{ +namespace Dumux { /*! * \ingroup TwoPModel - * \ingroup ImplicitTestProblems * * \brief The spatial parameters class for the test problem using the 2p cc model */ -template<class TypeTag> +template<class FVGridGeometry, class Scalar> class TwoPSpatialParams -: public FVSpatialParams<GetPropType<TypeTag, Properties::FVGridGeometry>, - GetPropType<TypeTag, Properties::Scalar>, - TwoPSpatialParams<TypeTag>> +: public FVSpatialParams<FVGridGeometry, Scalar, TwoPSpatialParams<FVGridGeometry, Scalar>> { - using Scalar = GetPropType<TypeTag, Properties::Scalar>; - using Problem = GetPropType<TypeTag, Properties::Problem>; - using GridView = GetPropType<TypeTag, Properties::GridView>; + using GridView = typename FVGridGeometry::GridView; using Element = typename GridView::template Codim<0>::Entity; - using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>; using FVElementGeometry = typename FVGridGeometry::LocalView; using SubControlVolume = typename FVElementGeometry::SubControlVolume; - using ParentType = FVSpatialParams<FVGridGeometry, Scalar, TwoPSpatialParams<TypeTag>>; + using ParentType = FVSpatialParams<FVGridGeometry, Scalar, TwoPSpatialParams<FVGridGeometry, Scalar>>; using GlobalPosition = typename Element::Geometry::GlobalCoordinate; using EffectiveLaw = RegularizedVanGenuchten<Scalar>; @@ -62,7 +55,7 @@ public: using PermeabilityType = Scalar; TwoPSpatialParams(std::shared_ptr<const FVGridGeometry> fvGridGeometry) - : ParentType(fvGridGeometry) + : ParentType(fvGridGeometry) { permeability_ = getParam<Scalar>("Darcy.SpatialParams.Permeability"); porosity_ = getParam<Scalar>("Darcy.SpatialParams.Porosity"); @@ -134,6 +127,6 @@ private: static constexpr Scalar eps_ = 1.0e-7; }; -} // end namespace +} // end namespace Dumux #endif diff --git a/exercises/exercise-coupling-ff-pm/interface/ex_interface_pmproblem.hh b/exercises/exercise-coupling-ff-pm/interface/ex_interface_pmproblem.hh index 2fbb48231d6aa8be8f7dfe8497767727e3806c0e..456a837f7b88f455838e2c9ee1eeb22b9a35574f 100644 --- a/exercises/exercise-coupling-ff-pm/interface/ex_interface_pmproblem.hh +++ b/exercises/exercise-coupling-ff-pm/interface/ex_interface_pmproblem.hh @@ -17,10 +17,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * *****************************************************************************/ /*! -* \file -* -* \brief The porous medium flow sub problem -*/ + * \file + * + * \brief The porous medium flow sub problem + */ #ifndef DUMUX_DARCY_SUBPROBLEM_HH #define DUMUX_DARCY_SUBPROBLEM_HH @@ -80,8 +80,11 @@ struct Grid<TypeTag, TTag::DarcyOneP> }; template<class TypeTag> -struct SpatialParams<TypeTag, TTag::DarcyOneP> { using type = OnePSpatialParams<TypeTag>; }; -} +struct SpatialParams<TypeTag, TTag::DarcyOneP> { + using type = OnePSpatialParams<GetPropType<TypeTag, FVGridGeometry>, GetPropType<TypeTag, Scalar>>; +}; + +} // end namespace Properties /*! * \brief The porous medium flow sub problem 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 73f87d211a966eeee9dcceaed9c6ce76c8a510dc..31fdc8a3383e7c52a5271291133b10d179751568 100644 --- a/exercises/exercise-coupling-ff-pm/models/ex_models_pmproblem.hh +++ b/exercises/exercise-coupling-ff-pm/models/ex_models_pmproblem.hh @@ -79,8 +79,11 @@ struct Grid<TypeTag, TTag::DarcyOnePNC> { using type = Dune::YaspGrid<2>; }; // Set the spatial paramaters type template<class TypeTag> -struct SpatialParams<TypeTag, TTag::DarcyOnePNC> { using type = OnePSpatialParams<TypeTag>; }; -} +struct SpatialParams<TypeTag, TTag::DarcyOnePNC> { + using type = OnePSpatialParams<GetPropType<TypeTag, FVGridGeometry>, GetPropType<TypeTag, Scalar>>; +}; + +} // end namespace Properties template <class TypeTag> class DarcySubProblem : public PorousMediumFlowProblem<TypeTag> @@ -396,6 +399,6 @@ private: Dumux::GnuplotInterface<Scalar> gnuplotInterfaceFluxes_; Dumux::GnuplotInterface<Scalar> gnuplotStorage_; }; -} //end namespace +} //end namespace Dumux #endif //DUMUX_DARCY_SUBPROBLEM_HH diff --git a/exercises/exercise-coupling-ff-pm/turbulence/ex_turbulence_ffproblem.hh b/exercises/exercise-coupling-ff-pm/turbulence/ex_turbulence_ffproblem.hh index 79b958a00ccd9880dddb0419fff85d2305e38951..e6abb8e430d72f705f03bc7b19fa3a15032a2507 100644 --- a/exercises/exercise-coupling-ff-pm/turbulence/ex_turbulence_ffproblem.hh +++ b/exercises/exercise-coupling-ff-pm/turbulence/ex_turbulence_ffproblem.hh @@ -32,13 +32,13 @@ #include <dumux/freeflow/compositional/navierstokesncmodel.hh> #include <dumux/freeflow/navierstokes/problem.hh> -namespace Dumux -{ +namespace Dumux { + template <class TypeTag> class FreeFlowSubProblem; -namespace Properties -{ +namespace Properties { + // Create new type tags namespace TTag { struct StokesZeroEq { using InheritsFrom = std::tuple<NavierStokesNCNI, StaggeredFreeFlowModel>; }; diff --git a/exercises/exercise-coupling-ff-pm/turbulence/ex_turbulence_pmproblem.hh b/exercises/exercise-coupling-ff-pm/turbulence/ex_turbulence_pmproblem.hh index 361ac60e5b7b1e5c3b2503d91bf9f5b05678ffd2..0ded6f6e318a04d42753cbb792e59d6a057974b1 100644 --- a/exercises/exercise-coupling-ff-pm/turbulence/ex_turbulence_pmproblem.hh +++ b/exercises/exercise-coupling-ff-pm/turbulence/ex_turbulence_pmproblem.hh @@ -16,11 +16,11 @@ * You should have received a copy of the GNU General Public License * * along with this program. If not, see <http://www.gnu.org/licenses/>. * *****************************************************************************/ - /*! - * \file - * - * \brief The porous medium sub problem - */ +/*! + * \file + * + * \brief The porous medium sub problem + */ #ifndef DUMUX_DARCY2P2C_SUBPROBLEM_HH #define DUMUX_DARCY2P2C_SUBPROBLEM_HH @@ -72,8 +72,11 @@ template<class TypeTag> struct UseMoles<TypeTag, TTag::DarcyTwoPTwoCNI> { static constexpr bool value = true; }; template<class TypeTag> -struct SpatialParams<TypeTag, TTag::DarcyTwoPTwoCNI> { using type = TwoPSpatialParams<TypeTag>; }; -} +struct SpatialParams<TypeTag, TTag::DarcyTwoPTwoCNI> { + using type = TwoPSpatialParams<GetPropType<TypeTag, FVGridGeometry>, GetPropType<TypeTag, Scalar>>; +}; + +} // end namespace Properties /*! * \brief The porous medium sub problem diff --git a/exercises/solution/exercise-coupling-ff-pm/1pspatialparams.hh b/exercises/solution/exercise-coupling-ff-pm/1pspatialparams.hh index e95c24917d05382c77b53c769357a61ee41a9994..a042388f1eac51bb38ef980cb0f183756aaf6362 100644 --- a/exercises/solution/exercise-coupling-ff-pm/1pspatialparams.hh +++ b/exercises/solution/exercise-coupling-ff-pm/1pspatialparams.hh @@ -26,27 +26,20 @@ #include <dumux/material/spatialparams/fv1p.hh> -namespace Dumux -{ +namespace Dumux { /*! * \ingroup OnePModel - * \ingroup ImplicitTestProblems * * \brief The spatial parameters class for the test problem using the * 1p cc model */ -template<class TypeTag> +template<class FVGridGeometry, class Scalar> class OnePSpatialParams -: public FVSpatialParamsOneP<GetPropType<TypeTag, Properties::FVGridGeometry>, - GetPropType<TypeTag, Properties::Scalar>, - OnePSpatialParams<TypeTag>> +: public FVSpatialParamsOneP<FVGridGeometry, Scalar, OnePSpatialParams<FVGridGeometry, Scalar>> { - using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>; - using Scalar = GetPropType<TypeTag, Properties::Scalar>; - using Problem = GetPropType<TypeTag, Properties::Problem>; - using GridView = GetPropType<TypeTag, Properties::GridView>; - using ParentType = FVSpatialParamsOneP<FVGridGeometry, Scalar, OnePSpatialParams<TypeTag>>; + using GridView = typename FVGridGeometry::GridView; + using ParentType = FVSpatialParamsOneP<FVGridGeometry, Scalar, OnePSpatialParams<FVGridGeometry, Scalar>>; using Element = typename GridView::template Codim<0>::Entity; using GlobalPosition = typename Element::Geometry::GlobalCoordinate; @@ -56,7 +49,7 @@ public: using PermeabilityType = Scalar; OnePSpatialParams(std::shared_ptr<const FVGridGeometry> fvGridGeometry) - : ParentType(fvGridGeometry) + : ParentType(fvGridGeometry) { permeability_ = getParam<Scalar>("Darcy.SpatialParams.Permeability"); porosity_ = getParam<Scalar>("Darcy.SpatialParams.Porosity"); diff --git a/exercises/solution/exercise-coupling-ff-pm/2pspatialparams.hh b/exercises/solution/exercise-coupling-ff-pm/2pspatialparams.hh index 948b7a7b7ce4e00bbba83f88b399b8889eee7177..622e4f59ca7837281111f6a79435d0fb74c1cddb 100644 --- a/exercises/solution/exercise-coupling-ff-pm/2pspatialparams.hh +++ b/exercises/solution/exercise-coupling-ff-pm/2pspatialparams.hh @@ -29,29 +29,22 @@ #include <dumux/material/fluidmatrixinteractions/2p/regularizedvangenuchten.hh> #include <dumux/material/fluidmatrixinteractions/2p/thermalconductivitysomerton.hh> -namespace Dumux -{ +namespace Dumux { /*! * \ingroup TwoPModel - * \ingroup ImplicitTestProblems * * \brief The spatial parameters class for the test problem using the 2p cc model */ -template<class TypeTag> +template<class FVGridGeometry, class Scalar> class TwoPSpatialParams -: public FVSpatialParams<GetPropType<TypeTag, Properties::FVGridGeometry>, - GetPropType<TypeTag, Properties::Scalar>, - TwoPSpatialParams<TypeTag>> +: public FVSpatialParams<FVGridGeometry, Scalar, TwoPSpatialParams<FVGridGeometry, Scalar>> { - using Scalar = GetPropType<TypeTag, Properties::Scalar>; - using Problem = GetPropType<TypeTag, Properties::Problem>; - using GridView = GetPropType<TypeTag, Properties::GridView>; + using GridView = typename FVGridGeometry::GridView; using Element = typename GridView::template Codim<0>::Entity; - using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>; using FVElementGeometry = typename FVGridGeometry::LocalView; using SubControlVolume = typename FVElementGeometry::SubControlVolume; - using ParentType = FVSpatialParams<FVGridGeometry, Scalar, TwoPSpatialParams<TypeTag>>; + using ParentType = FVSpatialParams<FVGridGeometry, Scalar, TwoPSpatialParams<FVGridGeometry, Scalar>>; using GlobalPosition = typename Element::Geometry::GlobalCoordinate; using EffectiveLaw = RegularizedVanGenuchten<Scalar>; @@ -62,7 +55,7 @@ public: using PermeabilityType = Scalar; TwoPSpatialParams(std::shared_ptr<const FVGridGeometry> fvGridGeometry) - : ParentType(fvGridGeometry) + : ParentType(fvGridGeometry) { permeability_ = getParam<Scalar>("Darcy.SpatialParams.Permeability"); porosity_ = getParam<Scalar>("Darcy.SpatialParams.Porosity"); @@ -134,6 +127,6 @@ private: static constexpr Scalar eps_ = 1.0e-7; }; -} // end namespace +} // end namespace Dumux #endif diff --git a/exercises/solution/exercise-coupling-ff-pm/interface/ex_interface_pmproblem.hh b/exercises/solution/exercise-coupling-ff-pm/interface/ex_interface_pmproblem.hh index 910df4d5128505f1bfeec263afb639c3ee5c0e7f..51e1663c8d66f1379545bb566e8c38336c4632e5 100644 --- a/exercises/solution/exercise-coupling-ff-pm/interface/ex_interface_pmproblem.hh +++ b/exercises/solution/exercise-coupling-ff-pm/interface/ex_interface_pmproblem.hh @@ -47,23 +47,29 @@ class DarcySubProblem; namespace Properties { -NEW_TYPE_TAG(DarcyOneP, INHERITS_FROM(CCTpfaModel, OneP)); +// Create new type tags +namespace TTag { +struct DarcyOneP { using InheritsFrom = std::tuple<OneP, CCTpfaModel>; }; +} // end namespace TTag // Set the problem property -SET_TYPE_PROP(DarcyOneP, Problem, Dumux::DarcySubProblem<TypeTag>); +template<class TypeTag> +struct Problem<TypeTag, TTag::DarcyOneP> { using type = Dumux::DarcySubProblem<TypeTag>; }; // the fluid system -SET_PROP(DarcyOneP, FluidSystem) +template<class TypeTag> +struct FluidSystem<TypeTag, TTag::DarcyOneP> { - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; using type = FluidSystems::OnePLiquid<Scalar, Dumux::Components::SimpleH2O<Scalar> > ; }; // Set the grid type -SET_PROP(DarcyOneP, Grid) +template<class TypeTag> +struct Grid<TypeTag, TTag::DarcyOneP> { static constexpr auto dim = 2; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using Scalar = GetPropType<TypeTag, Properties::Scalar>; using TensorGrid = Dune::YaspGrid<2, Dune::TensorProductCoordinates<Scalar, dim> >; #if EXNUMBER < 3 // use "normal" grid @@ -74,8 +80,12 @@ SET_PROP(DarcyOneP, Grid) #endif }; -SET_TYPE_PROP(DarcyOneP, SpatialParams, OnePSpatialParams<TypeTag>); -} +template<class TypeTag> +struct SpatialParams<TypeTag, TTag::DarcyOneP> { + using type = OnePSpatialParams<GetPropType<TypeTag, FVGridGeometry>, GetPropType<TypeTag, Scalar>>; +}; + +} // end namespace Properties /*! * \brief The porous medium flow sub problem @@ -84,23 +94,23 @@ template <class TypeTag> class DarcySubProblem : public PorousMediumFlowProblem<TypeTag> { using ParentType = PorousMediumFlowProblem<TypeTag>; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); - using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector); - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables); - using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView; + using GridView = GetPropType<TypeTag, Properties::GridView>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>; + using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>; + using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using VolumeVariables = GetPropType<TypeTag, Properties::VolumeVariables>; + using FVElementGeometry = typename GetPropType<TypeTag, Properties::FVGridGeometry>::LocalView; using SubControlVolume = typename FVElementGeometry::SubControlVolume; using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace; - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); + using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>; - using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; + using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; using Element = typename GridView::template Codim<0>::Entity; using GlobalPosition = typename Element::Geometry::GlobalCoordinate; - using CouplingManager = typename GET_PROP_TYPE(TypeTag, CouplingManager); + using CouplingManager = GetPropType<TypeTag, Properties::CouplingManager>; public: DarcySubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry, 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 8f5bc3dc5784be6b5e9e0ac37fa01731bd08294a..aec17c64c9cd62ea0800480ae8a3e4dee6015c00 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 @@ -26,9 +26,9 @@ #include <dune/grid/yaspgrid.hh> -#include <dumux/material/fluidsystems/1padapter.hh> #include <dumux/discretization/cctpfa.hh> #include <dumux/io/gnuplotinterface.hh> +#include <dumux/material/fluidsystems/1padapter.hh> #include <dumux/material/fluidsystems/h2oair.hh> #include <dumux/material/fluidmatrixinteractions/diffusivityconstanttortuosity.hh> @@ -100,12 +100,17 @@ struct Formulation<TypeTag, TTag::DarcyOnePNC> // Set the spatial paramaters type #if EXNUMBER >= 1 template<class TypeTag> -struct SpatialParams<TypeTag, TTag::DarcyOnePNC> { using type = TwoPSpatialParams<TypeTag>; }; +struct SpatialParams<TypeTag, TTag::DarcyOnePNC> { + using type = TwoPSpatialParams<GetPropType<TypeTag, FVGridGeometry>, GetPropType<TypeTag, Scalar>>; +}; #else template<class TypeTag> -struct SpatialParams<TypeTag, TTag::DarcyOnePNC> { using type = OnePSpatialParams<TypeTag>; }; +struct SpatialParams<TypeTag, TTag::DarcyOnePNC> { + using type = OnePSpatialParams<GetPropType<TypeTag, FVGridGeometry>, GetPropType<TypeTag, Scalar>>; +}; #endif -} + +} // end namespace Properties template <class TypeTag> class DarcySubProblem : public PorousMediumFlowProblem<TypeTag> @@ -309,6 +314,11 @@ public: gnuplotInterfaceFluxes_.plot("flux_" + std::to_string(timeLoop_->timeStepIndex())); } + /*! + * \name Problem parameters + */ + // \{ + /*! * \brief Return the temperature within the domain in [K]. * @@ -380,10 +390,10 @@ public: * \param scv The subcontrolvolume */ template<class ElementVolumeVariables> - NumEqVector source(const Element &element, + NumEqVector source(const Element& element, const FVElementGeometry& fvGeometry, const ElementVolumeVariables& elemVolVars, - const SubControlVolume &scv) const + const SubControlVolume& scv) const { return NumEqVector(0.0); } // \} @@ -396,7 +406,7 @@ public: * For this method, the \a priVars parameter stores primary * variables. */ - PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const + PrimaryVariables initialAtPos(const GlobalPosition& globalPos) const { static const Scalar stokesPressure = getParamFromGroup<Scalar>("Stokes", "Problem.Pressure"); @@ -460,6 +470,6 @@ private: Dumux::GnuplotInterface<Scalar> gnuplotInterfaceFluxes_; Dumux::GnuplotInterface<Scalar> gnuplotStorage_; }; -} //end namespace +} //end namespace Dumux #endif //DUMUX_DARCY_SUBPROBLEM_HH diff --git a/exercises/solution/exercise-coupling-ff-pm/turbulence/ex_turbulence_ffproblem.hh b/exercises/solution/exercise-coupling-ff-pm/turbulence/ex_turbulence_ffproblem.hh index 2b5f0864b719739cefd5133991cb879ab75f6e9a..07213ac644ab775ac24e2f4cb76aef7d99358069 100644 --- a/exercises/solution/exercise-coupling-ff-pm/turbulence/ex_turbulence_ffproblem.hh +++ b/exercises/solution/exercise-coupling-ff-pm/turbulence/ex_turbulence_ffproblem.hh @@ -16,10 +16,10 @@ * You should have received a copy of the GNU General Public License * * along with this program. If not, see <http://www.gnu.org/licenses/>. * *****************************************************************************/ - /*! - * \file - * \brief The free-flow sub problem - */ +/*! + * \file + * \brief The free-flow sub problem + */ #ifndef DUMUX_FREEFLOW1P2C_SUBPROBLEM_HH #define DUMUX_FREEFLOW1P2C_SUBPROBLEM_HH @@ -37,13 +37,13 @@ #include <dumux/freeflow/navierstokes/problem.hh> #endif -namespace Dumux -{ +namespace Dumux { + template <class TypeTag> class FreeFlowSubProblem; -namespace Properties -{ +namespace Properties { + // Create new type tags namespace TTag { #if EXNUMBER >= 1 diff --git a/exercises/solution/exercise-coupling-ff-pm/turbulence/ex_turbulence_pmproblem.hh b/exercises/solution/exercise-coupling-ff-pm/turbulence/ex_turbulence_pmproblem.hh index 8f93288ba372c4241562967c44e5b3674ba367ea..0ded6f6e318a04d42753cbb792e59d6a057974b1 100644 --- a/exercises/solution/exercise-coupling-ff-pm/turbulence/ex_turbulence_pmproblem.hh +++ b/exercises/solution/exercise-coupling-ff-pm/turbulence/ex_turbulence_pmproblem.hh @@ -72,8 +72,11 @@ template<class TypeTag> struct UseMoles<TypeTag, TTag::DarcyTwoPTwoCNI> { static constexpr bool value = true; }; template<class TypeTag> -struct SpatialParams<TypeTag, TTag::DarcyTwoPTwoCNI> { using type = TwoPSpatialParams<TypeTag>; }; -} +struct SpatialParams<TypeTag, TTag::DarcyTwoPTwoCNI> { + using type = TwoPSpatialParams<GetPropType<TypeTag, FVGridGeometry>, GetPropType<TypeTag, Scalar>>; +}; + +} // end namespace Properties /*! * \brief The porous medium sub problem