When gmsh uses higher-order tetrahedral elements, there is an underlying Lagrange basis used to specify the map from reference space to the element. I'm trying to load a gmsh mesh of 3rd degree tetrahedral elements, but I can't seem to find any precise documentation on the location of the nodes that define the Lagrange basis used to define the map from reference space to world space.

The gmsh documentation indicates the ordering of the nodes, but it is not particularly precise (for instance the tetrahedral examples therein do not even show how the face nodes would be ordered). Is there some way I can answer the question, for any tetrahedral element of order $n$, the $m$th node corresponds to coordinate $(x,y,z)$ on the reference element? Is there some undocumented gmsh library function that I can call?


1 Answer 1


I think you've got slightly the wrong end of the stick from the documentation. As with a lot of other software in the area, GMSH started out with low order, hard coded numberings. These are the ones with the ASCII art representations, which only give first and second order numberings for tetrahedra (hence there aren't any face nodes in the 4 node or 10 node "low order" versions). These aren't examples, they're the original canonical numberings from earlier versions.

As things have progressed further, the developers have added support for a more arbitrary scheme for higher order elements, with a numbering scheme as described here

9.2.2 High-order elements

The node ordering of a higher order (possibly curved) element is compatible with the numbering of low order element (it is a generalization). We number nodes in the following order:

  • the element principal or corner vertices;
  • the internal nodes for each edge;
  • the internal nodes for each face;
  • the volume internal nodes.

The numbering for internal nodes is recursive, i.e. the numbering follows that of the nodes of an embedded edge/face/volume of lower order. The higher order nodes are assumed to be equispaced. Edges and faces are numbered following the lowest order template that generates a single high-order on this edge/face. Furthermore, an edge is oriented from the node with the lowest to the highest index. The orientation of a face is such that the computed normal points outward; the starting point is the node with the lowest index.

Although this text is rather dense, I believe it to end up as fairly unambiguous, provided you remember that everything is using a dictionary ordering based on the assigned principal vertex numbers.

  • $\begingroup$ Hmmm... I had read this and I had found it be fairly ambiguous at the time, but I did not recall that you need to use a dictionary ordering. That makes it less ambiguous though honestly I would prefer if I just had access to the function that determined this numbering! Anyway, I will try to translate this into code and see what happens. $\endgroup$
    – Wraith1995
    May 9, 2019 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.