[Dune] Getting rid of EntityPointer

Agnese, Marco m.agnese13 at imperial.ac.uk
Wed Jan 21 17:16:49 CET 2015


Hi Duners,
since in the future releases of Dune EntityPointer will disappear, I am trying to get rid of them in my codes.

Let's suppose that I am iterating over the entities, and I want to access the father at level 0 of a given entity. 
Using EntityPointer is very simple:

EntityPtr entityPtr(*it);
while(entityPtr->hasFather())
  entityPtr=entityPtr->father();

where it is my iterator. How can I do the same thing without using the EntityPointer?
I can create a pointer to an entity as

Entity* entityPtr(&(*it));

but then, how can I go up in the hierarchical  grid?

Thank you in advance,
Marco.



More information about the Dune mailing list