dune-grid
2.11
Toggle main menu visibility
Loading...
Searching...
No Matches
dune
grid
geometrygrid
geometrygrid/intersectioniterator.hh
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
2
// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4
// vi: set et ts=4 sw=2 sts=2:
5
#ifndef DUNE_GEOGRID_INTERSECTIONITERATOR_HH
6
#define DUNE_GEOGRID_INTERSECTIONITERATOR_HH
7
8
#include <
dune/grid/geometrygrid/intersection.hh
>
9
10
namespace
Dune
11
{
12
13
namespace
GeoGrid
14
{
15
16
// IntersectionIterator
17
// --------------------
18
19
template
<
class
Gr
id
,
class
HostIntersectionIterator >
20
class
IntersectionIterator
21
{
22
typedef
typename
std::remove_const< Grid >::type::Traits Traits;
23
24
typedef
GeoGrid::Intersection< Grid, typename HostIntersectionIterator::Intersection >
IntersectionImpl;
25
26
typedef
typename
Traits::template Codim< 0 >::Geometry ElementGeometry;
27
typedef
typename
Traits::template Codim< 0 >::GeometryImpl ElementGeometryImpl;
28
29
public
:
30
typedef
Dune::Intersection< Grid, IntersectionImpl >
Intersection
;
31
32
IntersectionIterator
()
33
{}
34
35
template
<
class
Entity >
36
IntersectionIterator
(
const
Entity
&inside,
37
const
HostIntersectionIterator &hostIterator )
38
: hostIterator_( hostIterator )
39
, insideGeo_( inside.geometry().impl() )
40
{}
41
42
IntersectionIterator
(
const
IntersectionIterator
&other )
43
: hostIterator_( other.hostIterator_ )
44
, insideGeo_( other.insideGeo_ )
45
{}
46
47
IntersectionIterator
(
IntersectionIterator
&& other )
48
: hostIterator_(
std
::move( other.hostIterator_ ) )
49
, insideGeo_(
std
::move( other.insideGeo_ ) )
50
{}
51
52
IntersectionIterator
&
operator=
(
const
IntersectionIterator
&other )
53
{
54
hostIterator_ = other.hostIterator_;
55
insideGeo_ = other.insideGeo_;
56
return
*
this
;
57
}
58
59
IntersectionIterator
&
operator=
(
IntersectionIterator
&& other )
60
{
61
hostIterator_ = std::move( other.hostIterator_ );
62
insideGeo_ = std::move( other.insideGeo_ );
63
return
*
this
;
64
}
65
66
bool
equals
(
const
IntersectionIterator
&other )
const
67
{
68
return
(hostIterator_ == other.hostIterator_);
69
}
70
71
void
increment
()
72
{
73
++hostIterator_;
74
}
75
76
Intersection
dereference
()
const
77
{
78
return
IntersectionImpl( *hostIterator_, insideGeo_ );
79
}
80
81
private
:
82
83
HostIntersectionIterator hostIterator_;
84
ElementGeometryImpl insideGeo_;
85
86
};
87
88
}
// namespace GeoGrid
89
90
}
// namespace Dune
91
92
#endif
// #ifndef DUNE_GEOGRID_INTERSECTIONITERATOR_HH
std
STL namespace.
Dune
Include standard header files.
Definition
agrid.hh:60
Dune::GeoGrid
namespace containing the implementations of GeometryGrid
Definition
geometrygrid/backuprestore.hh:20
Dune::Intersection< Grid, IntersectionImpl >
Dune::GeoGrid::Entity
DUNE-conform implementation of the entity.
Definition
geometrygrid/entity.hh:694
Dune::GeoGrid::IntersectionIterator::IntersectionIterator
IntersectionIterator(const IntersectionIterator &other)
Definition
geometrygrid/intersectioniterator.hh:42
Dune::GeoGrid::IntersectionIterator::IntersectionIterator
IntersectionIterator(const Entity &inside, const HostIntersectionIterator &hostIterator)
Definition
geometrygrid/intersectioniterator.hh:36
Dune::GeoGrid::IntersectionIterator::dereference
Intersection dereference() const
Definition
geometrygrid/intersectioniterator.hh:76
Dune::GeoGrid::IntersectionIterator::equals
bool equals(const IntersectionIterator &other) const
Definition
geometrygrid/intersectioniterator.hh:66
Dune::GeoGrid::IntersectionIterator::operator=
IntersectionIterator & operator=(const IntersectionIterator &other)
Definition
geometrygrid/intersectioniterator.hh:52
Dune::GeoGrid::IntersectionIterator::Intersection
Dune::Intersection< Grid, IntersectionImpl > Intersection
Definition
geometrygrid/intersectioniterator.hh:30
Dune::GeoGrid::IntersectionIterator::increment
void increment()
Definition
geometrygrid/intersectioniterator.hh:71
Dune::GeoGrid::IntersectionIterator::IntersectionIterator
IntersectionIterator()
Definition
geometrygrid/intersectioniterator.hh:32
Dune::GeoGrid::IntersectionIterator::IntersectionIterator
IntersectionIterator(IntersectionIterator &&other)
Definition
geometrygrid/intersectioniterator.hh:47
Dune::GeoGrid::Intersection< Grid, typename HostIntersectionIterator::Intersection >
intersection.hh
Generated by
1.17.0