22#ifndef DUMUX_BOUNDING_BOX_TREE_INTERSECTION_HH
23#define DUMUX_BOUNDING_BOX_TREE_INTERSECTION_HH
25#warning "This header is deprecated and will be removed after 3.2. Use more general class IntersectionInfo from header intersectingentities.hh"
26#include <dune/common/fvector.hh>
27#include <dune/common/promotiontraits.hh>
40template<
class EntitySet0,
class EntitySet1>
43 enum { dimworld = EntitySet0::dimensionworld };
44 using ctype =
typename Dune::PromotionTraits<typename EntitySet0::ctype, typename EntitySet1::ctype>::PromotedType;
45 using GlobalPosition = Dune::FieldVector<ctype, dimworld>;
48 template<
class Corners>
54 , corners_(c.begin(), c.end())
56 static_assert(int(EntitySet0::dimensionworld) == int(EntitySet1::dimensionworld),
57 "Can only store intersections of entity sets with the same world dimension");
69 std::vector<GlobalPosition>
corners()
const
76 bool cornersMatch(
const std::vector<GlobalPosition>& otherCorners)
const
78 if (otherCorners.size() != corners_.size())
81 const auto eps = 1.5e-7*(corners_[1] - corners_[0]).two_norm();
82 for (
int i = 0; i < corners_.size(); ++i)
83 if ((corners_[i] - otherCorners[i]).two_norm() > eps)
91 std::vector<GlobalPosition> corners_;
An intersection object resulting from the intersection of two bounding box tree primitives.
Definition: boundingboxtreeintersection.hh:42
std::vector< GlobalPosition > corners() const
Get the corners of the intersection geometry.
Definition: boundingboxtreeintersection.hh:69
std::size_t first() const
Get the index of the intersecting entity belonging to this grid.
Definition: boundingboxtreeintersection.hh:61
std::size_t second() const
Get the index of the intersecting entity belonging to the other grid.
Definition: boundingboxtreeintersection.hh:65
bool cornersMatch(const std::vector< GlobalPosition > &otherCorners) const
Check if the corners of this intersection match with the given corners.
Definition: boundingboxtreeintersection.hh:76
BoundingBoxTreeIntersection(std::size_t a, std::size_t b, Corners &&c)
Definition: boundingboxtreeintersection.hh:49
An intersection object resulting from the intersection of two primitives in an entity set.
Definition: intersectingentities.hh:46