Skip to content

Conversation

@gthyagi
Copy link
Contributor

@gthyagi gthyagi commented Jun 30, 2025

I have updated checkpoint_xdmf method to save discontinuous fields properly.

Copilot AI review requested due to automatic review settings June 30, 2025 04:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the checkpoint_xdmf method to properly save discontinuous fields. Key changes include introducing a helper function to retrieve cell field sizes from HDF5 files, adjusting the file naming scheme for mesh variables, and dynamically determining the data centering and dimensions based on the field’s continuity.

Comments suppressed due to low confidence (3)

src/underworld3/discretisation.py:2897

  • [nitpick] Consider renaming the helper function to more clearly indicate that it returns the size of cell fields. For example, 'fetch_cell_field_size' could better express that a file read operation is performed.
    def get_cell_field_size(h5_filename, mesh_var):

src/underworld3/discretisation.py:2904

  • Verify that the updated file naming pattern (including the leading dot) is consistent with other parts of the codebase and intended file structure.
        var_filename = filename + f".mesh.{var.clean_name}.{index:05}.h5"

src/underworld3/discretisation.py:2927

  • [nitpick] The variable name 'numItems' could be more descriptive; consider renaming it to something like 'field_size' to clarify that it represents the number of data elements being used.
                Dimensions="1 {numItems} {var.num_components}"

@julesghub julesghub merged commit faed46c into underworldcode:development Jun 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants