Skip to content
Snippets Groups Projects
Commit 91ea9d10 authored by Kilian Weishaupt's avatar Kilian Weishaupt Committed by Dennis Gläser
Browse files

[staggered][freeflow] Remove TypeTag from FaceVariables

parent 475041b2
No related branches found
No related tags found
1 merge request!878Free grid/element/face volvars/fluxvarcache from typetag
......@@ -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,
......
......@@ -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)
......
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