Skip to content

Commit a379573

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

20 files changed

+1216
-1345
lines changed

doc/source/_static/dpf_operators.html

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

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ class compute_residual_and_error(Operator):
3333
normalization_type: int, optional
3434
type of normalization applied to the residuals and norm calculation (optional, defaut: absolute):
3535
0 for absolute,
36-
1 for relative to the first entry at a given time step,
37-
2 for normalized by the max at a given time step of the first entry or residuals depending on the reference field option,
38-
3 for normalized by the max over all time steps of the first entry or residuals depending on the reference field option
36+
1 for relative to the first entry,
37+
2 for normalized by the max of each field of the first entry or residuals depending on the reference field option,
38+
3 for normalized by the max over all fields of the first entry or residuals depending on the reference field option
3939
norm_calculation_type: int, optional
4040
type for norm calculation (optional, default: L2) - It is normalized depending on Pin2 selection
4141
1 for L1, ie sum(abs(xi)),
@@ -140,9 +140,9 @@ def _spec() -> Specification:
140140
optional=True,
141141
document=r"""type of normalization applied to the residuals and norm calculation (optional, defaut: absolute):
142142
0 for absolute,
143-
1 for relative to the first entry at a given time step,
144-
2 for normalized by the max at a given time step of the first entry or residuals depending on the reference field option,
145-
3 for normalized by the max over all time steps of the first entry or residuals depending on the reference field option""",
143+
1 for relative to the first entry,
144+
2 for normalized by the max of each field of the first entry or residuals depending on the reference field option,
145+
3 for normalized by the max over all fields of the first entry or residuals depending on the reference field option""",
146146
),
147147
2: PinSpecification(
148148
name="norm_calculation_type",
@@ -308,9 +308,9 @@ def normalization_type(self) -> Input:
308308
309309
type of normalization applied to the residuals and norm calculation (optional, defaut: absolute):
310310
0 for absolute,
311-
1 for relative to the first entry at a given time step,
312-
2 for normalized by the max at a given time step of the first entry or residuals depending on the reference field option,
313-
3 for normalized by the max over all time steps of the first entry or residuals depending on the reference field option
311+
1 for relative to the first entry,
312+
2 for normalized by the max of each field of the first entry or residuals depending on the reference field option,
313+
3 for normalized by the max over all fields of the first entry or residuals depending on the reference field option
314314
315315
Returns
316316
-------

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

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ class modal_superposition(Operator):
2323
2424
Parameters
2525
----------
26+
is_output_custom: bool, optional
27+
If true, output will be a a custom container, otherwise a reconstructed fields_container. Default is false.
2628
modal_basis: FieldsContainer
2729
One field by mode with each field representing a mode shape on nodes or elements.
2830
solution_in_modal_space: FieldsContainer
@@ -46,6 +48,8 @@ class modal_superposition(Operator):
4648
>>> op = dpf.operators.math.modal_superposition()
4749
4850
>>> # Make input connections
51+
>>> my_is_output_custom = bool()
52+
>>> op.inputs.is_output_custom.connect(my_is_output_custom)
4953
>>> my_modal_basis = dpf.FieldsContainer()
5054
>>> op.inputs.modal_basis.connect(my_modal_basis)
5155
>>> my_solution_in_modal_space = dpf.FieldsContainer()
@@ -59,6 +63,7 @@ class modal_superposition(Operator):
5963
6064
>>> # Instantiate operator and connect inputs in one line
6165
>>> op = dpf.operators.math.modal_superposition(
66+
... is_output_custom=my_is_output_custom,
6267
... modal_basis=my_modal_basis,
6368
... solution_in_modal_space=my_solution_in_modal_space,
6469
... incremental_fc=my_incremental_fc,
@@ -72,6 +77,7 @@ class modal_superposition(Operator):
7277

7378
def __init__(
7479
self,
80+
is_output_custom=None,
7581
modal_basis=None,
7682
solution_in_modal_space=None,
7783
incremental_fc=None,
@@ -85,6 +91,8 @@ def __init__(
8591
)
8692
self._inputs = InputsModalSuperposition(self)
8793
self._outputs = OutputsModalSuperposition(self)
94+
if is_output_custom is not None:
95+
self.inputs.is_output_custom.connect(is_output_custom)
8896
if modal_basis is not None:
8997
self.inputs.modal_basis.connect(modal_basis)
9098
if solution_in_modal_space is not None:
@@ -105,6 +113,12 @@ def _spec() -> Specification:
105113
spec = Specification(
106114
description=description,
107115
map_input_pin_spec={
116+
-1: PinSpecification(
117+
name="is_output_custom",
118+
type_names=["bool"],
119+
optional=True,
120+
document=r"""If true, output will be a a custom container, otherwise a reconstructed fields_container. Default is false.""",
121+
),
108122
0: PinSpecification(
109123
name="modal_basis",
110124
type_names=["fields_container"],
@@ -201,6 +215,8 @@ class InputsModalSuperposition(_Inputs):
201215
--------
202216
>>> from ansys.dpf import core as dpf
203217
>>> op = dpf.operators.math.modal_superposition()
218+
>>> my_is_output_custom = bool()
219+
>>> op.inputs.is_output_custom.connect(my_is_output_custom)
204220
>>> my_modal_basis = dpf.FieldsContainer()
205221
>>> op.inputs.modal_basis.connect(my_modal_basis)
206222
>>> my_solution_in_modal_space = dpf.FieldsContainer()
@@ -215,6 +231,10 @@ class InputsModalSuperposition(_Inputs):
215231

216232
def __init__(self, op: Operator):
217233
super().__init__(modal_superposition._spec().inputs, op)
234+
self._is_output_custom = Input(
235+
modal_superposition._spec().input_pin(-1), -1, op, -1
236+
)
237+
self._inputs.append(self._is_output_custom)
218238
self._modal_basis = Input(modal_superposition._spec().input_pin(0), 0, op, -1)
219239
self._inputs.append(self._modal_basis)
220240
self._solution_in_modal_space = Input(
@@ -230,6 +250,27 @@ def __init__(self, op: Operator):
230250
self._mesh_scoping = Input(modal_superposition._spec().input_pin(4), 4, op, -1)
231251
self._inputs.append(self._mesh_scoping)
232252

253+
@property
254+
def is_output_custom(self) -> Input:
255+
r"""Allows to connect is_output_custom input to the operator.
256+
257+
If true, output will be a a custom container, otherwise a reconstructed fields_container. Default is false.
258+
259+
Returns
260+
-------
261+
input:
262+
An Input instance for this pin.
263+
264+
Examples
265+
--------
266+
>>> from ansys.dpf import core as dpf
267+
>>> op = dpf.operators.math.modal_superposition()
268+
>>> op.inputs.is_output_custom.connect(my_is_output_custom)
269+
>>> # or
270+
>>> op.inputs.is_output_custom(my_is_output_custom)
271+
"""
272+
return self._is_output_custom
273+
233274
@property
234275
def modal_basis(self) -> Input:
235276
r"""Allows to connect modal_basis input to the operator.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,6 @@
126126
from .euler_load_buckling import euler_load_buckling
127127
from .euler_nodes import euler_nodes
128128
from .fluid_velocity import fluid_velocity
129-
from .gasket_deformation import gasket_deformation
130-
from .gasket_deformation_X import gasket_deformation_X
131-
from .gasket_deformation_XY import gasket_deformation_XY
132-
from .gasket_deformation_XZ import gasket_deformation_XZ
133129
from .gasket_inelastic_closure import gasket_inelastic_closure
134130
from .gasket_inelastic_closure_X import gasket_inelastic_closure_X
135131
from .gasket_inelastic_closure_XY import gasket_inelastic_closure_XY
@@ -142,6 +138,10 @@
142138
from .gasket_thermal_closure_X import gasket_thermal_closure_X
143139
from .gasket_thermal_closure_XY import gasket_thermal_closure_XY
144140
from .gasket_thermal_closure_XZ import gasket_thermal_closure_XZ
141+
from .gasket_total_closure import gasket_total_closure
142+
from .gasket_total_closure_X import gasket_total_closure_X
143+
from .gasket_total_closure_XY import gasket_total_closure_XY
144+
from .gasket_total_closure_XZ import gasket_total_closure_XZ
145145
from .global_added_mass import global_added_mass
146146
from .global_added_mass_pct import global_added_mass_pct
147147
from .global_center_mass import global_center_mass

0 commit comments

Comments
 (0)