Skip to content

Commit 5917de2

Browse files
PProfizigithub-actions[bot]
authored andcommitted
update generated code
1 parent 9d4185c commit 5917de2

File tree

765 files changed

+67649
-82272
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

765 files changed

+67649
-82272
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/averaging/elemental_difference.py

Lines changed: 75 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,37 @@
44
Autogenerated DPF operator classes.
55
"""
66

7+
from __future__ import annotations
8+
79
from warnings import warn
810
from ansys.dpf.core.dpf_operator import Operator
911
from ansys.dpf.core.inputs import Input, _Inputs
1012
from ansys.dpf.core.outputs import Output, _Outputs
1113
from ansys.dpf.core.operators.specification import PinSpecification, Specification
14+
from ansys.dpf.core.config import Config
15+
from ansys.dpf.core.server_types import AnyServerType
1216

1317

1418
class elemental_difference(Operator):
15-
"""Transforms an Elemental Nodal or Nodal field into an Elemental field.
16-
Each elemental value is the maximum difference between the
17-
computed result for all nodes in this element. The result is
18-
computed on a given element scoping.
19+
r"""Transforms an Elemental Nodal or Nodal field into an Elemental field.
20+
Each elemental value is the maximum difference between the computed
21+
result for all nodes in this element. The result is computed on a given
22+
element scoping.
23+
1924
2025
Parameters
2126
----------
22-
field : Field or FieldsContainer
23-
Field or fields container with only one field
24-
is expected
25-
mesh_scoping : Scoping, optional
26-
Average only on these entities
27-
mesh : MeshedRegion, optional
28-
through_layers : bool, optional
29-
The maximum elemental difference is taken
30-
through the different shell layers if
31-
true (default is false).
27+
field: Field or FieldsContainer
28+
field or fields container with only one field is expected
29+
mesh_scoping: Scoping, optional
30+
average only on these entities
31+
mesh: MeshedRegion, optional
32+
through_layers: bool, optional
33+
The maximum elemental difference is taken through the different shell layers if true (default is false).
3234
3335
Returns
3436
-------
35-
field : Field
37+
field: Field
3638
3739
Examples
3840
--------
@@ -85,55 +87,53 @@ def __init__(
8587
self.inputs.through_layers.connect(through_layers)
8688

8789
@staticmethod
88-
def _spec():
89-
description = """Transforms an Elemental Nodal or Nodal field into an Elemental field.
90-
Each elemental value is the maximum difference between the
91-
computed result for all nodes in this element. The result
92-
is computed on a given element scoping."""
90+
def _spec() -> Specification:
91+
description = r"""Transforms an Elemental Nodal or Nodal field into an Elemental field.
92+
Each elemental value is the maximum difference between the computed
93+
result for all nodes in this element. The result is computed on a given
94+
element scoping.
95+
"""
9396
spec = Specification(
9497
description=description,
9598
map_input_pin_spec={
9699
0: PinSpecification(
97100
name="field",
98101
type_names=["field", "fields_container"],
99102
optional=False,
100-
document="""Field or fields container with only one field
101-
is expected""",
103+
document=r"""field or fields container with only one field is expected""",
102104
),
103105
1: PinSpecification(
104106
name="mesh_scoping",
105107
type_names=["scoping"],
106108
optional=True,
107-
document="""Average only on these entities""",
109+
document=r"""average only on these entities""",
108110
),
109111
7: PinSpecification(
110112
name="mesh",
111113
type_names=["abstract_meshed_region"],
112114
optional=True,
113-
document="""""",
115+
document=r"""""",
114116
),
115117
10: PinSpecification(
116118
name="through_layers",
117119
type_names=["bool"],
118120
optional=True,
119-
document="""The maximum elemental difference is taken
120-
through the different shell layers if
121-
true (default is false).""",
121+
document=r"""The maximum elemental difference is taken through the different shell layers if true (default is false).""",
122122
),
123123
},
124124
map_output_pin_spec={
125125
0: PinSpecification(
126126
name="field",
127127
type_names=["field"],
128128
optional=False,
129-
document="""""",
129+
document=r"""""",
130130
),
131131
},
132132
)
133133
return spec
134134

135135
@staticmethod
136-
def default_config(server=None):
136+
def default_config(server: AnyServerType = None) -> Config:
137137
"""Returns the default config of the operator.
138138
139139
This config can then be changed to the user needs and be used to
@@ -142,29 +142,36 @@ def default_config(server=None):
142142
143143
Parameters
144144
----------
145-
server : server.DPFServer, optional
145+
server:
146146
Server with channel connected to the remote or local instance. When
147147
``None``, attempts to use the global server.
148+
149+
Returns
150+
-------
151+
config:
152+
A new Config instance equivalent to the default config for this operator.
148153
"""
149154
return Operator.default_config(name="elemental_difference", server=server)
150155

151156
@property
152-
def inputs(self):
157+
def inputs(self) -> InputsElementalDifference:
153158
"""Enables to connect inputs to the operator
154159
155160
Returns
156161
--------
157-
inputs : InputsElementalDifference
162+
inputs:
163+
An instance of InputsElementalDifference.
158164
"""
159165
return super().inputs
160166

161167
@property
162-
def outputs(self):
168+
def outputs(self) -> OutputsElementalDifference:
163169
"""Enables to get outputs of the operator by evaluating it
164170
165171
Returns
166172
--------
167-
outputs : OutputsElementalDifference
173+
outputs:
174+
An instance of OutputsElementalDifference.
168175
"""
169176
return super().outputs
170177

@@ -201,15 +208,15 @@ def __init__(self, op: Operator):
201208
self._inputs.append(self._through_layers)
202209

203210
@property
204-
def field(self):
205-
"""Allows to connect field input to the operator.
211+
def field(self) -> Input:
212+
r"""Allows to connect field input to the operator.
206213
207-
Field or fields container with only one field
208-
is expected
214+
field or fields container with only one field is expected
209215
210-
Parameters
211-
----------
212-
my_field : Field or FieldsContainer
216+
Returns
217+
-------
218+
input:
219+
An Input instance for this pin.
213220
214221
Examples
215222
--------
@@ -222,14 +229,15 @@ def field(self):
222229
return self._field
223230

224231
@property
225-
def mesh_scoping(self):
226-
"""Allows to connect mesh_scoping input to the operator.
232+
def mesh_scoping(self) -> Input:
233+
r"""Allows to connect mesh_scoping input to the operator.
227234
228-
Average only on these entities
235+
average only on these entities
229236
230-
Parameters
231-
----------
232-
my_mesh_scoping : Scoping
237+
Returns
238+
-------
239+
input:
240+
An Input instance for this pin.
233241
234242
Examples
235243
--------
@@ -242,12 +250,13 @@ def mesh_scoping(self):
242250
return self._mesh_scoping
243251

244252
@property
245-
def mesh(self):
246-
"""Allows to connect mesh input to the operator.
253+
def mesh(self) -> Input:
254+
r"""Allows to connect mesh input to the operator.
247255
248-
Parameters
249-
----------
250-
my_mesh : MeshedRegion
256+
Returns
257+
-------
258+
input:
259+
An Input instance for this pin.
251260
252261
Examples
253262
--------
@@ -260,16 +269,15 @@ def mesh(self):
260269
return self._mesh
261270

262271
@property
263-
def through_layers(self):
264-
"""Allows to connect through_layers input to the operator.
272+
def through_layers(self) -> Input:
273+
r"""Allows to connect through_layers input to the operator.
265274
266-
The maximum elemental difference is taken
267-
through the different shell layers if
268-
true (default is false).
275+
The maximum elemental difference is taken through the different shell layers if true (default is false).
269276
270-
Parameters
271-
----------
272-
my_through_layers : bool
277+
Returns
278+
-------
279+
input:
280+
An Input instance for this pin.
273281
274282
Examples
275283
--------
@@ -300,18 +308,19 @@ def __init__(self, op: Operator):
300308
self._outputs.append(self._field)
301309

302310
@property
303-
def field(self):
304-
"""Allows to get field output of the operator
311+
def field(self) -> Output:
312+
r"""Allows to get field output of the operator
305313
306314
Returns
307-
----------
308-
my_field : Field
315+
-------
316+
output:
317+
An Output instance for this pin.
309318
310319
Examples
311320
--------
312321
>>> from ansys.dpf import core as dpf
313322
>>> op = dpf.operators.averaging.elemental_difference()
314-
>>> # Connect inputs : op.inputs. ...
323+
>>> # Get the output from op.outputs. ...
315324
>>> result_field = op.outputs.field()
316-
""" # noqa: E501
325+
"""
317326
return self._field

0 commit comments

Comments
 (0)