12#ifndef DUMUX_DISCRETIZATION_PQ1BUBBLE_DOF_HELPER_HH
13#define DUMUX_DISCRETIZATION_PQ1BUBBLE_DOF_HELPER_HH
17#include <dune/common/rangeutilities.hh>
18#include <dune/geometry/type.hh>
19#include <dune/geometry/referenceelements.hh>
33template <
class Gr
idView, std::
size_t numCubeBubbleDofs>
36 using Scalar =
typename GridView::ctype;
40 using Element =
typename GridView::template Codim<0>::Entity;
42 static constexpr auto dim = GridView::dimension;
49 const auto numVertexDofs = Dune::referenceElement<Scalar, dim>(type).size(dim);
50 return numVertexDofs + (type.isCube() ? numCubeBubbleDofs : 1);
56 return Dune::referenceElement<Scalar, dim>(type).size(iIdx, 1, dim);
62 return Dune::referenceElement<Scalar, dim>(type).subEntity(iIdx, 1, ilocalDofIdx, dim);
69 template<
class ElemDisc,
class BoundaryFace>
72 return Dune::transformedRangeView(
75 auto localDofIdx = localDofIndexIntersection(elemDisc.element().type(), boundaryFace.intersectionIndex(), i);
76 return CVFE::LocalDof(
77 static_cast<LocalIndexType>(localDofIdx),
78 static_cast<GridIndexType>(Dumux::Experimental::FEDofHelper<GridView>::dofIndex(
79 elemDisc.gridGeometry().dofMapper(),
81 elemDisc.feLocalCoefficients().localKey(localDofIdx))),
82 static_cast<GridIndexType>(elemDisc.elementIndex())
Default Dof helper for finite-element discretizations providing dof-related utility functions....
Definition fedofhelper.hh:34
Dof helper for the PQ1Bubble method, providing the number of dofs and their positions.
Definition pq1bubble/dofhelper.hh:35
static auto numLocalDofsIntersection(Dune::GeometryType type, unsigned int iIdx)
Number of local dofs related to an intersection with index iIdx.
Definition pq1bubble/dofhelper.hh:54
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 pq1bubble/dofhelper.hh:70
static std::size_t numElementDofs(Dune::GeometryType type)
number of element dofs
Definition pq1bubble/dofhelper.hh:47
static auto localDofIndexIntersection(Dune::GeometryType type, unsigned int iIdx, unsigned int ilocalDofIdx)
Local dof index related to a localDof, with index ilocalDofIdx, on an intersection with index iIdx.
Definition pq1bubble/dofhelper.hh:60
Default Dof helper for finite-element discretizations providing dof-related utility functions....
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