Skip to content

Commit 2d010b2

Browse files
authored
Merge branch 'main' into dependabot/pip/requirements/coverage-7.11.0
2 parents 9704cc8 + c125927 commit 2d010b2

Some content is hidden

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

53 files changed

+2235
-139
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
- name: "Build the wheel"
8080
shell: pwsh
8181
run: |
82-
tox -e build-wheel
82+
tox -e build-wheel -- "any"
8383
8484
- name: "Expose the wheel"
8585
shell: bash

doc/source/_static/dpf_operators.html

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

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ requires = ["setuptools>=61.0.0", "wheel"]
55
[project]
66
# Check https://setuptools.pypa.io/en/stable/userguide/quickstart.html for all available sections
77
name = "ansys-dpf-core"
8-
version = "0.14.2.dev0"
8+
version = "0.14.3.dev0"
99
description = "Data Processing Framework - Python Core "
1010
readme = "README.md"
1111
requires-python = ">=3.9, <4"

src/ansys/dpf/core/operators/metadata/time_freq_support_get_attribute.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ class time_freq_support_get_attribute(Operator):
2525
----------
2626
time_freq_support: TimeFreqSupport
2727
property_name: str
28-
Supported property names are: "time_freqs", "imaginary_freqs", "frequency_tolerance", "set_id", "cummulative_index", "sets_freqs".
29-
property_identifier: int, optional
30-
Additional pin for properties "set_id" and "cummulative_index": the step id, for "sets_freqs": the sets scoping.
28+
Supported property names are: "time_freqs", "imaginary_freqs", "frequency_tolerance", "set_id", "cummulative_index", "sets_freqs", "step_id_from_harmonic_index".
29+
property_identifier: int or Scoping, optional
30+
Additional pin for properties "set_id" and "cummulative_index": the step id, for "sets_freqs": the sets scoping, for "step_id_from_harmonic_index" : the harmonic index.
3131
property_identifier_2: int, optional
3232
Additional pin for properties "set_id" and "cummulative_index": the substep id (if none, last substep is considered).
3333
3434
Returns
3535
-------
3636
property: float or Field or Scoping
37-
Returns a double for property: "frequency_tolerance", a single-value Scoping for properties for "set_id" and "cummulative_index", and a Field otherwise.
37+
Returns a double for property: "frequency_tolerance", a single-value Scoping for properties for "set_id" and "cummulative_index", an int for "step_id_from_harmonic_index" and a Field otherwise.
3838
3939
Examples
4040
--------
@@ -106,13 +106,13 @@ def _spec() -> Specification:
106106
name="property_name",
107107
type_names=["string"],
108108
optional=False,
109-
document=r"""Supported property names are: "time_freqs", "imaginary_freqs", "frequency_tolerance", "set_id", "cummulative_index", "sets_freqs".""",
109+
document=r"""Supported property names are: "time_freqs", "imaginary_freqs", "frequency_tolerance", "set_id", "cummulative_index", "sets_freqs", "step_id_from_harmonic_index".""",
110110
),
111111
2: PinSpecification(
112112
name="property_identifier",
113-
type_names=["int32"],
113+
type_names=["int32", "scoping"],
114114
optional=True,
115-
document=r"""Additional pin for properties "set_id" and "cummulative_index": the step id, for "sets_freqs": the sets scoping.""",
115+
document=r"""Additional pin for properties "set_id" and "cummulative_index": the step id, for "sets_freqs": the sets scoping, for "step_id_from_harmonic_index" : the harmonic index.""",
116116
),
117117
3: PinSpecification(
118118
name="property_identifier_2",
@@ -126,7 +126,7 @@ def _spec() -> Specification:
126126
name="property",
127127
type_names=["double", "field", "scoping"],
128128
optional=False,
129-
document=r"""Returns a double for property: "frequency_tolerance", a single-value Scoping for properties for "set_id" and "cummulative_index", and a Field otherwise.""",
129+
document=r"""Returns a double for property: "frequency_tolerance", a single-value Scoping for properties for "set_id" and "cummulative_index", an int for "step_id_from_harmonic_index" and a Field otherwise.""",
130130
),
131131
},
132132
)
@@ -238,7 +238,7 @@ def time_freq_support(self) -> Input:
238238
def property_name(self) -> Input:
239239
r"""Allows to connect property_name input to the operator.
240240
241-
Supported property names are: "time_freqs", "imaginary_freqs", "frequency_tolerance", "set_id", "cummulative_index", "sets_freqs".
241+
Supported property names are: "time_freqs", "imaginary_freqs", "frequency_tolerance", "set_id", "cummulative_index", "sets_freqs", "step_id_from_harmonic_index".
242242
243243
Returns
244244
-------
@@ -259,7 +259,7 @@ def property_name(self) -> Input:
259259
def property_identifier(self) -> Input:
260260
r"""Allows to connect property_identifier input to the operator.
261261
262-
Additional pin for properties "set_id" and "cummulative_index": the step id, for "sets_freqs": the sets scoping.
262+
Additional pin for properties "set_id" and "cummulative_index": the step id, for "sets_freqs": the sets scoping, for "step_id_from_harmonic_index" : the harmonic index.
263263
264264
Returns
265265
-------

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

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ class accu_eqv_creep_strain(Operator):
156156
If true, this pin forces the results to be split by element shape, indicated by the presence of the 'elshape' label in the output. If false, the results for all elements shapes are combined. Default value is false if averaging is not required and true if averaging is required.
157157
shell_layer: int, optional
158158
If connected, this pin allows you to extract the result only on the selected shell layer(s). The available values are: 0: Top, 1: Bottom, 2: TopBottom, 3: Mid, 4: TopBottomMid.
159+
extend_to_mid_nodes: bool, optional
160+
Compute mid nodes (when available) by averaging the neighbour corner nodes. Default: True
159161
160162
Returns
161163
-------
@@ -191,6 +193,8 @@ class accu_eqv_creep_strain(Operator):
191193
>>> op.inputs.split_shells.connect(my_split_shells)
192194
>>> my_shell_layer = int()
193195
>>> op.inputs.shell_layer.connect(my_shell_layer)
196+
>>> my_extend_to_mid_nodes = bool()
197+
>>> op.inputs.extend_to_mid_nodes.connect(my_extend_to_mid_nodes)
194198
195199
>>> # Instantiate operator and connect inputs in one line
196200
>>> op = dpf.operators.result.accu_eqv_creep_strain(
@@ -205,6 +209,7 @@ class accu_eqv_creep_strain(Operator):
205209
... read_beams=my_read_beams,
206210
... split_shells=my_split_shells,
207211
... shell_layer=my_shell_layer,
212+
... extend_to_mid_nodes=my_extend_to_mid_nodes,
208213
... )
209214
210215
>>> # Get output data
@@ -224,6 +229,7 @@ def __init__(
224229
read_beams=None,
225230
split_shells=None,
226231
shell_layer=None,
232+
extend_to_mid_nodes=None,
227233
config=None,
228234
server=None,
229235
):
@@ -252,6 +258,8 @@ def __init__(
252258
self.inputs.split_shells.connect(split_shells)
253259
if shell_layer is not None:
254260
self.inputs.shell_layer.connect(shell_layer)
261+
if extend_to_mid_nodes is not None:
262+
self.inputs.extend_to_mid_nodes.connect(extend_to_mid_nodes)
255263

256264
@staticmethod
257265
def _spec() -> Specification:
@@ -446,6 +454,12 @@ def _spec() -> Specification:
446454
optional=True,
447455
document=r"""If connected, this pin allows you to extract the result only on the selected shell layer(s). The available values are: 0: Top, 1: Bottom, 2: TopBottom, 3: Mid, 4: TopBottomMid.""",
448456
),
457+
28: PinSpecification(
458+
name="extend_to_mid_nodes",
459+
type_names=["bool"],
460+
optional=True,
461+
document=r"""Compute mid nodes (when available) by averaging the neighbour corner nodes. Default: True""",
462+
),
449463
},
450464
map_output_pin_spec={
451465
0: PinSpecification(
@@ -532,6 +546,8 @@ class InputsAccuEqvCreepStrain(_Inputs):
532546
>>> op.inputs.split_shells.connect(my_split_shells)
533547
>>> my_shell_layer = int()
534548
>>> op.inputs.shell_layer.connect(my_shell_layer)
549+
>>> my_extend_to_mid_nodes = bool()
550+
>>> op.inputs.extend_to_mid_nodes.connect(my_extend_to_mid_nodes)
535551
"""
536552

537553
def __init__(self, op: Operator):
@@ -578,6 +594,10 @@ def __init__(self, op: Operator):
578594
accu_eqv_creep_strain._spec().input_pin(27), 27, op, -1
579595
)
580596
self._inputs.append(self._shell_layer)
597+
self._extend_to_mid_nodes = Input(
598+
accu_eqv_creep_strain._spec().input_pin(28), 28, op, -1
599+
)
600+
self._inputs.append(self._extend_to_mid_nodes)
581601

582602
@property
583603
def time_scoping(self) -> Input:
@@ -810,6 +830,27 @@ def shell_layer(self) -> Input:
810830
"""
811831
return self._shell_layer
812832

833+
@property
834+
def extend_to_mid_nodes(self) -> Input:
835+
r"""Allows to connect extend_to_mid_nodes input to the operator.
836+
837+
Compute mid nodes (when available) by averaging the neighbour corner nodes. Default: True
838+
839+
Returns
840+
-------
841+
input:
842+
An Input instance for this pin.
843+
844+
Examples
845+
--------
846+
>>> from ansys.dpf import core as dpf
847+
>>> op = dpf.operators.result.accu_eqv_creep_strain()
848+
>>> op.inputs.extend_to_mid_nodes.connect(my_extend_to_mid_nodes)
849+
>>> # or
850+
>>> op.inputs.extend_to_mid_nodes(my_extend_to_mid_nodes)
851+
"""
852+
return self._extend_to_mid_nodes
853+
813854

814855
class OutputsAccuEqvCreepStrain(_Outputs):
815856
"""Intermediate class used to get outputs from

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

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ class accu_eqv_plastic_strain(Operator):
156156
If true, this pin forces the results to be split by element shape, indicated by the presence of the 'elshape' label in the output. If false, the results for all elements shapes are combined. Default value is false if averaging is not required and true if averaging is required.
157157
shell_layer: int, optional
158158
If connected, this pin allows you to extract the result only on the selected shell layer(s). The available values are: 0: Top, 1: Bottom, 2: TopBottom, 3: Mid, 4: TopBottomMid.
159+
extend_to_mid_nodes: bool, optional
160+
Compute mid nodes (when available) by averaging the neighbour corner nodes. Default: True
159161
160162
Returns
161163
-------
@@ -191,6 +193,8 @@ class accu_eqv_plastic_strain(Operator):
191193
>>> op.inputs.split_shells.connect(my_split_shells)
192194
>>> my_shell_layer = int()
193195
>>> op.inputs.shell_layer.connect(my_shell_layer)
196+
>>> my_extend_to_mid_nodes = bool()
197+
>>> op.inputs.extend_to_mid_nodes.connect(my_extend_to_mid_nodes)
194198
195199
>>> # Instantiate operator and connect inputs in one line
196200
>>> op = dpf.operators.result.accu_eqv_plastic_strain(
@@ -205,6 +209,7 @@ class accu_eqv_plastic_strain(Operator):
205209
... read_beams=my_read_beams,
206210
... split_shells=my_split_shells,
207211
... shell_layer=my_shell_layer,
212+
... extend_to_mid_nodes=my_extend_to_mid_nodes,
208213
... )
209214
210215
>>> # Get output data
@@ -224,6 +229,7 @@ def __init__(
224229
read_beams=None,
225230
split_shells=None,
226231
shell_layer=None,
232+
extend_to_mid_nodes=None,
227233
config=None,
228234
server=None,
229235
):
@@ -252,6 +258,8 @@ def __init__(
252258
self.inputs.split_shells.connect(split_shells)
253259
if shell_layer is not None:
254260
self.inputs.shell_layer.connect(shell_layer)
261+
if extend_to_mid_nodes is not None:
262+
self.inputs.extend_to_mid_nodes.connect(extend_to_mid_nodes)
255263

256264
@staticmethod
257265
def _spec() -> Specification:
@@ -446,6 +454,12 @@ def _spec() -> Specification:
446454
optional=True,
447455
document=r"""If connected, this pin allows you to extract the result only on the selected shell layer(s). The available values are: 0: Top, 1: Bottom, 2: TopBottom, 3: Mid, 4: TopBottomMid.""",
448456
),
457+
28: PinSpecification(
458+
name="extend_to_mid_nodes",
459+
type_names=["bool"],
460+
optional=True,
461+
document=r"""Compute mid nodes (when available) by averaging the neighbour corner nodes. Default: True""",
462+
),
449463
},
450464
map_output_pin_spec={
451465
0: PinSpecification(
@@ -532,6 +546,8 @@ class InputsAccuEqvPlasticStrain(_Inputs):
532546
>>> op.inputs.split_shells.connect(my_split_shells)
533547
>>> my_shell_layer = int()
534548
>>> op.inputs.shell_layer.connect(my_shell_layer)
549+
>>> my_extend_to_mid_nodes = bool()
550+
>>> op.inputs.extend_to_mid_nodes.connect(my_extend_to_mid_nodes)
535551
"""
536552

537553
def __init__(self, op: Operator):
@@ -578,6 +594,10 @@ def __init__(self, op: Operator):
578594
accu_eqv_plastic_strain._spec().input_pin(27), 27, op, -1
579595
)
580596
self._inputs.append(self._shell_layer)
597+
self._extend_to_mid_nodes = Input(
598+
accu_eqv_plastic_strain._spec().input_pin(28), 28, op, -1
599+
)
600+
self._inputs.append(self._extend_to_mid_nodes)
581601

582602
@property
583603
def time_scoping(self) -> Input:
@@ -810,6 +830,27 @@ def shell_layer(self) -> Input:
810830
"""
811831
return self._shell_layer
812832

833+
@property
834+
def extend_to_mid_nodes(self) -> Input:
835+
r"""Allows to connect extend_to_mid_nodes input to the operator.
836+
837+
Compute mid nodes (when available) by averaging the neighbour corner nodes. Default: True
838+
839+
Returns
840+
-------
841+
input:
842+
An Input instance for this pin.
843+
844+
Examples
845+
--------
846+
>>> from ansys.dpf import core as dpf
847+
>>> op = dpf.operators.result.accu_eqv_plastic_strain()
848+
>>> op.inputs.extend_to_mid_nodes.connect(my_extend_to_mid_nodes)
849+
>>> # or
850+
>>> op.inputs.extend_to_mid_nodes(my_extend_to_mid_nodes)
851+
"""
852+
return self._extend_to_mid_nodes
853+
813854

814855
class OutputsAccuEqvPlasticStrain(_Outputs):
815856
"""Intermediate class used to get outputs from

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

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ class contact_fluid_penetration_pressure(Operator):
164164
If true, this pin forces the results to be split by element shape, indicated by the presence of the 'elshape' label in the output. If false, the results for all elements shapes are combined. Default value is false if averaging is not required and true if averaging is required.
165165
shell_layer: int, optional
166166
If connected, this pin allows you to extract the result only on the selected shell layer(s). The available values are: 0: Top, 1: Bottom, 2: TopBottom, 3: Mid, 4: TopBottomMid.
167+
extend_to_mid_nodes: bool, optional
168+
Compute mid nodes (when available) by averaging the neighbour corner nodes. Default: True
167169
168170
Returns
169171
-------
@@ -207,6 +209,8 @@ class contact_fluid_penetration_pressure(Operator):
207209
>>> op.inputs.split_shells.connect(my_split_shells)
208210
>>> my_shell_layer = int()
209211
>>> op.inputs.shell_layer.connect(my_shell_layer)
212+
>>> my_extend_to_mid_nodes = bool()
213+
>>> op.inputs.extend_to_mid_nodes.connect(my_extend_to_mid_nodes)
210214
211215
>>> # Instantiate operator and connect inputs in one line
212216
>>> op = dpf.operators.result.contact_fluid_penetration_pressure(
@@ -225,6 +229,7 @@ class contact_fluid_penetration_pressure(Operator):
225229
... read_beams=my_read_beams,
226230
... split_shells=my_split_shells,
227231
... shell_layer=my_shell_layer,
232+
... extend_to_mid_nodes=my_extend_to_mid_nodes,
228233
... )
229234
230235
>>> # Get output data
@@ -248,6 +253,7 @@ def __init__(
248253
read_beams=None,
249254
split_shells=None,
250255
shell_layer=None,
256+
extend_to_mid_nodes=None,
251257
config=None,
252258
server=None,
253259
):
@@ -284,6 +290,8 @@ def __init__(
284290
self.inputs.split_shells.connect(split_shells)
285291
if shell_layer is not None:
286292
self.inputs.shell_layer.connect(shell_layer)
293+
if extend_to_mid_nodes is not None:
294+
self.inputs.extend_to_mid_nodes.connect(extend_to_mid_nodes)
287295

288296
@staticmethod
289297
def _spec() -> Specification:
@@ -502,6 +510,12 @@ def _spec() -> Specification:
502510
optional=True,
503511
document=r"""If connected, this pin allows you to extract the result only on the selected shell layer(s). The available values are: 0: Top, 1: Bottom, 2: TopBottom, 3: Mid, 4: TopBottomMid.""",
504512
),
513+
28: PinSpecification(
514+
name="extend_to_mid_nodes",
515+
type_names=["bool"],
516+
optional=True,
517+
document=r"""Compute mid nodes (when available) by averaging the neighbour corner nodes. Default: True""",
518+
),
505519
},
506520
map_output_pin_spec={
507521
0: PinSpecification(
@@ -596,6 +610,8 @@ class InputsContactFluidPenetrationPressure(_Inputs):
596610
>>> op.inputs.split_shells.connect(my_split_shells)
597611
>>> my_shell_layer = int()
598612
>>> op.inputs.shell_layer.connect(my_shell_layer)
613+
>>> my_extend_to_mid_nodes = bool()
614+
>>> op.inputs.extend_to_mid_nodes.connect(my_extend_to_mid_nodes)
599615
"""
600616

601617
def __init__(self, op: Operator):
@@ -660,6 +676,10 @@ def __init__(self, op: Operator):
660676
contact_fluid_penetration_pressure._spec().input_pin(27), 27, op, -1
661677
)
662678
self._inputs.append(self._shell_layer)
679+
self._extend_to_mid_nodes = Input(
680+
contact_fluid_penetration_pressure._spec().input_pin(28), 28, op, -1
681+
)
682+
self._inputs.append(self._extend_to_mid_nodes)
663683

664684
@property
665685
def time_scoping(self) -> Input:
@@ -976,6 +996,27 @@ def shell_layer(self) -> Input:
976996
"""
977997
return self._shell_layer
978998

999+
@property
1000+
def extend_to_mid_nodes(self) -> Input:
1001+
r"""Allows to connect extend_to_mid_nodes input to the operator.
1002+
1003+
Compute mid nodes (when available) by averaging the neighbour corner nodes. Default: True
1004+
1005+
Returns
1006+
-------
1007+
input:
1008+
An Input instance for this pin.
1009+
1010+
Examples
1011+
--------
1012+
>>> from ansys.dpf import core as dpf
1013+
>>> op = dpf.operators.result.contact_fluid_penetration_pressure()
1014+
>>> op.inputs.extend_to_mid_nodes.connect(my_extend_to_mid_nodes)
1015+
>>> # or
1016+
>>> op.inputs.extend_to_mid_nodes(my_extend_to_mid_nodes)
1017+
"""
1018+
return self._extend_to_mid_nodes
1019+
9791020

9801021
class OutputsContactFluidPenetrationPressure(_Outputs):
9811022
"""Intermediate class used to get outputs from

0 commit comments

Comments
 (0)