1#ifndef DUNE_FEM_GRIDPART_FILTEREDGRIDPART_INTERSECTIONITERATOR_HH
2#define DUNE_FEM_GRIDPART_FILTEREDGRIDPART_INTERSECTIONITERATOR_HH
9#include <dune/grid/common/intersectioniterator.hh>
11#include <dune/fem/gridpart/filteredgridpart/intersection.hh>
22 template<
class Gr
idPartFamily >
23 class FilteredGridPartIntersectionIterator
25 typedef FilteredGridPartIntersectionIterator< GridPartFamily > ThisType;
27 typedef typename std::remove_const_t< GridPartFamily >::Filter FilterType;
28 typedef typename std::remove_const_t< GridPartFamily >::HostGridPart::IntersectionIteratorType HostIteratorType;
30 typedef FilteredGridPartIntersection< FilterType, typename HostIteratorType::Intersection > IntersectionImpl;
35 FilteredGridPartIntersectionIterator () =
default;
37 FilteredGridPartIntersectionIterator (
const FilterType &filter, HostIteratorType hostIterator )
38 : filter_( &filter ), hostIterator_(
std::move( hostIterator ) )
41 Intersection dereference ()
const {
return Intersection( IntersectionImpl( filter(), *hostIterator_ ) ); }
43 bool equals (
const ThisType &other )
const {
return (hostIterator() == other.hostIterator()); }
45 void increment () { ++hostIterator_; }
47 const FilterType &filter ()
const { assert( filter_ );
return *filter_; }
49 const HostIteratorType &hostIterator ()
const {
return hostIterator_; }
50 HostIteratorType &hostIterator () {
return hostIterator_; }
53 const FilterType *filter_ =
nullptr;
54 HostIteratorType hostIterator_;
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition: intersection.hh:164
constexpr auto equals
Function object for performing equality comparison.
Definition: hybridutilities.hh:572
Dune namespace.
Definition: alignedallocator.hh:13