petsc_save_checkpoint on a mesh built with refinement=2 (UnstructuredSimplexBox(cellSize=4/64, refinement=2), 9824 cells, three-level hierarchy) writes a mesh file that uw.discretisation.Mesh(<mesh h5>) reloads with the same cell count and a rebuilt three-level hierarchy, but with the vertices in a different order: the same-index coordinate mismatch between the reloaded mesh and the mesh rebuilt by the original call is 1.0 (the domain size) at both the vertices and the P2 nodes. read_timestep maps the saved field by DOF index, so a P2 velocity read back onto the reloaded mesh is scrambled (the render is a jumble of triangles); read onto a mesh rebuilt by the original call it is correct. Meshes without refinement round-trip correctly (the Re 100 and Re 400 cavity runs from the same driver render fine).
The reload appears to re-refine the saved base rather than restore the refined DM, which renumbers the points. Workaround used in ~/+Simulations/navier_stokes_supg/scripts/render_ns.py (-uw_rebuild cavity:64:2): rebuild the mesh the way the run did and read the fields into that. Related to the split-mesh round-trip defect #640 in shape (a checkpoint that does not preserve the DOF map).
Underworld development team with AI support from Claude Code
petsc_save_checkpointon a mesh built withrefinement=2(UnstructuredSimplexBox(cellSize=4/64, refinement=2), 9824 cells, three-level hierarchy) writes a mesh file thatuw.discretisation.Mesh(<mesh h5>)reloads with the same cell count and a rebuilt three-level hierarchy, but with the vertices in a different order: the same-index coordinate mismatch between the reloaded mesh and the mesh rebuilt by the original call is 1.0 (the domain size) at both the vertices and the P2 nodes.read_timestepmaps the saved field by DOF index, so a P2 velocity read back onto the reloaded mesh is scrambled (the render is a jumble of triangles); read onto a mesh rebuilt by the original call it is correct. Meshes without refinement round-trip correctly (the Re 100 and Re 400 cavity runs from the same driver render fine).The reload appears to re-refine the saved base rather than restore the refined DM, which renumbers the points. Workaround used in
~/+Simulations/navier_stokes_supg/scripts/render_ns.py(-uw_rebuild cavity:64:2): rebuild the mesh the way the run did and read the fields into that. Related to the split-mesh round-trip defect #640 in shape (a checkpoint that does not preserve the DOF map).Underworld development team with AI support from Claude Code