3#ifndef DUNE_MMESH_RANGEGENERATORS_HH
4#define DUNE_MMESH_RANGEGENERATORS_HH
12template <
typename Entity>
14#ifndef DOXYGEN_SHOULD_SKIP_THIS
18 static_assert(Entity::mydimension <= 1,
19 "Incident element range iterator is only available for "
20 "vertices and edges!");
22 entity.impl().incidentBegin(),
entity.impl().incidentEnd());
28template <
typename Vertex>
30#ifndef DOXYGEN_SHOULD_SKIP_THIS
31 ->
IteratorRange<
decltype(vertex.impl().incidentFacetsBegin())>
35 Vertex::mydimension == 0,
36 "Incident facet range iterator is only available for vertices!");
37 return IteratorRange<
decltype(vertex.impl().incidentFacetsBegin())>(
38 vertex.impl().incidentFacetsBegin(), vertex.impl().incidentFacetsEnd());
44template <
typename Vertex>
46#ifndef DOXYGEN_SHOULD_SKIP_THIS
48 decltype(vertex.impl().incidentVerticesBegin(includeInfinite))>
52 Vertex::mydimension == 0,
53 "Incident vertices range iterator is only available for vertices!");
54 return IteratorRange<
decltype(vertex.impl().incidentVerticesBegin(
55 includeInfinite))>(vertex.impl().incidentVerticesBegin(includeInfinite),
56 vertex.impl().incidentVerticesEnd(includeInfinite));
62template <
typename Gr
idView,
int codim = 1>
64#ifndef DOXYGEN_SHOULD_SKIP_THIS
66 decltype(gv.
grid().template interfaceBegin<codim>(includeBoundary))>
71 gv.
grid().template interfaceBegin<codim>(includeBoundary),
72 gv.
grid().template interfaceEnd<codim>(includeBoundary));
78template <
typename Gr
idView>
80#ifndef DOXYGEN_SHOULD_SKIP_THIS
82 decltype(gv.
grid().interfaceVerticesBegin(includeBoundary))>
86 includeBoundary))>(gv.
grid().interfaceVerticesBegin(includeBoundary),
87 gv.
grid().interfaceVerticesEnd(includeBoundary));
93template <
typename Vertex>
95#ifndef DOXYGEN_SHOULD_SKIP_THIS
96 ->
IteratorRange<
decltype(vertex.impl().incidentInterfaceVerticesBegin())>
99 static_assert(Vertex::mydimension == 0,
100 "Incident interface vertices range iterator is only available "
101 "for interface vertices!");
103 decltype(vertex.impl().incidentInterfaceVerticesBegin())>(
104 vertex.impl().incidentInterfaceVerticesBegin(),
105 vertex.impl().incidentInterfaceVerticesEnd());
111template <
typename Entity>
113#ifndef DOXYGEN_SHOULD_SKIP_THIS
117 static_assert(Entity::mydimension <= 1,
118 "Incident interface vertices range iterator is only available "
119 "for interface vertices and edges!");
121 decltype(
entity.impl().incidentInterfaceElementsBegin())>(
122 entity.impl().incidentInterfaceElementsBegin(),
123 entity.impl().incidentInterfaceElementsEnd());
auto incidentInterfaceVertices(const Vertex &vertex)
Incident interface vertices.
Definition rangegenerators.hh:94
auto interfaceVertices(const GridView &gv, bool includeBoundary=false)
All interface vertices.
Definition rangegenerators.hh:79
@ Vertex
Definition curvatureoperator.hh:22
auto incidentFacets(const Vertex &vertex)
Facets incident to a given vertex.
Definition rangegenerators.hh:29
auto incidentVertices(const Vertex &vertex, bool includeInfinite=false)
Vertices incident to a given vertex.
Definition rangegenerators.hh:45
auto incidentElements(const Entity &entity)
Elements incident to a given entity.
Definition rangegenerators.hh:13
auto interfaceElements(const GridView &gv, bool includeBoundary=false)
All interface elements.
Definition rangegenerators.hh:63
auto incidentInterfaceElements(const Entity &entity)
Incident interface elements.
Definition rangegenerators.hh:112
const Grid & grid() const
const EntityType & entity() const