Skip to content

Commit a8430fc

Browse files
update generated code (#1509)
Co-authored-by: rlagha <[email protected]>
1 parent b85a124 commit a8430fc

24 files changed

+6345
-44
lines changed

doc/source/_static/dpf_operators.html

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

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

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,16 @@
1313

1414

1515
class compute_residual_and_error(Operator):
16-
"""Computes the norm of a field or a field container.
16+
"""Computes the Lp-norm of a field or a field container.
1717
When a second entry is provided, the residual (the difference
1818
between the first and second entry) is calculated along with the
19-
error.
19+
error as the Lp-norm of the difference.
2020
When a second input is not provided, the calculation is only
2121
completed for the first entry.
2222
The type of calculation performed is based on the specifications
23-
provided for pins 1 and pin 2 defines the type of error norm (L1
24-
vs L2).
25-
Note that if the input is a field container that only contains one
26-
field, the operator's outputs are of type field
23+
provided for pin 1, pin 2 defines the type of error norm (L1 vs
24+
L2), and
25+
pin 3 which entity to use as a reference
2726
2827
Parameters
2928
----------
@@ -36,10 +35,14 @@ class compute_residual_and_error(Operator):
3635
0 for absolute,
3736
1 for relative to the first entry at
3837
a given time step,
39-
2 for normalized by the max of the
40-
first entry at a given time step,
41-
3 for normalized by the max of the
42-
first entry over all time steps
38+
2 for normalized by the max at a
39+
given time step of the first entry or
40+
residuals depending on the reference
41+
field option,
42+
3 for normalized by the max over all
43+
time steps of the first entry or
44+
residuals depending on the reference
45+
field option
4346
norm_calculation_type : int, optional
4447
Type for norm calculation (optional, default:
4548
l2) - it is normalized depending on
@@ -116,18 +119,17 @@ def __init__(
116119

117120
@staticmethod
118121
def _spec():
119-
description = """Computes the norm of a field or a field container.
122+
description = """Computes the Lp-norm of a field or a field container.
120123
When a second entry is provided, the residual (the
121124
difference between the first and second entry) is
122-
calculated along with the error.
125+
calculated along with the error as the Lp-norm of the
126+
difference.
123127
When a second input is not provided, the calculation is
124128
only completed for the first entry.
125129
The type of calculation performed is based on the
126-
specifications provided for pins 1 and pin 2 defines the
127-
type of error norm (L1 vs L2).
128-
Note that if the input is a field container that only
129-
contains one field, the operator's outputs are of type
130-
field"""
130+
specifications provided for pin 1, pin 2 defines the type
131+
of error norm (L1 vs L2), and
132+
pin 3 which entity to use as a reference"""
131133
spec = Specification(
132134
description=description,
133135
map_input_pin_spec={
@@ -147,10 +149,14 @@ def _spec():
147149
0 for absolute,
148150
1 for relative to the first entry at
149151
a given time step,
150-
2 for normalized by the max of the
151-
first entry at a given time step,
152-
3 for normalized by the max of the
153-
first entry over all time steps""",
152+
2 for normalized by the max at a
153+
given time step of the first entry or
154+
residuals depending on the reference
155+
field option,
156+
3 for normalized by the max over all
157+
time steps of the first entry or
158+
residuals depending on the reference
159+
field option""",
154160
),
155161
2: PinSpecification(
156162
name="norm_calculation_type",
@@ -321,10 +327,14 @@ def normalization_type(self):
321327
0 for absolute,
322328
1 for relative to the first entry at
323329
a given time step,
324-
2 for normalized by the max of the
325-
first entry at a given time step,
326-
3 for normalized by the max of the
327-
first entry over all time steps
330+
2 for normalized by the max at a
331+
given time step of the first entry or
332+
residuals depending on the reference
333+
field option,
334+
3 for normalized by the max over all
335+
time steps of the first entry or
336+
residuals depending on the reference
337+
field option
328338
329339
Parameters
330340
----------

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

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@
1212

1313

1414
class from_scoping(Operator):
15-
"""Extracts a meshed region from an other meshed region base on a scoping
15+
"""Extracts a meshed region from another meshed region based on a
16+
scoping. Regarding the property fields of the meshed region: the
17+
'Elemental' and 'Nodal' property fields are scoped to the elements
18+
or nodes of the output mesh, the 'Global' property fields are
19+
transferred from the input mesh to the output mesh without
20+
changes, and the rest of the property fields are not present in
21+
the output mesh.
1622
1723
Parameters
1824
----------
@@ -29,7 +35,8 @@ class from_scoping(Operator):
2935
included
3036
nodes_only : bool, optional
3137
Returns mesh with nodes only (without any
32-
elements). default is false.
38+
elements or property fields). default
39+
is false.
3340
mesh : MeshedRegion
3441
3542
@@ -85,9 +92,13 @@ def __init__(
8592

8693
@staticmethod
8794
def _spec():
88-
description = (
89-
"""Extracts a meshed region from an other meshed region base on a scoping"""
90-
)
95+
description = """Extracts a meshed region from another meshed region based on a
96+
scoping. Regarding the property fields of the meshed
97+
region: the 'Elemental' and 'Nodal' property fields are
98+
scoped to the elements or nodes of the output mesh, the
99+
'Global' property fields are transferred from the input
100+
mesh to the output mesh without changes, and the rest of
101+
the property fields are not present in the output mesh."""
91102
spec = Specification(
92103
description=description,
93104
map_input_pin_spec={
@@ -115,7 +126,8 @@ def _spec():
115126
type_names=["bool"],
116127
optional=True,
117128
document="""Returns mesh with nodes only (without any
118-
elements). default is false.""",
129+
elements or property fields). default
130+
is false.""",
119131
),
120132
7: PinSpecification(
121133
name="mesh",
@@ -253,7 +265,8 @@ def nodes_only(self):
253265
"""Allows to connect nodes_only input to the operator.
254266
255267
Returns mesh with nodes only (without any
256-
elements). default is false.
268+
elements or property fields). default
269+
is false.
257270
258271
Parameters
259272
----------

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@
9191
from .elastic_strain_Z import elastic_strain_Z
9292
from .elastic_strain_energy_density import elastic_strain_energy_density
9393
from .elastic_strain_eqv import elastic_strain_eqv
94+
from .elastic_strain_intensity import elastic_strain_intensity
95+
from .elastic_strain_max_shear import elastic_strain_max_shear
9496
from .elastic_strain_principal_1 import elastic_strain_principal_1
9597
from .elastic_strain_principal_2 import elastic_strain_principal_2
9698
from .elastic_strain_principal_3 import elastic_strain_principal_3
@@ -101,6 +103,9 @@
101103
from .element_centroids import element_centroids
102104
from .element_nodal_forces import element_nodal_forces
103105
from .element_orientations import element_orientations
106+
from .element_orientations_X import element_orientations_X
107+
from .element_orientations_Y import element_orientations_Y
108+
from .element_orientations_Z import element_orientations_Z
104109
from .elemental_heat_generation import elemental_heat_generation
105110
from .elemental_mass import elemental_mass
106111
from .elemental_volume import elemental_volume
@@ -199,6 +204,8 @@
199204
from .plastic_strain_Z import plastic_strain_Z
200205
from .plastic_strain_energy_density import plastic_strain_energy_density
201206
from .plastic_strain_eqv import plastic_strain_eqv
207+
from .plastic_strain_intensity import plastic_strain_intensity
208+
from .plastic_strain_max_shear import plastic_strain_max_shear
202209
from .plastic_strain_principal_1 import plastic_strain_principal_1
203210
from .plastic_strain_principal_2 import plastic_strain_principal_2
204211
from .plastic_strain_principal_3 import plastic_strain_principal_3
@@ -239,6 +246,8 @@
239246
from .stress_YZ import stress_YZ
240247
from .stress_Z import stress_Z
241248
from .stress_eqv_as_mechanical import stress_eqv_as_mechanical
249+
from .stress_intensity import stress_intensity
250+
from .stress_max_shear import stress_max_shear
242251
from .stress_principal_1 import stress_principal_1
243252
from .stress_principal_2 import stress_principal_2
244253
from .stress_principal_3 import stress_principal_3

0 commit comments

Comments
 (0)