Open chrishavlin opened 1 year ago
But looks like it doesn't catch all the cases, here's 2D ASPECT dataset using the new detection
import yt
import yt_aspect
ds = yt.load("aspect/output_shell_simple_2d/solution/solution-00000.pvtu", detect_null_elements=True)
yt.SlicePlot(ds, "z", ('connect0', 'T'), origin="native")
What I thought was initially a yt bug (https://github.com/yt-project/yt/issues/4334) is in fact an issue with the vtk pieces being loaded (see this comment in the yt PR that started to address it). The gist of it is that for some datasets, the connectivity arrays may contain invalid elements where all of the node indices in a given element point to the same index in the coordinate array. Simply removing those null elements from the connectivity arrays is sufficient -- and they do really seem to be extra (so coming from how those vtk files are originally written?). I'll open a PR here with a fix after the yt discussion is closed out...