[Dune] CurvilinearGridAPI: Implementation of EntityTags and BoundaryIterators

Robert Kloefkorn robertk at posteo.de
Thu Dec 18 15:30:09 CET 2014


Hello Aleksejs,

> 1) We require a tag (integer) associated with each entity.

PersistentContainer< Grid, int > is your friend.
It provides everything that you have described in your request. Please
read the documentation.

> 2) There is a whole set of calculations that can be performed by
> iterating over the boundary of the grid, be it domain boundary or
> interprocessor boundary. In our electromagnetic code, to this point we
> have used the EntityIterator->IntersectionIterator->boundary() and
> ->neighbor(), thus looping over all elements, then over all
> intersections of the element, and only performing certain operations
> if the faces of the element were not the internal faces. This
> operation could be significantly accelerated, if it was possible to
> directly iterate over DomainBoundaries and/or ProcessBoundaries.

I think you can test your hypothesis by at least storing the elements
(as vector of EntitySeeds) that are adjacent to boundaries. Then a class
similar to PersistentContainer could be added to grid/utility to
provides that feature. E.g. in ALUGrid you would gain exactly nothing,
because most likely one would still have to iterate of the elements.
So all you would gain is some "nicer" code. Also, the iteration over the
elements is not very expensive compared to what you then do on each
element. So I wouldn't worry to much about it.

Best,

Rob




More information about the Dune mailing list