3 #ifndef DUNE_INTERSECTIONITERATORWRAPPER_HH
4 #define DUNE_INTERSECTIONITERATORWRAPPER_HH
17 template <
class Gr
idImp,
class IntersectionIteratorImpl>
20 enum { dim = GridImp :: dimension };
21 enum { dimworld = GridImp :: dimensionworld };
25 typedef IntersectionIteratorImpl IntersectionIteratorImp;
27 typedef typename IntersectionIteratorImp :: StorageType IntersectionIteratorProviderType;
30 typedef typename GridImp :: GridObjectFactoryType
FactoryType;
38 typedef typename GridImp :: ctype
ctype;
41 typedef typename GridImp::template Codim<0>::Entity
Entity;
43 typedef typename GridImp::template Codim<0>::EntityPointer
EntityPointer;
46 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
48 typedef typename GridImp::template Codim<1>::LocalGeometry
LocalGeometry;
54 template <
class EntityImp>
56 : factory_( en.factory() )
57 , it_( factory_.getIntersection(wLevel, (IntersectionIteratorImpl *) 0) )
62 it().first(en,wLevel);
67 : factory_( org.factory_ )
68 , it_( factory_.getIntersection(-1, (IntersectionIteratorImpl *) 0) )
70 it().assign( org.
it() );
76 it().assign( org.
it() );
83 factory_.freeIntersection(
it() );
87 bool equals (
const ThisType & i)
const {
return it().equals(i.
it()); }
93 EntityPointer
outside()
const {
return it().outside(); }
96 EntityPointer
inside()
const {
return it().inside(); }
117 return it().geometryInInside();
126 return it().geometry();
139 return it().indexInInside();
147 return it().geometryInOutside();
154 return it().indexInOutside();
167 return it().unitOuterNormal( local );
175 const ReferenceElement<
ctype, dim-1> & refElement =
176 ReferenceElements<ctype, dim-1>::general(type);
182 const NormalType
outerNormal (
const FieldVector< ctype, dim-1 > &local )
const
184 return it().outerNormal( local );
191 return it().integrationOuterNormal( local );
201 IntersectionIteratorImp &
it() {
return it_; }
202 const IntersectionIteratorImp &
it()
const {
return it_; }
205 const FactoryType& factory_ ;
206 IntersectionIteratorImp & it_;
209 template <
class Gr
idImp>
217 template <
class EntityImp>
219 : BaseType(en,wLevel,end)
231 template <
class Gr
idImp>
246 typedef typename GridImp :: ctype
ctype;
249 typedef typename GridImp::template Codim<0>::Entity
Entity;
254 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
262 template <
class EntityImp>
298 IntersectionImp&
impl() {
return GridImp :: getRealImplementation( intersection_ ); }
300 const IntersectionImp&
impl()
const {
return GridImp :: getRealImplementation( intersection_ ); }
305 template <
class Gr
idImp>
313 template <
class EntityImp>
315 : BaseType(en,wLevel,end)
326 template <
class Gr
idImp>
340 typedef typename GridImp :: ctype
ctype;
343 typedef typename GridImp::template Codim<0>::Entity
Entity;
348 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
356 template <
class EntityImp>
392 IntersectionImp&
impl() {
return GridImp :: getRealImplementation( intersection_ ); }
394 const IntersectionImp&
impl()
const {
return GridImp :: getRealImplementation( intersection_ ); }
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
type of intersection*Local
Definition: intersectioniteratorwrapper.hh:350
Intersection of a mesh entities of codimension 0 ("elements") with a "neighboring" element or with th...
Definition: albertagrid/dgfparser.hh:26
Definition: intersectioniteratorwrapper.hh:35
int level() const
return level of iterator
Definition: intersectioniteratorwrapper.hh:195
bool boundary() const
Definition: intersectioniteratorwrapper.hh:100
const NormalType centerUnitOuterNormal() const
Definition: intersectioniteratorwrapper.hh:172
Definition: intersectioniteratorwrapper.hh:337
Definition: intersectioniteratorwrapper.hh:33
size_t boundarySegmentIndex() const
return the boundary segment index
Definition: intersectioniteratorwrapper.hh:109
const IntersectionImp & impl() const
Definition: intersectioniteratorwrapper.hh:300
void increment()
increment iterator
Definition: intersectioniteratorwrapper.hh:289
const IntersectionIteratorImp & it() const
Definition: intersectioniteratorwrapper.hh:202
const NormalType unitOuterNormal(const FieldVector< ctype, dim-1 > &local) const
Definition: intersectioniteratorwrapper.hh:165
const NormalType integrationOuterNormal(const FieldVector< ctype, dim-1 > &local) const
Definition: intersectioniteratorwrapper.hh:189
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
type of intersection*Local
Definition: intersectioniteratorwrapper.hh:48
bool equals(const ThisType &i) const
the equality method
Definition: intersectioniteratorwrapper.hh:87
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:18
Dune::Intersection< GridImp, IntersectionImp > Intersection
Definition: intersectioniteratorwrapper.hh:332
Dune::Intersection< GridImp, IntersectionImp > Intersection
Definition: intersectioniteratorwrapper.hh:238
FieldVector< ctype, dimworld > NormalType
type of normal vector
Definition: intersectioniteratorwrapper.hh:51
EntityPointer inside() const
access entity where iteration started
Definition: intersectioniteratorwrapper.hh:96
LevelIntersectionWrapper(const ThisType &org)
The copy constructor.
Definition: intersectioniteratorwrapper.hh:319
GridImp::template Codim< 0 >::Entity Entity
Entity type.
Definition: intersectioniteratorwrapper.hh:249
~IntersectionIteratorWrapper()
The Destructor puts internal object back to stack.
Definition: intersectioniteratorwrapper.hh:81
GridImp::template Codim< 0 >::Entity Entity
Entity type.
Definition: intersectioniteratorwrapper.hh:41
LeafIntersectionWrapper(const ThisType &org)
The copy constructor.
Definition: intersectioniteratorwrapper.hh:223
IntersectionIteratorWrapper(const ThisType &org)
The copy constructor.
Definition: intersectioniteratorwrapper.hh:66
const NormalType outerNormal(const FieldVector< ctype, dim-1 > &local) const
Definition: intersectioniteratorwrapper.hh:182
Definition: intersectioniteratorwrapper.hh:243
bool neighbor() const
return true if across the intersection a neighbor on this level exists
Definition: intersectioniteratorwrapper.hh:103
Intersection intersection_
Definition: intersectioniteratorwrapper.hh:295
Geometry geometry() const
Definition: intersectioniteratorwrapper.hh:124
int boundaryId() const
return information about the Boundary
Definition: intersectioniteratorwrapper.hh:106
GridImp::template Codim< 0 >::EntityPointer EntityPointer
type of EntityPointer
Definition: intersectioniteratorwrapper.hh:43
LevelIntersectionIteratorWrapper(const ThisType &org)
The copy constructor.
Definition: intersectioniteratorwrapper.hh:362
GridImp::ctype ctype
define type used for coordinates in grid module
Definition: intersectioniteratorwrapper.hh:38
GridImp::GridObjectFactoryType FactoryType
Definition: intersectioniteratorwrapper.hh:30
IntersectionIteratorWrapper(const EntityImp &en, int wLevel, bool end)
constructor called from the ibegin and iend method
Definition: intersectioniteratorwrapper.hh:55
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:306
IntersectionIteratorImp & it()
returns reference to underlying intersection iterator implementation
Definition: intersectioniteratorwrapper.hh:201
Definition: intersectioniteratorwrapper.hh:210
int indexInOutside() const
Definition: intersectioniteratorwrapper.hh:152
int indexInInside() const
Definition: intersectioniteratorwrapper.hh:137
ThisType & operator=(const ThisType &org)
the f*cking assignment operator
Definition: intersectioniteratorwrapper.hh:367
LeafIntersectionIteratorWrapper(const EntityImp &en, int wLevel, bool end)
constructor called from the ibegin and iend method
Definition: intersectioniteratorwrapper.hh:263
void increment()
increment iterator
Definition: intersectioniteratorwrapper.hh:383
GridImp::template Codim< 1 >::Geometry Geometry
type of intersectionGlobal
Definition: intersectioniteratorwrapper.hh:254
bool equals(const ThisType &i) const
the equality method
Definition: intersectioniteratorwrapper.hh:380
FieldVector< ctype, dimensionworld > NormalType
type of normal vector
Definition: intersectioniteratorwrapper.hh:353
const IntersectionImp & impl() const
Definition: intersectioniteratorwrapper.hh:394
ThisType & operator=(const ThisType &org)
the f*cking assignment operator
Definition: intersectioniteratorwrapper.hh:273
void increment()
increment iterator
Definition: intersectioniteratorwrapper.hh:90
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:327
GridImp::ctype ctype
define type used for coordinates in grid module
Definition: intersectioniteratorwrapper.hh:340
bool equals(const ThisType &i) const
the equality method
Definition: intersectioniteratorwrapper.hh:286
GridImp::template Codim< 1 >::Geometry Geometry
type of intersectionGlobal
Definition: intersectioniteratorwrapper.hh:348
const Intersection & dereference() const
return reference to intersection
Definition: intersectioniteratorwrapper.hh:374
int twistInInside() const
twist of the face seen from the inner element
Definition: intersectioniteratorwrapper.hh:158
IntersectionImp & impl()
Definition: intersectioniteratorwrapper.hh:392
LocalGeometry geometryInOutside() const
Definition: intersectioniteratorwrapper.hh:145
IntersectionImp & impl()
Definition: intersectioniteratorwrapper.hh:298
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
type of intersection*Local
Definition: intersectioniteratorwrapper.hh:256
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:232
LevelIntersectionIteratorWrapper(const EntityImp &en, int wLevel, bool end)
constructor called from the ibegin and iend method
Definition: intersectioniteratorwrapper.hh:357
GridImp::template Codim< 1 >::Geometry Geometry
type of intersectionGlobal
Definition: intersectioniteratorwrapper.hh:46
ThisType & operator=(const ThisType &org)
the f*cking assignment operator
Definition: intersectioniteratorwrapper.hh:74
LeafIntersectionIteratorWrapper(const ThisType &org)
The copy constructor.
Definition: intersectioniteratorwrapper.hh:268
LevelIntersectionWrapper(const EntityImp &en, int wLevel, bool end)
constructor called from the ibegin and iend method
Definition: intersectioniteratorwrapper.hh:314
Include standard header files.
Definition: agrid.hh:59
FieldVector< ctype, dimensionworld > NormalType
type of normal vector
Definition: intersectioniteratorwrapper.hh:259
Definition: intersectioniteratorwrapper.hh:335
LocalGeometry geometryInInside() const
Definition: intersectioniteratorwrapper.hh:115
GridImp::template Codim< 0 >::Entity Entity
Entity type.
Definition: intersectioniteratorwrapper.hh:343
bool conforming() const
return true if intersection is conform (i.e. only one neighbor)
Definition: intersectioniteratorwrapper.hh:198
GridImp::template Codim< 0 >::EntityPointer EntityPointer
type of EntityPointer
Definition: intersectioniteratorwrapper.hh:345
EntityPointer outside() const
access neighbor
Definition: intersectioniteratorwrapper.hh:93
Intersection intersection_
Definition: intersectioniteratorwrapper.hh:389
const Intersection & dereference() const
return reference to intersection
Definition: intersectioniteratorwrapper.hh:280
GeometryType type() const
obtain the type of reference element for this intersection
Definition: intersectioniteratorwrapper.hh:130
GridImp::template Codim< 0 >::EntityPointer EntityPointer
type of EntityPointer
Definition: intersectioniteratorwrapper.hh:251
int twistInOutside() const
twist of the face seen from the outer element
Definition: intersectioniteratorwrapper.hh:161
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
Definition: intersectioniteratorwrapper.hh:241
GridImp::ctype ctype
define type used for coordinates in grid module
Definition: intersectioniteratorwrapper.hh:246
LeafIntersectionWrapper(const EntityImp &en, int wLevel, bool end)
constructor called from the ibegin and iend method
Definition: intersectioniteratorwrapper.hh:218