Skip to content

Commit 40acfeb

Browse files
PProfizigithub-actions[bot]
authored andcommitted
update generated code
1 parent 60aad08 commit 40acfeb

File tree

8 files changed

+92
-49
lines changed

8 files changed

+92
-49
lines changed

doc/source/_static/dpf_operators.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
from .coordinates import coordinates
6060
from .creep_strain_energy_density import creep_strain_energy_density
6161
from .current_density import current_density
62-
from .custom import custom
6362
from .cyclic_analytic_seqv_max import cyclic_analytic_seqv_max
6463
from .cyclic_analytic_usum_max import cyclic_analytic_usum_max
6564
from .cyclic_expansion import cyclic_expansion
@@ -246,6 +245,7 @@
246245
from .recombine_harmonic_indeces_cyclic import recombine_harmonic_indeces_cyclic
247246
from .remove_rigid_body_motion import remove_rigid_body_motion
248247
from .remove_rigid_body_motion_fc import remove_rigid_body_motion_fc
248+
from .result_provider import result_provider
249249
from .rigid_transformation import rigid_transformation
250250
from .rigid_transformation_provider import rigid_transformation_provider
251251
from .rms_static_pressure import rms_static_pressure

src/ansys/dpf/core/operators/result/custom.py renamed to src/ansys/dpf/core/operators/result/result_provider.py

Lines changed: 84 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
custom
2+
result_provider
33
44
Autogenerated DPF operator classes.
55
"""
@@ -15,7 +15,7 @@
1515
from ansys.dpf.core.server_types import AnyServerType
1616

1717

18-
class custom(Operator):
18+
class result_provider(Operator):
1919
r"""Read/compute user defined result by calling the readers defined by the
2020
datasources.
2121
@@ -37,7 +37,9 @@ class custom(Operator):
3737
mesh: MeshedRegion or MeshesContainer, optional
3838
prevents from reading the mesh in the result files
3939
result_name:
40-
Name of the result that must be extracted from the file
40+
Specifies the scripting name of the raw/internal Name of the result to extract from the file
41+
result_scripting_name: optional
42+
Specifies the scripting name of the result to extract;see ResultInfo for details. Use either "result name" or "result scripting name" with their appropriate pin, but not both.
4143
4244
Returns
4345
-------
@@ -48,7 +50,7 @@ class custom(Operator):
4850
>>> from ansys.dpf import core as dpf
4951
5052
>>> # Instantiate operator
51-
>>> op = dpf.operators.result.custom()
53+
>>> op = dpf.operators.result.result_provider()
5254
5355
>>> # Make input connections
5456
>>> my_time_scoping = dpf.Scoping()
@@ -67,9 +69,11 @@ class custom(Operator):
6769
>>> op.inputs.mesh.connect(my_mesh)
6870
>>> my_result_name = dpf.()
6971
>>> op.inputs.result_name.connect(my_result_name)
72+
>>> my_result_scripting_name = dpf.()
73+
>>> op.inputs.result_scripting_name.connect(my_result_scripting_name)
7074
7175
>>> # Instantiate operator and connect inputs in one line
72-
>>> op = dpf.operators.result.custom(
76+
>>> op = dpf.operators.result.result_provider(
7377
... time_scoping=my_time_scoping,
7478
... mesh_scoping=my_mesh_scoping,
7579
... fields_container=my_fields_container,
@@ -78,6 +82,7 @@ class custom(Operator):
7882
... bool_rotate_to_global=my_bool_rotate_to_global,
7983
... mesh=my_mesh,
8084
... result_name=my_result_name,
85+
... result_scripting_name=my_result_scripting_name,
8186
... )
8287
8388
>>> # Get output data
@@ -94,12 +99,13 @@ def __init__(
9499
bool_rotate_to_global=None,
95100
mesh=None,
96101
result_name=None,
102+
result_scripting_name=None,
97103
config=None,
98104
server=None,
99105
):
100-
super().__init__(name="custom", config=config, server=server)
101-
self._inputs = InputsCustom(self)
102-
self._outputs = OutputsCustom(self)
106+
super().__init__(name="result_provider", config=config, server=server)
107+
self._inputs = InputsResultProvider(self)
108+
self._outputs = OutputsResultProvider(self)
103109
if time_scoping is not None:
104110
self.inputs.time_scoping.connect(time_scoping)
105111
if mesh_scoping is not None:
@@ -116,6 +122,8 @@ def __init__(
116122
self.inputs.mesh.connect(mesh)
117123
if result_name is not None:
118124
self.inputs.result_name.connect(result_name)
125+
if result_scripting_name is not None:
126+
self.inputs.result_scripting_name.connect(result_scripting_name)
119127

120128
@staticmethod
121129
def _spec() -> Specification:
@@ -178,7 +186,13 @@ def _spec() -> Specification:
178186
name="result_name",
179187
type_names=["any"],
180188
optional=False,
181-
document=r"""Name of the result that must be extracted from the file""",
189+
document=r"""Specifies the scripting name of the raw/internal Name of the result to extract from the file""",
190+
),
191+
64: PinSpecification(
192+
name="result_scripting_name",
193+
type_names=["any"],
194+
optional=True,
195+
document=r"""Specifies the scripting name of the result to extract;see ResultInfo for details. Use either "result name" or "result scripting name" with their appropriate pin, but not both.""",
182196
),
183197
},
184198
map_output_pin_spec={
@@ -211,39 +225,39 @@ def default_config(server: AnyServerType = None) -> Config:
211225
config:
212226
A new Config instance equivalent to the default config for this operator.
213227
"""
214-
return Operator.default_config(name="custom", server=server)
228+
return Operator.default_config(name="result_provider", server=server)
215229

216230
@property
217-
def inputs(self) -> InputsCustom:
231+
def inputs(self) -> InputsResultProvider:
218232
"""Enables to connect inputs to the operator
219233
220234
Returns
221235
--------
222236
inputs:
223-
An instance of InputsCustom.
237+
An instance of InputsResultProvider.
224238
"""
225239
return super().inputs
226240

227241
@property
228-
def outputs(self) -> OutputsCustom:
242+
def outputs(self) -> OutputsResultProvider:
229243
"""Enables to get outputs of the operator by evaluating it
230244
231245
Returns
232246
--------
233247
outputs:
234-
An instance of OutputsCustom.
248+
An instance of OutputsResultProvider.
235249
"""
236250
return super().outputs
237251

238252

239-
class InputsCustom(_Inputs):
253+
class InputsResultProvider(_Inputs):
240254
"""Intermediate class used to connect user inputs to
241-
custom operator.
255+
result_provider operator.
242256
243257
Examples
244258
--------
245259
>>> from ansys.dpf import core as dpf
246-
>>> op = dpf.operators.result.custom()
260+
>>> op = dpf.operators.result.result_provider()
247261
>>> my_time_scoping = dpf.Scoping()
248262
>>> op.inputs.time_scoping.connect(my_time_scoping)
249263
>>> my_mesh_scoping = dpf.ScopingsContainer()
@@ -260,26 +274,34 @@ class InputsCustom(_Inputs):
260274
>>> op.inputs.mesh.connect(my_mesh)
261275
>>> my_result_name = dpf.()
262276
>>> op.inputs.result_name.connect(my_result_name)
277+
>>> my_result_scripting_name = dpf.()
278+
>>> op.inputs.result_scripting_name.connect(my_result_scripting_name)
263279
"""
264280

265281
def __init__(self, op: Operator):
266-
super().__init__(custom._spec().inputs, op)
267-
self._time_scoping = Input(custom._spec().input_pin(0), 0, op, -1)
282+
super().__init__(result_provider._spec().inputs, op)
283+
self._time_scoping = Input(result_provider._spec().input_pin(0), 0, op, -1)
268284
self._inputs.append(self._time_scoping)
269-
self._mesh_scoping = Input(custom._spec().input_pin(1), 1, op, -1)
285+
self._mesh_scoping = Input(result_provider._spec().input_pin(1), 1, op, -1)
270286
self._inputs.append(self._mesh_scoping)
271-
self._fields_container = Input(custom._spec().input_pin(2), 2, op, -1)
287+
self._fields_container = Input(result_provider._spec().input_pin(2), 2, op, -1)
272288
self._inputs.append(self._fields_container)
273-
self._streams_container = Input(custom._spec().input_pin(3), 3, op, -1)
289+
self._streams_container = Input(result_provider._spec().input_pin(3), 3, op, -1)
274290
self._inputs.append(self._streams_container)
275-
self._data_sources = Input(custom._spec().input_pin(4), 4, op, -1)
291+
self._data_sources = Input(result_provider._spec().input_pin(4), 4, op, -1)
276292
self._inputs.append(self._data_sources)
277-
self._bool_rotate_to_global = Input(custom._spec().input_pin(5), 5, op, -1)
293+
self._bool_rotate_to_global = Input(
294+
result_provider._spec().input_pin(5), 5, op, -1
295+
)
278296
self._inputs.append(self._bool_rotate_to_global)
279-
self._mesh = Input(custom._spec().input_pin(7), 7, op, -1)
297+
self._mesh = Input(result_provider._spec().input_pin(7), 7, op, -1)
280298
self._inputs.append(self._mesh)
281-
self._result_name = Input(custom._spec().input_pin(60), 60, op, -1)
299+
self._result_name = Input(result_provider._spec().input_pin(60), 60, op, -1)
282300
self._inputs.append(self._result_name)
301+
self._result_scripting_name = Input(
302+
result_provider._spec().input_pin(64), 64, op, -1
303+
)
304+
self._inputs.append(self._result_scripting_name)
283305

284306
@property
285307
def time_scoping(self) -> Input:
@@ -295,7 +317,7 @@ def time_scoping(self) -> Input:
295317
Examples
296318
--------
297319
>>> from ansys.dpf import core as dpf
298-
>>> op = dpf.operators.result.custom()
320+
>>> op = dpf.operators.result.result_provider()
299321
>>> op.inputs.time_scoping.connect(my_time_scoping)
300322
>>> # or
301323
>>> op.inputs.time_scoping(my_time_scoping)
@@ -316,7 +338,7 @@ def mesh_scoping(self) -> Input:
316338
Examples
317339
--------
318340
>>> from ansys.dpf import core as dpf
319-
>>> op = dpf.operators.result.custom()
341+
>>> op = dpf.operators.result.result_provider()
320342
>>> op.inputs.mesh_scoping.connect(my_mesh_scoping)
321343
>>> # or
322344
>>> op.inputs.mesh_scoping(my_mesh_scoping)
@@ -337,7 +359,7 @@ def fields_container(self) -> Input:
337359
Examples
338360
--------
339361
>>> from ansys.dpf import core as dpf
340-
>>> op = dpf.operators.result.custom()
362+
>>> op = dpf.operators.result.result_provider()
341363
>>> op.inputs.fields_container.connect(my_fields_container)
342364
>>> # or
343365
>>> op.inputs.fields_container(my_fields_container)
@@ -358,7 +380,7 @@ def streams_container(self) -> Input:
358380
Examples
359381
--------
360382
>>> from ansys.dpf import core as dpf
361-
>>> op = dpf.operators.result.custom()
383+
>>> op = dpf.operators.result.result_provider()
362384
>>> op.inputs.streams_container.connect(my_streams_container)
363385
>>> # or
364386
>>> op.inputs.streams_container(my_streams_container)
@@ -379,7 +401,7 @@ def data_sources(self) -> Input:
379401
Examples
380402
--------
381403
>>> from ansys.dpf import core as dpf
382-
>>> op = dpf.operators.result.custom()
404+
>>> op = dpf.operators.result.result_provider()
383405
>>> op.inputs.data_sources.connect(my_data_sources)
384406
>>> # or
385407
>>> op.inputs.data_sources(my_data_sources)
@@ -400,7 +422,7 @@ def bool_rotate_to_global(self) -> Input:
400422
Examples
401423
--------
402424
>>> from ansys.dpf import core as dpf
403-
>>> op = dpf.operators.result.custom()
425+
>>> op = dpf.operators.result.result_provider()
404426
>>> op.inputs.bool_rotate_to_global.connect(my_bool_rotate_to_global)
405427
>>> # or
406428
>>> op.inputs.bool_rotate_to_global(my_bool_rotate_to_global)
@@ -421,7 +443,7 @@ def mesh(self) -> Input:
421443
Examples
422444
--------
423445
>>> from ansys.dpf import core as dpf
424-
>>> op = dpf.operators.result.custom()
446+
>>> op = dpf.operators.result.result_provider()
425447
>>> op.inputs.mesh.connect(my_mesh)
426448
>>> # or
427449
>>> op.inputs.mesh(my_mesh)
@@ -432,7 +454,7 @@ def mesh(self) -> Input:
432454
def result_name(self) -> Input:
433455
r"""Allows to connect result_name input to the operator.
434456
435-
Name of the result that must be extracted from the file
457+
Specifies the scripting name of the raw/internal Name of the result to extract from the file
436458
437459
Returns
438460
-------
@@ -442,29 +464,50 @@ def result_name(self) -> Input:
442464
Examples
443465
--------
444466
>>> from ansys.dpf import core as dpf
445-
>>> op = dpf.operators.result.custom()
467+
>>> op = dpf.operators.result.result_provider()
446468
>>> op.inputs.result_name.connect(my_result_name)
447469
>>> # or
448470
>>> op.inputs.result_name(my_result_name)
449471
"""
450472
return self._result_name
451473

474+
@property
475+
def result_scripting_name(self) -> Input:
476+
r"""Allows to connect result_scripting_name input to the operator.
477+
478+
Specifies the scripting name of the result to extract;see ResultInfo for details. Use either "result name" or "result scripting name" with their appropriate pin, but not both.
479+
480+
Returns
481+
-------
482+
input:
483+
An Input instance for this pin.
484+
485+
Examples
486+
--------
487+
>>> from ansys.dpf import core as dpf
488+
>>> op = dpf.operators.result.result_provider()
489+
>>> op.inputs.result_scripting_name.connect(my_result_scripting_name)
490+
>>> # or
491+
>>> op.inputs.result_scripting_name(my_result_scripting_name)
492+
"""
493+
return self._result_scripting_name
494+
452495

453-
class OutputsCustom(_Outputs):
496+
class OutputsResultProvider(_Outputs):
454497
"""Intermediate class used to get outputs from
455-
custom operator.
498+
result_provider operator.
456499
457500
Examples
458501
--------
459502
>>> from ansys.dpf import core as dpf
460-
>>> op = dpf.operators.result.custom()
503+
>>> op = dpf.operators.result.result_provider()
461504
>>> # Connect inputs : op.inputs. ...
462505
>>> result_fields_container = op.outputs.fields_container()
463506
"""
464507

465508
def __init__(self, op: Operator):
466-
super().__init__(custom._spec().outputs, op)
467-
self._fields_container = Output(custom._spec().output_pin(0), 0, op)
509+
super().__init__(result_provider._spec().outputs, op)
510+
self._fields_container = Output(result_provider._spec().output_pin(0), 0, op)
468511
self._outputs.append(self._fields_container)
469512

470513
@property
@@ -479,7 +522,7 @@ def fields_container(self) -> Output:
479522
Examples
480523
--------
481524
>>> from ansys.dpf import core as dpf
482-
>>> op = dpf.operators.result.custom()
525+
>>> op = dpf.operators.result.result_provider()
483526
>>> # Get the output from op.outputs. ...
484527
>>> result_fields_container = op.outputs.fields_container()
485528
"""

0 commit comments

Comments
 (0)