Inconsistent node ordering for triangles in higher-order Lagrange wedges?
Hello, I wrote a small Python script that generates a single higher-order Lagrange element (right-angled, at origin, as in the examples from the blogpost) and saves it as a
vtu file. Then I view it in ParaView.
While I stumbled across some inconsistencies in the documentation (already described in this issue), everything works fine for triangles, quadrilaterals, tetrahedra and hexahedra of any order. However wedges only work up to order 4. Starting from order 5, node numbers are mixed up, as visible glitches appear when viewing the element in ParaView. The problematic nodes are those of the inner (recursive) triangles of order 2 (assuming the outer order 5). By trial and error, I found out that changing the second-order triangle ordering from
0 1 2 3 4 5, corresponding to
point 0,0; point 1,0; point 0,1; edge 0->1; edge 1->2, edge 2->0, to
0 3 1 5 4 2 fixes this problem, and the element is rendered without any glitches. This ordering does not make any sense to me, since nodes and edges are mixed up in a weird way.
At this point, I don't know if I did something wrong or if this is a bug in VTK or a bug in ParaView.
I'm on Linux, scripts in Python 3.6, using ParaView 5.8.0 and the vtk pip package version 8.1.2.
To verify the problem, you can download the scripts from github. Simply invoke
sample_lagrange_element.py which should output a
lagrange_sample.vtu that you can open in ParaView. Element type and order is specified in the script,
for the default wedge of 5th order said glitches should appear. Then in
node_ordering.py, you can comment in the line with the
<------ to change the triangular ordering and the glitches should disappear.
I'd be very happy if someone could look into this and verify or disprove the problem.
EDIT for quick reference: This is not a bug. Face points are reported in axis order for triangular faces on wedges.