GEOS icon indicating copy to clipboard operation
GEOS copied to clipboard

feat: Adding HDF5 support for tableFunction

Open castelletto1 opened this issue 8 months ago • 3 comments

This PR adds HDF5 support to tableFunction, addressing one issue raised in PR #3524.

In addition to HDF5 support, a new function, determineTableInputType, has been introduced to validate the input data for tableFunction and ensure that only one type of input is provided in the xml file. The supported input types are:

  • 1D: One-dimensional data defined directly in the XML file
  • ND: N-dimensional data provided via ASCII files
  • HDF5: N-dimensional data provided via an HDF5 file

The immiscibleTwoPhase_SPE10_layer84 integrated test has been updated to demonstrate how to use the new HDF5 functionality. If approved, we plan to promote the use of HDF5 binary files over ASCII files wherever appropriate across all solvers.

Note: Compressed HDF5 files are not supported at the moment. This limitation should be addressed as soon as possible to fully leverage HDF5 benefits.

Baseline updates are required: new XML children have been added: hdf5CoordinateDatasetNames, hdf5File, and hdf5TableDatasetName.

  • [ ] Adding RTD documentation
  • [ ] Considering supporting other float types as valid dataset type input

castelletto1 avatar May 09 '25 00:05 castelletto1

@castelletto1 Can you:

  1. Add unit testing for the new functions
  2. change a few of the integrated tests to use the new functionality.

rrsettgast avatar May 09 '25 17:05 rrsettgast

Codecov Report

:x: Patch coverage is 85.96059% with 57 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 57.66%. Comparing base (c2768e6) to head (a7756ff). :warning: Report is 130 commits behind head on develop.

Files with missing lines Patch % Lines
src/coreComponents/functions/HDF5Utilities.cpp 75.00% 41 Missing :warning:
src/coreComponents/functions/TableFunction.cpp 71.42% 16 Missing :warning:
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3656      +/-   ##
===========================================
+ Coverage    57.56%   57.66%   +0.10%     
===========================================
  Files         1235     1238       +3     
  Lines       106973   107363     +390     
===========================================
+ Hits         61578    61911     +333     
- Misses       45395    45452      +57     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar May 16 '25 19:05 codecov[bot]

@castelletto1 Can you provide the script or instruction for how to prepare the HDF5 tables (e.g., SPE10_layer84_permeability_porosity.hdf5 in this PR)?

jhuang2601 avatar May 29 '25 22:05 jhuang2601