Uh oh!
There was an error while loading. Please reload this page.
Add mesh-files-only internal spherical shell generation - #592
Open
gthyagi wants to merge 1 commit into
Open
Conversation
Extract the atomic Gmsh-to-PETSc-HDF5 conversion from _from_gmsh so SphericalShellInternalBoundary can write reusable mesh files without loading and initializing an Underworld Mesh. Add write_mesh_files_only=True to return the .msh.h5 path after conversion while preserving the existing full-Mesh behavior by default. This avoids the serial Inner/Outer classification over millions of cells when callers only need reusable mesh files. Add a level-2 regression that verifies Mesh construction is bypassed and the HDF5 reloads with Lower, Internal, and Upper labels.
This was referenced Aug 16, 2026
gthyagi
marked this pull request as ready for review
August 16, 2026 17:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_gmsh_to_h5();SphericalShellInternalBoundary(write_mesh_files_only=True);.msh.h5path without constructing an in-memory UW3Mesh;Meshbehavior by default;Meshconstruction and reloading the generated HDF5 withLower,Internal, andUpperlabels.Motivation
SphericalShellInternalBoundary()currently writes the reusable.msh.h5file during Gmsh import, then reloads that file into a full UW3 mesh and materializesInnerandOutercell-region labels. The region creation loops over every cell in Python.That work is required when the caller needs the returned in-memory mesh, but it is unnecessary for workflows that only generate reusable mesh files for later MPI jobs. The custom region labels are created after the HDF5 write and therefore do not alter the already-written reusable file.
This became significant for the Zhong et al. spherical-shell benchmark on Gadi. Each
cellSize=1/64mesh contains about 4.2 million cells. The approximately 710 MB HDF5 files appeared several minutes before the serial jobs exited; one measured job completed in 15:14 using 8.35 GB while remaining CPU-bound in post-conversion mesh setup.API
With
write_mesh_files_only=True, the generator:.mshfile;.msh.h5;The default remains
write_mesh_files_only=False, so existing callers continue to receive a fully initialized UW3Meshwith no behavior change.Validation
Validated on a fresh branch from
upstream/developmentat59982834:./uw buildcompleted successfully;2 passed;The same feature diff also passed the complete level-1 suite before being squashed for this PR:
1493 passed, 33 skipped, 2 xfailed.