version 3.11-dev
Loading...
Searching...
No Matches
pq1nonconforming/dofhelper.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3//
4// SPDX-FileCopyrightText: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
12#ifndef DUMUX_DISCRETIZATION_PQ1_NONCONFORMING_DOF_HELPER_HH
13#define DUMUX_DISCRETIZATION_PQ1_NONCONFORMING_DOF_HELPER_HH
14
15#include <ranges>
16
20
21namespace Dumux {
22
28template<class GridView>
30{
31 using LocalIndexType = typename IndexTraits<GridView>::SmallLocalIndex;
32 using GridIndexType = typename IndexTraits<GridView>::GridIndex;
33public:
38 template<class ElemDisc, class BoundaryFace>
39 static auto localDofsOnBoundaryFace(const ElemDisc& elemDisc, const BoundaryFace& boundaryFace)
40 {
41 const auto localDofIdx = boundaryFace.intersectionIndex();
42 return std::views::single(CVFE::LocalDof(
43 static_cast<LocalIndexType>(localDofIdx),
44 static_cast<GridIndexType>(elemDisc.gridDiscretization().dofMapper().subIndex(elemDisc.element(), localDofIdx, 1)),
45 static_cast<GridIndexType>(elemDisc.elementIndex())
46 ));
47 }
48};
49
50} // namespace Dumux
51
52#endif // DUMUX_DISCRETIZATION_PQ1_NONCONFORMING_DOF_HELPER_HH
A local degree of freedom from an element perspective.
Definition localdof.hh:27
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 nonconforming scheme....
Definition pq1nonconforming/dofhelper.hh:30
static auto localDofsOnBoundaryFace(const ElemDisc &elemDisc, const BoundaryFace &boundaryFace)
Iterator range over all local dofs on a given boundary face. For the PQ1 nonconforming scheme,...
Definition pq1nonconforming/dofhelper.hh:39
Default Dof helper for finite-element discretizations providing dof-related utility functions....
Defines the index types used for grid and local indices.
Class representing dofs on elements for control-volume finite element schemes.
Definition adapt.hh:17
typename GridView::IndexSet::IndexType GridIndex
Definition indextraits.hh:27
std::uint_least8_t SmallLocalIndex
Definition indextraits.hh:29