Skip to content

Commit 10c952e

Browse files
pyansys-ci-botrlaghaPProfizi
authored
Update generated code for DPF 251_daily on master (#1617)
* update generated code * Update src/ansys/dpf/core/operators/mesh/__init__.py * Delete src/ansys/dpf/core/operators/mesh/meshed_edges_extractors.py --------- Co-authored-by: rlagha <[email protected]> Co-authored-by: Paul Profizi <[email protected]>
1 parent 08d6203 commit 10c952e

File tree

8 files changed

+119
-8
lines changed

8 files changed

+119
-8
lines changed

doc/source/_static/dpf_operators.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

src/ansys/dpf/core/operators/result/migrate_to_h5dpf.py

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ class migrate_to_h5dpf(Operator):
1818
1919
Parameters
2020
----------
21+
dataset_size_compression_threshold : int, optional
22+
Integer value that defines the minimum
23+
dataset size (in bytes) to use h5
24+
native compression applicable for
25+
arrays of floats, doubles and
26+
integers.
2127
h5_native_compression : int, optional
2228
Integer value that defines the h5 native
2329
compression used 0: no compression
@@ -65,6 +71,8 @@ class migrate_to_h5dpf(Operator):
6571
>>> op = dpf.operators.result.migrate_to_h5dpf()
6672
6773
>>> # Make input connections
74+
>>> my_dataset_size_compression_threshold = int()
75+
>>> op.inputs.dataset_size_compression_threshold.connect(my_dataset_size_compression_threshold)
6876
>>> my_h5_native_compression = int()
6977
>>> op.inputs.h5_native_compression.connect(my_h5_native_compression)
7078
>>> my_export_floats = bool()
@@ -86,6 +94,7 @@ class migrate_to_h5dpf(Operator):
8694
8795
>>> # Instantiate operator and connect inputs in one line
8896
>>> op = dpf.operators.result.migrate_to_h5dpf(
97+
... dataset_size_compression_threshold=my_dataset_size_compression_threshold,
8998
... h5_native_compression=my_h5_native_compression,
9099
... export_floats=my_export_floats,
91100
... filename=my_filename,
@@ -103,6 +112,7 @@ class migrate_to_h5dpf(Operator):
103112

104113
def __init__(
105114
self,
115+
dataset_size_compression_threshold=None,
106116
h5_native_compression=None,
107117
export_floats=None,
108118
filename=None,
@@ -118,6 +128,10 @@ def __init__(
118128
super().__init__(name="hdf5::h5dpf::migrate_file", config=config, server=server)
119129
self._inputs = InputsMigrateToH5Dpf(self)
120130
self._outputs = OutputsMigrateToH5Dpf(self)
131+
if dataset_size_compression_threshold is not None:
132+
self.inputs.dataset_size_compression_threshold.connect(
133+
dataset_size_compression_threshold
134+
)
121135
if h5_native_compression is not None:
122136
self.inputs.h5_native_compression.connect(h5_native_compression)
123137
if export_floats is not None:
@@ -147,6 +161,16 @@ def _spec():
147161
spec = Specification(
148162
description=description,
149163
map_input_pin_spec={
164+
-5: PinSpecification(
165+
name="dataset_size_compression_threshold",
166+
type_names=["int32"],
167+
optional=True,
168+
document="""Integer value that defines the minimum
169+
dataset size (in bytes) to use h5
170+
native compression applicable for
171+
arrays of floats, doubles and
172+
integers.""",
173+
),
150174
-2: PinSpecification(
151175
name="h5_native_compression",
152176
type_names=["int32"],
@@ -277,6 +301,8 @@ class InputsMigrateToH5Dpf(_Inputs):
277301
--------
278302
>>> from ansys.dpf import core as dpf
279303
>>> op = dpf.operators.result.migrate_to_h5dpf()
304+
>>> my_dataset_size_compression_threshold = int()
305+
>>> op.inputs.dataset_size_compression_threshold.connect(my_dataset_size_compression_threshold)
280306
>>> my_h5_native_compression = int()
281307
>>> op.inputs.h5_native_compression.connect(my_h5_native_compression)
282308
>>> my_export_floats = bool()
@@ -299,6 +325,10 @@ class InputsMigrateToH5Dpf(_Inputs):
299325

300326
def __init__(self, op: Operator):
301327
super().__init__(migrate_to_h5dpf._spec().inputs, op)
328+
self._dataset_size_compression_threshold = Input(
329+
migrate_to_h5dpf._spec().input_pin(-5), -5, op, -1
330+
)
331+
self._inputs.append(self._dataset_size_compression_threshold)
302332
self._h5_native_compression = Input(
303333
migrate_to_h5dpf._spec().input_pin(-2), -2, op, -1
304334
)
@@ -328,6 +358,30 @@ def __init__(self, op: Operator):
328358
)
329359
self._inputs.append(self._filtering_workflow)
330360

361+
@property
362+
def dataset_size_compression_threshold(self):
363+
"""Allows to connect dataset_size_compression_threshold input to the operator.
364+
365+
Integer value that defines the minimum
366+
dataset size (in bytes) to use h5
367+
native compression applicable for
368+
arrays of floats, doubles and
369+
integers.
370+
371+
Parameters
372+
----------
373+
my_dataset_size_compression_threshold : int
374+
375+
Examples
376+
--------
377+
>>> from ansys.dpf import core as dpf
378+
>>> op = dpf.operators.result.migrate_to_h5dpf()
379+
>>> op.inputs.dataset_size_compression_threshold.connect(my_dataset_size_compression_threshold)
380+
>>> # or
381+
>>> op.inputs.dataset_size_compression_threshold(my_dataset_size_compression_threshold)
382+
"""
383+
return self._dataset_size_compression_threshold
384+
331385
@property
332386
def h5_native_compression(self):
333387
"""Allows to connect h5_native_compression input to the operator.

src/ansys/dpf/core/operators/serialization/hdf5dpf_generate_result_file.py

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ class hdf5dpf_generate_result_file(Operator):
1616
1717
Parameters
1818
----------
19+
dataset_size_compression_threshold : int, optional
20+
Integer value that defines the minimum
21+
dataset size (in bytes) to use h5
22+
native compression applicable for
23+
arrays of floats, doubles and
24+
integers.
1925
h5_native_compression : int, optional
2026
Integer value that defines the h5 native
2127
compression used 0: no compression
@@ -72,6 +78,8 @@ class hdf5dpf_generate_result_file(Operator):
7278
>>> op = dpf.operators.serialization.hdf5dpf_generate_result_file()
7379
7480
>>> # Make input connections
81+
>>> my_dataset_size_compression_threshold = int()
82+
>>> op.inputs.dataset_size_compression_threshold.connect(my_dataset_size_compression_threshold)
7583
>>> my_h5_native_compression = int()
7684
>>> op.inputs.h5_native_compression.connect(my_h5_native_compression)
7785
>>> my_export_floats = bool()
@@ -91,6 +99,7 @@ class hdf5dpf_generate_result_file(Operator):
9199
92100
>>> # Instantiate operator and connect inputs in one line
93101
>>> op = dpf.operators.serialization.hdf5dpf_generate_result_file(
102+
... dataset_size_compression_threshold=my_dataset_size_compression_threshold,
94103
... h5_native_compression=my_h5_native_compression,
95104
... export_floats=my_export_floats,
96105
... filename=my_filename,
@@ -107,6 +116,7 @@ class hdf5dpf_generate_result_file(Operator):
107116

108117
def __init__(
109118
self,
119+
dataset_size_compression_threshold=None,
110120
h5_native_compression=None,
111121
export_floats=None,
112122
filename=None,
@@ -123,6 +133,10 @@ def __init__(
123133
)
124134
self._inputs = InputsHdf5DpfGenerateResultFile(self)
125135
self._outputs = OutputsHdf5DpfGenerateResultFile(self)
136+
if dataset_size_compression_threshold is not None:
137+
self.inputs.dataset_size_compression_threshold.connect(
138+
dataset_size_compression_threshold
139+
)
126140
if h5_native_compression is not None:
127141
self.inputs.h5_native_compression.connect(h5_native_compression)
128142
if export_floats is not None:
@@ -146,6 +160,16 @@ def _spec():
146160
spec = Specification(
147161
description=description,
148162
map_input_pin_spec={
163+
-5: PinSpecification(
164+
name="dataset_size_compression_threshold",
165+
type_names=["int32"],
166+
optional=True,
167+
document="""Integer value that defines the minimum
168+
dataset size (in bytes) to use h5
169+
native compression applicable for
170+
arrays of floats, doubles and
171+
integers.""",
172+
),
149173
-2: PinSpecification(
150174
name="h5_native_compression",
151175
type_names=["int32"],
@@ -284,6 +308,8 @@ class InputsHdf5DpfGenerateResultFile(_Inputs):
284308
--------
285309
>>> from ansys.dpf import core as dpf
286310
>>> op = dpf.operators.serialization.hdf5dpf_generate_result_file()
311+
>>> my_dataset_size_compression_threshold = int()
312+
>>> op.inputs.dataset_size_compression_threshold.connect(my_dataset_size_compression_threshold)
287313
>>> my_h5_native_compression = int()
288314
>>> op.inputs.h5_native_compression.connect(my_h5_native_compression)
289315
>>> my_export_floats = bool()
@@ -304,6 +330,10 @@ class InputsHdf5DpfGenerateResultFile(_Inputs):
304330

305331
def __init__(self, op: Operator):
306332
super().__init__(hdf5dpf_generate_result_file._spec().inputs, op)
333+
self._dataset_size_compression_threshold = Input(
334+
hdf5dpf_generate_result_file._spec().input_pin(-5), -5, op, -1
335+
)
336+
self._inputs.append(self._dataset_size_compression_threshold)
307337
self._h5_native_compression = Input(
308338
hdf5dpf_generate_result_file._spec().input_pin(-2), -2, op, -1
309339
)
@@ -337,6 +367,30 @@ def __init__(self, op: Operator):
337367
)
338368
self._inputs.append(self._input_name2)
339369

370+
@property
371+
def dataset_size_compression_threshold(self):
372+
"""Allows to connect dataset_size_compression_threshold input to the operator.
373+
374+
Integer value that defines the minimum
375+
dataset size (in bytes) to use h5
376+
native compression applicable for
377+
arrays of floats, doubles and
378+
integers.
379+
380+
Parameters
381+
----------
382+
my_dataset_size_compression_threshold : int
383+
384+
Examples
385+
--------
386+
>>> from ansys.dpf import core as dpf
387+
>>> op = dpf.operators.serialization.hdf5dpf_generate_result_file()
388+
>>> op.inputs.dataset_size_compression_threshold.connect(my_dataset_size_compression_threshold)
389+
>>> # or
390+
>>> op.inputs.dataset_size_compression_threshold(my_dataset_size_compression_threshold)
391+
"""
392+
return self._dataset_size_compression_threshold
393+
340394
@property
341395
def h5_native_compression(self):
342396
"""Allows to connect h5_native_compression input to the operator.

src/ansys/dpf/core/operators/serialization/import_symbolic_workflow.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ class import_symbolic_workflow(Operator):
1919
----------
2020
string_or_path : str or DataSources
2121
format : int, optional
22-
0 is ascii format and 1 is binary, default is
23-
0.
22+
-1 is auto-detection, 0 is ascii format, 1 is
23+
binary, 2 is json, default is -1
24+
(auto-detection).
2425
2526
2627
Examples
@@ -72,8 +73,9 @@ def _spec():
7273
name="format",
7374
type_names=["int32"],
7475
optional=True,
75-
document="""0 is ascii format and 1 is binary, default is
76-
0.""",
76+
document="""-1 is auto-detection, 0 is ascii format, 1 is
77+
binary, 2 is json, default is -1
78+
(auto-detection).""",
7779
),
7880
},
7981
map_output_pin_spec={
@@ -169,8 +171,9 @@ def string_or_path(self):
169171
def format(self):
170172
"""Allows to connect format input to the operator.
171173
172-
0 is ascii format and 1 is binary, default is
173-
0.
174+
-1 is auto-detection, 0 is ascii format, 1 is
175+
binary, 2 is json, default is -1
176+
(auto-detection).
174177
175178
Parameters
176179
----------
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)