[Dune-devel] Are IdSets persistent?

Carsten Gräser graeser at mi.fu-berlin.de
Wed Apr 25 10:29:23 CEST 2018


Hi Christian,

Am 25.04.2018 um 08:55 schrieb Christian Engwer:
> Hi Carstenm
> 
> On Tue, Apr 24, 2018 at 04:10:54PM +0200, Carsten Gräser wrote:
>> Dear fellow developers,
>> I recently stumbled upon the question if
>> the IdSets obtained by grid.globalIdSet()
>> and grid.localIdSet() are persistent?
>>
>> To be more precise: Is it guaranteed that
>> I can store a pointer for the obtained
>> const-references and reuse it after grid
>> modification?
> 
> as far as I always understood the interface, these objects are not
> guaranteed to be valid until end of time. The persistence discussion
> was only about the values. Still all examples used the IdSet also
> after modification.
then I did not miss this and we should clarify this
question. Currently, e.g., the PersistentContainerMap
relyies on the fact that the IdSet pointer remains
valid after grid modification. Adjusting this behaviour
would require an interface change (because there's no
way to obtain a fresh pointer unless you know how the
original one was created).

Carsten

> 
> Christian
> 
>>
>> Looking at the code it seems that this is fact
>> true, even for the grid implementations (at least
>> in dune-grid and dune-alugrid) that create IdSets
>> on demand. However, I'm unclear if this is
>> guaranteed.
>>
>> As far as I can see, the interface documentation
>> does not comment on this question and I'm not aware
>> of any discussion on this, but maybe I'm just
>> forgetful or blind.
>>
>> Best,
>> Carsten
>>
>>
>>


-- 
Prof. Dr. Carsten Gräser
Freie Universität Berlin
Institut für Mathematik
Arnimallee 6
14195 Berlin, Germany
phone: +49 30 838 72637
fax  : +49 30 838 472637
email: graeser at mi.fu-berlin.de
URL  : http://page.mi.fu-berlin.de/graeser

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20180425/9bd8ad73/attachment.sig>


More information about the Dune-devel mailing list