Get coordinates of nodes on which basis functions are defined on a triangle
I am using the following function call in the python API to get Lagrange basis functions for a triangle:
_, basis_functions, _ = gmsh.model.mesh.getBasisFunctions(2, integration_coords, f"Lagrange{order}")
where integration_coords
is a set of points on which the basis functions are sampled, and order
is the desired basis order.
How can I can extract the coordinates of the nodes on which the basis functions are defined? I don't think there's an API function for this, but I'm happy to go digging for lower level functions if pointed in the right direction.
It would be even more helpful if I can also extract a mapping from the nodes on which the functions are defined to the functions themselves in the order in which they appear, so that I know, for example, which of those functions' nodes sit on the triangle's edges and which ones are internal nodes. I know that node ordering is given in the docs for higher order functions, but it's not clear to me if this ordering also corresponds to the Lagrange basis functions.
Thank you.