Skip to content
Snippets Groups Projects
Commit 47e95170 authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

[rans] Clean-up problems

parent 64c7845e
1 merge request!1165[rans][problem] Make ctor accept modelParamGroup
......@@ -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:
......
......@@ -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];
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment