1 #ifndef DUNE_PDELAB_COMMON_INTERSECTIONTYPE_HH
2 #define DUNE_PDELAB_COMMON_INTERSECTIONTYPE_HH
7 #include <dune/common/version.hh>
8 #include <dune/grid/common/partitionset.hh>
36 template<
typename EntitySet,
typename Intersection>
37 std::tuple<IntersectionType,typename EntitySet::Element>
classifyIntersection(
const EntitySet& entity_set,
const Intersection& is)
39 auto type =
static_cast<IntersectionType>(1* is.neighbor() + 2*is.boundary());
41 if (entity_set.partitions() == Partitions::all)
42 return std::make_tuple(type,is.outside());
45 auto outside_entity = is.outside();
46 if (entity_set.partitions().contains(outside_entity.partitionType()))
47 return std::make_tuple(type,outside_entity);
52 return std::make_tuple(type,decltype(is.outside()){});
59 #endif // DUNE_PDELAB_COMMON_INTERSECTIONTYPE_HH