4 #ifndef DUNE_GRID_INTERSECTION_HH 5 #define DUNE_GRID_INTERSECTION_HH 160 template<
class Gr
idImp,
class IntersectionImp >
183 const Implementation &
impl ()
const {
return real; }
190 typedef typename GridImp::template Codim<0>::Entity
Entity;
193 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
207 enum DUNE_DEPRECATED_MSG(
"Deprecated: codimensions of an intersection are always 1!") {
codimension=1 };
214 enum DUNE_DEPRECATED_MSG(
"Deprecated: get this dimension from the grid itself, or from an element!") {
dimension=GridImp::dimension };
223 typedef typename GridImp::ctype
ctype;
262 return this->real.
inside();
341 return this->real.
type();
424 return real.
equals(other.real);
430 return !real.
equals(other.real);
444 : real(
std::move(other.real))
457 real = std::move(other.real);
492 template<
class Gr
idImp,
class IntersectionImp >
495 enum { dim=GridImp::dimension };
496 enum { dimworld=GridImp::dimensionworld };
497 typedef typename GridImp::ctype ct;
505 FieldVector<ct, dimworld> n = asImp().unitOuterNormal(local);
506 n *= asImp().geometry().integrationElement(local);
513 FieldVector<ct, dimworld> n = asImp().outerNormal(local);
524 return asImp().unitOuterNormal(refElement.position(0,0));
532 IntersectionImp &asImp () {
return static_cast< IntersectionImp &
>( *this ); }
533 const IntersectionImp &asImp ()
const {
return static_cast< const IntersectionImp &
>( *this ); }
538 #endif // DUNE_GRID_INTERSECTION_HH Intersection(Intersection &&other)
Move constructor from an existing intersection.
Definition: common/intersection.hh:443
FieldVector< ct, dimworld > centerUnitOuterNormal() const
return unit outer normal at center of intersection geometry
Definition: common/intersection.hh:519
LocalGeometry geometryInOutside() const
Definition: intersection.cc:400
Implementation real
Definition: common/intersection.hh:186
Implementation & impl()
access to the underlying implementation
Definition: common/intersection.hh:176
FieldVector< ctype, mydim > LocalCoordinate
type of local coordinates
Definition: common/geometry.hh:98
bool conforming() const
Return true if intersection is conforming.
Definition: common/intersection.hh:278
IntersectionImp Implementation
type of underlying implementation
Definition: common/intersection.hh:169
Entity inside() const
Definition: intersection.cc:33
Intersection(const Implementation &impl)
Definition: common/intersection.hh:468
Intersection()
Default constructor.
Definition: common/intersection.hh:434
bool neighbor() const
Definition: intersection.cc:380
FieldVector< ct, dimworld > unitOuterNormal(const FieldVector< ct, dim-1 > &local) const
return unit outer normal
Definition: common/intersection.hh:511
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
Codim 1 geometry returned by geometryInInside() and geometryInOutside()
Definition: common/intersection.hh:202
bool conforming() const
Definition: albertagrid/intersection.hh:164
GridImp::template Codim< 0 >::Entity Entity
Type of entity that this Intersection belongs to.
Definition: common/intersection.hh:190
NormalVector centerUnitOuterNormal() const
Definition: intersection.cc:177
LocalGeometry geometryInInside() const
Definition: intersection.cc:389
size_t boundarySegmentIndex() const
Definition: intersection.cc:62
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition: common/grid.hh:345
Intersection(const Intersection &other)
Copy constructor from an existing intersection.
Definition: common/intersection.hh:438
GlobalCoordinate integrationOuterNormal(const LocalCoordinate &local) const
return unit outer normal scaled with the integration element
Definition: common/intersection.hh:395
GlobalCoordinate centerUnitOuterNormal() const
Return unit outer normal (length == 1)
Definition: common/intersection.hh:416
Default Implementations of integrationOuterNormal and unitOuterNormal for IntersectionImp.
Definition: common/intersection.hh:493
bool operator!=(const Intersection &other) const
Compares two intersections for inequality.
Definition: common/intersection.hh:428
Geometry geometry() const
geometrical information about the intersection in global coordinates.
Definition: common/intersection.hh:333
NormalVector integrationOuterNormal(const LocalCoordType &local) const
Definition: intersection.cc:187
bool equals(const AlbertaGridLeafIntersection &other) const
Definition: albertagrid/intersection.hh:156
GridImp::template Codim< 0 >::Entity outside() const
Definition: intersection.cc:363
bool operator==(const Intersection &other) const
Compares two intersections for equality.
Definition: common/intersection.hh:422
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:260
int indexInOutside() const
Definition: intersection.cc:424
GridImp::template Codim< 1 >::Geometry Geometry
Codim 1 geometry returned by geometry()
Definition: common/intersection.hh:193
const Implementation & impl() const
access to the underlying implementation
Definition: common/intersection.hh:183
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
Intersection & operator=(Intersection &&other)
Move assignment operator from an existing intersection.
Definition: common/intersection.hh:455
Different resources needed by all grid implementations.
NormalVector unitOuterNormal(const LocalCoordType &local) const
Definition: intersection.cc:203
Intersection(Implementation &&impl)
Definition: common/intersection.hh:473
Definition: common/intersection.hh:217
int indexInInside() const
Definition: intersection.cc:72
GlobalCoordinate outerNormal(const LocalCoordinate &local) const
Return an outer normal (length not necessarily 1)
Definition: common/intersection.hh:382
Definition: common/intersection.hh:207
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition: albertagrid/dgfparser.hh:26
int indexInOutside() const
Local index of codim 1 entity in outside() entity where intersection is contained in...
Definition: common/intersection.hh:373
size_t boundarySegmentIndex() const
index of the boundary segment within the macro grid
Definition: common/intersection.hh:246
Definition: common/intersection.hh:214
GeometryType type() const
Definition: intersection.cc:80
FieldVector< ct, dimworld > integrationOuterNormal(const FieldVector< ct, dim-1 > &local) const
Definition: common/intersection.hh:503
Entity outside() const
return Entity on the outside of this intersection. That is the neighboring Entity.
Definition: common/intersection.hh:271
Geometry::LocalCoordinate LocalCoordinate
Type for vectors of coordinates on the intersection.
Definition: common/intersection.hh:196
Geometry geometry() const
Definition: intersection.cc:415
GeometryType type() const
obtain the type of reference element for this intersection
Definition: common/intersection.hh:339
auto referenceElement(const Geometry< mydim, cdim, GridImp, GeometryImp > &geo) -> decltype(referenceElement(geo, geo.impl()))
Definition: common/geometry.hh:411
FieldVector< ctype, cdim > GlobalCoordinate
type of the global coordinates
Definition: common/geometry.hh:101
Geometry::GlobalCoordinate GlobalCoordinate
Type for normal vectors.
Definition: common/intersection.hh:199
NormalVector outerNormal(const LocalCoordType &local) const
Definition: intersection.cc:195
LocalGeometry geometryInOutside() const
geometrical information about this intersection in local coordinates of the outside() entity...
Definition: common/intersection.hh:314
Intersection & operator=(const Intersection &other)
Copy assignment operator from an existing intersection.
Definition: common/intersection.hh:448
bool boundary() const
Return true if intersection is with interior or exterior boundary (see the cases above) ...
Definition: common/intersection.hh:226
LocalGeometry geometryInInside() const
geometrical information about this intersection in local coordinates of the inside() entity...
Definition: common/intersection.hh:296
GridImp::ctype ctype
Type of individual coefficients of coordinate vectors.
Definition: common/intersection.hh:223
Definition: common/intersection.hh:220
GlobalCoordinate unitOuterNormal(const LocalCoordinate &local) const
Return unit outer normal (length == 1)
Definition: common/intersection.hh:405
int indexInInside() const
Local index of codim 1 entity in the inside() entity where intersection is contained in...
Definition: common/intersection.hh:356
bool neighbor() const
return true if intersection is shared with another element.
Definition: common/intersection.hh:252
Include standard header files.
Definition: agrid.hh:58