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> ;
185 typedef typename GridImp::template Codim<0>::Entity
Entity;
191 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
215 typedef typename GridImp::ctype
ctype;
220 return this->
real.boundary();
223 #if DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
239 int boundaryId ()
const
241 return this->
real.boundaryId();
262 return this->
real.boundarySegmentIndex();
268 return this->
real.neighbor();
277 typename std::conditional<
279 decltype(
real.inside()),
288 Entity::template warnOnDeprecatedEntityPointer<decltype(
real.inside())>();
289 return this->
real.inside();
301 typename std::conditional<
303 decltype(
real.outside()),
312 Entity::template warnOnDeprecatedEntityPointer<decltype(
real.outside())>();
313 return this->
real.outside();
320 return this->
real.conforming();
338 return this->
real.geometryInInside();
356 return this->
real.geometryInOutside();
375 return this->
real.geometry();
381 return this->
real.type();
395 return this->
real.indexInInside();
409 return this->
real.indexInOutside();
418 return this->
real.outerNormal(local);
431 return this->
real.integrationOuterNormal(local);
441 return this->
real.unitOuterNormal(local);
452 return this->
real.centerUnitOuterNormal();
458 return real.equals(other.real);
464 return !
real.equals(other.real);
526 template<
class Gr
idImp,
class IntersectionImp >
529 enum { dim=GridImp::dimension };
530 enum { dimworld=GridImp::dimensionworld };
531 typedef typename GridImp::ctype ct;
539 FieldVector<ct, dimworld> n = asImp().unitOuterNormal(local);
540 n *= asImp().geometry().integrationElement(local);
547 FieldVector<ct, dimworld> n = asImp().outerNormal(local);
557 const ReferenceElement<ct, dim-1> & refElement =
558 ReferenceElements<ct, dim-1>::general(type);
559 return asImp().unitOuterNormal(refElement.position(0,0));
567 IntersectionImp &asImp () {
return static_cast< IntersectionImp &
>( *this ); }
568 const IntersectionImp &asImp ()
const {
return static_cast< const IntersectionImp &
>( *this ); }
573 #endif // DUNE_GRID_INTERSECTION_HH
Intersection of a mesh entities of codimension 0 ("elements") with a "neighboring" element or with th...
Definition: albertagrid/dgfparser.hh:26
FieldVector< ct, dimworld > integrationOuterNormal(const FieldVector< ct, dim-1 > &local) const
Definition: common/intersection.hh:537
Default Implementations of integrationOuterNormal and unitOuterNormal for IntersectionImp.
Definition: common/intersection.hh:527
Different resources needed by all grid implementations.
FieldVector< ctype, mydim > LocalCoordinate
type of local coordinates
Definition: common/geometry.hh:101
LocalGeometry geometryInInside() const
geometrical information about this intersection in local coordinates of the inside() entity...
Definition: common/intersection.hh:336
Intersection()
Default constructor.
Definition: common/intersection.hh:468
GlobalCoordinate integrationOuterNormal(const LocalCoordinate &local) const
return unit outer normal scaled with the integration element
Definition: common/intersection.hh:429
FieldVector< ct, dimworld > centerUnitOuterNormal() const
return unit outer normal at center of intersection geometry
Definition: common/intersection.hh:553
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition: common/grid.hh:360
Geometry geometry() const
geometrical information about the intersection in global coordinates.
Definition: common/intersection.hh:373
Intersection(const Intersection &other)
Copy constructor from an existing intersection.
Definition: common/intersection.hh:472
static void(*)(*)(*)(*)(*)(*) move(const double *)
Definition: partitiondisplay.cc:122
Wrapper class for entities.
Definition: common/entity.hh:61
GeometryType type() const
obtain the type of reference element for this intersection
Definition: common/intersection.hh:379
Intersection(const Implementation &impl)
Definition: common/intersection.hh:502
bool operator==(const Intersection &other) const
Compares two intersections for equality.
Definition: common/intersection.hh:456
size_t boundarySegmentIndex() const
index of the boundary segment within the macro grid
Definition: common/intersection.hh:260
bool conforming() const
Return true if intersection is conforming.
Definition: common/intersection.hh:318
Wrapper class for pointers to entities.
Definition: common/entitypointer.hh:112
Intersection & operator=(const Intersection &other)
Copy assignment operator from an existing intersection.
Definition: common/intersection.hh:482
LocalGeometry geometryInOutside() const
geometrical information about this intersection in local coordinates of the outside() entity...
Definition: common/intersection.hh:354
const Implementation & impl() const
return reference to the real implementation
Definition: common/intersection.hh:178
bool boundary() const
Return true if intersection is with interior or exterior boundary (see the cases above) ...
Definition: common/intersection.hh:218
Definition: common/intersection.hh:203
bool operator!=(const Intersection &other) const
Compares two intersections for inequality.
Definition: common/intersection.hh:462
Intersection(Implementation &&impl)
Definition: common/intersection.hh:507
int indexInOutside() const
Local index of codim 1 entity in outside() entity where intersection is contained in...
Definition: common/intersection.hh:407
GridImp::template Codim< 0 >::Entity Entity
Type of entity that this Intersection belongs to.
Definition: common/intersection.hh:185
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
Codim 1 geometry returned by geometryInInside() and geometryInOutside()
Definition: common/intersection.hh:200
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
Geometry::LocalCoordinate LocalCoordinate
Type for vectors of coordinates on the intersection.
Definition: common/intersection.hh:194
Geometry::GlobalCoordinate GlobalCoordinate
Type for normal vectors.
Definition: common/intersection.hh:197
Implementation real
Definition: common/intersection.hh:181
GridImp::template Codim< 0 >::EntityPointer EntityPointer
Pointer to the type of entities that this Intersection belongs to.
Definition: common/intersection.hh:188
Implementation & impl()
return reference to the real implementation
Definition: common/intersection.hh:176
GlobalCoordinate unitOuterNormal(const LocalCoordinate &local) const
Return unit outer normal (length == 1)
Definition: common/intersection.hh:439
int indexInInside() const
Local index of codim 1 entity in the inside() entity where intersection is contained in...
Definition: common/intersection.hh:393
GlobalCoordinate centerUnitOuterNormal() const
Return unit outer normal (length == 1)
Definition: common/intersection.hh:450
GridImp::ctype ctype
Type of individual coefficients of coordinate vectors.
Definition: common/intersection.hh:215
GridImp::template Codim< 1 >::Geometry Geometry
Codim 1 geometry returned by geometry()
Definition: common/intersection.hh:191
Intersection & operator=(Intersection &&other)
Move assignment operator from an existing intersection.
Definition: common/intersection.hh:489
GlobalCoordinate outerNormal(const LocalCoordinate &local) const
Return an outer normal (length not necessarily 1)
Definition: common/intersection.hh:416
bool neighbor() const
return true if intersection is shared with another element.
Definition: common/intersection.hh:266
Definition: common/intersection.hh:206
Entity outside() const
return EntityPointer to the Entity on the outside of this intersection. That is the neighboring Entit...
Definition: common/intersection.hh:310
FieldVector< ct, dimworld > unitOuterNormal(const FieldVector< ct, dim-1 > &local) const
return unit outer normal
Definition: common/intersection.hh:545
FieldVector< ctype, cdim > GlobalCoordinate
type of the global coordinates
Definition: common/geometry.hh:104
Definition: common/intersection.hh:209
Entity inside() const
return EntityPointer to the Entity on the inside of this intersection. That is the Entity where we st...
Definition: common/intersection.hh:286
Intersection(Intersection &&other)
Move constructor from an existing intersection.
Definition: common/intersection.hh:477
Definition: common/intersection.hh:212