diff --git a/dumux/discretization/staggered/freeflow/facevariables.hh b/dumux/discretization/staggered/freeflow/facevariables.hh index b84abd27c42d494478df2c7a86fb5ad9d8f82809..470ce0365e70066683171985f368db8ab2a4ea70 100644 --- a/dumux/discretization/staggered/freeflow/facevariables.hh +++ b/dumux/discretization/staggered/freeflow/facevariables.hh @@ -24,8 +24,7 @@ #ifndef DUMUX_DISCRETIZATION_STAGGERED_FREEFLOW_FACEVARIABLES_HH #define DUMUX_DISCRETIZATION_STAGGERED_FREEFLOW_FACEVARIABLES_HH -#include <dune/common/fvector.hh> -#include <dumux/common/properties.hh> +#include <array> namespace Dumux { @@ -35,27 +34,14 @@ namespace Dumux * \brief The face variables class for free flow staggered grid models. * Contains all relevant velocities for the assembly of the momentum balance. */ -template<class TypeTag> +template<class FacePrimaryVariables, int dim> class StaggeredFaceVariables { - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using FacePrimaryVariables = typename GET_PROP_TYPE(TypeTag, FacePrimaryVariables); - using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView; - using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace; - using Indices = typename GET_PROP_TYPE(TypeTag, Indices); - - static constexpr int dimWorld = GridView::dimensionworld; - static constexpr int numPairs = (dimWorld == 2) ? 2 : 4; - - using Element = typename GridView::template Codim<0>::Entity; - - using DofTypeIndices = typename GET_PROP(TypeTag, DofTypeIndices); - typename DofTypeIndices::CellCenterIdx cellCenterIdx; - typename DofTypeIndices::FaceIdx faceIdx; + static constexpr int numPairs = (dim == 2) ? 2 : 4; + using Scalar = typename FacePrimaryVariables::block_type; public: - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + /*! * \brief Partial update of the face variables. Only the face itself is considered. * @@ -76,7 +62,8 @@ public: * \param fvGeometry The finite-volume geometry * \param scvf The sub-control volume face of interest */ - template<class SolVector> + template<class SolVector, class Problem, class Element, + class FVElementGeometry, class SubControlVolumeFace> void update(const SolVector& faceSol, const Problem& problem, const Element& element, diff --git a/dumux/discretization/staggered/freeflow/properties.hh b/dumux/discretization/staggered/freeflow/properties.hh index f93ed8221e56d43c556e9239ecc66d63f8d4b82a..3916d6576c402335370e50bb34b30d24b0ddf235 100644 --- a/dumux/discretization/staggered/freeflow/properties.hh +++ b/dumux/discretization/staggered/freeflow/properties.hh @@ -106,7 +106,14 @@ public: }; //! The variables living on the faces -SET_TYPE_PROP(StaggeredFreeFlowModel, FaceVariables, StaggeredFaceVariables<TypeTag>); +SET_PROP(StaggeredFreeFlowModel, FaceVariables) +{ +private: + using FacePrimaryVariables = typename GET_PROP_TYPE(TypeTag, FacePrimaryVariables); + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); +public: + using type = StaggeredFaceVariables<FacePrimaryVariables, GridView::dimension>; +}; //! Boundary types at a single degree of freedom SET_PROP(StaggeredFreeFlowModel, BoundaryTypes)