Skip to content

Commit 3b10383

Browse files
PProfizigithub-actions[bot]
authored andcommitted
update generated code
1 parent e055e67 commit 3b10383

File tree

9 files changed

+417
-14
lines changed

9 files changed

+417
-14
lines changed

doc/source/_static/dpf_operators.html

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

src/ansys/dpf/core/operators/math/min_max_over_time.py

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ class min_max_over_time(Operator):
2727
2828
Returns
2929
-------
30-
fields_container: FieldsContainer
30+
field_container_1: FieldsContainer
31+
field_container_2: FieldsContainer, optional
3132
3233
Examples
3334
--------
@@ -49,7 +50,8 @@ class min_max_over_time(Operator):
4950
... )
5051
5152
>>> # Get output data
52-
>>> result_fields_container = op.outputs.fields_container()
53+
>>> result_field_container_1 = op.outputs.field_container_1()
54+
>>> result_field_container_2 = op.outputs.field_container_2()
5355
"""
5456

5557
def __init__(self, fields_container=None, int32=None, config=None, server=None):
@@ -85,11 +87,17 @@ def _spec() -> Specification:
8587
},
8688
map_output_pin_spec={
8789
0: PinSpecification(
88-
name="fields_container",
90+
name="field_container_1",
8991
type_names=["fields_container"],
9092
optional=False,
9193
document=r"""""",
9294
),
95+
1: PinSpecification(
96+
name="field_container_2",
97+
type_names=["fields_container"],
98+
optional=True,
99+
document=r"""""",
100+
),
93101
},
94102
)
95103
return spec
@@ -213,17 +221,20 @@ class OutputsMinMaxOverTime(_Outputs):
213221
>>> from ansys.dpf import core as dpf
214222
>>> op = dpf.operators.math.min_max_over_time()
215223
>>> # Connect inputs : op.inputs. ...
216-
>>> result_fields_container = op.outputs.fields_container()
224+
>>> result_field_container_1 = op.outputs.field_container_1()
225+
>>> result_field_container_2 = op.outputs.field_container_2()
217226
"""
218227

219228
def __init__(self, op: Operator):
220229
super().__init__(min_max_over_time._spec().outputs, op)
221-
self._fields_container = Output(min_max_over_time._spec().output_pin(0), 0, op)
222-
self._outputs.append(self._fields_container)
230+
self._field_container_1 = Output(min_max_over_time._spec().output_pin(0), 0, op)
231+
self._outputs.append(self._field_container_1)
232+
self._field_container_2 = Output(min_max_over_time._spec().output_pin(1), 1, op)
233+
self._outputs.append(self._field_container_2)
223234

224235
@property
225-
def fields_container(self) -> Output:
226-
r"""Allows to get fields_container output of the operator
236+
def field_container_1(self) -> Output:
237+
r"""Allows to get field_container_1 output of the operator
227238
228239
Returns
229240
-------
@@ -235,6 +246,24 @@ def fields_container(self) -> Output:
235246
>>> from ansys.dpf import core as dpf
236247
>>> op = dpf.operators.math.min_max_over_time()
237248
>>> # Get the output from op.outputs. ...
238-
>>> result_fields_container = op.outputs.fields_container()
249+
>>> result_field_container_1 = op.outputs.field_container_1()
239250
"""
240-
return self._fields_container
251+
return self._field_container_1
252+
253+
@property
254+
def field_container_2(self) -> Output:
255+
r"""Allows to get field_container_2 output of the operator
256+
257+
Returns
258+
-------
259+
output:
260+
An Output instance for this pin.
261+
262+
Examples
263+
--------
264+
>>> from ansys.dpf import core as dpf
265+
>>> op = dpf.operators.math.min_max_over_time()
266+
>>> # Get the output from op.outputs. ...
267+
>>> result_field_container_2 = op.outputs.field_container_2()
268+
"""
269+
return self._field_container_2

src/ansys/dpf/core/operators/mesh/from_scoping.py

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ class from_scoping(Operator):
3333
nodes_only: bool, optional
3434
returns mesh with nodes only (without any elements or property fields). Default is false.
3535
mesh: MeshedRegion
36+
already_fill_map: bool
37+
internal pin used when running meshes::by_scopings operator to never recalculate heavy map over scopings. Default is false.
38+
keep_map: bool
39+
internal pin used to keep cached map if necessary. Default is false.
3640
3741
Returns
3842
-------
@@ -54,13 +58,19 @@ class from_scoping(Operator):
5458
>>> op.inputs.nodes_only.connect(my_nodes_only)
5559
>>> my_mesh = dpf.MeshedRegion()
5660
>>> op.inputs.mesh.connect(my_mesh)
61+
>>> my_already_fill_map = bool()
62+
>>> op.inputs.already_fill_map.connect(my_already_fill_map)
63+
>>> my_keep_map = bool()
64+
>>> op.inputs.keep_map.connect(my_keep_map)
5765
5866
>>> # Instantiate operator and connect inputs in one line
5967
>>> op = dpf.operators.mesh.from_scoping(
6068
... scoping=my_scoping,
6169
... inclusive=my_inclusive,
6270
... nodes_only=my_nodes_only,
6371
... mesh=my_mesh,
72+
... already_fill_map=my_already_fill_map,
73+
... keep_map=my_keep_map,
6474
... )
6575
6676
>>> # Get output data
@@ -73,6 +83,8 @@ def __init__(
7383
inclusive=None,
7484
nodes_only=None,
7585
mesh=None,
86+
already_fill_map=None,
87+
keep_map=None,
7688
config=None,
7789
server=None,
7890
):
@@ -87,6 +99,10 @@ def __init__(
8799
self.inputs.nodes_only.connect(nodes_only)
88100
if mesh is not None:
89101
self.inputs.mesh.connect(mesh)
102+
if already_fill_map is not None:
103+
self.inputs.already_fill_map.connect(already_fill_map)
104+
if keep_map is not None:
105+
self.inputs.keep_map.connect(keep_map)
90106

91107
@staticmethod
92108
def _spec() -> Specification:
@@ -124,6 +140,18 @@ def _spec() -> Specification:
124140
optional=False,
125141
document=r"""""",
126142
),
143+
200: PinSpecification(
144+
name="already_fill_map",
145+
type_names=["bool"],
146+
optional=False,
147+
document=r"""internal pin used when running meshes::by_scopings operator to never recalculate heavy map over scopings. Default is false.""",
148+
),
149+
201: PinSpecification(
150+
name="keep_map",
151+
type_names=["bool"],
152+
optional=False,
153+
document=r"""internal pin used to keep cached map if necessary. Default is false.""",
154+
),
127155
},
128156
map_output_pin_spec={
129157
0: PinSpecification(
@@ -196,6 +224,10 @@ class InputsFromScoping(_Inputs):
196224
>>> op.inputs.nodes_only.connect(my_nodes_only)
197225
>>> my_mesh = dpf.MeshedRegion()
198226
>>> op.inputs.mesh.connect(my_mesh)
227+
>>> my_already_fill_map = bool()
228+
>>> op.inputs.already_fill_map.connect(my_already_fill_map)
229+
>>> my_keep_map = bool()
230+
>>> op.inputs.keep_map.connect(my_keep_map)
199231
"""
200232

201233
def __init__(self, op: Operator):
@@ -208,6 +240,10 @@ def __init__(self, op: Operator):
208240
self._inputs.append(self._nodes_only)
209241
self._mesh = Input(from_scoping._spec().input_pin(7), 7, op, -1)
210242
self._inputs.append(self._mesh)
243+
self._already_fill_map = Input(from_scoping._spec().input_pin(200), 200, op, -1)
244+
self._inputs.append(self._already_fill_map)
245+
self._keep_map = Input(from_scoping._spec().input_pin(201), 201, op, -1)
246+
self._inputs.append(self._keep_map)
211247

212248
@property
213249
def scoping(self) -> Input:
@@ -291,6 +327,48 @@ def mesh(self) -> Input:
291327
"""
292328
return self._mesh
293329

330+
@property
331+
def already_fill_map(self) -> Input:
332+
r"""Allows to connect already_fill_map input to the operator.
333+
334+
internal pin used when running meshes::by_scopings operator to never recalculate heavy map over scopings. Default is false.
335+
336+
Returns
337+
-------
338+
input:
339+
An Input instance for this pin.
340+
341+
Examples
342+
--------
343+
>>> from ansys.dpf import core as dpf
344+
>>> op = dpf.operators.mesh.from_scoping()
345+
>>> op.inputs.already_fill_map.connect(my_already_fill_map)
346+
>>> # or
347+
>>> op.inputs.already_fill_map(my_already_fill_map)
348+
"""
349+
return self._already_fill_map
350+
351+
@property
352+
def keep_map(self) -> Input:
353+
r"""Allows to connect keep_map input to the operator.
354+
355+
internal pin used to keep cached map if necessary. Default is false.
356+
357+
Returns
358+
-------
359+
input:
360+
An Input instance for this pin.
361+
362+
Examples
363+
--------
364+
>>> from ansys.dpf import core as dpf
365+
>>> op = dpf.operators.mesh.from_scoping()
366+
>>> op.inputs.keep_map.connect(my_keep_map)
367+
>>> # or
368+
>>> op.inputs.keep_map(my_keep_map)
369+
"""
370+
return self._keep_map
371+
294372

295373
class OutputsFromScoping(_Outputs):
296374
"""Intermediate class used to get outputs from

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from .extract_time_freq import extract_time_freq
1919
from .fc_get_attribute import fc_get_attribute
2020
from .field import field
21+
from .field_clone_to_shell_layer import field_clone_to_shell_layer
2122
from .field_get_attribute import field_get_attribute
2223
from .field_to_fc import field_to_fc
2324
from .fields_container import fields_container

0 commit comments

Comments
 (0)