Skip to content

Simplify support for 2D meshes#22

Open
nncarlson wants to merge 1 commit intomasterfrom
simplify-2d-mesh-support-10752117872873327314
Open

Simplify support for 2D meshes#22
nncarlson wants to merge 1 commit intomasterfrom
simplify-2d-mesh-support-10752117872873327314

Conversation

@nncarlson
Copy link
Owner

Simplified support for 1D and 2D meshes by automatically expanding point coordinate arrays to 3 components in the HDF5 output.

Key changes:

  1. HDF5 Bindings: Added H5Pset_fill_value to vtkhdf_h5_c_binding.F90.
  2. HDF5 Abstraction: Modified h5_write_dataset and write_dataset_common in src/vtkhdf_h5.F90.fypp to accept an optional force_leading_dims argument. When present, the library creates a dataset with these leading dimensions and writes the provided array into a slice. A zero fill value is used to ensure unwritten components are initialized to 0.
  3. Mesh Writing: Updated write_mesh in src/vtkhdf_ug_type.F90.fypp to use force_leading_dims=[3_hsize_t] for the 'Points' dataset.
  4. Testing: Added test/vtkhdf_2d_test.F90 and updated test/CMakeLists.txt to verify the new functionality.
  5. Verification: Confirmed the HDF5 file structure and data values using a custom inspection script.

Fixes #14


PR created automatically by Jules for task 10752117872873327314 started by @nncarlson

Simplified support for 1D and 2D meshes by automatically expanding
point coordinate arrays to 3 components in the HDF5 output. This is
achieved by:
- Adding H5Pset_fill_value to the HDF5 bindings.
- Enhancing h5_write_dataset and write_dataset_common to support an
  optional force_leading_dims argument and set a zero fill value.
- Updating write_mesh to use these new features for the 'Points'
  dataset.
- Adding a new test case for 2D meshes.

This allows users with 1D or 2D meshes to pass their coordinate
arrays directly without manually adding dummy components.

Co-authored-by: nncarlson <7231327+nncarlson@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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.

Simplified support for 2D meshes

1 participant