Commit 651643f9 authored by Dennis Gläser's avatar Dennis Gläser Committed by Timo Koch
Browse files

[mpfa-o-fps][localscentities] use stdlib for the searching of local indices

parent 274fd2e2
......@@ -129,15 +129,9 @@ public:
LocalIndexType getScvfIdxInScv(const LocalIndexType localScvfIndex) const
LocalIndexType count = 0;
for (auto&& localIdx : scvSeed_().localScvfIndices())
if (localIdx == localScvfIndex)
return count;
DUNE_THROW(Dune::InvalidStateException, "Could not find the local coordinate of the local scvf");
auto it = std::find(scvSeed_().localScvfIndices().begin(), scvSeed_().localScvfIndices().end(), localScvfIndex);
assert(it != scvSeed_().localScvfIndices().end() && "Could not find the local coordinate of the local scvf");
return std::distance(scvSeed_().localScvfIndices().begin(), it);
//! Returns the center of the element the scv is embedded in
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