dune-grid
2.11
Toggle main menu visibility
Loading...
Searching...
No Matches
dune
grid
albertagrid
albertagrid/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_ALBERTA_INTERSECTIONITERATOR_HH
6
#define DUNE_ALBERTA_INTERSECTIONITERATOR_HH
7
8
#include <
dune/grid/common/intersectioniterator.hh
>
9
10
#include <
dune/grid/albertagrid/intersection.hh
>
11
16
17
#if HAVE_ALBERTA
18
19
namespace
Dune
20
{
21
22
// AlbertaGridLeafIntersectionIterator
23
// -----------------------------------
24
25
template
<
class
Gr
id
Imp >
26
class
AlbertaGridLeafIntersectionIterator
27
{
28
typedef
AlbertaGridLeafIntersectionIterator< GridImp >
This;
29
30
public
:
31
typedef
Dune::Intersection< GridImp, AlbertaGridLeafIntersection< GridImp >
>
Intersection
;
32
33
static
const
int
dimension
= Intersection::Entity::dimension;
34
35
struct
Begin
{};
36
struct
End
{};
37
38
private
:
39
typedef
AlbertaGridLeafIntersection< GridImp >
IntersectionImp;
40
41
public
:
42
AlbertaGridLeafIntersectionIterator
()
43
{}
44
45
template
<
class
EntityImp >
46
AlbertaGridLeafIntersectionIterator
(
const
EntityImp &entity, Begin )
47
: intersection_( IntersectionImp( entity, 0 ) )
48
{}
49
50
template
<
class
EntityImp >
51
AlbertaGridLeafIntersectionIterator
(
const
EntityImp &entity, End )
52
: intersection_( IntersectionImp( entity,
dimension
+1 ) )
53
{}
54
55
AlbertaGridLeafIntersectionIterator
(
const
This &other )
56
: intersection_( other.intersection_.impl() )
57
{}
58
59
This &
operator=
(
const
This &other )
60
{
61
intersection_.impl() = other.intersection_.
impl
();
62
return
*
this
;
63
}
64
65
const
Intersection
&
dereference
()
const
66
{
67
return
intersection_;
68
}
69
70
bool
equals
(
const
This &other )
const
71
{
72
return
(intersection_.impl() == other.intersection_.
impl
());
73
}
74
75
void
increment
()
76
{
77
intersection_.impl().next();
78
}
79
80
private
:
81
Intersection
intersection_;
82
};
83
84
}
85
86
#endif
// #if HAVE_ALBERTA
87
88
#endif
// #ifndef DUNE_ALBERTA_INTERSECTIONITERATOR_HH
Dune
Include standard header files.
Definition
agrid.hh:60
Dune::Intersection
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition
common/intersection.hh:164
Dune::Intersection::impl
Implementation & impl()
access to the underlying implementation
Definition
common/intersection.hh:178
Dune::AlbertaGridLeafIntersection
Definition
albertagrid/intersection.hh:105
Dune::AlbertaGridLeafIntersectionIterator::AlbertaGridLeafIntersectionIterator
AlbertaGridLeafIntersectionIterator(const EntityImp &entity, Begin)
Definition
albertagrid/intersectioniterator.hh:46
Dune::AlbertaGridLeafIntersectionIterator::operator=
This & operator=(const This &other)
Definition
albertagrid/intersectioniterator.hh:59
Dune::AlbertaGridLeafIntersectionIterator::AlbertaGridLeafIntersectionIterator
AlbertaGridLeafIntersectionIterator()
Definition
albertagrid/intersectioniterator.hh:42
Dune::AlbertaGridLeafIntersectionIterator< Grid >::Intersection
Dune::Intersection< Grid, AlbertaGridLeafIntersection< Grid > > Intersection
Definition
albertagrid/intersectioniterator.hh:31
Dune::AlbertaGridLeafIntersectionIterator::AlbertaGridLeafIntersectionIterator
AlbertaGridLeafIntersectionIterator(const EntityImp &entity, End)
Definition
albertagrid/intersectioniterator.hh:51
Dune::AlbertaGridLeafIntersectionIterator< Grid >::dimension
static const int dimension
Definition
albertagrid/intersectioniterator.hh:33
Dune::AlbertaGridLeafIntersectionIterator::AlbertaGridLeafIntersectionIterator
AlbertaGridLeafIntersectionIterator(const This &other)
Definition
albertagrid/intersectioniterator.hh:55
Dune::AlbertaGridLeafIntersectionIterator::equals
bool equals(const This &other) const
Definition
albertagrid/intersectioniterator.hh:70
Dune::AlbertaGridLeafIntersectionIterator::increment
void increment()
Definition
albertagrid/intersectioniterator.hh:75
Dune::AlbertaGridLeafIntersectionIterator::dereference
const Intersection & dereference() const
Definition
albertagrid/intersectioniterator.hh:65
Dune::AlbertaGridLeafIntersectionIterator::Begin
Definition
albertagrid/intersectioniterator.hh:35
Dune::AlbertaGridLeafIntersectionIterator::End
Definition
albertagrid/intersectioniterator.hh:36
intersection.hh
intersectioniterator.hh
Generated by
1.17.0