JordiManyer / upa

FEM library for Plasma Physics and Confinement Fusion.
1 stars 0 forks source link

Find element from coordinates #12

Closed JordiManyer closed 3 years ago

JordiManyer commented 3 years ago

Given a set of coordinates (x,y,z), we would like to obtain the index of the element where this point belongs.

How to do it:

As a first approach, my idea would be the following: We could add to the mesh an element-element connectivity map (which has not been implemented yet but is quite standard to have). Once this is done, a Dijkstra algorithm could be used to navigate between elements until finding the one containing the target coordinates. As a distance function, one could use the distance between the target coordinates and the baricenter of the elements (since all elements are convex, this would be an OK measure).

To do:

Possible other options: