-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Before submitting the issue
- I have checked for Compatibility issues
- I have searched among the existing issues
- I am using a Python virtual environment
Description of the bug
The compression of the h5 migration does not have any effect on the size of the resulting .h5 file.
Steps To Reproduce
`
import os
from ansys.dpf import core as dpf
dpf.set_default_server_context(dpf.AvailableServerContexts.premium)
dpf.start_local_server(ansys_path=r"C:\Program Files\ANSYS Inc\v252") # Change path to Ansys Installation folder
cwd = r"D:\PYANSYS\dpf"
rst_file_path = r"D:\PYANSYS\dpf\file.rst"
h5_file_1_comp = os.path.join(cwd, "file_1comp.h5")
h5_file_8_comp = os.path.join(cwd, "file_8comp.h5")
dataSource_rst = dpf.DataSources(rst_file_path)
model = dpf.Model(dataSource_rst)
Migration
migrate_op = dpf.operators.result.migrate_to_h5dpf()
migrate_op.connect(-2, 1) # GZIP Level
migrate_op.inputs.export_floats.connect(False) # True if Conversion to float
migrate_op.inputs.filename.connect(h5_file_1_comp )
migrate_op.connect(1, "U")
migrate_op.inputs.all_time_sets.connect(True)
migrate_op.inputs.data_sources.connect(dataSource_rst)
migrate_op.run()
migrate_op = dpf.operators.result.migrate_to_h5dpf()
migrate_op.connect(-2, 8) # GZIP Level
migrate_op.inputs.export_floats.connect(False) # True if Conversion to float
migrate_op.inputs.filename.connect(h5_file_8_comp )
migrate_op.connect(1, "U")
migrate_op.inputs.all_time_sets.connect(True)
migrate_op.inputs.data_sources.connect(dataSource_rst)
migrate_op.run()
`
Which Operating System causes the issue?
Windows
Which DPF/Ansys version are you using?
Ansys 2025 R2
Which Python version causes the issue?
3.13
Installed packages
most recent version