[Dune] Returning Geometries As Objects

Jö Fahlke jorrit at jorrit.de
Thu Feb 9 17:45:54 CET 2012


Am Tue,  7. Feb 2012, 12:07:52 +0100 schrieb Martin Nolte:
> as far as I understood Christian, he wants the lifetime (I mean the
> time in which the geometry remains valid) to be unlimited before the
> next release. Changing the user code to call geometry only once
> (which would be wise anyway) might take a lot of time and,
> therefore, I think a longer transition period would be good.
> 
> Moreover, I'm still not sure on the correct path. I see at least
> three possibilities:
> 
> A geometry object is valid
> (a) for ever (i.e., as long as it exists)
> (b) as long as the grid, the entity belongs to
> (c) as long as the entity exists within the grid
> (d) as long as the corresponding entity pointer is valid (current situation)

I guess I have to propose (b') (same as Carsten):
(b') A geometry object is valid until the grid changes.

I want either (b') or better (b).  Which one depends on how much effort it is
to implement (b) compared to (b').  I.e. are there any grids where the
internal data structures are moved around even for persistent entities during
grid change?

Rationale: Geometry objects don't look like they keep internal references to
           the grid (in contrast to iterators, which obviously do).  So I
           actually would expect a geometry object to be valid for as long as
           it exists.

           However, I can see the potential for optimization for grids that
           store parts of the geometry internally anyway.  Plus I would assume
           that the cases where a geometry isn't re-fetched anyway after a
           grid change are very rare.

           (b) Would affect only those cases where the user code needs the
           geometry of a no-longer existing entity, which seems obscure to me.
           (b') Would also affect cases like computations on multiple
           refinement levels and doing globalRefine() on demand.

Just my 2¢,
Jö.

-- 
Jorrit (Jö) Fahlke, Interdisciplinary Center for Scientific Computing,
Heidelberg University, Im Neuenheimer Feld 368, D-69120 Heidelberg
Tel: +49 6221 54 8890 Fax: +49 6221 54 8884

A mathematician is a device to turn coffee into theorems.
-- Paul Erdős
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20120209/6289e93a/attachment.sig>


More information about the Dune mailing list