[Dune-devel] Checking whether a given point is contained in a given element

Jö Fahlke jorrit at jorrit.de
Fri Nov 9 13:21:19 CET 2012


Am Thu,  8. Nov 2012, 15:36:02 +0100 schrieb Martin Nolte:
> A last question: What is the exact semantics of local, if the point
> does not lie inside the geometric realization of an entity? For
> surface grids, you currently have the following (unintuitive)
> behavior: Assume that a point lies slightly "above" the actual
> geometric realization. Now, local will return the local coordinates
> of its orthogonal projection and checkInside will return true
> despite the fact that the point actually lies outside the geometric
> realization.

I had the same use case as Oliver for local() and checkInside(), and to me it
was alway clear that I get a projection when calling local() on e.g. an
intersection's geometry, simply because a point's global coordinates may not
be representable exactly due to limited numerical accuracy.  That the point
may be outside the actual plane was never a problem for me -- either I knew
that it was originally from inside the plane, or I checked its distance to the
element in question seperately.

While we're talking about checkInside() and possibly reconsidering its
interface, I want to highlight another shortcoming: currently it is impossible
to specify a tolerance, neither for including nor for excluding the boundary
of the geometry.  Where needed, I'm currently solvin this by scaling the
coordinate obtained from local() with 1+epsilon around the barycenter of the
reference element before sticking it into checkInside(), but that is far from
ideal...

Regards,
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

[Zum Thema GNOME 3]
(15:11:22) marina: linus ist auf meiner seite
-------------- 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-devel/attachments/20121109/6d7ba194/attachment.sig>


More information about the Dune-devel mailing list