Repository navigation
xdmf: read_grid_fragment and collection_names, the two XDMF reads a Proteus archive reader needs - #20
Merged
Merged
Conversation
…roteus archive reader needs Proteus <= 1.9.x stored one <Grid> fragment per rank and step inside its HDF5 files and wrote the order of its collections only into the .xmf beside them. A current Proteus reads both when it hot starts from or converts such an archive. With these two functions it does so without importing an XML parser itself: XDMF is this module's business. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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 free
to 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.
Two small readers in
ymf.xdmf, for Proteus's XDMF retirement (campaign C2):read_grid_fragment(text) -> (grid, time): one serialized<Grid>element, as Proteus <= 1.9.x stored per rank and step inside its HDF5 files. The time is the fragment's own<Time>orNone, which is how a reader tells the two write paths of that Proteus apart.collection_names(path) -> [str]: the names of a.xmf's top-level grids, in file order. The order of the collections is the one thing that Proteus recorded nowhere else, and a hot start must reproduce it.Proteus's archive reader used
xml.etreefor exactly these two things; with them here, Proteus imports no XML parser at all. Seven tests.🤖 Generated with Claude Code