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>
34template <
class Gr
idView, std::
size_t numCubeBubbleDofs>
37 using Scalar =
typename GridView::ctype;
41 using Element =
typename GridView::template Codim<0>::Entity;
43 static constexpr auto dim = GridView::dimension;
50 const auto numVertexDofs = Dune::referenceElement<Scalar, dim>(type).size(dim);
51 return numVertexDofs + (type.isCube() ? numCubeBubbleDofs : 1);
57 return Dune::referenceElement<Scalar, dim>(type).size(iIdx, 1, dim);
63 return Dune::referenceElement<Scalar, dim>(type).subEntity(iIdx, 1, ilocalDofIdx, dim);
70 template<
class ElemDisc,
class BoundaryFace>
73 const auto& gridDiscretization = Deprecated::gridGeometry(elemDisc);
74 return Dune::transformedRangeView(
77 auto localDofIdx = localDofIndexIntersection(elemDisc.element().type(), boundaryFace.intersectionIndex(), i);
78 return CVFE::LocalDof(
79 static_cast<LocalIndexType>(localDofIdx),
80 static_cast<GridIndexType>(Dumux::Experimental::FEDofHelper<GridView>::dofIndex(
81 gridDiscretization.dofMapper(),
83 elemDisc.feLocalCoefficients().localKey(localDofIdx))),
84 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:36
static auto numLocalDofsIntersection(Dune::GeometryType type, unsigned int iIdx)
Number of local dofs related to an intersection with index iIdx.
Definition pq1bubble/dofhelper.hh:55
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:71
static std::size_t numElementDofs(Dune::GeometryType type)
number of element dofs
Definition pq1bubble/dofhelper.hh:48
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:61
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