Skip to content
Snippets Groups Projects
Commit 33125f0c authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

[staggered][geometryhelper] Use indexInInside for intersection function

parent 63202e7e
No related branches found
No related tags found
1 merge request!2901Feature/improve staggered gridgeometry
......@@ -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");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment