Nodes at wrong position in second-order Lagrange element
I am getting an unexpected problem with second-order Lagrange elements.
I am producing a second-order mesh for a relatively simple cylindrical geometry (more complicated geometries will also be considered in the future). The .geo file producing the geometry and mesh is attached here: gaafet_2.geo.
When plotting the mesh, everything looks fine at first glance, however, running my code on it causes it to crash. After some investigation, I found that roughly 200 elements in the mesh are the cause of the problem. An example of such an element is the 207th tetrahedron, i.e., element # 1259 in the .msh2 file (for compatibility reasons, I can only use msh format 2).
The coordinates of the 10 local nodes of this element are:
x | y | z |
---|---|---|
8.0902 | -5.8779 | 0 |
5.8779 | -8.0902 | 2.5 |
5.6959 | -5.1652 | 2.5 |
5.8779 | -8.0902 | 0 |
7.0711 | -7.0711 | 1.25 |
5.7869 | -6.6277 | 2.5 |
6.8930 | -5.5215 | 1.25 |
7.0711 | -7.0711 | 0 |
5.7869 | -6.6277 | 1.25 |
5.8779 | -8.0902 | 1.25 |
If I plot the tetrahedron, using nodes 1 to 4 as the tetrahedron vertices, and then display dots at the position of each node, then it is easy to see that nodes 5 and 7 do not lie exactly on the tetrahedron edges, as normally required for a second-order Lagrange element: .
I was wondering why this is the case. Is this a bug, or are the second-order elements generated by gmsh different from the usual T10 elements, i.e., one node at each tetrahedron vertex, and one additional node at the center of each edge ?