Skip to content

Commit

Permalink
update generated code (#1261)
Browse files Browse the repository at this point in the history
Co-authored-by: rlagha <rlagha@users.noreply.github.com>
Co-authored-by: Paul Profizi <100710998+PProfizi@users.noreply.github.com>
  • Loading branch information
3 people authored Nov 14, 2023
1 parent db667e9 commit aa1973c
Show file tree
Hide file tree
Showing 10 changed files with 127 additions and 23 deletions.
2 changes: 1 addition & 1 deletion docs/source/_static/dpf_operators.html

Large diffs are not rendered by default.

88 changes: 70 additions & 18 deletions src/ansys/dpf/core/operators/result/migrate_to_h5dpf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,17 @@ class migrate_to_h5dpf(Operator):
export_floats : bool, optional
Converts double to float to reduce file size
(default is true)
compression_worfklow : Workflow, optional
compression_workflow : Workflow, optional
Beta option: applies input compression
workflow
filtering_workflow : Workflow, optional
Applies input filtering workflow
h5_native_compression : int, optional
Integer value that defines the h5 native
compression used 0: no compression
(default)1-9: gzip level compression
: 9 gives us maximum compression but
at the slowest speed.
requested_location : str, optional
If no location is specified, elemental
results will be stored as they are.
Expand Down Expand Up @@ -69,10 +75,12 @@ class migrate_to_h5dpf(Operator):
>>> op.inputs.data_sources.connect(my_data_sources)
>>> my_export_floats = bool()
>>> op.inputs.export_floats.connect(my_export_floats)
>>> my_compression_worfklow = dpf.Workflow()
>>> op.inputs.compression_worfklow.connect(my_compression_worfklow)
>>> my_compression_workflow = dpf.Workflow()
>>> op.inputs.compression_workflow.connect(my_compression_workflow)
>>> my_filtering_workflow = dpf.Workflow()
>>> op.inputs.filtering_workflow.connect(my_filtering_workflow)
>>> my_h5_native_compression = int()
>>> op.inputs.h5_native_compression.connect(my_h5_native_compression)
>>> my_requested_location = str()
>>> op.inputs.requested_location.connect(my_requested_location)
>>> my_separate_dofs = bool()
Expand All @@ -86,8 +94,9 @@ class migrate_to_h5dpf(Operator):
... streams_container=my_streams_container,
... data_sources=my_data_sources,
... export_floats=my_export_floats,
... compression_worfklow=my_compression_worfklow,
... compression_workflow=my_compression_workflow,
... filtering_workflow=my_filtering_workflow,
... h5_native_compression=my_h5_native_compression,
... requested_location=my_requested_location,
... separate_dofs=my_separate_dofs,
... )
Expand All @@ -104,8 +113,9 @@ def __init__(
streams_container=None,
data_sources=None,
export_floats=None,
compression_worfklow=None,
compression_workflow=None,
filtering_workflow=None,
h5_native_compression=None,
requested_location=None,
separate_dofs=None,
config=None,
Expand All @@ -128,10 +138,12 @@ def __init__(
self.inputs.data_sources.connect(data_sources)
if export_floats is not None:
self.inputs.export_floats.connect(export_floats)
if compression_worfklow is not None:
self.inputs.compression_worfklow.connect(compression_worfklow)
if compression_workflow is not None:
self.inputs.compression_workflow.connect(compression_workflow)
if filtering_workflow is not None:
self.inputs.filtering_workflow.connect(filtering_workflow)
if h5_native_compression is not None:
self.inputs.h5_native_compression.connect(h5_native_compression)
if requested_location is not None:
self.inputs.requested_location.connect(requested_location)
if separate_dofs is not None:
Expand Down Expand Up @@ -186,7 +198,7 @@ def _spec():
(default is true)""",
),
6: PinSpecification(
name="compression_worfklow",
name="compression_workflow",
type_names=["workflow"],
optional=True,
document="""Beta option: applies input compression
Expand All @@ -198,6 +210,16 @@ def _spec():
optional=True,
document="""Applies input filtering workflow""",
),
8: PinSpecification(
name="h5_native_compression",
type_names=["int32"],
optional=True,
document="""Integer value that defines the h5 native
compression used 0: no compression
(default)1-9: gzip level compression
: 9 gives us maximum compression but
at the slowest speed.""",
),
9: PinSpecification(
name="requested_location",
type_names=["string"],
Expand Down Expand Up @@ -284,10 +306,12 @@ class InputsMigrateToH5Dpf(_Inputs):
>>> op.inputs.data_sources.connect(my_data_sources)
>>> my_export_floats = bool()
>>> op.inputs.export_floats.connect(my_export_floats)
>>> my_compression_worfklow = dpf.Workflow()
>>> op.inputs.compression_worfklow.connect(my_compression_worfklow)
>>> my_compression_workflow = dpf.Workflow()
>>> op.inputs.compression_workflow.connect(my_compression_workflow)
>>> my_filtering_workflow = dpf.Workflow()
>>> op.inputs.filtering_workflow.connect(my_filtering_workflow)
>>> my_h5_native_compression = int()
>>> op.inputs.h5_native_compression.connect(my_h5_native_compression)
>>> my_requested_location = str()
>>> op.inputs.requested_location.connect(my_requested_location)
>>> my_separate_dofs = bool()
Expand All @@ -312,14 +336,18 @@ def __init__(self, op: Operator):
self._inputs.append(self._data_sources)
self._export_floats = Input(migrate_to_h5dpf._spec().input_pin(5), 5, op, -1)
self._inputs.append(self._export_floats)
self._compression_worfklow = Input(
self._compression_workflow = Input(
migrate_to_h5dpf._spec().input_pin(6), 6, op, -1
)
self._inputs.append(self._compression_worfklow)
self._inputs.append(self._compression_workflow)
self._filtering_workflow = Input(
migrate_to_h5dpf._spec().input_pin(7), 7, op, -1
)
self._inputs.append(self._filtering_workflow)
self._h5_native_compression = Input(
migrate_to_h5dpf._spec().input_pin(8), 8, op, -1
)
self._inputs.append(self._h5_native_compression)
self._requested_location = Input(
migrate_to_h5dpf._spec().input_pin(9), 9, op, -1
)
Expand Down Expand Up @@ -454,25 +482,25 @@ def export_floats(self):
return self._export_floats

@property
def compression_worfklow(self):
"""Allows to connect compression_worfklow input to the operator.
def compression_workflow(self):
"""Allows to connect compression_workflow input to the operator.
Beta option: applies input compression
workflow
Parameters
----------
my_compression_worfklow : Workflow
my_compression_workflow : Workflow
Examples
--------
>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.migrate_to_h5dpf()
>>> op.inputs.compression_worfklow.connect(my_compression_worfklow)
>>> op.inputs.compression_workflow.connect(my_compression_workflow)
>>> # or
>>> op.inputs.compression_worfklow(my_compression_worfklow)
>>> op.inputs.compression_workflow(my_compression_workflow)
"""
return self._compression_worfklow
return self._compression_workflow

@property
def filtering_workflow(self):
Expand All @@ -494,6 +522,30 @@ def filtering_workflow(self):
"""
return self._filtering_workflow

@property
def h5_native_compression(self):
"""Allows to connect h5_native_compression input to the operator.
Integer value that defines the h5 native
compression used 0: no compression
(default)1-9: gzip level compression
: 9 gives us maximum compression but
at the slowest speed.
Parameters
----------
my_h5_native_compression : int
Examples
--------
>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.migrate_to_h5dpf()
>>> op.inputs.h5_native_compression.connect(my_h5_native_compression)
>>> # or
>>> op.inputs.h5_native_compression(my_h5_native_compression)
"""
return self._h5_native_compression

@property
def requested_location(self):
"""Allows to connect requested_location input to the operator.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ class hdf5dpf_generate_result_file(Operator):
Parameters
----------
h5_native_compression : int, optional
Integer value that defines the h5 native
compression used 0: no compression
(default)1-9: gzip level compression
: 9 gives us maximum compression but
at the slowest speed.
export_floats : bool, optional
Converts double to float to reduce file size
(default is true)
Expand Down Expand Up @@ -63,6 +69,8 @@ class hdf5dpf_generate_result_file(Operator):
>>> op = dpf.operators.serialization.hdf5dpf_generate_result_file()
>>> # Make input connections
>>> my_h5_native_compression = int()
>>> op.inputs.h5_native_compression.connect(my_h5_native_compression)
>>> my_export_floats = bool()
>>> op.inputs.export_floats.connect(my_export_floats)
>>> my_filename = str()
Expand All @@ -80,6 +88,7 @@ class hdf5dpf_generate_result_file(Operator):
>>> # Instantiate operator and connect inputs in one line
>>> op = dpf.operators.serialization.hdf5dpf_generate_result_file(
... h5_native_compression=my_h5_native_compression,
... export_floats=my_export_floats,
... filename=my_filename,
... mesh_provider_out=my_mesh_provider_out,
Expand All @@ -95,6 +104,7 @@ class hdf5dpf_generate_result_file(Operator):

def __init__(
self,
h5_native_compression=None,
export_floats=None,
filename=None,
mesh_provider_out=None,
Expand All @@ -110,6 +120,8 @@ def __init__(
)
self._inputs = InputsHdf5DpfGenerateResultFile(self)
self._outputs = OutputsHdf5DpfGenerateResultFile(self)
if h5_native_compression is not None:
self.inputs.h5_native_compression.connect(h5_native_compression)
if export_floats is not None:
self.inputs.export_floats.connect(export_floats)
if filename is not None:
Expand All @@ -131,6 +143,16 @@ def _spec():
spec = Specification(
description=description,
map_input_pin_spec={
-2: PinSpecification(
name="h5_native_compression",
type_names=["int32"],
optional=True,
document="""Integer value that defines the h5 native
compression used 0: no compression
(default)1-9: gzip level compression
: 9 gives us maximum compression but
at the slowest speed.""",
),
-1: PinSpecification(
name="export_floats",
type_names=["bool"],
Expand Down Expand Up @@ -257,6 +279,8 @@ class InputsHdf5DpfGenerateResultFile(_Inputs):
--------
>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.serialization.hdf5dpf_generate_result_file()
>>> my_h5_native_compression = int()
>>> op.inputs.h5_native_compression.connect(my_h5_native_compression)
>>> my_export_floats = bool()
>>> op.inputs.export_floats.connect(my_export_floats)
>>> my_filename = str()
Expand All @@ -275,6 +299,10 @@ class InputsHdf5DpfGenerateResultFile(_Inputs):

def __init__(self, op: Operator):
super().__init__(hdf5dpf_generate_result_file._spec().inputs, op)
self._h5_native_compression = Input(
hdf5dpf_generate_result_file._spec().input_pin(-2), -2, op, -1
)
self._inputs.append(self._h5_native_compression)
self._export_floats = Input(
hdf5dpf_generate_result_file._spec().input_pin(-1), -1, op, -1
)
Expand Down Expand Up @@ -304,6 +332,30 @@ def __init__(self, op: Operator):
)
self._inputs.append(self._input_name2)

@property
def h5_native_compression(self):
"""Allows to connect h5_native_compression input to the operator.
Integer value that defines the h5 native
compression used 0: no compression
(default)1-9: gzip level compression
: 9 gives us maximum compression but
at the slowest speed.
Parameters
----------
my_h5_native_compression : int
Examples
--------
>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.serialization.hdf5dpf_generate_result_file()
>>> op.inputs.h5_native_compression.connect(my_h5_native_compression)
>>> # or
>>> op.inputs.h5_native_compression(my_h5_native_compression)
"""
return self._h5_native_compression

@property
def export_floats(self):
"""Allows to connect export_floats input to the operator.
Expand Down
4 changes: 2 additions & 2 deletions src/ansys/dpf/gate/_version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Version for ansys-dpf-gate"""
# major, minor, patch
version_info = 0, 4, "2.dev0"
__ansys_version__ = "241"
version_info = 0, 5, "0.dev0"
__ansys_version__ = "242"

# Nice string for the version
__version__ = ".".join(map(str, version_info))
Binary file modified src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll
Binary file not shown.
Binary file modified src/ansys/dpf/gatebin/DPFClientAPI.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion src/ansys/dpf/gatebin/_version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Version for ansys-dpf-gatebin"""
# major, minor, patch
version_info = 0, 4, "2.dev0"
version_info = 0, 5, "0.dev0"

# Nice string for the version
__version__ = ".".join(map(str, version_info))
Binary file modified src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so
Binary file not shown.
Binary file modified src/ansys/dpf/gatebin/libDPFClientAPI.so
Binary file not shown.
2 changes: 1 addition & 1 deletion src/ansys/grpc/dpf/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""ansys-grpc-dpf python protocol version"""
__version__ = '0.8.2dev0' # major.minor.patch
__version__ = '0.9.0dev0' # major.minor.patch

0 comments on commit aa1973c

Please sign in to comment.