[Dune] Barycentric coordinates

Agnese, Marco m.agnese13 at imperial.ac.uk
Wed Feb 10 14:48:42 CET 2016


Hi Carsten, hi Aleksejs,

what I need is, given an entity and the global coordinates of a point, to compute its barycentric coordinates.

Then, if the point is not inside the entity, I can take the minimum barycentric coordinate to know which neighbouring entity is more likely to contain the point (and repeat this procedure until I find the entity which contains the point). 

The only alternative method is to recursively explore the neighbours until I find the entity which contains the point. But I think it is much less efficient (or maybe not??)

Cheers,
Marco  

________________________________________
From: Carsten Gräser <graeser at mi.fu-berlin.de>
Sent: 10 February 2016 13:35
To: Agnese, Marco; Dune
Subject: Re: [Dune] Barycentric coordinates

Hi Marco,
to map local coordinates to barycentric coordinates you
can just evaluate the P1 shape functions at this point.

Best,
Carsten

Am 10.02.2016 um 14:09 schrieb Agnese, Marco:
> Hi,
>
>
> I need to compute the barycentric coordinates of a point.
>
> Before reinventing the wheel, is there something already implemented
> within Dune? I have looked inside dune-grid and dune-geometry but I
> haven't found anything.
>
>
> If nothing is implemented, do you think would be useful to add this
> feature to Dune (I think it should be added as a method of Dune::Geometry)?
>
> Obviously I will implement such a method.
>
>
> Cheers,
>
> Marco




More information about the Dune mailing list