diff --git a/dumux/freeflow/navierstokes/problem.hh b/dumux/freeflow/navierstokes/problem.hh index 5046e29772b33e9dde05a0a845e0d314216b365d..b755600aaedf3bdd9ed0602400be27e91d13a5af 100644 --- a/dumux/freeflow/navierstokes/problem.hh +++ b/dumux/freeflow/navierstokes/problem.hh @@ -63,6 +63,10 @@ class NavierStokesProblem : public NavierStokesParentProblem<TypeTag> using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); + using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace); + using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector); + using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); + using Indices = typename GET_PROP_TYPE(TypeTag, Indices); enum { dim = Grid::dimension, @@ -113,6 +117,18 @@ public: const GlobalPosition &gravity() const { return gravity_; } + //! Applys the initial face solution. Specialization for staggered grid discretization. + template <class T = TypeTag> + typename std::enable_if<GET_PROP_VALUE(T, DiscretizationMethod) == DiscretizationMethods::Staggered, void>::type + applyInititalFaceSolution(SolutionVector& sol, + const SubControlVolumeFace& scvf, + const PrimaryVariables& initSol) const + { + typename GET_PROP(TypeTag, DofTypeIndices)::FaceIdx faceIdx; + const auto numEqCellCenter = GET_PROP_VALUE(TypeTag, NumEqCellCenter); + sol[faceIdx][scvf.dofIndex()][numEqCellCenter] = initSol[Indices::velocity(scvf.directionIndex())]; + } + // \} private: