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;
223 #if DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
239 int boundaryId ()
const
277 typename std::conditional<
288 Entity::template warnOnDeprecatedEntityPointer<decltype(real.
inside())>();
289 return this->real.
inside();
301 typename std::conditional<
312 Entity::template warnOnDeprecatedEntityPointer<decltype(real.
outside())>();
381 return this->real.
type();
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
int boundaryId() const
Definition: sgrid.hh:683
Intersection of a mesh entities of codimension 0 ("elements") with a "neighboring" element or with th...
Definition: albertagrid/dgfparser.hh:26
Definition: common/intersection.hh:212
GlobalCoordinate unitOuterNormal(const LocalCoordinate &local) const
Return unit outer normal (length == 1)
Definition: sgrid.hh:790
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
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
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
bool equals(const SIntersection &other) const
Geometry geometry() const
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
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
FieldVector< ct, dimworld > centerUnitOuterNormal() const
return unit outer normal at center of intersection geometry
Definition: common/intersection.hh:553
bool operator!=(const Intersection &other) const
Compares two intersections for inequality.
Definition: common/intersection.hh:462
static void(*)(*)(*)(*)(*)(*) move(const double *)
Definition: partitiondisplay.cc:122
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
GlobalCoordinate integrationOuterNormal(const LocalCoordinate &local) const
return outer normal scaled with the integration element
Definition: sgrid.hh:782
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
GlobalCoordinate outerNormal(const LocalCoordinate &local) const
Return an outer normal (length not necessarily 1)
Definition: sgrid.hh:776
Default Implementations of integrationOuterNormal and unitOuterNormal for IntersectionImp.
Definition: common/intersection.hh:527
int indexInOutside() const
local index of codim 1 entity in neighbor where intersection is contained in
Different resources needed by all grid implementations.
Geometry::LocalCoordinate LocalCoordinate
Type for vectors of coordinates on the intersection.
Definition: common/intersection.hh:194
LocalGeometry geometryInOutside() const
GlobalCoordinate centerUnitOuterNormal() const
Return unit outer normal (length == 1)
Definition: sgrid.hh:796
Geometry::GlobalCoordinate GlobalCoordinate
Type for normal vectors.
Definition: common/intersection.hh:197
Implementation real
Definition: common/intersection.hh:181
bool conforming() const
return true if intersection is conform.
Definition: sgrid.hh:770
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
GeometryType type() const
obtain the type of reference element for this intersection
Definition: sgrid.hh:711
FieldVector< ct, dimworld > unitOuterNormal(const FieldVector< ct, dim-1 > &local) const
return unit outer normal
Definition: common/intersection.hh:545
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
bool boundary() const
return true if intersection is with boundary.
LocalGeometry geometryInInside() const
int boundarySegmentIndex() const
Definition: sgrid.hh:688
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
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition: common/grid.hh:360
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
Definition: common/intersection.hh:206
Definition: common/intersection.hh:203
bool neighbor() const
return true if intersection is shared with another element.
Definition: common/intersection.hh:266
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< ctype, cdim > GlobalCoordinate
type of the global coordinates
Definition: common/geometry.hh:104
int indexInInside() const
local index of codim 1 entity in self where intersection is contained in
Include standard header files.
Definition: agrid.hh:59
Definition: common/intersection.hh:209
bool neighbor() const
return true if neighbor on this level exists
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
FieldVector< ct, dimworld > integrationOuterNormal(const FieldVector< ct, dim-1 > &local) const
Definition: common/intersection.hh:537
Intersection(Intersection &&other)
Move constructor from an existing intersection.
Definition: common/intersection.hh:477
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178