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 168 friend class GridDefaultImplementation<
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;
227 #if DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS 243 int boundaryId ()
const 280 return this->real.
inside();
359 return this->real.
type();
442 return real.
equals(other.real);
448 return !real.
equals(other.real);
462 : real(
std::move(other.real))
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);
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 ); }
557 #endif // DUNE_GRID_INTERSECTION_HH bool neighbor() const
Definition: intersection.cc:420
Definition: common/intersection.hh:203
size_t boundarySegmentIndex() const
Definition: intersection.cc:62
Intersection & operator=(const Intersection &other)
Copy assignment operator from an existing intersection.
Definition: common/intersection.hh:466
bool boundary() const
Return true if intersection is with interior or exterior boundary (see the cases above) ...
Definition: common/intersection.hh:222
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition: albertagrid/dgfparser.hh:26
Intersection(const Intersection &other)
Copy constructor from an existing intersection.
Definition: common/intersection.hh:456
GlobalCoordinate integrationOuterNormal(const LocalCoordinate &local) const
return unit outer normal scaled with the integration element
Definition: common/intersection.hh:413
GlobalCoordinate unitOuterNormal(const LocalCoordinate &local) const
Return unit outer normal (length == 1)
Definition: common/intersection.hh:423
int indexInInside() const
Local index of codim 1 entity in the inside() entity where intersection is contained in...
Definition: common/intersection.hh:374
bool operator!=(const Intersection &other) const
Compares two intersections for inequality.
Definition: common/intersection.hh:446
Geometry geometry() const
geometrical information about the intersection in global coordinates.
Definition: common/intersection.hh:351
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
Intersection(Intersection &&other)
Move constructor from an existing intersection.
Definition: common/intersection.hh:461
Implementation real
Definition: common/intersection.hh:182
NormalVector integrationOuterNormal(const LocalCoordType &local) const
Definition: intersection.cc:188
Implementation & impl()
return reference to the real implementation
Definition: common/intersection.hh:177
Geometry geometry() const
Definition: intersection.cc:455
bool conforming() const
Return true if intersection is conforming.
Definition: common/intersection.hh:296
bool boundary() const
Definition: intersection.cc:41
Entity inside() const
return Entity on the inside of this intersection. That is the Entity where we started this...
Definition: common/intersection.hh:278
Intersection(const Implementation &impl)
Definition: common/intersection.hh:486
FieldVector< ct, dimworld > integrationOuterNormal(const FieldVector< ct, dim-1 > &local) const
Definition: common/intersection.hh:521
Intersection()
Default constructor.
Definition: common/intersection.hh:452
FieldVector< ct, dimworld > unitOuterNormal(const FieldVector< ct, dim-1 > &local) const
return unit outer normal
Definition: common/intersection.hh:529
GridImp::template Codim< 1 >::Geometry Geometry
Codim 1 geometry returned by geometry()
Definition: common/intersection.hh:189
const Implementation & impl() const
return reference to the real implementation
Definition: common/intersection.hh:179
Definition: common/intersection.hh:210
GridImp::template Codim< 0 >::Entity Entity
Type of entity that this Intersection belongs to.
Definition: common/intersection.hh:186
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition: common/grid.hh:345
NormalVector centerUnitOuterNormal() const
Definition: intersection.cc:178
int boundaryId() const
Definition: intersection.cc:48
int indexInInside() const
Definition: intersection.cc:72
GlobalCoordinate centerUnitOuterNormal() const
Return unit outer normal (length == 1)
Definition: common/intersection.hh:434
GlobalCoordinate outerNormal(const LocalCoordinate &local) const
Return an outer normal (length not necessarily 1)
Definition: common/intersection.hh:400
int indexInOutside() const
Local index of codim 1 entity in outside() entity where intersection is contained in...
Definition: common/intersection.hh:391
size_t boundarySegmentIndex() const
index of the boundary segment within the macro grid
Definition: common/intersection.hh:264
GeometryType type() const
Definition: intersection.cc:80
Default Implementations of integrationOuterNormal and unitOuterNormal for IntersectionImp.
Definition: common/intersection.hh:511
Geometry::GlobalCoordinate GlobalCoordinate
Type for normal vectors.
Definition: common/intersection.hh:195
bool operator==(const Intersection &other) const
Compares two intersections for equality.
Definition: common/intersection.hh:440
NormalVector outerNormal(const LocalCoordType &local) const
Definition: intersection.cc:196
Definition: common/intersection.hh:216
Include standard header files.
Definition: agrid.hh:59
FieldVector< ctype, cdim > GlobalCoordinate
type of the global coordinates
Definition: common/geometry.hh:96
LocalGeometry geometryInInside() const
Definition: intersection.cc:429
bool conforming() const
Definition: intersection.cc:414
Intersection & operator=(Intersection &&other)
Move assignment operator from an existing intersection.
Definition: common/intersection.hh:473
LocalGeometry geometryInInside() const
geometrical information about this intersection in local coordinates of the inside() entity...
Definition: common/intersection.hh:314
GridImp::ctype ctype
Type of individual coefficients of coordinate vectors.
Definition: common/intersection.hh:219
Definition: common/intersection.hh:213
NormalVector unitOuterNormal(const LocalCoordType &local) const
Definition: intersection.cc:204
Intersection(Implementation &&impl)
Definition: common/intersection.hh:491
bool neighbor() const
return true if intersection is shared with another element.
Definition: common/intersection.hh:270
FieldVector< ct, dimworld > centerUnitOuterNormal() const
return unit outer normal at center of intersection geometry
Definition: common/intersection.hh:537
FieldVector< ctype, mydim > LocalCoordinate
type of local coordinates
Definition: common/geometry.hh:93
Different resources needed by all grid implementations.
Entity inside() const
Definition: intersection.cc:33
LocalGeometry geometryInOutside() const
Definition: intersection.cc:440
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
Codim 1 geometry returned by geometryInInside() and geometryInOutside()
Definition: common/intersection.hh:198
Entity outside() const
return Entity on the outside of this intersection. That is the neighboring Entity.
Definition: common/intersection.hh:289
Geometry::LocalCoordinate LocalCoordinate
Type for vectors of coordinates on the intersection.
Definition: common/intersection.hh:192
Definition: albertagrid/entity.hh:30
GeometryType type() const
obtain the type of reference element for this intersection
Definition: common/intersection.hh:357
bool equals(const AlbertaGridLeafIntersection &other) const
Definition: albertagrid/intersection.hh:147
GridImp::template Codim< 0 >::Entity outside() const
Definition: intersection.cc:397
LocalGeometry geometryInOutside() const
geometrical information about this intersection in local coordinates of the outside() entity...
Definition: common/intersection.hh:332
int indexInOutside() const
Definition: intersection.cc:464