Commit 33125f0c authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

[staggered][geometryhelper] Use indexInInside for intersection function

parent 63202e7e
......@@ -155,12 +155,10 @@ public:
//! Returns an element's intersection based on the local facet index.
auto intersection(const SmallLocalIndexType localFacetIdx, const Element& element) const
{
SmallLocalIndexType counter = 0;
for (const auto& intersection : intersections(gridView(), element))
{
if (counter == localFacetIdx)
if (intersection.indexInInside() == localFacetIdx)
return intersection;
++counter;
}
DUNE_THROW(Dune::InvalidStateException, "localFacetIdx " << localFacetIdx << " out of range");
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment