dune-grid
2.11
Toggle main menu visibility
Loading...
Searching...
No Matches
dune
grid
yaspgrid
yaspgridintersectioniterator.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_GRID_YASPGRIDINTERSECTIONITERATOR_HH
6
#define DUNE_GRID_YASPGRIDINTERSECTIONITERATOR_HH
7
14
15
namespace
Dune
{
16
20
template
<
class
Gr
id
Imp>
21
class
YaspIntersectionIterator
22
{
23
constexpr
static
int
dim = GridImp::dimension;
24
public
:
25
// types used from grids
26
typedef
Dune::YaspIntersection< GridImp >
IntersectionImp
;
27
typedef
Dune::Intersection< GridImp, IntersectionImp >
Intersection
;
28
30
void
increment
()
31
{
32
intersection_.impl()._count += (intersection_.impl()._count < 2*dim);
33
}
34
36
bool
equals
(
const
YaspIntersectionIterator
& other)
const
37
{
38
return
intersection_ == other.intersection_;
39
}
40
42
const
Intersection
&
dereference
()
const
43
{
44
intersection_.
impl
().update();
45
return
intersection_;
46
}
47
48
YaspIntersectionIterator
()
49
{}
50
52
YaspIntersectionIterator
(
const
YaspEntity<0,dim,GridImp>
& myself,
bool
toend)
53
: intersection_(
IntersectionImp
(myself, toend))
54
{}
55
57
YaspIntersectionIterator
(
const
YaspIntersectionIterator
& other)
58
: intersection_(other.intersection_)
59
{}
60
62
YaspIntersectionIterator
&
operator =
(
const
YaspIntersectionIterator
& other)
63
{
64
intersection_ = other.intersection_;
65
return
*
this
;
66
}
67
68
private
:
69
// The intersection this iterator points to
70
mutable
Intersection
intersection_;
71
};
72
73
}
// namespace Dune
74
75
#endif
// DUNE_GRID_YASPGRIDINTERSECTIONITERATOR_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::YaspEntity
Definition
yaspgridentity.hh:242
Dune::YaspIntersectionIterator::dereference
const Intersection & dereference() const
dereferencing
Definition
yaspgridintersectioniterator.hh:42
Dune::YaspIntersectionIterator::YaspIntersectionIterator
YaspIntersectionIterator(const YaspIntersectionIterator &other)
copy constructor
Definition
yaspgridintersectioniterator.hh:57
Dune::YaspIntersectionIterator::IntersectionImp
Dune::YaspIntersection< GridImp > IntersectionImp
Definition
yaspgridintersectioniterator.hh:26
Dune::YaspIntersectionIterator::Intersection
Dune::Intersection< GridImp, IntersectionImp > Intersection
Definition
yaspgridintersectioniterator.hh:27
Dune::YaspIntersectionIterator::increment
void increment()
increment
Definition
yaspgridintersectioniterator.hh:30
Dune::YaspIntersectionIterator::operator=
YaspIntersectionIterator & operator=(const YaspIntersectionIterator &other)
assignment
Definition
yaspgridintersectioniterator.hh:62
Dune::YaspIntersectionIterator::YaspIntersectionIterator
YaspIntersectionIterator(const YaspEntity< 0, dim, GridImp > &myself, bool toend)
make intersection iterator from entity
Definition
yaspgridintersectioniterator.hh:52
Dune::YaspIntersectionIterator::equals
bool equals(const YaspIntersectionIterator &other) const
equality
Definition
yaspgridintersectioniterator.hh:36
Dune::YaspIntersectionIterator::YaspIntersectionIterator
YaspIntersectionIterator()
Definition
yaspgridintersectioniterator.hh:48
Dune::YaspIntersection
YaspIntersection provides data about intersection with neighboring codim 0 entities.
Definition
yaspgridintersection.hh:22
Generated by
1.17.0