[Dune] Storing entity iterators

Andreas Dedner a.s.dedner at warwick.ac.uk
Thu Mar 12 08:23:02 CET 2015


Hi Marco.
To answer that question please look into the implementation of 
GeometryGrid. Basically
the question is whether the GeoGridEntity. But I think it more likely to 
be the new position and
I would even say that if you get the old position then that is a bug 
since a change in the implementation
could also easily change that behaviour (e.g. whether the geometry is 
build when geometry() is called
or if it is build when the Entity is constructed....)
Andreas


On 11/03/15 18:04, Agnese, Marco wrote: que
> Hi Steffen, hi Christian Engwer and hi Oliver,
> thank you for your answers. I wasn't aware that entity iterators were expensive.
> Therefore storing a copy of the entities (or the entity seed) is the correct solution.
> Good news since that was the solution I had implemented :)
>
> Another very quick question.
>
> Let's suppose that I have a GeometryGrid and I store a copy of an entity.
> After that, I move the vertices of my grid (therefore I change the values of the discrete function defined on the host grid which defines my wrapped grid).
> The entity copy extracted before is consistent with the updated GeometryGrid or is consistent with the old one?
> More precisely, if I extract a vertex of the entity copy, the global coordinate will have the same value of the old grid or of the new grid?
> Does it change the behaviour, if I store the entity seed instead of the entity copy?
>
> Thank you very much,
> cheers,
> Marco.
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune





More information about the Dune mailing list