Issues with higher-order Lagrange elements in Paraview 5.9


I’m working with a bunch of VTK Unstructured Grid Files that are collected in several MultiBlocks. The files are generated from Python, using either version 8.1.2 of the VTK Python package or version 9.0.1.
The elements used in these files are Lagrange elements (tetra, hexa, wedge) of orders 1 to 4.
Recently, I switched from Paraview 5.8 to 5.9 and began having some issues with specific element types:

Issue 1: Lagrange hexahedra (starting from order 2) for vtk 9.0.1
Order 1 looks alright, but for orders 2, 3 and 4 the elements are broken with holes in them. It looks very much like the order of the points that make up the element are messed up.
The weird thing is that this only happens when the files are created with the Python package vtk 9.0.1. With the older version 8.1.2, everything is fine. I compared the vtu XML files and besides from adding <InformationKey> entries, the unstructured grid version attribute changes from 0.1 to 2.2. Hexahedra were the only element type where this version changes (<InformationKey> are new for all types) and the only type with this problem, so I assume the issue to be related with this.
It gets even weirder now: This problem only happens with Paraview 5.9. With Paraview 5.8, the files generated with both vtk Python versions look alright.

Issue 2: Interior points of Lagrange wedges (starting from order 3)
This one is less severe, but when using a clip filter on a mesh of prisms, there appear small graphic glitches in the interior. I suspect this to be also due to flipped point indices. Notably this issue happens the same way with files generated by vtk 9.0.1 and 8.1.2, but is specific to Paraview 5.9. With Paraview 5.8, everything looks fine.

I can provide more detailed information if it’ll help narrowing down the issue. Of course maybe also I did a terrible mistake somewhere, I that case I’d like to apologize.

Best regards!

Opened a Gitlab issue with example files for this.

@florian360 as one of the higher-order element experts in VTK/ParaView - do any of these issues sound related to changes you have made in the last year or two?

@florian360 I see you responded on the related GitLab issue already - thanks!