Commit ae6d7aaf authored by Lukas Riedel's avatar Lukas Riedel

Improve FlowParameters::bind

Omit find operation of entity is already cached
parent f723c09f
......@@ -79,6 +79,14 @@ public:
void bind (const Entity& entity) const
const auto index = _mapper.index(entity);
// done if index is already cached
if (index == _cache.first
&& std::get<std::shared_ptr<Parameterization>>(_cache.second))
const auto it = _param.find(index);
if (it == _param.end()) {
DUNE_THROW(Dune::Exception, "Could not retrieve parameterization"
Markdown is supported
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