Skip to main content

DPF Framework 2026 R1

serialization:hdf5dpf generate result file

Last update: 31.07.2026

Version: 0.0.0

Description

Generate a dpf result file from provided information.

Inputs

This table lists the input pins for this operator. Input pins define the data that the operator requires to perform its operation. Some inputs are required, while others are optional and provide additional configuration. Each parameter is detailed in the sections that follow the table.

Pin number Name Status Expected type(s)
-7 h5_chunk_size int32
-6 append_mode bool
-5 dataset_size_compression_threshold int32
-2 h5_native_compression int32, abstract_data_tree
-1 export_floats bool
0 filename Required string
1 mesh_provider_out abstract_meshed_region
2 time_freq_support_out time_freq_support
3 ansys_unit_system_id int32, result_info
4 input_name string, any

h5_chunk_size (Pin -7)

  • Required: No
  • Expected type(s): int32

Size of each HDF5 chunk in kilobytes (KB). Default: 1 MB when compression is enabled; for uncompressed datasets, the default is the full dataset size x dimension.

append_mode (Pin -6)

  • Required: No
  • Expected type(s): bool

Experimental: Allow appending chunked data to the file. This disables fields container content deduplication.

dataset_size_compression_threshold (Pin -5)

  • Required: No
  • Expected type(s): int32

Integer value that defines the minimum dataset size (in bytes) to use h5 native compression Applicable for arrays of floats, doubles and integers.

h5_native_compression (Pin -2)

Integer value / DataTree that defines the h5 native compression used For Integer Input {0: No Compression (default); 1-9: GZIP Compression : 9 provides maximum compression but at the slowest speed.}For DataTree Input {type: None / GZIP / ZSTD; level: GZIP (1-9) / ZSTD (1-20); num_threads: ZSTD (>0)}

export_floats (Pin -1)

  • Required: No
  • Expected type(s): bool

converts double to float to reduce file size (default is true)

filename (Pin 0)

  • Required: Yes
  • Expected type(s): string

name of the output file that will be generated (utf8).

mesh_provider_out (Pin 1)

defines the MeshedRegion that is exported and provided by MeshProvider.

time_freq_support_out (Pin 2)

defines the TimeFreqSupport that is exported and provided by TimeFreqSupportProvider.

ansys_unit_system_id (Pin 3)

defines the unit system the results are exported with. A Result info can be input to also export Physics Type and Analysis Type.

input_name (Pin 4)

Set of even and odd pins to serialize results. Odd pins (4, 6, 8...) are strings, and they represent the names of the results to be serialized. Even pins (5, 7, 9...) are DPF types, and they represent the results to be serialized. They should go in pairs (for each result name, there should be a result) and connected sequentially.

Outputs

This table lists the output pins for this operator. Output pins provide the results of the operator's computation and can be connected to inputs of other operators or retrieved for further processing. Each output is detailed in the sections that follow the table.

Pin number Name Expected type(s)
0 data_sources data_sources

data_sources (Pin 0)

data_sources filled with the H5 generated file path.

Configurations

This operator supports configuration options that modify its behavior.

evaluate_inputs_before_run

  • Expected type(s): bool
  • Default value: false

If this option is set to true, all input pins of the operator will be evaluated before entering the run method to maintain a correct Operator status.

mutex

  • Expected type(s): bool
  • Default value: false

If this option is set to true, the shared memory is prevented from being simultaneously accessed by multiple threads.

Scripting

This operator can be accessed through scripting interfaces using these identifiers.

Category: serialization

Plugin: core

Scripting name: hdf5dpf_generate_result_file

Full name: serialization.hdf5dpf_generate_result_file

Internal name: hdf5::h5dpf::make_result_file

License: None

Examples

These examples demonstrate how to use this operator in different programming environments. Each example shows how to instantiate the operator, connect the required inputs, and retrieve the output.

C++
#include "dpf_api.h"

ansys::dpf::Operator op("hdf5::h5dpf::make_result_file"); // operator instantiation
op.connect(-7, my_h5_chunk_size);
op.connect(-6, my_append_mode);
op.connect(-5, my_dataset_size_compression_threshold);
op.connect(-2, my_h5_native_compression);
op.connect(-1, my_export_floats);
op.connect(0, my_filename);
op.connect(1, my_mesh_provider_out);
op.connect(2, my_time_freq_support_out);
op.connect(3, my_ansys_unit_system_id);
op.connect(4, my_input_name);
ansys::dpf::DataSources my_data_sources = op.getOutput<ansys::dpf::DataSources>(0);
CPython
import ansys.dpf.core as dpf

op = dpf.operators.serialization.hdf5dpf_generate_result_file() # operator instantiation
op.inputs.h5_chunk_size.connect(my_h5_chunk_size)
op.inputs.append_mode.connect(my_append_mode)
op.inputs.dataset_size_compression_threshold.connect(my_dataset_size_compression_threshold)
op.inputs.h5_native_compression.connect(my_h5_native_compression)
op.inputs.export_floats.connect(my_export_floats)
op.inputs.filename.connect(my_filename)
op.inputs.mesh_provider_out.connect(my_mesh_provider_out)
op.inputs.time_freq_support_out.connect(my_time_freq_support_out)
op.inputs.ansys_unit_system_id.connect(my_ansys_unit_system_id)
op.inputs.input_name1.connect(my_input_name1)
op.inputs.input_name2.connect(my_input_name2)
my_data_sources = op.outputs.data_sources()
IPython
import mech_dpf
import Ans.DataProcessing as dpf

op = dpf.operators.serialization.hdf5dpf_generate_result_file() # operator instantiation
op.inputs.h5_chunk_size.Connect(my_h5_chunk_size)
op.inputs.append_mode.Connect(my_append_mode)
op.inputs.dataset_size_compression_threshold.Connect(my_dataset_size_compression_threshold)
op.inputs.h5_native_compression.Connect(my_h5_native_compression)
op.inputs.export_floats.Connect(my_export_floats)
op.inputs.filename.Connect(my_filename)
op.inputs.mesh_provider_out.Connect(my_mesh_provider_out)
op.inputs.time_freq_support_out.Connect(my_time_freq_support_out)
op.inputs.ansys_unit_system_id.Connect(my_ansys_unit_system_id)
op.inputs.input_name.Connect(my_input_name)
my_data_sources = op.outputs.data_sources.GetData()

Changelog

  • Version 0.0.0: Initial release.

Connect with Ansys