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 DUNE_VERSION_NEWER_REV(DUNE_GRID,2,4,1) 42 if (entity_set.partitions() == Partitions::all)
44 if (entity_set.partitions().partitionIterator() == Partitions::all.partitionIterator())
46 return std::make_tuple(type,is.outside());
49 auto outside_entity = is.outside();
50 if (entity_set.partitions().contains(outside_entity.partitionType()))
51 return std::make_tuple(type,outside_entity);
56 return std::make_tuple(type,decltype(is.outside()){});
63 #endif // DUNE_PDELAB_COMMON_INTERSECTIONTYPE_HH skeleton intersection (neighbor() == true && boundary() == false)
periodic boundary intersection (neighbor() == true && boundary() == true)
domain boundary intersection (neighbor() == false && boundary() == true)
IntersectionType
Enum describing the type of an intersection.
Definition: intersectiontype.hh:14
std::tuple< IntersectionType, typename EntitySet::Element > classifyIntersection(const EntitySet &entity_set, const Intersection &is)
Classifies the type of an intersection wrt to the passed EntitySet.
Definition: intersectiontype.hh:37
For backward compatibility – Do not use this!
Definition: adaptivity.hh:27
processor boundary intersection (neighbor() == false && boundary() == false) or outside entity not in...