[Dune] LocalGeometry

Carsten Gräser graeser at math.fu-berlin.de
Wed Feb 8 22:06:53 CET 2012


Dear all,
I just stumbled upon a restriction of the grid interface:

The grid interface enforces a single LocalGeometry type
for all uses cases. While one can use template specialization
to use completely different implementations for geometryInFather
and geometryInInside/Outside (gII/gIO) it is not possible to
do so for gII/gIO for leaf and level intersections.

Here's the (a bit lengthly) explanation why this is a problem:

  In dune-subgrid this turns out to be a problem:
  While level a gII/gIO can always be directly mapped
  to some host grid level gII or gIO this is no longer
  true for leaf gII/gIO (these are not implemented yet).
  In order to implement the latter one could use the
  wonderful BasicGeometry but due to the interface
  restrictions one would have to do the same for
  the level gII/gIO. Alternatively one could use dynamic
  polymorphism or a manual switch in each method call.

  However all of these introduce additional copies
  and computations only needed to satisfy the interface.

I'm tempted to request an interface change such that
e.g. the LocalGeometry type might be exported by the
intersections and entities but might be different in different
situations but this would be the really invasive change.
It's even more problematic since we just turn to copyable
geometry objects and one might use copies from a different
origin in the same place.

Did anyone notice this as issue in any of the other grid
implementations? In fact it would be surprising if all of these
could use the same implementation for level and leaf gII/gIO
since these are really different guys.

I'd appreciate any comment or experience on this issue.

Best,
Carsten





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




More information about the Dune mailing list