[Gmsh] getMeshElementByCoord in API

Christophe Geuzaine cgeuzaine at uliege.be
Thu Nov 28 21:33:36 CET 2019



> On 28 Nov 2019, at 09:23, MA Ariza-Gracia <miguel.ariza at artorg.unibe.ch> wrote:
> 
> Dear Gmsh users,
> 
> I'm using the function "getMeshElementByCoord" to look for all the elements that are connected to a node of given coordinates (x, y, z). The function is always returning a single element even though there could be 3-4 elements sharing the node.
> 
> Is this because "getMeshElementByCoord" is just returning the first element after the octree search? I also tried setting 'strict' to false, but it is still returning a single element.
> 
> Is there a (built-in) way of retrieving all the elements with the common node? (i.e., not me loading the full connectivity and looking for the nodes).
> 

Indeed, there wasn't. Give the latest snapshot a try: there's now getMeshElementsByCoord, which will return all elements.

(We might want to also return the nodes + local coordinates as for getMeshElementByCoord; but it makes the function a bit unwieldy...)

Christophe


> 
> Best,
> 
> 
> MA
> 
> 
> 
> 
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine






More information about the gmsh mailing list