3#ifndef DUNE_FUNCTIONS_FUNCTIONSPACEBASES_BOUNDARYDOFS_HH
4#define DUNE_FUNCTIONS_FUNCTIONSPACEBASES_BOUNDARYDOFS_HH
34template<
class Basis,
class F,
38 auto localView = basis.localView();
40 const auto& gridView = basis.gridView();
41 for(
auto&& element : elements(gridView))
42 if (element.hasBoundaryIntersections())
44 localView.bind(element);
45 for(
const auto& intersection: intersections(gridView, element))
46 if (intersection.boundary())
47 for(
auto localIndex: seDOFs.bind(localView,intersection))
48 f(localIndex, localView, intersection);
71template<
class Basis,
class F,
75 auto localView = basis.localView();
77 const auto& gridView = basis.gridView();
78 for(
auto&& element : elements(gridView))
79 if (element.hasBoundaryIntersections())
81 localView.bind(element);
82 for(
const auto& intersection: intersections(gridView, element))
83 if (intersection.boundary())
84 for(auto localIndex: seDOFs.bind(localView,intersection))
85 f(localIndex, localView);
107template<
class Basis,
class F,
111 auto localView = basis.localView();
113 const auto& gridView = basis.gridView();
114 for(
auto&& element :
elements(gridView))
115 if (element.hasBoundaryIntersections())
117 localView.bind(element);
118 for(
const auto& intersection:
intersections(gridView, element))
119 if (intersection.boundary())
120 for(auto localIndex: seDOFs.
bind(localView,intersection))
121 f(localView.
index(localIndex));
void forEachBoundaryDOF(const Basis &basis, F &&f)
Loop over all DOFs on the boundary.
Definition boundarydofs.hh:36
auto subEntityDOFs(const T &t)
Create SubEntityDOFs object.
Definition subentitydofs.hh:160
std::ptrdiff_t index() const
IteratorRange<... > intersections(const GV &gv, const Entity &e)
IteratorRange<... > elements(const GV &gv)