4#ifndef DUNE_GRID_INTERSECTION_HH
5#define DUNE_GRID_INTERSECTION_HH
160 template<
class Gr
idImp,
class IntersectionImp >
163#if DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
169 GridImp::
dimension, GridImp::dimensionworld,
170 typename GridImp::ctype,
171 typename GridImp::GridFamily> ;
186 typedef typename GridImp::template Codim<0>::Entity
Entity;
189 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
203 enum DUNE_DEPRECATED_MSG(
"Deprecated: codimensions of an intersection are always 1!") {
codimension=1 };
210 enum DUNE_DEPRECATED_MSG(
"Deprecated: get this dimension from the grid itself, or from an element!") {
dimension=GridImp::dimension };
219 typedef typename GridImp::ctype
ctype;
224 return this->real.boundary();
227#if DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
243 int boundaryId ()
const
245 return this->real.boundaryId();
266 return this->real.boundarySegmentIndex();
272 return this->real.neighbor();
280 return this->real.inside();
291 return this->real.outside();
298 return this->real.conforming();
316 return this->real.geometryInInside();
334 return this->real.geometryInOutside();
353 return this->real.geometry();
359 return this->real.type();
376 return this->real.indexInInside();
393 return this->real.indexInOutside();
402 return this->real.outerNormal(local);
415 return this->real.integrationOuterNormal(local);
425 return this->real.unitOuterNormal(local);
436 return this->real.centerUnitOuterNormal();
475 real = std::move(other.real);
510 template<
class Gr
idImp,
class IntersectionImp >
513 enum { dim=GridImp::dimension };
514 enum { dimworld=GridImp::dimensionworld };
515 typedef typename GridImp::ctype ct;
523 FieldVector<ct, dimworld> n = asImp().unitOuterNormal(local);
524 n *= asImp().geometry().integrationElement(local);
531 FieldVector<ct, dimworld> n = asImp().outerNormal(local);
540 GeometryType type = asImp().geometry().type();
541 const ReferenceElement<ct, dim-1> & refElement =
542 ReferenceElements<ct, dim-1>::general(type);
543 return asImp().unitOuterNormal(refElement.position(0,0));
551 IntersectionImp &asImp () {
return static_cast< IntersectionImp &
>( *this ); }
552 const IntersectionImp &asImp ()
const {
return static_cast< const IntersectionImp &
>( *this ); }
Include standard header files.
Definition agrid.hh:60
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:162
Intersection & operator=(const Intersection &other)
Copy assignment operator from an existing intersection.
Definition common/intersection.hh:466
Geometry geometry() const
geometrical information about the intersection in global coordinates.
Definition common/intersection.hh:351
bool conforming() const
Return true if intersection is conforming.
Definition common/intersection.hh:296
Entity outside() const
return Entity on the outside of this intersection. That is the neighboring Entity.
Definition common/intersection.hh:289
int indexInOutside() const
Local index of codim 1 entity in outside() entity where intersection is contained in.
Definition common/intersection.hh:391
bool neighbor() const
return true if intersection is shared with another element.
Definition common/intersection.hh:270
bool boundary() const
Return true if intersection is with interior or exterior boundary (see the cases above)
Definition common/intersection.hh:222
int indexInInside() const
Local index of codim 1 entity in the inside() entity where intersection is contained in.
Definition common/intersection.hh:374
Intersection(Implementation &&impl)
Definition common/intersection.hh:491
Intersection & operator=(Intersection &&other)
Move assignment operator from an existing intersection.
Definition common/intersection.hh:473
Geometry::GlobalCoordinate GlobalCoordinate
Type for normal vectors.
Definition common/intersection.hh:195
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
Codim 1 geometry returned by geometryInInside() and geometryInOutside()
Definition common/intersection.hh:198
GlobalCoordinate unitOuterNormal(const LocalCoordinate &local) const
Return unit outer normal (length == 1)
Definition common/intersection.hh:423
bool operator!=(const Intersection &other) const
Compares two intersections for inequality.
Definition common/intersection.hh:446
GeometryType type() const
obtain the type of reference element for this intersection
Definition common/intersection.hh:357
Intersection(Intersection &&other)
Move constructor from an existing intersection.
Definition common/intersection.hh:461
LocalGeometry geometryInOutside() const
geometrical information about this intersection in local coordinates of the outside() entity.
Definition common/intersection.hh:332
LocalGeometry geometryInInside() const
geometrical information about this intersection in local coordinates of the inside() entity.
Definition common/intersection.hh:314
size_t boundarySegmentIndex() const
index of the boundary segment within the macro grid
Definition common/intersection.hh:264
@ codimension
Definition common/intersection.hh:203
@ dimension
Definition common/intersection.hh:210
Entity inside() const
return Entity on the inside of this intersection. That is the Entity where we started this.
Definition common/intersection.hh:278
Geometry::LocalCoordinate LocalCoordinate
Type for vectors of coordinates on the intersection.
Definition common/intersection.hh:192
Implementation real
Definition common/intersection.hh:182
GlobalCoordinate centerUnitOuterNormal() const
Return unit outer normal (length == 1)
Definition common/intersection.hh:434
GridImp::template Codim< 1 >::Geometry Geometry
Codim 1 geometry returned by geometry()
Definition common/intersection.hh:189
Implementation & impl()
return reference to the real implementation
Definition common/intersection.hh:177
@ mydimension
Definition common/intersection.hh:213
GridImp::template Codim< 0 >::Entity Entity
Type of entity that this Intersection belongs to.
Definition common/intersection.hh:186
const Implementation & impl() const
return reference to the real implementation
Definition common/intersection.hh:179
@ dimensionworld
Definition common/intersection.hh:216
GlobalCoordinate outerNormal(const LocalCoordinate &local) const
Return an outer normal (length not necessarily 1)
Definition common/intersection.hh:400
Intersection()
Default constructor.
Definition common/intersection.hh:452
GridImp::ctype ctype
Type of individual coefficients of coordinate vectors.
Definition common/intersection.hh:219
Intersection(const Implementation &impl)
Definition common/intersection.hh:486
IntersectionImp Implementation
Definition common/intersection.hh:174
GlobalCoordinate integrationOuterNormal(const LocalCoordinate &local) const
return unit outer normal scaled with the integration element
Definition common/intersection.hh:413
bool operator==(const Intersection &other) const
Compares two intersections for equality.
Definition common/intersection.hh:440
Intersection(const Intersection &other)
Copy constructor from an existing intersection.
Definition common/intersection.hh:456
Definition common/grid.hh:924
FieldVector< ctype, cdim > GlobalCoordinate
type of the global coordinates
Definition common/geometry.hh:96
FieldVector< ctype, mydim > LocalCoordinate
type of local coordinates
Definition common/geometry.hh:93
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition common/intersectioniterator.hh:81
Default Implementations of integrationOuterNormal and unitOuterNormal for IntersectionImp.
Definition common/intersection.hh:512
FieldVector< ct, dimworld > integrationOuterNormal(const FieldVector< ct, dim-1 > &local) const
Definition common/intersection.hh:521
FieldVector< ct, dimworld > unitOuterNormal(const FieldVector< ct, dim-1 > &local) const
return unit outer normal
Definition common/intersection.hh:529
FieldVector< ct, dimworld > centerUnitOuterNormal() const
return unit outer normal at center of intersection geometry
Definition common/intersection.hh:537
Different resources needed by all grid implementations.