[Dune] Grid geometry and storage

Timo Koch timo.koch at iws.uni-stuttgart.de
Wed Aug 10 11:41:07 CEST 2016


Dear Dune developers,


I have some questions regarding Dune::Geometry class in dune-grid.

Is there any particular reason geometries are

- not default-contructible?

- on purpose not (copy) assignable?


I find myself writing code where I want to write a wrapper around

an Intersection object / Intersection geometry information. It would be 
convenient for me to store geometries in there.

This seems to work fine (working around non-default-constructibility and 
non-assignability using the

Dune::Optional class implemented dune-functions (there seems to be a 
similar interest there?)) for the grid managers

Yasp and UGGrid, however for dune-alugrid intersection geometries seem 
to be only valid objects inside the intersection loop.

I could also store corners and type and construct the geometry on 
demand, however

when instantiating the wrapper I already have an Intersection::Geometry 
object at hand.

Extraction of the corners and some other information results in a 
performance penalty of ca. 10% for my code.


Do you have any advice on how to store geometries (elements and 
intersections) / alternatives to storage?

Is it better to store the actual intersection / element object (I'm 
talking about less than ten)? Could the geometry object

then be somehow cached on first call to avoid constructing it every time 
I need geometry information from my wrapper?


Thanks in advance

Timo


-- 
____________________________________________________________________

Timo Koch                      phone: +49 711 685 64676
IWS, Universität Stuttgart     fax:   +49 711 685 60430
Pfaffenwaldring 61             email: timo.koch at iws.uni-stuttgart.de
D-70569 Stuttgart              url:   www.hydrosys.uni-stuttgart.de
____________________________________________________________________





More information about the Dune mailing list