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(Intersection &&other)
Move constructor from an existing intersection.
Definition: common/intersection.hh:477
bool conforming() const
Return true if intersection is conforming.
Definition: common/intersection.hh:318
FieldVector< ctype, mydim > LocalCoordinate
type of local coordinates
Definition: common/geometry.hh:101
Definition: common/intersection.hh:209
Entity outside() const
return EntityPointer to the Entity on the outside of this intersection. That is the neighboring Entit...
Definition: common/intersection.hh:310
LocalGeometry geometryInInside() const
geometrical information about this intersection in local coordinates of the inside() entity...
Definition: common/intersection.hh:336
GlobalCoordinate unitOuterNormal(const LocalCoordinate &local) const
Return unit outer normal (length == 1)
Definition: sgrid.hh:790
Geometry geometry() const
geometrical information about the intersection in global coordinates.
Definition: common/intersection.hh:373
bool boundary() const
Return true if intersection is with interior or exterior boundary (see the cases above) ...
Definition: common/intersection.hh:218
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition: common/grid.hh:360
int indexInOutside() const
Local index of codim 1 entity in outside() entity where intersection is contained in...
Definition: common/intersection.hh:407
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
GlobalCoordinate integrationOuterNormal(const LocalCoordinate &local) const
return unit outer normal scaled with the integration element
Definition: common/intersection.hh:429
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
Definition: common/intersection.hh:203
Geometry::LocalCoordinate LocalCoordinate
Type for vectors of coordinates on the intersection.
Definition: common/intersection.hh:194
Include standard header files.
Definition: agrid.hh:59
bool equals(const SIntersection &other) const
Geometry geometry() const
LocalGeometry geometryInOutside() const
geometrical information about this intersection in local coordinates of the outside() entity...
Definition: common/intersection.hh:354
bool operator==(const Intersection &other) const
Compares two intersections for equality.
Definition: common/intersection.hh:456
const Implementation & impl() const
return reference to the real implementation
Definition: common/intersection.hh:178
bool operator!=(const Intersection &other) const
Compares two intersections for inequality.
Definition: common/intersection.hh:462
Intersection()
Default constructor.
Definition: common/intersection.hh:468
static void(*)(*)(*)(*)(*)(*) move(const double *)
Definition: partitiondisplay.cc:122
GlobalCoordinate integrationOuterNormal(const LocalCoordinate &local) const
return outer normal scaled with the integration element
Definition: sgrid.hh:782
GlobalCoordinate outerNormal(const LocalCoordinate &local) const
Return an outer normal (length not necessarily 1)
Definition: sgrid.hh:776
GeometryType type() const
obtain the type of reference element for this intersection
Definition: common/intersection.hh:379
FieldVector< ct, dimworld > integrationOuterNormal(const FieldVector< ct, dim-1 > &local) const
Definition: common/intersection.hh:537
int indexInOutside() const
local index of codim 1 entity in neighbor where intersection is contained in
Intersection(const Implementation &impl)
Definition: common/intersection.hh:502
Definition: common/intersection.hh:212
Different resources needed by all grid implementations.
LocalGeometry geometryInOutside() const
GlobalCoordinate centerUnitOuterNormal() const
Return unit outer normal (length == 1)
Definition: sgrid.hh:796
size_t boundarySegmentIndex() const
index of the boundary segment within the macro grid
Definition: common/intersection.hh:260
GridImp::template Codim< 0 >::EntityPointer EntityPointer
Pointer to the type of entities that this Intersection belongs to.
Definition: common/intersection.hh:188
bool conforming() const
return true if intersection is conform.
Definition: sgrid.hh:770
Intersection & operator=(const Intersection &other)
Copy assignment operator from an existing intersection.
Definition: common/intersection.hh:482
Implementation real
Definition: common/intersection.hh:181
GeometryType type() const
obtain the type of reference element for this intersection
Definition: sgrid.hh:711
int indexInInside() const
Local index of codim 1 entity in the inside() entity where intersection is contained in...
Definition: common/intersection.hh:393
bool neighbor() const
return true if intersection is shared with another element.
Definition: common/intersection.hh:266
GlobalCoordinate centerUnitOuterNormal() const
Return unit outer normal (length == 1)
Definition: common/intersection.hh:450
Intersection(Implementation &&impl)
Definition: common/intersection.hh:507
GridImp::template Codim< 0 >::Entity Entity
Type of entity that this Intersection belongs to.
Definition: common/intersection.hh:185
Intersection of a mesh entities of codimension 0 ("elements") with a "neighboring" element or with th...
Definition: albertagrid/dgfparser.hh:26
FieldVector< ct, dimworld > unitOuterNormal(const FieldVector< ct, dim-1 > &local) const
return unit outer normal
Definition: common/intersection.hh:545
GridImp::template Codim< 1 >::Geometry Geometry
Codim 1 geometry returned by geometry()
Definition: common/intersection.hh:191
bool boundary() const
return true if intersection is with boundary.
LocalGeometry geometryInInside() const
int boundarySegmentIndex() const
Definition: sgrid.hh:688
Default Implementations of integrationOuterNormal and unitOuterNormal for IntersectionImp.
Definition: common/intersection.hh:527
GlobalCoordinate outerNormal(const LocalCoordinate &local) const
Return an outer normal (length not necessarily 1)
Definition: common/intersection.hh:416
Geometry::GlobalCoordinate GlobalCoordinate
Type for normal vectors.
Definition: common/intersection.hh:197
GridImp::ctype ctype
Type of individual coefficients of coordinate vectors.
Definition: common/intersection.hh:215
Implementation & impl()
return reference to the real implementation
Definition: common/intersection.hh:176
Intersection & operator=(Intersection &&other)
Move assignment operator from an existing intersection.
Definition: common/intersection.hh:489
GlobalCoordinate unitOuterNormal(const LocalCoordinate &local) const
Return unit outer normal (length == 1)
Definition: common/intersection.hh:439
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
Intersection(const Intersection &other)
Copy constructor from an existing intersection.
Definition: common/intersection.hh:472
bool neighbor() const
return true if neighbor on this level exists
Definition: common/intersection.hh:206
FieldVector< ct, dimworld > centerUnitOuterNormal() const
return unit outer normal at center of intersection geometry
Definition: common/intersection.hh:553