[Dune] Index to Entity map

Simon Praetorius Simon.Praetorius at tu-dresden.de
Mon Apr 24 12:57:48 CEST 2017


I think its the same reason as why STL provides iterators for general  
containers. Some can be indexed (e.g. a vector or array) and for some  
containers it is not efficient, e.g. a tree/graph or list.

Some grids have the coarse-grid entities stored and the leaf-grid (or  
level-grid) entities are filled during traverse. So it is probably not  
efficient to get an entity by index.

Since the dune-grid interface tries to be very general to hold many  
different grid implementations, an index based access would not be  
efficient, although for a special grid implementation one could find  
an index-based access, especially if you just store the leaf-grid.

Simon


Zitat von Kristof Cools <krcools at gmail.com>:

> Dear all,
>
> I am completely new at Dune and after going through the available docs and
> tutorials I have the following general question:
>
> I understand that the concept of a mapper/indexset is central to dune-grid
> and allows one to get an index (and corresponding attribute values) given
> an entity. It there a reason that the inverse concept is not part of the
> API? in other words, why is the set of entities merely iterable, as opposed
> to indexable?
>
> kind regards
>
> Kristof



-- 
Dr. Simon Praetorius
Institut für Wissenschaftliches Rechnen
Fachrichtung Mathematik
Technische Universität Dresden
Tel.: TUD-42377
Mail: simon.praetorius at tu-dresden.de
Web: www.math.tu-dresden.de/~spraetor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5733 bytes
Desc: S/MIME-Signatur
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20170424/7f165a10/attachment.bin>


More information about the Dune mailing list