From 784bd27bee2159765f4ac5dfd06075807d48b63c Mon Sep 17 00:00:00 2001 From: Kilian <kilian.weishaupt@iws.uni-stuttgart.de> Date: Fri, 5 Jun 2020 08:43:38 +0200 Subject: [PATCH] [test][navierstokes] Use BoundaryTypes directly --- test/freeflow/navierstokes/angeli/problem.hh | 13 ++++++++----- test/freeflow/navierstokes/channel/1d/problem.hh | 12 +++++++----- test/freeflow/navierstokes/channel/2d/problem.hh | 14 ++++++++------ test/freeflow/navierstokes/channel/3d/problem.hh | 16 +++++++++------- .../navierstokes/channel/pipe/problem.hh | 3 ++- .../navierstokes/closedsystem/problem.hh | 14 +++++++++----- test/freeflow/navierstokes/donea/problem.hh | 14 ++++++++------ test/freeflow/navierstokes/kovasznay/problem.hh | 11 +++++++---- test/freeflow/navierstokes/sincos/problem.hh | 13 ++++++++----- 9 files changed, 66 insertions(+), 44 deletions(-) diff --git a/test/freeflow/navierstokes/angeli/problem.hh b/test/freeflow/navierstokes/angeli/problem.hh index e5c65158e7..70435a0e39 100644 --- a/test/freeflow/navierstokes/angeli/problem.hh +++ b/test/freeflow/navierstokes/angeli/problem.hh @@ -28,12 +28,15 @@ #include <dune/grid/yaspgrid.hh> -#include <dumux/material/fluidsystems/1pliquid.hh> -#include <dumux/material/components/constant.hh> - -#include <dumux/freeflow/navierstokes/problem.hh> #include <dumux/discretization/staggered/freeflow/properties.hh> + +#include <dumux/freeflow/navierstokes/boundarytypes.hh> #include <dumux/freeflow/navierstokes/model.hh> +#include <dumux/freeflow/navierstokes/problem.hh> + +#include <dumux/material/components/constant.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> + #include "../l2error.hh" namespace Dumux { @@ -87,7 +90,7 @@ class AngeliTestProblem : public NavierStokesProblem<TypeTag> { using ParentType = NavierStokesProblem<TypeTag>; - using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using BoundaryTypes = Dumux::NavierStokesBoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>; using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; using ModelTraits = GetPropType<TypeTag, Properties::ModelTraits>; using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>; diff --git a/test/freeflow/navierstokes/channel/1d/problem.hh b/test/freeflow/navierstokes/channel/1d/problem.hh index bbb65649c8..c8e10dfe6f 100644 --- a/test/freeflow/navierstokes/channel/1d/problem.hh +++ b/test/freeflow/navierstokes/channel/1d/problem.hh @@ -29,14 +29,16 @@ #include <dune/common/fmatrix.hh> #include <dune/grid/yaspgrid.hh> -#include <dumux/material/components/constant.hh> -#include <dumux/material/fluidsystems/1pliquid.hh> - #include <dumux/discretization/staggered/freeflow/properties.hh> + +#include <dumux/freeflow/navierstokes/boundarytypes.hh> #include <dumux/freeflow/navierstokes/model.hh> #include <dumux/freeflow/navierstokes/problem.hh> -#include "../../l2error.hh" +#include <dumux/material/components/constant.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> + +#include "../../l2error.hh" namespace Dumux { template <class TypeTag> @@ -89,7 +91,7 @@ class NavierStokesAnalyticProblem : public NavierStokesProblem<TypeTag> { using ParentType = NavierStokesProblem<TypeTag>; - using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using BoundaryTypes = Dumux::NavierStokesBoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>; using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>; diff --git a/test/freeflow/navierstokes/channel/2d/problem.hh b/test/freeflow/navierstokes/channel/2d/problem.hh index 344a0526a5..7ca0092e9a 100644 --- a/test/freeflow/navierstokes/channel/2d/problem.hh +++ b/test/freeflow/navierstokes/channel/2d/problem.hh @@ -27,13 +27,15 @@ #include <dune/grid/yaspgrid.hh> -#include <dumux/material/fluidsystems/1pliquid.hh> -#include <dumux/material/components/simpleh2o.hh> -#include <dumux/material/components/constant.hh> - -#include <dumux/freeflow/navierstokes/problem.hh> #include <dumux/discretization/staggered/freeflow/properties.hh> + +#include <dumux/freeflow/navierstokes/boundarytypes.hh> #include <dumux/freeflow/navierstokes/model.hh> +#include <dumux/freeflow/navierstokes/problem.hh> + +#include <dumux/material/fluidsystems/1pliquid.hh> +#include <dumux/material/components/constant.hh> +#include <dumux/material/components/simpleh2o.hh> namespace Dumux { template <class TypeTag> @@ -94,7 +96,7 @@ class ChannelTestProblem : public NavierStokesProblem<TypeTag> { using ParentType = NavierStokesProblem<TypeTag>; - using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using BoundaryTypes = Dumux::NavierStokesBoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>; using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; using FVElementGeometry = typename GridGeometry::LocalView; using SubControlVolumeFace = typename GridGeometry::SubControlVolumeFace; diff --git a/test/freeflow/navierstokes/channel/3d/problem.hh b/test/freeflow/navierstokes/channel/3d/problem.hh index 6bee7e9f13..243804b332 100644 --- a/test/freeflow/navierstokes/channel/3d/problem.hh +++ b/test/freeflow/navierstokes/channel/3d/problem.hh @@ -28,15 +28,17 @@ #ifndef DUMUX_3D_CHANNEL_PROBLEM_HH #define DUMUX_3D_CHANNEL_PROBLEM_HH +#include <dune/common/float_cmp.hh> #include <dune/grid/yaspgrid.hh> -#include <dumux/material/fluidsystems/1pliquid.hh> -#include <dumux/material/components/constant.hh> - -#include <dumux/freeflow/navierstokes/problem.hh> #include <dumux/discretization/staggered/freeflow/properties.hh> + +#include <dumux/freeflow/navierstokes/boundarytypes.hh> #include <dumux/freeflow/navierstokes/model.hh> -#include <dune/common/float_cmp.hh> +#include <dumux/freeflow/navierstokes/problem.hh> + +#include <dumux/material/components/constant.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #ifndef DIM_3D #define DIM_3D 0 @@ -102,7 +104,7 @@ class ThreeDChannelTestProblem : public NavierStokesProblem<TypeTag> using Scalar = GetPropType<TypeTag, Properties::Scalar>; using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using BoundaryTypes = Dumux::NavierStokesBoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>; using Element = typename GridView::template Codim<0>::Entity; using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; @@ -112,7 +114,7 @@ class ThreeDChannelTestProblem : public NavierStokesProblem<TypeTag> static constexpr int dim = GridView::dimension; static constexpr int dimWorld = GridView::dimensionworld; - using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; + using GlobalPosition = typename Element::Geometry::GlobalCoordinate; using CellCenterPrimaryVariables = GetPropType<TypeTag, Properties::CellCenterPrimaryVariables>; using FacePrimaryVariables = GetPropType<TypeTag, Properties::FacePrimaryVariables>; diff --git a/test/freeflow/navierstokes/channel/pipe/problem.hh b/test/freeflow/navierstokes/channel/pipe/problem.hh index fb7722d98b..02b1992b9c 100644 --- a/test/freeflow/navierstokes/channel/pipe/problem.hh +++ b/test/freeflow/navierstokes/channel/pipe/problem.hh @@ -23,6 +23,7 @@ #include <dumux/common/properties.hh> #include <dumux/common/parameters.hh> #include <dumux/freeflow/navierstokes/problem.hh> +#include <dumux/freeflow/navierstokes/boundarytypes.hh> namespace Dumux { @@ -38,11 +39,11 @@ class FreeFlowPipeProblem : public NavierStokesProblem<TypeTag> using GridView = typename GridGeometry::GridView; using Scalar = GetPropType<TypeTag, Properties::Scalar>; using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; using SubControlVolumeFace = typename GridGeometry::SubControlVolumeFace; using Element = typename GridView::template Codim<0>::Entity; using GlobalPosition = typename Element::Geometry::GlobalCoordinate; using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>; + using BoundaryTypes = NavierStokesBoundaryTypes<PrimaryVariables::size()>; public: FreeFlowPipeProblem(std::shared_ptr<const GridGeometry> gridGeometry) diff --git a/test/freeflow/navierstokes/closedsystem/problem.hh b/test/freeflow/navierstokes/closedsystem/problem.hh index c340a64120..c470cfa91e 100644 --- a/test/freeflow/navierstokes/closedsystem/problem.hh +++ b/test/freeflow/navierstokes/closedsystem/problem.hh @@ -27,12 +27,16 @@ #include <dune/grid/yaspgrid.hh> -#include <dumux/material/fluidsystems/1pliquid.hh> -#include <dumux/material/components/constant.hh> - -#include <dumux/freeflow/navierstokes/problem.hh> #include <dumux/discretization/staggered/freeflow/properties.hh> + +#include <dumux/freeflow/navierstokes/boundarytypes.hh> #include <dumux/freeflow/navierstokes/model.hh> +#include <dumux/freeflow/navierstokes/problem.hh> + +#include <dumux/material/components/constant.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> + +#include "../l2error.hh" namespace Dumux { template <class TypeTag> @@ -83,7 +87,7 @@ class ClosedSystemTestProblem : public NavierStokesProblem<TypeTag> { using ParentType = NavierStokesProblem<TypeTag>; - using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using BoundaryTypes = Dumux::NavierStokesBoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>; using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; using FVElementGeometry = typename GridGeometry::LocalView; using SubControlVolume = typename GridGeometry::SubControlVolume; diff --git a/test/freeflow/navierstokes/donea/problem.hh b/test/freeflow/navierstokes/donea/problem.hh index 65d5ed9603..4a1c69a90a 100644 --- a/test/freeflow/navierstokes/donea/problem.hh +++ b/test/freeflow/navierstokes/donea/problem.hh @@ -30,14 +30,16 @@ #include <dune/grid/yaspgrid.hh> -#include <dumux/material/fluidsystems/1pliquid.hh> -#include <dumux/material/components/constant.hh> - -#include <dumux/freeflow/navierstokes/problem.hh> #include <dumux/discretization/staggered/freeflow/properties.hh> + +#include <dumux/freeflow/navierstokes/boundarytypes.hh> #include <dumux/freeflow/navierstokes/model.hh> -#include "../l2error.hh" +#include <dumux/freeflow/navierstokes/problem.hh> +#include <dumux/material/components/constant.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> + +#include "../l2error.hh" namespace Dumux { @@ -90,7 +92,7 @@ class DoneaTestProblem : public NavierStokesProblem<TypeTag> { using ParentType = NavierStokesProblem<TypeTag>; - using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using BoundaryTypes = Dumux::NavierStokesBoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>; using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>; diff --git a/test/freeflow/navierstokes/kovasznay/problem.hh b/test/freeflow/navierstokes/kovasznay/problem.hh index 348afbc53d..cf632fde7f 100644 --- a/test/freeflow/navierstokes/kovasznay/problem.hh +++ b/test/freeflow/navierstokes/kovasznay/problem.hh @@ -31,12 +31,15 @@ #include <dune/grid/yaspgrid.hh> +#include <dumux/discretization/staggered/freeflow/properties.hh> + +#include <dumux/freeflow/navierstokes/boundarytypes.hh> +#include <dumux/freeflow/navierstokes/model.hh> +#include <dumux/freeflow/navierstokes/problem.hh> + #include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/material/components/constant.hh> -#include <dumux/freeflow/navierstokes/problem.hh> -#include <dumux/discretization/staggered/freeflow/properties.hh> -#include <dumux/freeflow/navierstokes/model.hh> #include "../l2error.hh" namespace Dumux { @@ -90,7 +93,7 @@ class KovasznayTestProblem : public NavierStokesProblem<TypeTag> { using ParentType = NavierStokesProblem<TypeTag>; - using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using BoundaryTypes = Dumux::NavierStokesBoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>; using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; using FVElementGeometry = typename GridGeometry::LocalView; using SubControlVolume = typename GridGeometry::SubControlVolume; diff --git a/test/freeflow/navierstokes/sincos/problem.hh b/test/freeflow/navierstokes/sincos/problem.hh index f528eb40c0..619c4095aa 100644 --- a/test/freeflow/navierstokes/sincos/problem.hh +++ b/test/freeflow/navierstokes/sincos/problem.hh @@ -27,12 +27,15 @@ #include <dune/grid/yaspgrid.hh> -#include <dumux/material/fluidsystems/1pliquid.hh> -#include <dumux/material/components/constant.hh> - -#include <dumux/freeflow/navierstokes/problem.hh> #include <dumux/discretization/staggered/freeflow/properties.hh> + +#include <dumux/freeflow/navierstokes/boundarytypes.hh> #include <dumux/freeflow/navierstokes/model.hh> +#include <dumux/freeflow/navierstokes/problem.hh> + +#include <dumux/material/components/constant.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> + #include "../l2error.hh" namespace Dumux { @@ -85,7 +88,7 @@ class SincosTestProblem : public NavierStokesProblem<TypeTag> { using ParentType = NavierStokesProblem<TypeTag>; - using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; + using BoundaryTypes = Dumux::NavierStokesBoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>; using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>; using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>; -- GitLab