36 #ifndef OPM_INTERSECTION_HEADER 37 #define OPM_INTERSECTION_HEADER 42 #include <dune/grid/common/gridenums.hh> 44 #include <opm/grid/utility/ErrorMacros.hpp> 52 #include "Geometry.hpp" 53 #include "OrientedEntityTable.hpp" 72 enum { dimension = 3 };
73 enum { dimensionworld = 3 };
81 typedef FieldVector<ctype, 2> LocalCoordinate;
82 typedef FieldVector<ctype, 3> GlobalCoordinate;
95 is_on_boundary_(false)
109 return subindex_ == other.subindex_ && index_ == other.index_ && pgrid_ == other.pgrid_;
127 return is_on_boundary_;
142 return !
boundary() && nbcell_!=std::numeric_limits<int>::max();
170 OPM_THROW(std::runtime_error,
"This intersection class does not support geometryInInside().");
182 OPM_THROW(std::runtime_error,
"Cannot access geometryInOutside(), intersection is at a boundary.");
184 OPM_THROW(std::runtime_error,
"This intersection class does not support geometryInOutside().");
213 return in_inside + ((in_inside % 2) ? -1 : 1);
220 FieldVector<ctype, 3>
outerNormal(
const FieldVector<ctype, 2>&)
const;
232 FieldVector<ctype, 3>
unitOuterNormal(
const FieldVector<ctype, 2>&)
const;
247 const CpGridData* pgrid_;
250 OrientedEntityTable<0,1>::row_type faces_of_cell_;
251 Geometry global_geom_;
255 bool is_on_boundary_;
263 subindex_ = faces_of_cell_.size();
268 return subindex_ == faces_of_cell_.size();
273 if (is_on_boundary_) {
274 OPM_THROW(std::runtime_error,
"There is no outside cell, intersection is at boundary.");
276 if(nbcell_==std::numeric_limits<int>::max())
277 OPM_THROW(std::runtime_error,
"There is no outside cell, intersection is at processor boundary.");
300 Intersection::setAtEnd();
302 Intersection::update();
308 Intersection::increment();
314 assert(!Intersection::isAtEnd());
320 assert(!Intersection::isAtEnd());
333 #endif // OPM_INTERSECTION_HEADER const LocalGeometry & geometryInOutside() const
Definition: Intersection.hpp:179
Definition: CpGridData.hpp:93
int index() const
The (positive) index of an entity.
Definition: EntityRep.hpp:126
bool conforming() const
Definition: Intersection.hpp:158
Intersection()
Definition: Intersection.hpp:87
EntityPointer outside() const
Definition: Intersection.cpp:161
bool operator==(const Intersection &other) const
Definition: Intersection.hpp:107
EntityPointer inside() const
Definition: Intersection.cpp:156
Holds the implementation of the CpGrid as a pimple.
Definition: OpmParserIncludes.hpp:42
const LocalGeometry & geometryInInside() const
Definition: Intersection.hpp:168
Definition: Intersection.hpp:67
FieldVector< ctype, 3 > centerUnitOuterNormal() const
Definition: Intersection.cpp:151
Struct that hods all the data needed to represent a Cpgrid.
Definition: CpGridData.hpp:105
cpgrid::Entity< 0 > Entity
Definition: Intersection.hpp:76
int indexInInside() const
Local index of codim 1 entity in the inside() entity where intersection is contained in...
Definition: Intersection.cpp:114
FieldVector< ctype, 3 > integrationOuterNormal(const FieldVector< ctype, 2 > &unused) const
Definition: Intersection.cpp:140
int boundaryId() const
Returns the boundary id of this intersection.
Definition: Intersection.cpp:32
bool neighbor() const
Definition: Intersection.hpp:140
FieldVector< ctype, 3 > outerNormal(const FieldVector< ctype, 2 > &) const
Definition: Intersection.cpp:135
const Geometry & geometry() const
Definition: Intersection.hpp:191
GeometryType type() const
Definition: Intersection.hpp:199
FieldVector< ctype, 3 > unitOuterNormal(const FieldVector< ctype, 2 > &) const
Definition: Intersection.cpp:146
int indexInOutside() const
Local index of codim 1 entity in outside() entity where intersection is contained in...
Definition: Intersection.hpp:210
bool operator!=(const Intersection &other) const
Definition: Intersection.hpp:116
int boundarySegmentIndex() const
Returns the boundary segment index of this intersection.
Definition: Intersection.cpp:66
Low-level corner-point processing routines and supporting data structures.
Represents an entity of a given codim, with positive or negative orientation.
Definition: CpGridData.hpp:94
Definition: Intersection.hpp:286
bool boundary() const
Definition: Intersection.hpp:125