Does Gmsh C++ API have functions to get which elements share the same edge?
Hi. I am using gmsh C++ API now, which is very very useful!
I want to ask a question: does gmsh C++ API have built-in functions to check the elements sharing the same edge, for a 2D triangular mesh?
For example, I have a mesh like below:
The elements consist of node
1, 2, 3
1, 4, 2
I am looking for a function. By using it, I input the node ID forming a edge, e.g. node `1` and `2`, then I can get a result that element 1 and 2 share this edge. If I input node 1 and 3, then the function tells me that this is a boundary edge only belonging to element 1.
Right now, I am using a sparse matrix (S) to achieve this. For example, check S(1, 2) and S(2, 1), see if the two elements are non-zero, then I can determine if this edge is an interior edge or not. However, this is really time-consuming when the number of finite elements is large.
Does gmsh have a faster built-in function that can achieve this?