Repository navigation
Conversation
write_mesh and write_function take on_input_mesh, like write_meshtags, write_cell_data and write_point_data, so a file in the input ordering is written with one flag passed to every call. write_mesh_input_order and write_function_on_input_mesh call them with on_input_mesh=True and are deprecated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Summary
write_meshandwrite_functionget anon_input_mesh: bool = Falseargument, the same aswrite_meshtags,write_cell_dataandwrite_point_dataalready have. Writing everything in the input ordering is now one flag on every call:Before, the mesh and function needed separate functions (
write_mesh_input_order,write_function_on_input_mesh), while tags and data used a flag.Changes
write_mesh(..., on_input_mesh=True)builds the mesh data withcreate_original_mesh_data, andwrite_function(..., on_input_mesh=True)builds the function data withcreate_function_data_on_original_mesh. These are the same builders the old functions use.mesh_namenow works in both orderings.write_mesh(..., on_input_mesh=True, store_partition_info=True)raises aValueError, because partition info has no meaning for a mesh in the input ordering.write_mesh_input_orderandwrite_function_on_input_meshkeep their signatures and are still exported fromio4dolfinx. They now call the new keyword and emit aDeprecationWarning, following the pattern ofreconstruct_mesh.original_checkpoint.pytocheckpointing.py, to avoid a circular import.original_checkpoint.pykeeps the data builders. Only code that imports the old functions fromio4dolfinx.original_checkpointdirectly is affected; nothing in the repo does.Testing
write_mesh/write_functionwithon_input_mesh=True, and pass.write_mesh(on_input_mesh=...)in both orderings, and pass serially and on 3 ranks.store_partition_info=Truewithon_input_mesh=Trueraises.test_legacy_readers.pyalso fail without these changes and come from the local legacy data.ruffandmypypass.🤖 Generated with Claude Code