You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tracking the cleaner alternative to the XDMF viz-topology fix landed in PR #205.
Background
PR #205 (tiannh7) added a Python+MPI helper _write_mesh_viz_groups that gathers vertex coordinates and cell-to-vertex connectivity across ranks, deduplicates global vertex ids, and writes /viz/geometry/vertices + /viz/topology/cells into the mesh HDF5. This fixes ParaView crashes reading the XDMF generated by write_timestep. ~115 lines of new code, including 3D simplex/quad cell reordering.
Also hardens checkpoint_xdmf: uses integer topology precision from the HDF5 dtype rather than hardcoded Precision=\"8\", and removes the HyperSlab wrapper from variable DataItems (simpler/correct XDMF)
Roughly 10 lines of behavior change vs ~115 in PR #205.
If the HDF5_VIZ viewer turns out not to handle some cell topology that the manual Python helper does, this issue can be closed as "alternative not viable" instead.
Tracking the cleaner alternative to the XDMF viz-topology fix landed in PR #205.
Background
PR #205 (tiannh7) added a Python+MPI helper
_write_mesh_viz_groupsthat gathers vertex coordinates and cell-to-vertex connectivity across ranks, deduplicates global vertex ids, and writes/viz/geometry/vertices+/viz/topology/cellsinto the mesh HDF5. This fixes ParaView crashes reading the XDMF generated bywrite_timestep. ~115 lines of new code, including 3D simplex/quad cell reordering.The alternative @gthyagi developed
Commit
22dd9ab2(gthyagi, on a now-deleted branchfeature/annulus-spherical-benchmark-debug) addressed the same bug with a much smaller change:petsc_format: bool = Falsekwarg toMesh.write()write_timestepcallsself.write(mesh_file, petsc_format=False)→ usesPETSc.Viewer.Format.HDF5_VIZ→ PETSc itself writes/viz/topology/cellsnatively, no Python-side MPI gather neededwrite_checkpointkeepsHDF5_PETSC(DMPlex restart format)checkpoint_xdmf: uses integer topology precision from the HDF5 dtype rather than hardcodedPrecision=\"8\", and removes the HyperSlab wrapper from variable DataItems (simpler/correct XDMF)Roughly 10 lines of behavior change vs ~115 in PR #205.
Why we landed #205 anyway
What's needed to close this issue
22dd9ab2as a fresh PR off currentdevelopment(commit is still reachable via SHA onunderworldcode/underworld3)test_0005_xdmf_compat.py::test_xdmf_viz_topology_written_correctlyand_3d)_write_mesh_viz_groupsand the_local_viz_cell_connectivity/_petsc_numbering_to_global_idshelpers from PR Fix XDMF output to explicitly write cell-to-vertex topology and ensure strict ParaView compatibility #205 can be removed — leaving only PETSc-managed viz topologyIf the
HDF5_VIZviewer turns out not to handle some cell topology that the manual Python helper does, this issue can be closed as "alternative not viable" instead.cc @gthyagi @bknight1
Underworld development team with AI support from Claude Code