Skip to content

Commit fcd31a6

Browse files
PProfizigithub-actions[bot]
authored andcommitted
update generated code
1 parent cf099e4 commit fcd31a6

12 files changed

+803
-140
lines changed

doc/source/_static/dpf_operators.html

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

src/ansys/dpf/core/operators/utility/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from .change_shell_layers import change_shell_layers
99
from .compute_time_scoping import compute_time_scoping
1010
from .customtypefield_get_attribute import customtypefield_get_attribute
11+
from .customtypefield_set_property import customtypefield_set_property
1112
from .default_value import default_value
1213
from .delegate_to_operator import delegate_to_operator
1314
from .ds_get_attribute import ds_get_attribute
@@ -21,6 +22,7 @@
2122
from .field import field
2223
from .field_clone_to_shell_layer import field_clone_to_shell_layer
2324
from .field_get_attribute import field_get_attribute
25+
from .field_set_property import field_set_property
2426
from .field_to_fc import field_to_fc
2527
from .fields_container import fields_container
2628
from .fields_container_matrices_label import fields_container_matrices_label
@@ -66,14 +68,14 @@
6668
from .producer_consumer_for_each import producer_consumer_for_each
6769
from .property_field import property_field
6870
from .propertyfield_get_attribute import propertyfield_get_attribute
71+
from .propertyfield_set_property import propertyfield_set_property
6972
from .python_generator import python_generator
7073
from .remote_operator_instantiate import remote_operator_instantiate
7174
from .remote_workflow_instantiate import remote_workflow_instantiate
7275
from .remove_unnecessary_labels import remove_unnecessary_labels
7376
from .scalars_to_field import scalars_to_field
7477
from .server_path import server_path
7578
from .set_attribute import set_attribute
76-
from .set_property import set_property
7779
from .split_in_for_each_range import split_in_for_each_range
7880
from .strain_from_voigt import strain_from_voigt
7981
from .strain_from_voigt_fc import strain_from_voigt_fc

src/ansys/dpf/core/operators/utility/customtypefield_get_attribute.py

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@
1717

1818

1919
class customtypefield_get_attribute(Operator):
20-
r"""A CustomTypeField in pin 0 and a property name (string) in pin 1 are
21-
expected in input.
20+
r"""Gets a property from an input field/field container. A CustomTypeFieldin
21+
pin 0, a property name (string) in pin 1 are expected as inputs
2222
2323
2424
Parameters
2525
----------
26-
custom_type_field: CustomTypeField
26+
custom_type_field: CustomTypeField or CustomTypeFieldsContainer
2727
property_name: str
28-
Accepted inputs are: 'time_freq_support', 'scoping' and 'header'.
28+
Property to get. Accepted inputs are specific strings namely: 'unit, 'name','time_freq_support', 'scoping' and 'header'.
2929
3030
Returns
3131
-------
32-
property: TimeFreqSupport or Scoping or DataTree
33-
Property value.
32+
property_value: str or TimeFreqSupport or Scoping or DataTree
33+
Property value that is returned. Accepted Outputs are: Field, PropertyField, StringField, CustomTypeField or their containers.
3434
3535
Examples
3636
--------
@@ -52,7 +52,7 @@ class customtypefield_get_attribute(Operator):
5252
... )
5353
5454
>>> # Get output data
55-
>>> result_property = op.outputs.property()
55+
>>> result_property_value = op.outputs.property_value()
5656
"""
5757

5858
def __init__(
@@ -70,31 +70,36 @@ def __init__(
7070

7171
@staticmethod
7272
def _spec() -> Specification:
73-
description = r"""A CustomTypeField in pin 0 and a property name (string) in pin 1 are
74-
expected in input.
73+
description = r"""Gets a property from an input field/field container. A CustomTypeFieldin
74+
pin 0, a property name (string) in pin 1 are expected as inputs
7575
"""
7676
spec = Specification(
7777
description=description,
7878
map_input_pin_spec={
7979
0: PinSpecification(
8080
name="custom_type_field",
81-
type_names=["custom_type_field"],
81+
type_names=["custom_type_field", "custom_type_fields_container"],
8282
optional=False,
8383
document=r"""""",
8484
),
8585
1: PinSpecification(
8686
name="property_name",
8787
type_names=["string"],
8888
optional=False,
89-
document=r"""Accepted inputs are: 'time_freq_support', 'scoping' and 'header'.""",
89+
document=r"""Property to get. Accepted inputs are specific strings namely: 'unit, 'name','time_freq_support', 'scoping' and 'header'.""",
9090
),
9191
},
9292
map_output_pin_spec={
9393
0: PinSpecification(
94-
name="property",
95-
type_names=["time_freq_support", "scoping", "abstract_data_tree"],
94+
name="property_value",
95+
type_names=[
96+
"string",
97+
"time_freq_support",
98+
"scoping",
99+
"abstract_data_tree",
100+
],
96101
optional=False,
97-
document=r"""Property value.""",
102+
document=r"""Property value that is returned. Accepted Outputs are: Field, PropertyField, StringField, CustomTypeField or their containers.""",
98103
),
99104
},
100105
)
@@ -194,7 +199,7 @@ def custom_type_field(self) -> Input:
194199
def property_name(self) -> Input:
195200
r"""Allows to connect property_name input to the operator.
196201
197-
Accepted inputs are: 'time_freq_support', 'scoping' and 'header'.
202+
Property to get. Accepted inputs are specific strings namely: 'unit, 'name','time_freq_support', 'scoping' and 'header'.
198203
199204
Returns
200205
-------
@@ -221,32 +226,40 @@ class OutputsCustomtypefieldGetAttribute(_Outputs):
221226
>>> from ansys.dpf import core as dpf
222227
>>> op = dpf.operators.utility.customtypefield_get_attribute()
223228
>>> # Connect inputs : op.inputs. ...
224-
>>> result_property = op.outputs.property()
229+
>>> result_property_value = op.outputs.property_value()
225230
"""
226231

227232
def __init__(self, op: Operator):
228233
super().__init__(customtypefield_get_attribute._spec().outputs, op)
229-
self.property_as_time_freq_support = Output(
234+
self.property_value_as_string = Output(
235+
_modify_output_spec_with_one_type(
236+
customtypefield_get_attribute._spec().output_pin(0), "string"
237+
),
238+
0,
239+
op,
240+
)
241+
self._outputs.append(self.property_value_as_string)
242+
self.property_value_as_time_freq_support = Output(
230243
_modify_output_spec_with_one_type(
231244
customtypefield_get_attribute._spec().output_pin(0), "time_freq_support"
232245
),
233246
0,
234247
op,
235248
)
236-
self._outputs.append(self.property_as_time_freq_support)
237-
self.property_as_scoping = Output(
249+
self._outputs.append(self.property_value_as_time_freq_support)
250+
self.property_value_as_scoping = Output(
238251
_modify_output_spec_with_one_type(
239252
customtypefield_get_attribute._spec().output_pin(0), "scoping"
240253
),
241254
0,
242255
op,
243256
)
244-
self._outputs.append(self.property_as_scoping)
245-
self.property_as_data_tree = Output(
257+
self._outputs.append(self.property_value_as_scoping)
258+
self.property_value_as_data_tree = Output(
246259
_modify_output_spec_with_one_type(
247260
customtypefield_get_attribute._spec().output_pin(0), "data_tree"
248261
),
249262
0,
250263
op,
251264
)
252-
self._outputs.append(self.property_as_data_tree)
265+
self._outputs.append(self.property_value_as_data_tree)

0 commit comments

Comments
 (0)