4 #ifndef DUNE_GRID_INTERSECTION_HH
5 #define DUNE_GRID_INTERSECTION_HH
159 template<
class Gr
idImp,
class IntersectionImp >
162 #if DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
167 friend class GridDefaultImplementation<
168 GridImp::
dimension, GridImp::dimensionworld,
169 typename GridImp::ctype,
170 typename GridImp::GridFamily> ;
183 enum {
dim=GridImp::dimension };
188 typedef typename GridImp::template Codim<0>::Entity
Entity;
194 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
218 typedef typename GridImp::ctype
ctype;
223 return this->
real.boundary();
226 #if DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
242 int boundaryId ()
const
244 return this->
real.boundaryId();
261 return this->
real.boundarySegmentIndex();
267 return this->
real.neighbor();
275 return this->
real.inside();
286 return this->
real.outside();
293 return this->
real.conforming();
311 return this->
real.geometryInInside();
329 return this->
real.geometryInOutside();
345 return this->
real.geometry();
351 return this->
real.type();
365 return this->
real.indexInInside();
379 return this->
real.indexInOutside();
388 return this->
real.outerNormal(local);
399 return this->
real.integrationOuterNormal(local);
409 return this->
real.unitOuterNormal(local);
420 return this->
real.centerUnitOuterNormal();
459 template<
class Gr
idImp,
class IntersectionImp >
462 enum { dim=GridImp::dimension };
463 enum { dimworld=GridImp::dimensionworld };
464 typedef typename GridImp::ctype ct;
472 FieldVector<ct, dimworld> n = asImp().unitOuterNormal(local);
473 n *= asImp().intersectionGlobal().integrationElement(local);
480 FieldVector<ct, dimworld> n = asImp().outerNormal(local);
490 const ReferenceElement<ct, dim-1> & refElement =
491 ReferenceElements<ct, dim-1>::general(type);
492 return asImp().unitOuterNormal(refElement.position(0,0));
500 IntersectionImp &asImp () {
return static_cast< IntersectionImp &
>( *this ); }
501 const IntersectionImp &asImp ()
const {
return static_cast< const IntersectionImp &
>( *this ); }
506 #endif // DUNE_GRID_INTERSECTION_HH
Implementation real
Definition: common/intersection.hh:181
Definition: common/intersection.hh:215
FieldVector< ct, dimworld > integrationOuterNormal(const FieldVector< ct, dim-1 > &local) const
Definition: common/intersection.hh:470
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
Codim 1 geometry returned by geometryInInside and geometryInOutside()
Definition: common/intersection.hh:203
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
EntityPointer outside() const
return EntityPointer to the Entity on the outside of this intersection. That is the neighboring Entit...
Definition: common/intersection.hh:284
LocalGeometry geometryInOutside() const
geometrical information about this intersection in local coordinates of the outside() entity...
Definition: common/intersection.hh:327
Intersection(const Intersection &i)
Definition: common/intersection.hh:441
GridImp::ctype ctype
Type of individual coefficients of coordinate vectors.
Definition: common/intersection.hh:218
LocalGeometry geometryInInside() const
geometrical information about this intersection in local coordinates of the inside() entity...
Definition: common/intersection.hh:309
GlobalCoordinate unitOuterNormal(const LocalCoordinate &local) const
Return unit outer normal (length == 1)
Definition: common/intersection.hh:407
Intersection(const Implementation &impl)
Definition: common/intersection.hh:430
FieldVector< ct, dimworld > unitOuterNormal(const FieldVector< ct, dim-1 > &local) const
return unit outer normal
Definition: common/intersection.hh:478
bool conforming() const
Return true if intersection is conforming.
Definition: common/intersection.hh:291
size_t boundarySegmentIndex() const
index of the boundary segment within the macro grid
Definition: common/intersection.hh:259
FieldVector< ctype, mydim > LocalCoordinate
type of local coordinates
Definition: common/geometry.hh:133
GridImp::template Codim< 0 >::EntityPointer EntityPointer
Pointer to the type of entities that this Intersection belongs to.
Definition: common/intersection.hh:191
Geometry geometry() const
geometrical information about the intersection in global coordinates.
Definition: common/intersection.hh:343
bool boundary() const
Return true if intersection is with interior or exterior boundary (see the cases above) ...
Definition: common/intersection.hh:221
GeometryType type() const
obtain the type of reference element for this intersection
Definition: common/intersection.hh:349
FieldVector< ctype, cdim > GlobalCoordinate
type of the global coordinates
Definition: common/geometry.hh:136
Definition: common/intersection.hh:209
Geometry::LocalCoordinate LocalCoordinate
Type for vectors of coordinates on the intersection.
Definition: common/intersection.hh:197
Default Implementations of integrationOuterNormal and unitOuterNormal for IntersectionImp.
Definition: common/intersection.hh:460
Definition: common/intersection.hh:206
Geometry::GlobalCoordinate GlobalCoordinate
Type for normal vectors.
Definition: common/intersection.hh:200
Definition: common/intersection.hh:183
GridImp::template Codim< 1 >::Geometry Geometry
Codim 1 geometry returned by geometry()
Definition: common/intersection.hh:194
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition: common/grid.hh:358
Implementation & impl()
return reference to the real implementation
Definition: common/intersection.hh:176
EntityPointer inside() const
return EntityPointer to the Entity on the inside of this intersection. That is the Entity where we st...
Definition: common/intersection.hh:273
Intersection of a mesh entities of codimension 0 ("elements") with a "neighboring" element or with th...
Definition: albertagrid/dgfparser.hh:26
GridImp::template Codim< 0 >::Entity Entity
Type of entity that this Intersection belongs to.
Definition: common/intersection.hh:188
int indexInInside() const
Local index of codim 1 entity in the inside() entity where intersection is contained in...
Definition: common/intersection.hh:363
Definition: common/intersection.hh:184
bool neighbor() const
return true if intersection is shared with another element.
Definition: common/intersection.hh:265
Different resources needed by all grid implementations.
Definition: common/intersection.hh:212
GlobalCoordinate integrationOuterNormal(const LocalCoordinate &local) const
return outer normal scaled with the integration element
Definition: common/intersection.hh:397
const Implementation & impl() const
return reference to the real implementation
Definition: common/intersection.hh:178
GlobalCoordinate outerNormal(const LocalCoordinate &local) const
Return an outer normal (length not necessarily 1)
Definition: common/intersection.hh:386
FieldVector< ct, dimworld > centerUnitOuterNormal() const
return unit outer normal at center of intersection geometry
Definition: common/intersection.hh:486
const Intersection & operator=(const Intersection &i)
Definition: common/intersection.hh:446
int indexInOutside() const
Local index of codim 1 entity in outside() entity where intersection is contained in...
Definition: common/intersection.hh:377
GlobalCoordinate centerUnitOuterNormal() const
Return unit outer normal (length == 1)
Definition: common/intersection.hh:418