From 5e5e0eb0ae69fd57c5caa868f5cfaf5224ce6951 Mon Sep 17 00:00:00 2001 From: Bernd Flemisch <bernd@iws.uni-stuttgart.de> Date: Mon, 16 Apr 2012 16:25:56 +0000 Subject: [PATCH] deprecated model specific base problems: include deprecated.hh. generalproblem and tutorial: use Indices property and PorousMediaBoxProblem. porousmediaboxproblem: declare properties EnableGravity and SpatialParameters. git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@8080 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/boxmodels/1p/1pproblem.hh | 1 + dumux/boxmodels/1p2c/1p2cproblem.hh | 1 + dumux/boxmodels/2p/2pproblem.hh | 1 + dumux/boxmodels/2p2c/2p2cindices.hh | 2 ++ dumux/boxmodels/2p2c/2p2cproblem.hh | 1 + dumux/boxmodels/3p3c/3p3cproblem.hh | 1 + dumux/boxmodels/common/porousmediaboxproblem.hh | 6 ++++++ dumux/boxmodels/mpnc/mpncproblem.hh | 1 + test/common/generalproblem/generallensproblem.hh | 5 +++-- .../generalproblem/generallensspatialparameters.hh | 2 +- tutorial/tutorialproblem_coupled.hh | 9 ++++++--- 11 files changed, 24 insertions(+), 6 deletions(-) diff --git a/dumux/boxmodels/1p/1pproblem.hh b/dumux/boxmodels/1p/1pproblem.hh index 8420dc82a2..7b715be719 100644 --- a/dumux/boxmodels/1p/1pproblem.hh +++ b/dumux/boxmodels/1p/1pproblem.hh @@ -28,6 +28,7 @@ #ifndef DUMUX_1P_PROBLEM_HH #define DUMUX_1P_PROBLEM_HH +#include <dumux/common/deprecated.hh> #include <dumux/boxmodels/common/porousmediaboxproblem.hh> #include "1pproperties.hh" diff --git a/dumux/boxmodels/1p2c/1p2cproblem.hh b/dumux/boxmodels/1p2c/1p2cproblem.hh index c4c5a4f50f..46be5c438a 100644 --- a/dumux/boxmodels/1p2c/1p2cproblem.hh +++ b/dumux/boxmodels/1p2c/1p2cproblem.hh @@ -30,6 +30,7 @@ #ifndef DUMUX_1P2C_PROBLEM_HH #define DUMUX_1P2C_PROBLEM_HH +#include <dumux/common/deprecated.hh> #include <dumux/boxmodels/common/porousmediaboxproblem.hh> #include "1p2cproperties.hh" diff --git a/dumux/boxmodels/2p/2pproblem.hh b/dumux/boxmodels/2p/2pproblem.hh index 1622ecc996..f6290bd188 100644 --- a/dumux/boxmodels/2p/2pproblem.hh +++ b/dumux/boxmodels/2p/2pproblem.hh @@ -29,6 +29,7 @@ #include "2pproperties.hh" +#include <dumux/common/deprecated.hh> #include <dumux/boxmodels/common/porousmediaboxproblem.hh> namespace Dumux diff --git a/dumux/boxmodels/2p2c/2p2cindices.hh b/dumux/boxmodels/2p2c/2p2cindices.hh index 01cad0b8dc..79aec2ca43 100644 --- a/dumux/boxmodels/2p2c/2p2cindices.hh +++ b/dumux/boxmodels/2p2c/2p2cindices.hh @@ -28,6 +28,8 @@ #ifndef DUMUX_2P2C_INDICES_HH #define DUMUX_2P2C_INDICES_HH +#include <dumux/common/deprecated.hh> + #include "2p2cproperties.hh" namespace Dumux diff --git a/dumux/boxmodels/2p2c/2p2cproblem.hh b/dumux/boxmodels/2p2c/2p2cproblem.hh index 9fda738771..7615ca9523 100644 --- a/dumux/boxmodels/2p2c/2p2cproblem.hh +++ b/dumux/boxmodels/2p2c/2p2cproblem.hh @@ -28,6 +28,7 @@ #ifndef DUMUX_2P2C_PROBLEM_HH #define DUMUX_2P2C_PROBLEM_HH +#include <dumux/common/deprecated.hh> #include <dumux/boxmodels/common/porousmediaboxproblem.hh> #include "2p2cproperties.hh" diff --git a/dumux/boxmodels/3p3c/3p3cproblem.hh b/dumux/boxmodels/3p3c/3p3cproblem.hh index 0b27ab68b8..75c250f1f9 100644 --- a/dumux/boxmodels/3p3c/3p3cproblem.hh +++ b/dumux/boxmodels/3p3c/3p3cproblem.hh @@ -29,6 +29,7 @@ #ifndef DUMUX_3P3C_PROBLEM_HH #define DUMUX_3P3C_PROBLEM_HH +#include <dumux/common/deprecated.hh> #include <dumux/boxmodels/common/porousmediaboxproblem.hh> #include "3p3cproperties.hh" diff --git a/dumux/boxmodels/common/porousmediaboxproblem.hh b/dumux/boxmodels/common/porousmediaboxproblem.hh index d783ef8d83..d704e66cad 100644 --- a/dumux/boxmodels/common/porousmediaboxproblem.hh +++ b/dumux/boxmodels/common/porousmediaboxproblem.hh @@ -33,6 +33,12 @@ namespace Dumux { +namespace Properties +{ +NEW_PROP_TAG(SpatialParameters); //!< The type of the spatial parameters object +NEW_PROP_TAG(EnableGravity); //!< Returns whether gravity is considered in the problem +} + /*! * \ingroup BoxBaseProblems * \brief Base class for all porous media box problems diff --git a/dumux/boxmodels/mpnc/mpncproblem.hh b/dumux/boxmodels/mpnc/mpncproblem.hh index 605b3ab764..d4b164d7cb 100644 --- a/dumux/boxmodels/mpnc/mpncproblem.hh +++ b/dumux/boxmodels/mpnc/mpncproblem.hh @@ -30,6 +30,7 @@ #include "dumux/boxmodels/mpnc/mpncnewtoncontroller.hh" +#include <dumux/common/deprecated.hh> #include <dumux/boxmodels/common/porousmediaboxproblem.hh> namespace Dumux diff --git a/test/common/generalproblem/generallensproblem.hh b/test/common/generalproblem/generallensproblem.hh index 58931241f6..1b5882199a 100644 --- a/test/common/generalproblem/generallensproblem.hh +++ b/test/common/generalproblem/generallensproblem.hh @@ -43,6 +43,7 @@ #include <dumux/material/fluidsystems/liquidphase.hh> //box model +#include <dumux/boxmodels/common/porousmediaboxproblem.hh> #include <dumux/boxmodels/2p/2pmodel.hh> //decoupled model @@ -115,7 +116,7 @@ NEW_TYPE_TAG(BoxGeneralLensProblem, INHERITS_FROM(BoxTwoP, GeneralLensProblem)); // Set the problem property SET_PROP(BoxGeneralLensProblem, ProblemBaseClass) { - typedef Dumux::TwoPProblem<TypeTag> type; + typedef Dumux::PorousMediaBoxProblem<TypeTag> type; }; // Set the problem property @@ -195,7 +196,7 @@ class GeneralLensProblem : public GET_PROP_TYPE(TypeTag, ProblemBaseClass) typedef typename GET_PROP_TYPE(TypeTag, ProblemBaseClass) ParentType; typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, TwoPIndices) Indices; + typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; typedef typename GET_PROP_TYPE(TypeTag, WettingPhase) WettingPhase; diff --git a/test/common/generalproblem/generallensspatialparameters.hh b/test/common/generalproblem/generallensspatialparameters.hh index 123e90c6d5..7efa438c9c 100644 --- a/test/common/generalproblem/generallensspatialparameters.hh +++ b/test/common/generalproblem/generallensspatialparameters.hh @@ -82,7 +82,7 @@ class GeneralLensSpatialParameters : public GET_PROP_TYPE(TypeTag, SpatialParams typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; typedef typename Grid::ctype CoordScalar; - typedef typename GET_PROP_TYPE(TypeTag, TwoPIndices) Indices; + typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; enum { dim=GridView::dimension, diff --git a/tutorial/tutorialproblem_coupled.hh b/tutorial/tutorialproblem_coupled.hh index 57c575cd05..ae26ab1e7c 100644 --- a/tutorial/tutorialproblem_coupled.hh +++ b/tutorial/tutorialproblem_coupled.hh @@ -31,6 +31,9 @@ // The numerical model #include <dumux/boxmodels/2p/2pmodel.hh> +// The base prous media box problem +#include <dumux/boxmodels/common/porousmediaboxproblem.hh> + // The DUNE grid used #include <dune/grid/yaspgrid.hh> @@ -84,9 +87,9 @@ SET_BOOL_PROP(TutorialProblemCoupled, EnableGravity, false); /*@\label{tutorial- * \brief Tutorial problem for a fully coupled twophase box model. */ template <class TypeTag> -class TutorialProblemCoupled : public TwoPProblem<TypeTag> /*@\label{tutorial-coupled:def-problem}@*/ +class TutorialProblemCoupled : public PorousMediaBoxProblem<TypeTag> /*@\label{tutorial-coupled:def-problem}@*/ { - typedef TwoPProblem<TypeTag> ParentType; + typedef PorousMediaBoxProblem<TypeTag> ParentType; typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; @@ -101,7 +104,7 @@ class TutorialProblemCoupled : public TwoPProblem<TypeTag> /*@\label{tutorial-co // Dumux specific types typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; - typedef typename GET_PROP_TYPE(TypeTag, TwoPIndices) Indices; + typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; -- GitLab