diff --git a/dune/foamgrid/foamgrid/foamgridfactory.hh b/dune/foamgrid/foamgrid/foamgridfactory.hh index 322550a21e7db8f7a6f95a845e0c084a923e0ba0..99a75a016072043d9856affcc519b1b393533377 100644 --- a/dune/foamgrid/foamgrid/foamgridfactory.hh +++ b/dune/foamgrid/foamgrid/foamgridfactory.hh @@ -152,11 +152,10 @@ template <int dimworld> */ bool wasInserted( const typename FoamGrid<dimgrid, dimworld>::LeafIntersection &intersection ) const override { - if ( !intersection.boundary() ) + if ( !intersection.boundary() || intersection.inside().level() != 0 ) return false; const auto& vertex = intersection.inside().template subEntity<1>(intersection.indexInInside()); - const auto& it = boundarySegmentIndices_.find( this->insertionIndex(vertex) ); return (it != boundarySegmentIndices_.end()); } @@ -308,7 +307,7 @@ template <int dimworld> */ bool wasInserted( const typename FoamGrid<dimgrid, dimworld>::LeafIntersection &intersection ) const override { - if ( !intersection.boundary() ) + if ( !intersection.boundary() || intersection.inside().level() != 0 ) return false; // obtain the vertices of the intersection by reference element numbering