Skip to content

Follow-ups from #218: route snapshot subsystem off deprecated write_checkpoint + XDMF cleanups #252

Description

@lmoresi

Non-blocking follow-ups identified while reviewing #218 (PETSc-native XDMF viz topology, merged bc834b4):

  1. write_checkpoint() FutureWarning fires from UW3's own snapshot subsystem. src/underworld3/checkpoint/disk_snapshot.py:314 calls mesh.write_checkpoint(...), which Use PETSc-native XDMF visualization topology #218 deprecated. Harmless today (setup.cfg filterwarnings has no error escalation) but self-inflicted warning spam. Fix: have the snapshot backend call _write_petsc_reload_file / write_timestep(..., petsc_reload=True) directly, or suppress the warning for internal callers.

  2. Dead/fragile attr read in checkpoint_xdmf: topo["cells"].attrs["cell_dim"] is read but never used (topology type is derived from numCorners+spaceDim). Delete it — it's a needless dependency on a PETSc-internal attr name that could KeyError on a future PETSc/cell type.

  3. Unify XDMF attribute writers: Use PETSc-native XDMF visualization topology #218 flattened the meshVar attribute DataItem (removed HyperSlab) but the parallel swarmVar block still uses ItemType="HyperSlab". Not a regression; unify for consistency.

cc @gthyagi

Underworld development team with AI support from Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions