Commit 5cc02855 authored by Bernd Flemisch's avatar Bernd Flemisch Committed by Timo Koch
Browse files

[spatialparams] free several spatialparams from typetag

parent 7b11e159
......@@ -36,17 +36,14 @@ namespace Dumux
* \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<typename GET_PROP_TYPE(TypeTag, FVGridGeometry),
typename GET_PROP_TYPE(TypeTag, Scalar),
OnePSpatialParams<TypeTag>>
: public FVSpatialParamsOneP<FVGridGeometry, Scalar,
OnePSpatialParams<FVGridGeometry, Scalar>>
{
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
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 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;
......
......@@ -71,7 +71,12 @@ SET_TYPE_PROP(DarcyOnePTwoCTypeTag, EffectiveDiffusivityModel,
SET_TYPE_PROP(DarcyOnePTwoCTypeTag, Grid, Dune::YaspGrid<2>);
// Set the spatial paramaters type
SET_TYPE_PROP(DarcyOnePTwoCTypeTag, SpatialParams, OnePSpatialParams<TypeTag>);
SET_PROP(DarcyOnePTwoCTypeTag, SpatialParams)
{
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using type = OnePSpatialParams<FVGridGeometry, Scalar>;
};
}
template <class TypeTag>
......
......@@ -71,7 +71,12 @@ SET_TYPE_PROP(DarcyOnePTwoCTypeTag, EffectiveDiffusivityModel,
SET_TYPE_PROP(DarcyOnePTwoCTypeTag, Grid, Dune::YaspGrid<2>);
// Set the spatial paramaters type
SET_TYPE_PROP(DarcyOnePTwoCTypeTag, SpatialParams, OnePSpatialParams<TypeTag>);
SET_PROP(DarcyOnePTwoCTypeTag, SpatialParams)
{
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using type = OnePSpatialParams<FVGridGeometry, Scalar>;
};
}
template <class TypeTag>
......
......@@ -66,7 +66,13 @@ SET_TYPE_PROP(DarcyTwoPTwoCTypeTag, Grid, Dune::YaspGrid<2, Dune::TensorProductC
SET_BOOL_PROP(DarcyTwoPTwoCTypeTag, UseMoles, true);
SET_TYPE_PROP(DarcyTwoPTwoCTypeTag, SpatialParams, TwoPTwoCSpatialParams<TypeTag>);
SET_PROP(DarcyTwoPTwoCTypeTag, SpatialParams)
{
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using type = TwoPTwoCSpatialParams<FVGridGeometry, Scalar>;
};
}
template <class TypeTag>
......
......@@ -39,20 +39,15 @@ namespace Dumux
* \brief The spatial parameters class for the test problem using the
* 1p cc model
*/
template<class TypeTag>
template<class FVGridGeometry, class Scalar>
class TwoPTwoCSpatialParams
: public FVSpatialParams<typename GET_PROP_TYPE(TypeTag, FVGridGeometry),
typename GET_PROP_TYPE(TypeTag, Scalar),
TwoPTwoCSpatialParams<TypeTag>>
: public FVSpatialParams<FVGridGeometry, Scalar, TwoPTwoCSpatialParams<FVGridGeometry, Scalar>>
{
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 GridView = typename FVGridGeometry::GridView;
using Element = typename GridView::template Codim<0>::Entity;
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using FVElementGeometry = typename FVGridGeometry::LocalView;
using SubControlVolume = typename FVElementGeometry::SubControlVolume;
using ParentType = FVSpatialParams<FVGridGeometry, Scalar, TwoPTwoCSpatialParams<TypeTag>>;
using ParentType = FVSpatialParams<FVGridGeometry, Scalar, TwoPTwoCSpatialParams<FVGridGeometry, Scalar>>;
using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
using EffectiveLaw = RegularizedVanGenuchten<Scalar>;
......
......@@ -36,17 +36,14 @@ namespace Dumux
* \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<typename GET_PROP_TYPE(TypeTag, FVGridGeometry),
typename GET_PROP_TYPE(TypeTag, Scalar),
OnePSpatialParams<TypeTag>>
: public FVSpatialParamsOneP<FVGridGeometry, Scalar,
OnePSpatialParams<FVGridGeometry, Scalar>>
{
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
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 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;
......
......@@ -58,7 +58,12 @@ SET_PROP(DarcyOnePTypeTag, FluidSystem)
// Set the grid type
SET_TYPE_PROP(DarcyOnePTypeTag, Grid, Dune::YaspGrid<2>);
SET_TYPE_PROP(DarcyOnePTypeTag, SpatialParams, OnePSpatialParams<TypeTag>);
SET_PROP(DarcyOnePTypeTag, SpatialParams)
{
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using type = OnePSpatialParams<FVGridGeometry, Scalar>;
};
}
template <class TypeTag>
......
......@@ -58,7 +58,12 @@ SET_PROP(DarcyOnePTypeTag, FluidSystem)
// Set the grid type
SET_TYPE_PROP(DarcyOnePTypeTag, Grid, Dune::YaspGrid<2>);
SET_TYPE_PROP(DarcyOnePTypeTag, SpatialParams, OnePSpatialParams<TypeTag>);
SET_PROP(DarcyOnePTypeTag, SpatialParams)
{
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using type = OnePSpatialParams<FVGridGeometry, Scalar>;
};
}
template <class TypeTag>
......
......@@ -54,7 +54,12 @@ SET_TYPE_PROP(DarcyTwoPTypeTag, Grid, Dune::YaspGrid<2>);
SET_BOOL_PROP(DarcyTwoPTypeTag, UseMoles, false);
SET_TYPE_PROP(DarcyTwoPTypeTag, SpatialParams, ConservationSpatialParams<TypeTag>);
SET_PROP(DarcyTwoPTypeTag, SpatialParams)
{
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using type = ConservationSpatialParams<FVGridGeometry, Scalar>;
};
//! Set the default formulation to pw-Sn: This can be over written in the problem.
SET_PROP(DarcyTwoPTypeTag, Formulation)
......
......@@ -39,20 +39,17 @@ namespace Dumux
* \brief The spatial parameters class for the test problem using the
* 1p cc model
*/
template<class TypeTag>
template<class FVGridGeometry, class Scalar>
class ConservationSpatialParams
: public FVSpatialParams<typename GET_PROP_TYPE(TypeTag, FVGridGeometry),
typename GET_PROP_TYPE(TypeTag, Scalar),
ConservationSpatialParams<TypeTag>>
: public FVSpatialParams<FVGridGeometry, Scalar,
ConservationSpatialParams<FVGridGeometry, Scalar>>
{
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 GridView = typename FVGridGeometry::GridView;
using Element = typename GridView::template Codim<0>::Entity;
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using FVElementGeometry = typename FVGridGeometry::LocalView;
using SubControlVolume = typename FVElementGeometry::SubControlVolume;
using ParentType = FVSpatialParams<FVGridGeometry, Scalar, ConservationSpatialParams<TypeTag>>;
using ThisType = ConservationSpatialParams<FVGridGeometry, Scalar>;
using ParentType = FVSpatialParams<FVGridGeometry, Scalar, ThisType>;
using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
using EffectiveLaw = RegularizedVanGenuchten<Scalar>;
......
......@@ -50,7 +50,12 @@ SET_TYPE_PROP(OnePBulk, Grid, Dune::ALUGrid<3, 3, Dune::simplex, Dune::nonconfor
// Set the problem type
SET_TYPE_PROP(OnePBulk, Problem, OnePBulkProblem<TypeTag>);
// set the spatial params
SET_TYPE_PROP(OnePBulk, SpatialParams, OnePSpatialParams<TypeTag>);
SET_PROP(OnePBulk, SpatialParams)
{
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using type = OnePSpatialParams<FVGridGeometry, Scalar>;
};
// the fluid system
SET_PROP(OnePBulk, FluidSystem)
......
......@@ -52,7 +52,12 @@ SET_TYPE_PROP(OnePEdge, Grid, Dune::FoamGrid<1, 3>);
// Set the problem type
SET_TYPE_PROP(OnePEdge, Problem, OnePEdgeProblem<TypeTag>);
// set the spatial params
SET_TYPE_PROP(OnePEdge, SpatialParams, OnePSpatialParams<TypeTag>);
SET_PROP(OnePEdge, SpatialParams)
{
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using type = OnePSpatialParams<FVGridGeometry, Scalar>;
};
// the fluid system
SET_PROP(OnePEdge, FluidSystem)
......
......@@ -51,7 +51,12 @@ SET_TYPE_PROP(OnePFacet, Grid, Dune::FoamGrid<2, 3>);
// Set the problem type
SET_TYPE_PROP(OnePFacet, Problem, OnePFacetProblem<TypeTag>);
// set the spatial params
SET_TYPE_PROP(OnePFacet, SpatialParams, OnePSpatialParams<TypeTag>);
SET_PROP(OnePFacet, SpatialParams)
{
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using type = OnePSpatialParams<FVGridGeometry, Scalar>;
};
// the fluid system
SET_PROP(OnePFacet, FluidSystem)
......
......@@ -32,19 +32,15 @@ namespace Dumux {
* \ingroup OnePTests
* \brief The spatial params the single-phase facet coupling test
*/
template<class TypeTag>
class OnePSpatialParams : public FVSpatialParamsOneP< typename GET_PROP_TYPE(TypeTag, FVGridGeometry),
typename GET_PROP_TYPE(TypeTag, Scalar),
OnePSpatialParams<TypeTag> >
template<class FVGridGeometry, class Scalar>
class OnePSpatialParams : public FVSpatialParamsOneP<FVGridGeometry, Scalar,
OnePSpatialParams<FVGridGeometry, Scalar>>
{
using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using GridView = typename FVGridGeometry::GridView;
using Element = typename GridView::template Codim<0>::Entity;
using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
using ThisType = OnePSpatialParams<TypeTag>;
using ThisType = OnePSpatialParams<FVGridGeometry, Scalar>;
using ParentType = FVSpatialParamsOneP<FVGridGeometry, Scalar, ThisType>;
public:
......
......@@ -67,7 +67,12 @@ SET_TYPE_PROP(OnePNIConductionTypeTag, FluidSystem,
FluidSystems::OnePLiquid<typename GET_PROP_TYPE(TypeTag, Scalar),
Components::H2O<typename GET_PROP_TYPE(TypeTag, Scalar)> >);
// Set the spatial parameters
SET_TYPE_PROP(OnePNIConductionTypeTag, SpatialParams, OnePNISpatialParams<TypeTag>);
SET_PROP(OnePNIConductionTypeTag, SpatialParams)
{
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using type = OnePNISpatialParams<FVGridGeometry, Scalar>;
};
}
......
......@@ -66,7 +66,12 @@ SET_TYPE_PROP(OnePNIConvectionTypeTag, FluidSystem,
Components::H2O<typename GET_PROP_TYPE(TypeTag, Scalar)> >);
// Set the spatial parameters
SET_TYPE_PROP(OnePNIConvectionTypeTag, SpatialParams, OnePNISpatialParams<TypeTag>);
SET_PROP(OnePNIConvectionTypeTag, SpatialParams)
{
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using type = OnePNISpatialParams<FVGridGeometry, Scalar>;
};
} // end namespace Properties
......
......@@ -33,16 +33,14 @@ namespace Dumux {
* \ingroup OnePTests
* \brief Definition of the spatial parameters for the 1pni problems.
*/
template<class TypeTag>
template<class FVGridGeometry, class Scalar>
class OnePNISpatialParams
: public FVSpatialParamsOneP<typename GET_PROP_TYPE(TypeTag, FVGridGeometry),
typename GET_PROP_TYPE(TypeTag, Scalar),
OnePNISpatialParams<TypeTag>>
: public FVSpatialParamsOneP<FVGridGeometry, Scalar,
OnePNISpatialParams<FVGridGeometry, Scalar>>
{
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using GridView = typename FVGridGeometry::GridView;
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using ParentType = FVSpatialParamsOneP<FVGridGeometry, Scalar, OnePNISpatialParams<TypeTag>>;
using ParentType = FVSpatialParamsOneP<FVGridGeometry, Scalar,
OnePNISpatialParams<FVGridGeometry, Scalar>>;
static const int dimWorld = GridView::dimensionworld;
using Element = typename GridView::template Codim<0>::Entity;
......
......@@ -59,7 +59,12 @@ SET_TYPE_PROP(OnePCompressible, Grid, Dune::YaspGrid<2>);
SET_TYPE_PROP(OnePCompressible, Problem, OnePTestProblem<TypeTag>);
// set the spatial params
SET_TYPE_PROP(OnePCompressible, SpatialParams, OnePTestSpatialParams<TypeTag>);
SET_PROP(OnePCompressible, SpatialParams)
{
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using type = OnePTestSpatialParams<FVGridGeometry, Scalar>;
};
// the fluid system
SET_PROP(OnePCompressible, FluidSystem)
......
......@@ -34,19 +34,17 @@ namespace Dumux {
* \brief The spatial parameters class for the test problem using the
* compressible 1p model
*/
template<class TypeTag>
template<class FVGridGeometry, class Scalar>
class OnePTestSpatialParams
: public FVSpatialParamsOneP<typename GET_PROP_TYPE(TypeTag, FVGridGeometry),
typename GET_PROP_TYPE(TypeTag, Scalar),
OnePTestSpatialParams<TypeTag>>
: public FVSpatialParamsOneP<FVGridGeometry, Scalar,
OnePTestSpatialParams<FVGridGeometry, Scalar>>
{
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using GridView = typename FVGridGeometry::GridView;
using Element = typename GridView::template Codim<0>::Entity;
using FVElementGeometry = typename FVGridGeometry::LocalView;
using SubControlVolume = typename FVElementGeometry::SubControlVolume;
using ParentType = FVSpatialParamsOneP<FVGridGeometry, Scalar, OnePTestSpatialParams<TypeTag>>;
using ParentType = FVSpatialParamsOneP<FVGridGeometry, Scalar,
OnePTestSpatialParams<FVGridGeometry, Scalar>>;
static constexpr int dimWorld = GridView::dimensionworld;
using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
......
......@@ -71,7 +71,12 @@ SET_PROP(FractureTypeTag, FluidSystem)
using type = FluidSystems::OnePLiquid<Scalar, Components::SimpleH2O<Scalar> >;
};
// Set the spatial parameters
SET_TYPE_PROP(FractureTypeTag, SpatialParams, FractureSpatialParams<TypeTag>);
SET_PROP(FractureTypeTag, SpatialParams)
{
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using type = FractureSpatialParams<FVGridGeometry, Scalar>;
};
} // end namespace Properties
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment