12#ifndef DUMUX_DISCRETIZATION_PQ1_LAGRANGE_DOF_HELPER_HH
13#define DUMUX_DISCRETIZATION_PQ1_LAGRANGE_DOF_HELPER_HH
15#include <dune/common/rangeutilities.hh>
16#include <dune/geometry/type.hh>
17#include <dune/geometry/referenceelements.hh>
31template<
class Gr
idView>
34 using Scalar =
typename GridView::ctype;
38 static constexpr auto dim = GridView::dimension;
43 return Dune::referenceElement<Scalar, dim>(type).size(iIdx, 1, dim);
49 return Dune::referenceElement<Scalar, dim>(type).subEntity(iIdx, 1, localDofIdx, dim);
56 template<
class ElemDisc,
class BoundaryFace>
59 return Dune::transformedRangeView(
62 auto localDofIdx = localDofIndexIntersection(elemDisc.element().type(), boundaryFace.intersectionIndex(), i);
63 return CVFE::LocalDof(
64 static_cast<LocalIndexType>(localDofIdx),
65 static_cast<GridIndexType>(Dumux::Experimental::FEDofHelper<GridView>::dofIndex(
66 gridDiscretization(elemDisc).dofMapper(),
68 elemDisc.feLocalCoefficients().localKey(localDofIdx))),
69 static_cast<GridIndexType>(elemDisc.elementIndex())
Default Dof helper for finite-element discretizations providing dof-related utility functions....
Definition fedofhelper.hh:34
Helper class providing degree of freedom information for the PQ1 Lagrange basis. The pq1 basis uses v...
Definition pq1/dofhelper.hh:33
static auto localDofIndexIntersection(Dune::GeometryType type, unsigned int iIdx, unsigned int localDofIdx)
Local dof index of the localDofIdx-th dof on intersection with index iIdx.
Definition pq1/dofhelper.hh:47
static auto localDofsOnBoundaryFace(const ElemDisc &elemDisc, const BoundaryFace &boundaryFace)
Iterator range over all local dofs on a given boundary face. Overrides the less efficient default imp...
Definition pq1/dofhelper.hh:57
static auto numLocalDofsIntersection(Dune::GeometryType type, unsigned int iIdx)
Number of local dofs related to an intersection with index iIdx (vertex dofs only).
Definition pq1/dofhelper.hh:41
Default Dof helper for finite-element discretizations providing dof-related utility functions....
Type traits for classes providing a grid discretization.
Class representing dofs on elements for control-volume finite element schemes.
typename GridView::IndexSet::IndexType GridIndex
Definition indextraits.hh:27
unsigned int LocalIndex
Definition indextraits.hh:28