7#ifndef DUNE_FUNCTIONS_FUNCTIONSPACEBASES_BOUNDARYDOFS_HH
8#define DUNE_FUNCTIONS_FUNCTIONSPACEBASES_BOUNDARYDOFS_HH
12#include <dune/functions/functionspacebases/subentitydofs.hh>
38template<
class Basis,
class F,
39 decltype(std::declval<std::decay_t<F>>()(0, std::declval<typename Basis::LocalView>(),std::declval<typename Basis::GridView::Intersection>()), 0) = 0>
42 auto localView = basis.localView();
44 const auto& gridView = basis.gridView();
45 for(
auto&& element : elements(gridView))
46 if (element.hasBoundaryIntersections())
48 localView.bind(element);
49 for(
const auto& intersection: intersections(gridView, element))
50 if (intersection.boundary())
51 for(
auto localIndex: seDOFs.bind(localView,intersection))
52 f(localIndex, localView, intersection);
75template<
class Basis,
class F,
76 decltype(std::declval<std::decay_t<F>>()(0, std::declval<typename Basis::LocalView>()),0) = 0>
79 auto localView = basis.localView();
81 const auto& gridView = basis.gridView();
82 for(
auto&& element : elements(gridView))
83 if (element.hasBoundaryIntersections())
85 localView.bind(element);
86 for(
const auto& intersection: intersections(gridView, element))
87 if (intersection.boundary())
88 for(
auto localIndex: seDOFs.bind(localView,intersection))
89 f(localIndex, localView);
111template<
class Basis,
class F,
112 decltype(std::declval<std::decay_t<F>>()(std::declval<typename Basis::MultiIndex>()),0) = 0>
115 auto localView = basis.localView();
117 const auto& gridView = basis.gridView();
118 for(
auto&& element : elements(gridView))
119 if (element.hasBoundaryIntersections())
121 localView.bind(element);
122 for(
const auto& intersection: intersections(gridView, element))
123 if (intersection.boundary())
124 for(
auto localIndex: seDOFs.bind(localView,intersection))
125 f(localView.index(localIndex));
auto subEntityDOFs(const T &)
Create SubEntityDOFs object.
Definition: subentitydofs.hh:164
void forEachBoundaryDOF(const Basis &basis, F &&f)
Loop over all DOFs on the boundary.
Definition: boundarydofs.hh:40
Definition: polynomial.hh:17