Commit 86743ac3 authored by Lasse Hinrichsen's avatar Lasse Hinrichsen

[bugfix] Clear before inserting elements

parent e76b5660
Pipeline #8512 passed with stage
in 20 minutes and 38 seconds
......@@ -180,15 +180,17 @@ namespace Experimental {
}
}
// prepare mutable index cache
idToIndex_.clear();
isMutable_ = true;
// Add all (codim-0) elements to the index map. These should be known
// to the PersistentGridView for the contains() method.
for(const auto& element : elements(originalGridView_)) {
auto index = originalGridView_.indexSet().index(element);
auto id = grid_->globalIdSet().id(element);
idToIndex_.insert({id, index});
}
// prepare mutable index cache
idToIndex_.clear();
isMutable_ = true;
}
// global information
......
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