diff --git a/dumux/freeflow/rans/problem.hh b/dumux/freeflow/rans/problem.hh index a886af7141d6ae9365f823e43ff94152137332a4..468194bb86845e5657616efdba90aa13eca3dcde 100644 --- a/dumux/freeflow/rans/problem.hh +++ b/dumux/freeflow/rans/problem.hh @@ -24,6 +24,7 @@ #ifndef DUMUX_RANS_PROBLEM_HH #define DUMUX_RANS_PROBLEM_HH +#include <dune/common/fmatrix.hh> #include <dumux/common/properties.hh> #include <dumux/common/staggeredfvproblem.hh> #include <dumux/discretization/localview.hh> @@ -49,24 +50,22 @@ class RANSProblem : public NavierStokesProblem<TypeTag> using ParentType = NavierStokesProblem<TypeTag>; using Implementation = typename GET_PROP_TYPE(TypeTag, Problem); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Grid = typename GridView::Grid; using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); - using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView; + using FVElementGeometry = typename FVGridGeometry::LocalView; + using GridView = typename FVGridGeometry::GridView; using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace; using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables); using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector); - using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); + using PrimaryVariables = typename VolumeVariables::PrimaryVariables; using CellCenterPrimaryVariables = typename GET_PROP_TYPE(TypeTag, CellCenterPrimaryVariables); using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; - enum { - dim = Grid::dimension, - }; using GlobalPosition = typename SubControlVolumeFace::GlobalPosition; - using DimVector = Dune::FieldVector<Scalar, dim>; + + static constexpr auto dim = GridView::dimension; + using DimVector = GlobalPosition; using DimMatrix = Dune::FieldMatrix<Scalar, dim, dim>; public: diff --git a/dumux/freeflow/rans/twoeq/komega/problem.hh b/dumux/freeflow/rans/twoeq/komega/problem.hh index 33f41525f0b16bc5a68941c26331892503346997..a4ee39561e6793931e99417861f72b8fede6260e 100644 --- a/dumux/freeflow/rans/twoeq/komega/problem.hh +++ b/dumux/freeflow/rans/twoeq/komega/problem.hh @@ -52,7 +52,6 @@ class KOmegaProblem : public RANSProblem<TypeTag> using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView; - using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace; using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables); using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector); @@ -60,14 +59,8 @@ class KOmegaProblem : public RANSProblem<TypeTag> using CellCenterPrimaryVariables = typename GET_PROP_TYPE(TypeTag, CellCenterPrimaryVariables); using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Grid = typename GridView::Grid; - enum { - dim = Grid::dimension, - }; - using GlobalPosition = Dune::FieldVector<Scalar, dim>; - using DimVector = Dune::FieldVector<Scalar, dim>; - using DimMatrix = Dune::FieldMatrix<Scalar, dim, dim>; + using Element = typename FVGridGeometry::GridView::template Codim<0>::Entity; + using DimVector = typename Element::Geometry::GlobalCoordinate; public: KOmegaProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry, const std::string& paramGroup = "") @@ -127,7 +120,7 @@ public: { unsigned int elementIdx = this->fvGridGeometry().elementMapper().index(element); - for (unsigned int dimIdx = 0; dimIdx < dim; ++dimIdx) + for (unsigned int dimIdx = 0; dimIdx < DimVector::dimension; ++dimIdx) { unsigned backwardNeighbor = ParentType::neighborIdx_[elementIdx][dimIdx][0]; unsigned forwardNeighbor = ParentType::neighborIdx_[elementIdx][dimIdx][1]; diff --git a/dumux/freeflow/rans/twoeq/lowrekepsilon/problem.hh b/dumux/freeflow/rans/twoeq/lowrekepsilon/problem.hh index 1b420db7aa040d2e0e17d114b6a08f6b8563b6c3..34d30266e6ad82f903ba145fa269c0623d1eb041 100644 --- a/dumux/freeflow/rans/twoeq/lowrekepsilon/problem.hh +++ b/dumux/freeflow/rans/twoeq/lowrekepsilon/problem.hh @@ -52,7 +52,6 @@ class LowReKEpsilonProblem : public RANSProblem<TypeTag> using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView; - using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace; using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables); using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);