1#ifndef DUNE_INTERSECTIONITERATORWRAPPER_HH
2#define DUNE_INTERSECTIONITERATORWRAPPER_HH
4#include <dune/common/version.hh>
5#if !DUNE_VERSION_NEWER( DUNE_GRID, 3, 0 )
6#include <dune/common/nullptr.hh>
9#include <dune/grid/common/intersectioniterator.hh>
24template <
class Gr
idImp,
class IntersectionIteratorImpl>
27 enum { dim = GridImp :: dimension };
28 enum { dimworld = GridImp :: dimensionworld };
32 typedef IntersectionIteratorImpl IntersectionIteratorImp;
42 typedef typename GridImp :: ctype
ctype;
45 typedef typename GridImp::template Codim<0>::Entity
Entity;
46#if !DUNE_VERSION_NEWER(DUNE_GRID,3,0)
48 typedef typename GridImp::template Codim<0>::EntityPointer
EntityPointer;
52 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
54 typedef typename GridImp::template Codim<1>::LocalGeometry
LocalGeometry;
59 typedef typename IntersectionIteratorImpl::Twists
Twists;
60 typedef typename Twists::Twist
Twist;
65 template <
class EntityImp>
72 it().first( en, wLevel, grid.conformingRefinement(), grid.ghostCellsEnabled() );
75 operator bool ()
const {
return bool( itPtr_ ); }
78 bool equals (
const ThisType &other )
const
80 return (itPtr_ && other.itPtr_ ) ?
it().equals( other.it() ) : itPtr_ == other.itPtr_;
95 ALU3DSPACE SharedPointer< IntersectionIteratorImp > copy( itPtr_ );
127 return it().geometryInInside();
136 return it().geometry();
149 return it().indexInInside();
157 return it().geometryInOutside();
164 return it().indexInOutside();
177 return it().unitOuterNormal( local );
184 const ReferenceElement<
ctype, dim-1> & refElement =
185 ReferenceElements<ctype, dim-1>::general(
type() );
193 return it().outerNormal( local );
200 return it().integrationOuterNormal( local );
210 IntersectionIteratorImp &
it() {
return *itPtr_; }
211 const IntersectionIteratorImp &
it()
const {
return *itPtr_; }
216 return it().weight();
220 mutable ALU3DSPACE SharedPointer< IntersectionIteratorImp > itPtr_;
223template <
class Gr
idImp>
233 template <
class EntityImp>
235 : BaseType( grid, en, wLevel, end )
249template <
class Gr
idImp>
264 typedef typename GridImp :: ctype
ctype;
267 typedef typename GridImp::template Codim<0>::Entity
Entity;
268#if !DUNE_VERSION_NEWER(DUNE_GRID,3,0)
274 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
285 template <
class EntityImp>
309 bool equals (
const ThisType & i)
const {
return impl().equals( i.impl() ); }
323 const IntersectionImp&
impl()
const {
return GridImp :: getRealImplementation(
intersection_ ); }
328template <
class Gr
idImp>
338 template <
class EntityImp>
340 : BaseType( grid, en, wLevel, end )
353template <
class Gr
idImp>
367 typedef typename GridImp :: ctype
ctype;
370 typedef typename GridImp::template Codim<0>::Entity
Entity;
371#if !DUNE_VERSION_NEWER(DUNE_GRID,3,0)
377 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
387 template <
class EntityImp>
411 bool equals (
const ThisType & i)
const {
return impl().equals( i.impl() ); }
427 const IntersectionImp&
impl()
const {
return GridImp :: getRealImplementation(
intersection_ ); }
#define ALU3DSPACE
Definition alu3dinclude.hh:24
Definition alu3dinclude.hh:80
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition intersectioniteratorwrapper.hh:26
const NormalType centerUnitOuterNormal() const
Definition intersectioniteratorwrapper.hh:182
Geometry geometry() const
Definition intersectioniteratorwrapper.hh:134
const NormalType outerNormal(const FieldVector< ctype, dim-1 > &local) const
Definition intersectioniteratorwrapper.hh:191
size_t boundarySegmentIndex() const
return the boundary segment index
Definition intersectioniteratorwrapper.hh:119
int weight() const
return weight associated with graph edge between the neighboring elements
Definition intersectioniteratorwrapper.hh:214
bool boundary() const
Definition intersectioniteratorwrapper.hh:110
Entity inside() const
access entity where iteration started
Definition intersectioniteratorwrapper.hh:106
IntersectionIteratorImpl::Twists Twists
Definition intersectioniteratorwrapper.hh:59
void increment()
increment iterator
Definition intersectioniteratorwrapper.hh:84
IntersectionIteratorImp & it()
returns reference to underlying intersection iterator implementation
Definition intersectioniteratorwrapper.hh:210
IntersectionIteratorWrapper()
Definition intersectioniteratorwrapper.hh:62
bool conforming() const
return true if intersection is conform (i.e. only one neighbor)
Definition intersectioniteratorwrapper.hh:207
Entity outside() const
access neighbor
Definition intersectioniteratorwrapper.hh:103
int boundaryId() const
return information about the Boundary
Definition intersectioniteratorwrapper.hh:116
GridImp::template Codim< 0 >::Entity Entity
Entity type.
Definition intersectioniteratorwrapper.hh:45
GridImp::ctype ctype
define type used for coordinates in grid module
Definition intersectioniteratorwrapper.hh:42
Twists::Twist Twist
Definition intersectioniteratorwrapper.hh:60
GeometryType type() const
obtain the type of reference element for this intersection
Definition intersectioniteratorwrapper.hh:140
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
type of intersection*Local
Definition intersectioniteratorwrapper.hh:54
const IntersectionIteratorImp & it() const
Definition intersectioniteratorwrapper.hh:211
const NormalType integrationOuterNormal(const FieldVector< ctype, dim-1 > &local) const
Definition intersectioniteratorwrapper.hh:198
IntersectionIteratorWrapper(const GridImp &grid, const EntityImp &en, int wLevel, bool end)
constructor called from the ibegin and iend method
Definition intersectioniteratorwrapper.hh:66
LocalGeometry geometryInInside() const
Definition intersectioniteratorwrapper.hh:125
int level() const
return level of iterator
Definition intersectioniteratorwrapper.hh:204
FieldVector< ctype, dimworld > NormalType
type of normal vector
Definition intersectioniteratorwrapper.hh:57
LocalGeometry geometryInOutside() const
Definition intersectioniteratorwrapper.hh:155
GridImp::template Codim< 1 >::Geometry Geometry
type of intersectionGlobal
Definition intersectioniteratorwrapper.hh:52
Twist twistInOutside() const
twist of the face seen from the outer element
Definition intersectioniteratorwrapper.hh:171
@ dimension
Definition intersectioniteratorwrapper.hh:37
Twist twistInInside() const
twist of the face seen from the inner element
Definition intersectioniteratorwrapper.hh:168
int indexInInside() const
Definition intersectioniteratorwrapper.hh:147
int indexInOutside() const
Definition intersectioniteratorwrapper.hh:162
bool neighbor() const
return true if across the intersection a neighbor on this level exists
Definition intersectioniteratorwrapper.hh:113
const NormalType unitOuterNormal(const FieldVector< ctype, dim-1 > &local) const
Definition intersectioniteratorwrapper.hh:175
@ dimensionworld
Definition intersectioniteratorwrapper.hh:39
bool equals(const ThisType &other) const
the equality method
Definition intersectioniteratorwrapper.hh:78
GridImp::template Codim< 0 >::EntityPointer EntityPointer
type of EntityPointer
Definition intersectioniteratorwrapper.hh:48
Definition intersectioniteratorwrapper.hh:226
LeafIntersectionWrapper(const ThisType &org)
The copy constructor.
Definition intersectioniteratorwrapper.hh:240
LeafIntersectionWrapper(const GridImp &grid, const EntityImp &en, int wLevel, bool end)
constructor called from the ibegin and iend method
Definition intersectioniteratorwrapper.hh:234
LeafIntersectionWrapper()
Definition intersectioniteratorwrapper.hh:230
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition intersectioniteratorwrapper.hh:251
bool equals(const ThisType &i) const
the equality method
Definition intersectioniteratorwrapper.hh:309
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
type of intersection*Local
Definition intersectioniteratorwrapper.hh:276
@ dimension
Definition intersectioniteratorwrapper.hh:259
GridImp::template Codim< 0 >::Entity Entity
Entity type.
Definition intersectioniteratorwrapper.hh:267
Intersection intersection_
Definition intersectioniteratorwrapper.hh:318
const Intersection & dereference() const
return reference to intersection
Definition intersectioniteratorwrapper.hh:303
@ dimensionworld
Definition intersectioniteratorwrapper.hh:261
LeafIntersectionIteratorWrapper(const ThisType &org)
The copy constructor.
Definition intersectioniteratorwrapper.hh:291
GridImp::template Codim< 0 >::EntityPointer EntityPointer
type of EntityPointer
Definition intersectioniteratorwrapper.hh:270
GridImp::ctype ctype
define type used for coordinates in grid module
Definition intersectioniteratorwrapper.hh:264
const IntersectionImp & impl() const
Definition intersectioniteratorwrapper.hh:323
ThisType & operator=(const ThisType &org)
the f*cking assignment operator
Definition intersectioniteratorwrapper.hh:296
Dune::Intersection< GridImp, IntersectionImp > Intersection
Definition intersectioniteratorwrapper.hh:256
LeafIntersectionIteratorWrapper(const GridImp &grid, const EntityImp &en, int wLevel, bool end)
constructor called from the ibegin and iend method
Definition intersectioniteratorwrapper.hh:286
void increment()
increment iterator
Definition intersectioniteratorwrapper.hh:312
GridImp::template Codim< 1 >::Geometry Geometry
type of intersectionGlobal
Definition intersectioniteratorwrapper.hh:274
IntersectionImp & impl()
Definition intersectioniteratorwrapper.hh:321
LeafIntersectionIteratorWrapper()
default constructor
Definition intersectioniteratorwrapper.hh:282
FieldVector< ctype, dimensionworld > NormalType
type of normal vector
Definition intersectioniteratorwrapper.hh:279
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition intersectioniteratorwrapper.hh:331
LevelIntersectionWrapper()
Definition intersectioniteratorwrapper.hh:335
LevelIntersectionWrapper(const ThisType &org)
The copy constructor.
Definition intersectioniteratorwrapper.hh:345
LevelIntersectionWrapper(const GridImp &grid, const EntityImp &en, int wLevel, bool end)
constructor called from the ibegin and iend method
Definition intersectioniteratorwrapper.hh:339
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition intersectioniteratorwrapper.hh:355
GridImp::ctype ctype
define type used for coordinates in grid module
Definition intersectioniteratorwrapper.hh:367
const IntersectionImp & impl() const
Definition intersectioniteratorwrapper.hh:427
@ dimensionworld
Definition intersectioniteratorwrapper.hh:364
Intersection intersection_
Definition intersectioniteratorwrapper.hh:422
GridImp::template Codim< 0 >::Entity Entity
Entity type.
Definition intersectioniteratorwrapper.hh:370
LevelIntersectionIteratorWrapper()
Definition intersectioniteratorwrapper.hh:384
bool equals(const ThisType &i) const
the equality method
Definition intersectioniteratorwrapper.hh:411
@ dimension
Definition intersectioniteratorwrapper.hh:362
IntersectionImp & impl()
Definition intersectioniteratorwrapper.hh:425
GridImp::template Codim< 1 >::Geometry Geometry
type of intersectionGlobal
Definition intersectioniteratorwrapper.hh:377
FieldVector< ctype, dimensionworld > NormalType
type of normal vector
Definition intersectioniteratorwrapper.hh:382
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
type of intersection*Local
Definition intersectioniteratorwrapper.hh:379
void increment()
increment iterator
Definition intersectioniteratorwrapper.hh:414
ThisType & operator=(const ThisType &org)
the f*cking assignment operator
Definition intersectioniteratorwrapper.hh:398
LevelIntersectionIteratorWrapper(const ThisType &org)
The copy constructor.
Definition intersectioniteratorwrapper.hh:393
GridImp::template Codim< 0 >::EntityPointer EntityPointer
type of EntityPointer
Definition intersectioniteratorwrapper.hh:373
LevelIntersectionIteratorWrapper(const GridImp &grid, const EntityImp &en, int wLevel, bool end)
constructor called from the ibegin and iend method
Definition intersectioniteratorwrapper.hh:388
Dune::Intersection< GridImp, IntersectionImp > Intersection
Definition intersectioniteratorwrapper.hh:359
const Intersection & dereference() const
return reference to intersection
Definition intersectioniteratorwrapper.hh:405