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

Dedner, Andreas A.S.Dedner at warwick.ac.uk
Thu Nov 8 13:20:42 CET 2012


I think that the local method should not abort if the point is inside the reference element
or not - and one of the reasons is that you need as Oliver said you need the local method
to verify if a point is inside. Also I can think of applications where I would like to
represent for example the barycenter of neighbors in the local coordinate system
of an element - requiring me to use its local method...
I would thus suggest to remove that check (and think its mathematically fine because these
transformations are global mappings in all the cases I can think of...)

Andreas
________________________________________
From: dune-devel-bounces+a.s.dedner=warwick.ac.uk at dune-project.org [dune-devel-bounces+a.s.dedner=warwick.ac.uk at dune-project.org] on behalf of Oliver Sander [sander at igpm.rwth-aachen.de]
Sent: 08 November 2012 12:09
To: dune-devel at dune-project.org
Subject: [Dune-devel] Checking whether a given point is contained in a given    element

Dear Dune,
I have recently run into the following issue: I have a given point in world
space and an element.  I want to decide whether the element contains
the point.
So far, I have solved this by computing the coordinates of the point
wrt to the element (using Geometry::local(point)), and then calling
checkInside on the appropriate reference element.  That used to work
nicely.
Unfortunately, some grids have recently changed to MultiLinearGeometry
for their geometry implementations.  MLG has fairly tight preconditions:
in particular, its 'local' method aborts with an assertion failure if the
input argument is not contained in the element.
That does not seem like an unreasonable restriction to make.  After all,
strictly speaking, local element coordinates only exist on the element.
Unfortunately, now my old trick doesn't work anymore.  And I can't
think of another elegant why to decide whether a given point is contained
in a given element.

Any ideas?

cheers,
Oliver


_______________________________________________
Dune-devel mailing list
Dune-devel at dune-project.org
http://lists.dune-project.org/mailman/listinfo/dune-devel






More information about the Dune-devel mailing list