diff --git a/dumux/discretization/staggered/globalfacevariables.hh b/dumux/discretization/staggered/globalfacevariables.hh index 17bd954852deecd0fdb22eb67f7b542852ee1290..58a892ad21fefc782c8d8f2be92a01a0a77312d7 100644 --- a/dumux/discretization/staggered/globalfacevariables.hh +++ b/dumux/discretization/staggered/globalfacevariables.hh @@ -50,6 +50,21 @@ private: }; + + +template<class TypeTag> +class StaggeredModel; + +template<class TypeTag> +class StaggeredGlobalFaceVariables; + + +namespace Properties +{ +SET_TYPE_PROP(StaggeredModel, FaceVars, Dumux::StaggeredFaceVariables<TypeTag>); +SET_TYPE_PROP(StaggeredModel, GlobalFaceVars, Dumux::StaggeredGlobalFaceVariables<TypeTag>); +} + template<class TypeTag> class StaggeredGlobalFaceVariables { @@ -57,7 +72,7 @@ class StaggeredGlobalFaceVariables using Problem = typename GET_PROP_TYPE(TypeTag, Problem); using GridView = typename GET_PROP_TYPE(TypeTag, GridView); using FaceSolutionVector = typename GET_PROP_TYPE(TypeTag, FaceSolutionVector); - using FaceVariables = Dumux::StaggeredFaceVariables<TypeTag>; + using FaceVariables = typename GET_PROP_TYPE(TypeTag, FaceVars); using IndexType = typename GridView::IndexSet::IndexType; public: @@ -74,10 +89,10 @@ public: } } - const Scalar faceVars(const IndexType facetIdx) const + const FaceVariables& faceVars(const IndexType facetIdx) const { return faceVariables_[facetIdx]; } - Scalar& faceVars(const IndexType facetIdx) + FaceVariables& faceVars(const IndexType facetIdx) { return faceVariables_[facetIdx]; } private: const Problem& problem_() const diff --git a/dumux/implicit/staggered/properties.hh b/dumux/implicit/staggered/properties.hh index 7710767b869fda0653a36fe0eebc48b25a198a26..bc50802201f03c4934db60cf5715f3a7bbb69ed5 100644 --- a/dumux/implicit/staggered/properties.hh +++ b/dumux/implicit/staggered/properties.hh @@ -53,6 +53,8 @@ NEW_PROP_TAG(NumEqCellCenter); //!< Number of equations per cell center dof NEW_PROP_TAG(NumEqFace); //!< Number of equations per face dof NEW_PROP_TAG(DofTypeIndices); //!< Indices to choose between cell center and face dofs +NEW_PROP_TAG(FaceVars); //!< Variables associated to facets (equivalent to volVars) +NEW_PROP_TAG(GlobalFaceVars); //!< Global vector of facet variables } }