12#ifndef DUMUX_CVFE_LOCAL_DOF_HH
13#define DUMUX_CVFE_LOCAL_DOF_HH
25template<
class LocalIndex,
class Gr
idIndex>
34 LocalIndex
index()
const {
return index_; }
35 GridIndex
dofIndex()
const {
return dofIndex_; }
49template<
class FVElementGeometry>
50inline auto localDofs(
const FVElementGeometry& fvGeometry)
55 return std::views::iota(0u, fvGeometry.numScv())
58 static_cast<LocalIndexType
>(i),
59 static_cast<GridIndexType
>(fvGeometry.scv(i).dofIndex()),
60 static_cast<GridIndexType
>(fvGeometry.scv(i).elementIndex())
66template<
class FVElementGeometry>
77template<
class FVElementGeometry,
class LocalDof>
78inline std::ranges::range
auto
79scvs(
const FVElementGeometry& fvGeometry,
const LocalDof& localDof)
81 assert(fvGeometry.numScv() > localDof.index());
82 return std::views::single(1) | std::views::transform(
83 [&](
const auto i) ->
const typename FVElementGeometry::SubControlVolume& {
return fvGeometry.scv(localDof.index()); }
A local degree of freedom from an element perspective.
Definition: localdof.hh:27
GridIndex GridIndexType
Definition: localdof.hh:30
GridIndex dofIndex() const
Definition: localdof.hh:35
LocalIndex index() const
Definition: localdof.hh:34
GridIndex elementIndex() const
Definition: localdof.hh:36
LocalDof(LocalIndex index, GridIndex dofIndex, GridIndex eIdx)
Definition: localdof.hh:32
LocalIndex LocalIndexType
Definition: localdof.hh:29
Definition: cvfe/interpolationpointdata.hh:17
auto cvLocalDofs(const FVElementGeometry &fvGeometry)
range over control-volume local dofs
Definition: localdof.hh:67
std::ranges::range auto scvs(const FVElementGeometry &fvGeometry, const LocalDof &localDof)
Definition: localdof.hh:79
auto localDofs(const FVElementGeometry &fvGeometry)
range over local dofs
Definition: localdof.hh:50
typename GridView::IndexSet::IndexType GridIndex
Definition: indextraits.hh:27
unsigned int LocalIndex
Definition: indextraits.hh:28