[Dune] Projection direction in dune-grid-glue with psurface
Miguel de Benito Delgado
m.debenito.d at gmail.com
Tue May 14 18:09:12 CEST 2013
Hi Oliver,
On 14 May, 2013, at 16:05, Oliver Sander <sander at igpm.rwth-aachen.de> wrote:
> please update dune-grid-glue and try again.
Now, that's what I call fast support! :)
> 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.
Thanks a lot, I'll let you know in a couple of days if I find any problems.
> 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)
I thought I was doing a quick-hack approximation with exactly this and it turns out it's what I was looking for. The face outer normal will nevertheless come in handy too. Thanks!
Best,
--
Miguel de Benito.
More information about the Dune
mailing list