[Dune] Projection direction in dune-grid-glue with psurface

Oliver Sander sander at igpm.rwth-aachen.de
Tue May 14 16:05:32 CEST 2013


Hi Miguel,
please update dune-grid-glue and try again.  I implemented the outerNormal method
for 1d and 2d intersections in 2d and 3d worlds, respectively.  The unit tests for
these methods in dune-grid-glue are very rudimentary, so there may still be bugs.
Patches for the tests and for the code are welcome.

>      >   during traversal of the glued intersections I'd like to have access to
>      > the direction field along which the domain grid was projected onto the
>      > target grid. From the paper I understood libpsurface should use the outer
>      > normal by default, so in my case what I want is unitOuterNormal(), but this
>      > is not implemented for the glued intersections.
>

Beware: the details here are a bit tricky.

a) the outerNormal method gives you face normals
b) When the paper says that the outer normal is used for projection,
    the following is actually meant: psurface averages the face normals
    to obtain vertex normals.  These are then interpolated linearly
    across the faces, giving you a continuous direction field of
    approximate(!) normals (and hence a continuous projection).

Consequently, these two vectors fields are not exactly the same.
If you want to obtain b) through the interface you have to use

intersection->geometryInOutside().global(pos) - intersection->geometry().global(pos)

best,
Oliver



>     the unitOuterNormal(localCoord) is defined in
>     dune/grid-glue/adpapter/intersection.hh
>
>     or do you use an old version of grid-glue?
>
>     Christian
>
>      >  I've been looking for it but I cannot find the method I need in the docs.
>      > Does anybody know?
>      >
>      > Thanks,
>      > --
>      > Miguel de  Benito.
>
>      > _______________________________________________
>      > Dune mailing list
>      > Dune at dune-project.org <mailto:Dune at dune-project.org>
>      > http://lists.dune-project.org/mailman/listinfo/dune
>
>
>     --
>     Prof. Dr. Christian Engwer
>     Institut für Numerische und Angewandte Mathematik
>     Fachbereich Mathematik und Informatik der Universität Münster
>     Einsteinstrasse 62
>     48149 Münster
>
>     E-Mail christian.engwer at uni-muenster.de <mailto:christian.engwer at uni-muenster.de>
>     Telefon +49 251 83-35067 <tel:%2B49%20251%2083-35067>
>     FAX +49 251 83-32729 <tel:%2B49%20251%2083-32729>
>
>
>
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune





More information about the Dune mailing list