Skip to content

Commit 625e26b

Browse files
Update generated code for DPF 261_daily on master (#2360)
Co-authored-by: PProfizi <[email protected]>
1 parent 1095ea2 commit 625e26b

File tree

6 files changed

+404
-362
lines changed

6 files changed

+404
-362
lines changed

doc/source/_static/dpf_operators.html

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

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

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
class modal_superposition(Operator):
1919
r"""Computes the solution in the time/frequency space from a modal solution
20-
by multiplying a modal basis (in 0) by the solution in this modal space
20+
by multiplying a modal basis (in 0)by the solution in this modal space
2121
(coefficients for each mode for each time/frequency) (in 1).
2222
2323
@@ -27,6 +27,8 @@ class modal_superposition(Operator):
2727
One field by mode with each field representing a mode shape on nodes or elements.
2828
solution_in_modal_space: FieldsContainer
2929
One field by time/frequency with each field having a ponderating coefficient for each mode of the modal_basis pin.
30+
incremental_fc: FieldsContainer, optional
31+
If a non-empty fields container is introduced, it is modified, and sent to the output, to add the contribution of the requested expansion. The label spaces produced from the multiplication must be the same as the incremental ones.
3032
time_scoping: Scoping, optional
3133
Compute the result on a subset of the time frequency domain defined in the solution_in_modal_space fields container.
3234
mesh_scoping: Scoping or ScopingsContainer, optional
@@ -48,6 +50,8 @@ class modal_superposition(Operator):
4850
>>> op.inputs.modal_basis.connect(my_modal_basis)
4951
>>> my_solution_in_modal_space = dpf.FieldsContainer()
5052
>>> op.inputs.solution_in_modal_space.connect(my_solution_in_modal_space)
53+
>>> my_incremental_fc = dpf.FieldsContainer()
54+
>>> op.inputs.incremental_fc.connect(my_incremental_fc)
5155
>>> my_time_scoping = dpf.Scoping()
5256
>>> op.inputs.time_scoping.connect(my_time_scoping)
5357
>>> my_mesh_scoping = dpf.Scoping()
@@ -57,6 +61,7 @@ class modal_superposition(Operator):
5761
>>> op = dpf.operators.math.modal_superposition(
5862
... modal_basis=my_modal_basis,
5963
... solution_in_modal_space=my_solution_in_modal_space,
64+
... incremental_fc=my_incremental_fc,
6065
... time_scoping=my_time_scoping,
6166
... mesh_scoping=my_mesh_scoping,
6267
... )
@@ -69,6 +74,7 @@ def __init__(
6974
self,
7075
modal_basis=None,
7176
solution_in_modal_space=None,
77+
incremental_fc=None,
7278
time_scoping=None,
7379
mesh_scoping=None,
7480
config=None,
@@ -83,6 +89,8 @@ def __init__(
8389
self.inputs.modal_basis.connect(modal_basis)
8490
if solution_in_modal_space is not None:
8591
self.inputs.solution_in_modal_space.connect(solution_in_modal_space)
92+
if incremental_fc is not None:
93+
self.inputs.incremental_fc.connect(incremental_fc)
8694
if time_scoping is not None:
8795
self.inputs.time_scoping.connect(time_scoping)
8896
if mesh_scoping is not None:
@@ -91,7 +99,7 @@ def __init__(
9199
@staticmethod
92100
def _spec() -> Specification:
93101
description = r"""Computes the solution in the time/frequency space from a modal solution
94-
by multiplying a modal basis (in 0) by the solution in this modal space
102+
by multiplying a modal basis (in 0)by the solution in this modal space
95103
(coefficients for each mode for each time/frequency) (in 1).
96104
"""
97105
spec = Specification(
@@ -109,6 +117,12 @@ def _spec() -> Specification:
109117
optional=False,
110118
document=r"""One field by time/frequency with each field having a ponderating coefficient for each mode of the modal_basis pin.""",
111119
),
120+
2: PinSpecification(
121+
name="incremental_fc",
122+
type_names=["fields_container"],
123+
optional=True,
124+
document=r"""If a non-empty fields container is introduced, it is modified, and sent to the output, to add the contribution of the requested expansion. The label spaces produced from the multiplication must be the same as the incremental ones.""",
125+
),
112126
3: PinSpecification(
113127
name="time_scoping",
114128
type_names=["scoping", "vector<int32>"],
@@ -191,6 +205,8 @@ class InputsModalSuperposition(_Inputs):
191205
>>> op.inputs.modal_basis.connect(my_modal_basis)
192206
>>> my_solution_in_modal_space = dpf.FieldsContainer()
193207
>>> op.inputs.solution_in_modal_space.connect(my_solution_in_modal_space)
208+
>>> my_incremental_fc = dpf.FieldsContainer()
209+
>>> op.inputs.incremental_fc.connect(my_incremental_fc)
194210
>>> my_time_scoping = dpf.Scoping()
195211
>>> op.inputs.time_scoping.connect(my_time_scoping)
196212
>>> my_mesh_scoping = dpf.Scoping()
@@ -205,6 +221,10 @@ def __init__(self, op: Operator):
205221
modal_superposition._spec().input_pin(1), 1, op, -1
206222
)
207223
self._inputs.append(self._solution_in_modal_space)
224+
self._incremental_fc = Input(
225+
modal_superposition._spec().input_pin(2), 2, op, -1
226+
)
227+
self._inputs.append(self._incremental_fc)
208228
self._time_scoping = Input(modal_superposition._spec().input_pin(3), 3, op, -1)
209229
self._inputs.append(self._time_scoping)
210230
self._mesh_scoping = Input(modal_superposition._spec().input_pin(4), 4, op, -1)
@@ -252,6 +272,27 @@ def solution_in_modal_space(self) -> Input:
252272
"""
253273
return self._solution_in_modal_space
254274

275+
@property
276+
def incremental_fc(self) -> Input:
277+
r"""Allows to connect incremental_fc input to the operator.
278+
279+
If a non-empty fields container is introduced, it is modified, and sent to the output, to add the contribution of the requested expansion. The label spaces produced from the multiplication must be the same as the incremental ones.
280+
281+
Returns
282+
-------
283+
input:
284+
An Input instance for this pin.
285+
286+
Examples
287+
--------
288+
>>> from ansys.dpf import core as dpf
289+
>>> op = dpf.operators.math.modal_superposition()
290+
>>> op.inputs.incremental_fc.connect(my_incremental_fc)
291+
>>> # or
292+
>>> op.inputs.incremental_fc(my_incremental_fc)
293+
"""
294+
return self._incremental_fc
295+
255296
@property
256297
def time_scoping(self) -> Input:
257298
r"""Allows to connect time_scoping input to the operator.

0 commit comments

Comments
 (0)