Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some vtu files contain null elements #15

Open
chrishavlin opened this issue Feb 23, 2023 · 1 comment
Open

some vtu files contain null elements #15

chrishavlin opened this issue Feb 23, 2023 · 1 comment

Comments

@chrishavlin
Copy link
Collaborator

What I thought was initially a yt bug (yt-project/yt#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...

@chrishavlin
Copy link
Collaborator Author

#16 removes null elements, which removes the blank pixels for some datasets.

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")

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant