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

Address XDMF/Visit Issues #1079

Merged
merged 6 commits into from
May 24, 2024
Merged

Address XDMF/Visit Issues #1079

merged 6 commits into from
May 24, 2024

Conversation

pdmullen
Copy link
Collaborator

@pdmullen pdmullen commented May 16, 2024

Visualizing HDF5 + XDMF files generated through develop with VisIt produces strange artifacts wherein 2D datasets often show a protruding X3 feature (which looks like a skyscraper). This MR attempts to fix such artifacting by adjusting the data dumped in HyperSlab DataItems.

Parthenon particles cannot be visualized in VisIt currently, and their corresponding mesh is not even dumped in our current XDMF files. For the life of me, I cannot get VisIt to interpret VXVYVZ type geometries for Polyvertex meshes. I find that in order to get Visit to read our Polyvertex mesh, I must recast the geometry as an array of type {{x1, y1, z2}, {x2, y2, z2}...}. Even after that change, I cannot get Visit to see the Polyvertex mesh unless it is its own XDMF file. Visit can still plot particles on top of field variables if both XDMF files are read and a correlation is instantiated (VisIt prompts users automatically for this). This MR enables users to optionally dump out swarm XDMF files, which, if enabled, also dumps restructured particle geometry in the corresponding HDF5 file. Restart files should remain unchanged.

This is gross. Feel free to shoot down this MR.

PR Summary

PR Checklist

  • Code passes cpplint
  • New features are documented.
  • Adds a test for any bugs fixed. Adds tests for new features.
  • Code is formatted
  • Changes are summarized in CHANGELOG.md
  • Change is breaking (API, behavior, ...)
    • Change is additionally added to CHANGELOG.md in the breaking section
    • PR is marked as breaking
    • Short summary API changes at the top of the PR (plus optionally with an automated update/fix script)
  • CI has been triggered on Darwin for performance regression tests.
  • Docs build
  • (@lanl.gov employees) Update copyright on changed files

Copy link
Collaborator

@Yurlungur Yurlungur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey thanks for figuring this out! And I apologize for your suffering. I don't think this MR is the optimal implementation of this machinery. But I'm not sure I care about an optimal implementation... XDMF is forcing a bizarre structure on us and I think I'm perfectly happy to just hack in a solution rather than overengineer jumping through XDMF's hoops.

This MR attempts to fix such artifacting by adjusting the data dumped in HyperSlab DataItems.

Am I missing something? I can't find this change in the diff.

src/outputs/parthenon_hdf5.cpp Show resolved Hide resolved
src/outputs/parthenon_hdf5.cpp Show resolved Hide resolved
Copy link
Collaborator

@Yurlungur Yurlungur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm approving now to indicate my willingness to just hack this in.

@pdmullen
Copy link
Collaborator Author

pdmullen commented May 17, 2024

Am I missing something? I can't find this change in the diff.

@Yurlungur https://github.com/parthenon-hpc-lab/parthenon/pull/1079/files#diff-31b92df33d462322a957c4750de1874912d6947009746063e9684dae98314675R515

Copy link
Collaborator

@Yurlungur Yurlungur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing the change out. We should test this in Assail before merging...

src/outputs/parthenon_xdmf.cpp Show resolved Hide resolved
Copy link
Collaborator

@lroberts36 lroberts36 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am happy to approve this if it is working for you guys, but I don't think I can provide much useful feedback since I rarely use Visit and don't know what to expect for the XDMF.

@pdmullen pdmullen enabled auto-merge May 24, 2024 16:40
@pdmullen pdmullen merged commit 96832fe into develop May 24, 2024
49 checks passed
@pdmullen pdmullen deleted the pdmullen/xdmf-visit branch May 27, 2024 18:53
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

Successfully merging this pull request may close these issues.

3 participants