[Dune] Grid API without EntityPointer

Martin Nolte nolte at mathematik.uni-freiburg.de
Tue Jan 6 11:53:12 CET 2015


Hi Aleksejs,

for the upcoming 2.4 release, all grid implementations must still provide entity 
pointers. The removal of the entity pointer is planned for the 3.0 release, 
scheduled to follow after 2.4.

As the removal of entity pointers will have quite some impact on users, there is 
an ongoing discussion whether 2.4 should already provide most features necessary 
to avoid using the entity pointer in user code. While compatibility is good for 
users, it causes additional costs, which are eventually paid by the grid 
developers. So, as a grid developer, you always wish for the least possible 
compatibility in user code.

It seems you can neither afford to wait for 3.0 to arrive nor for these features 
to be implemented in the master (which will happen over the next year). Hence, 
you will have to implement entity pointers. On the upside, you already know that 
entity pointers are a compatibility construct. Therefore, you can implement them 
as thin as possible to allow for easy removal once the changes have been done in 
the master.

Frankly, you third question puzzles me a little: Where is the problem with the 
facade EntityIterator still inheriting from EntityPointer? For metagrids, my 
iterator implementation never inherits from the entity pointer implementation. 
However, if you just want to know how the future interface will look: Just copy 
all methods from EntityPointer to EntityIterator, remove the inheritance and 
you're nearly done. The only difference is that currently all iterators are 
required to cast into and compare to an entity pointer. But that is hidden 
deeply under the hood.

I hope this gives you some perspective on the future path. Of course, all this 
only reflects my understanding of it and there might be a lot of discussion 
coming upon us before the entity pointer can be finally removed forever.

Best,

Martin

On 01/06/2015 09:32 AM, Aleksejs Fomins wrote:
> Dear Dune,
>
> We are currently trying very hard to finish the implementation of the
> Grid API for the CurvilinearGrid. We have certain pressure on us, as we
> desperately require this functionality soon to be able to model
> nanooptical structures. This Grid manager will be made publicly
> available in due course.
>
> Based on the results of the last developer meeting minutes, we have
> decided to implement the API completely without using the EntityPointer,
> because it is not hip any more. However, when reading the last
> EntitySeed discussion, it seems that we may have misinterpreted the
> developer intentions. Therefore, I have the following questions:
>
> 1) Is it currently possible to use a Grid which is completely free of
> EntityPointers?
>
> 2) If no, then when is such functionality foreseen?
>
> 3) If yes, then how does one implement, for example, iterators. Even in
> the patch provided by Steffen, the iterator class still seems to inherit
> from the EntityPointer class, which leaves me puzzled on how to
> implement iterators without EntityPointers.
>
> Best Regards,
> Aleksejs
>
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
>

-- 
Dr. Martin Nolte <nolte at mathematik.uni-freiburg.de>

Universität Freiburg                                   phone: +49-761-203-5630
Abteilung für angewandte Mathematik                    fax:   +49-761-203-5632
Hermann-Herder-Straße 10
79104 Freiburg, Germany




More information about the Dune mailing list