[Dune] Storing entity iterators

Agnese, Marco m.agnese13 at imperial.ac.uk
Mon Mar 9 13:13:19 CET 2015


Hi Duners,
in my code I have a bulk grid and an interface grid. I have created a mapping between the 2 grids and to accomplish that I am storing entity iterators.
With the introduction of copyable entitites/intersections is it safe to do that?

In other words, if I have an entity iterator  and I dereference it, I will obtain an entity of the grid? Or the entity iterator points to a copy of the entity and therefore it is not safe?

Moreover, is there a better/safer way to create this mapping? Instead of the iterator I can store the leafIndexSet().index(entity) but is there a way, given this index, to obtain the entity directly without looping over the grid?

Thank you,
cheers,
Marco.



More information about the Dune mailing list