Skip to content
Snippets Groups Projects
Commit 203acadc authored by Kilian Weishaupt's avatar Kilian Weishaupt Committed by Timo Koch
Browse files

[staggeredGrid] Add property for faceVariables and return faceVars instead of Scalar

parent 3fb8f0df
No related branches found
No related tags found
2 merge requests!617[WIP] Next,!370Feature/staggered grid
......@@ -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
......
......@@ -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
}
}
......
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