Skip to content

Commit 3a47f8a

Browse files
authored
update generated code
1 parent af54fd3 commit 3a47f8a

Some content is hidden

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

58 files changed

+818
-3038
lines changed

doc/source/_static/dpf_operators.html

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

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

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ class correlation(Operator):
2727
ponderation : Field or FieldsContainer
2828
Field m, optional weighting for correlation
2929
computation.
30+
absoluteValue : bool
31+
If true, correlation factor is
32+
||amb||/(||ama||.||bmb||)
3033
3134
3235
Examples
@@ -43,12 +46,15 @@ class correlation(Operator):
4346
>>> op.inputs.fieldB.connect(my_fieldB)
4447
>>> my_ponderation = dpf.Field()
4548
>>> op.inputs.ponderation.connect(my_ponderation)
49+
>>> my_absoluteValue = bool()
50+
>>> op.inputs.absoluteValue.connect(my_absoluteValue)
4651
4752
>>> # Instantiate operator and connect inputs in one line
4853
>>> op = dpf.operators.math.correlation(
4954
... fieldA=my_fieldA,
5055
... fieldB=my_fieldB,
5156
... ponderation=my_ponderation,
57+
... absoluteValue=my_absoluteValue,
5258
... )
5359
5460
>>> # Get output data
@@ -57,7 +63,13 @@ class correlation(Operator):
5763
"""
5864

5965
def __init__(
60-
self, fieldA=None, fieldB=None, ponderation=None, config=None, server=None
66+
self,
67+
fieldA=None,
68+
fieldB=None,
69+
ponderation=None,
70+
absoluteValue=None,
71+
config=None,
72+
server=None,
6173
):
6274
super().__init__(name="correlation", config=config, server=server)
6375
self._inputs = InputsCorrelation(self)
@@ -68,6 +80,8 @@ def __init__(
6880
self.inputs.fieldB.connect(fieldB)
6981
if ponderation is not None:
7082
self.inputs.ponderation.connect(ponderation)
83+
if absoluteValue is not None:
84+
self.inputs.absoluteValue.connect(absoluteValue)
7185

7286
@staticmethod
7387
def _spec():
@@ -99,6 +113,13 @@ def _spec():
99113
document="""Field m, optional weighting for correlation
100114
computation.""",
101115
),
116+
3: PinSpecification(
117+
name="absoluteValue",
118+
type_names=["bool"],
119+
optional=False,
120+
document="""If true, correlation factor is
121+
||amb||/(||ama||.||bmb||)""",
122+
),
102123
},
103124
map_output_pin_spec={
104125
0: PinSpecification(
@@ -170,6 +191,8 @@ class InputsCorrelation(_Inputs):
170191
>>> op.inputs.fieldB.connect(my_fieldB)
171192
>>> my_ponderation = dpf.Field()
172193
>>> op.inputs.ponderation.connect(my_ponderation)
194+
>>> my_absoluteValue = bool()
195+
>>> op.inputs.absoluteValue.connect(my_absoluteValue)
173196
"""
174197

175198
def __init__(self, op: Operator):
@@ -180,6 +203,8 @@ def __init__(self, op: Operator):
180203
self._inputs.append(self._fieldB)
181204
self._ponderation = Input(correlation._spec().input_pin(2), 2, op, -1)
182205
self._inputs.append(self._ponderation)
206+
self._absoluteValue = Input(correlation._spec().input_pin(3), 3, op, -1)
207+
self._inputs.append(self._absoluteValue)
183208

184209
@property
185210
def fieldA(self):
@@ -244,6 +269,27 @@ def ponderation(self):
244269
"""
245270
return self._ponderation
246271

272+
@property
273+
def absoluteValue(self):
274+
"""Allows to connect absoluteValue input to the operator.
275+
276+
If true, correlation factor is
277+
||amb||/(||ama||.||bmb||)
278+
279+
Parameters
280+
----------
281+
my_absoluteValue : bool
282+
283+
Examples
284+
--------
285+
>>> from ansys.dpf import core as dpf
286+
>>> op = dpf.operators.math.correlation()
287+
>>> op.inputs.absoluteValue.connect(my_absoluteValue)
288+
>>> # or
289+
>>> op.inputs.absoluteValue(my_absoluteValue)
290+
"""
291+
return self._absoluteValue
292+
247293

248294
class OutputsCorrelation(_Outputs):
249295
"""Intermediate class used to get outputs from

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

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,24 @@ class from_scoping(Operator):
1515
"""Extracts a meshed region from another meshed region based on a
1616
scoping. Regarding the property fields of the meshed region: the
1717
'Elemental', 'Face', and 'Nodal' property fields are scoped to the
18-
elements or nodes of the output mesh, the 'Global' property fields
19-
are 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.
18+
elements, faces or nodes of the output mesh, the 'Global' property
19+
fields are transferred from the input mesh to the output mesh
20+
without changes, and the rest of the property fields are not
21+
present in the output mesh.
2222
2323
Parameters
2424
----------
2525
scoping : Scoping
26-
If nodal scoping, then the scoping is
26+
If nodal/face scoping, then the scoping is
2727
transposed respecting the inclusive
2828
pin
2929
inclusive : int, optional
3030
If inclusive == 1 then all the elements/faces
31-
adjacent to the nodes ids in input
32-
are added, if inclusive == 0, only
33-
the elements/faces which have all
34-
their nodes in the scoping are
35-
included
31+
adjacent to the nodes/faces ids in
32+
input are added, if inclusive == 0,
33+
only the elements/faces which have
34+
all their nodes/faces in the scoping
35+
are included
3636
nodes_only : bool, optional
3737
Returns mesh with nodes only (without any
3838
elements or property fields). default
@@ -95,19 +95,19 @@ def _spec():
9595
description = """Extracts a meshed region from another meshed region based on a
9696
scoping. Regarding the property fields of the meshed
9797
region: the 'Elemental', 'Face', and 'Nodal' property
98-
fields are scoped to the elements or nodes of the output
99-
mesh, the 'Global' property fields are transferred from
100-
the input mesh to the output mesh without changes, and the
101-
rest of the property fields are not present in the output
102-
mesh."""
98+
fields are scoped to the elements, faces or nodes of the
99+
output mesh, the 'Global' property fields are transferred
100+
from the input mesh to the output mesh without changes,
101+
and the rest of the property fields are not present in the
102+
output mesh."""
103103
spec = Specification(
104104
description=description,
105105
map_input_pin_spec={
106106
1: PinSpecification(
107107
name="scoping",
108108
type_names=["scoping"],
109109
optional=False,
110-
document="""If nodal scoping, then the scoping is
110+
document="""If nodal/face scoping, then the scoping is
111111
transposed respecting the inclusive
112112
pin""",
113113
),
@@ -116,11 +116,11 @@ def _spec():
116116
type_names=["int32"],
117117
optional=True,
118118
document="""If inclusive == 1 then all the elements/faces
119-
adjacent to the nodes ids in input
120-
are added, if inclusive == 0, only
121-
the elements/faces which have all
122-
their nodes in the scoping are
123-
included""",
119+
adjacent to the nodes/faces ids in
120+
input are added, if inclusive == 0,
121+
only the elements/faces which have
122+
all their nodes/faces in the scoping
123+
are included""",
124124
),
125125
3: PinSpecification(
126126
name="nodes_only",
@@ -218,7 +218,7 @@ def __init__(self, op: Operator):
218218
def scoping(self):
219219
"""Allows to connect scoping input to the operator.
220220
221-
If nodal scoping, then the scoping is
221+
If nodal/face scoping, then the scoping is
222222
transposed respecting the inclusive
223223
pin
224224
@@ -241,11 +241,11 @@ def inclusive(self):
241241
"""Allows to connect inclusive input to the operator.
242242
243243
If inclusive == 1 then all the elements/faces
244-
adjacent to the nodes ids in input
245-
are added, if inclusive == 0, only
246-
the elements/faces which have all
247-
their nodes in the scoping are
248-
included
244+
adjacent to the nodes/faces ids in
245+
input are added, if inclusive == 0,
246+
only the elements/faces which have
247+
all their nodes/faces in the scoping
248+
are included
249249
250250
Parameters
251251
----------

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ class from_scopings(Operator):
2323
pin
2424
inclusive : int, optional
2525
If inclusive == 1 then all the elements/faces
26-
adjacent to the nodes ids in input
27-
are added, if inclusive == 0, only
28-
the elements/faces which have all
29-
their nodes in the scoping are
30-
included
26+
adjacent to the nodes/faces ids in
27+
input are added, if inclusive == 0,
28+
only the elements/faces which have
29+
all their nodes/faces in the scoping
30+
are included
3131
nodes_only : bool, optional
3232
Returns mesh with nodes only (without any
3333
elements). default is false.
@@ -104,11 +104,11 @@ def _spec():
104104
type_names=["int32"],
105105
optional=True,
106106
document="""If inclusive == 1 then all the elements/faces
107-
adjacent to the nodes ids in input
108-
are added, if inclusive == 0, only
109-
the elements/faces which have all
110-
their nodes in the scoping are
111-
included""",
107+
adjacent to the nodes/faces ids in
108+
input are added, if inclusive == 0,
109+
only the elements/faces which have
110+
all their nodes/faces in the scoping
111+
are included""",
112112
),
113113
3: PinSpecification(
114114
name="nodes_only",
@@ -228,11 +228,11 @@ def inclusive(self):
228228
"""Allows to connect inclusive input to the operator.
229229
230230
If inclusive == 1 then all the elements/faces
231-
adjacent to the nodes ids in input
232-
are added, if inclusive == 0, only
233-
the elements/faces which have all
234-
their nodes in the scoping are
235-
included
231+
adjacent to the nodes/faces ids in
232+
input are added, if inclusive == 0,
233+
only the elements/faces which have
234+
all their nodes/faces in the scoping
235+
are included
236236
237237
Parameters
238238
----------

src/ansys/dpf/core/operators/scoping/on_property.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ class on_property(Operator):
3333
If element scoping is requested on a nodal
3434
named selection, if inclusive == 1
3535
then all the elements/faces adjacent
36-
to the nodes ids in input are added,
37-
if inclusive == 0, only the
36+
to the nodes/faces ids in input are
37+
added, if inclusive == 0, only the
3838
elements/faces which have all their
39-
nodes in the scoping are included
39+
nodes/faces in the scoping are
40+
included
4041
4142
4243
Examples
@@ -150,10 +151,11 @@ def _spec():
150151
document="""If element scoping is requested on a nodal
151152
named selection, if inclusive == 1
152153
then all the elements/faces adjacent
153-
to the nodes ids in input are added,
154-
if inclusive == 0, only the
154+
to the nodes/faces ids in input are
155+
added, if inclusive == 0, only the
155156
elements/faces which have all their
156-
nodes in the scoping are included""",
157+
nodes/faces in the scoping are
158+
included""",
157159
),
158160
},
159161
map_output_pin_spec={
@@ -347,10 +349,11 @@ def inclusive(self):
347349
If element scoping is requested on a nodal
348350
named selection, if inclusive == 1
349351
then all the elements/faces adjacent
350-
to the nodes ids in input are added,
351-
if inclusive == 0, only the
352+
to the nodes/faces ids in input are
353+
added, if inclusive == 0, only the
352354
elements/faces which have all their
353-
nodes in the scoping are included
355+
nodes/faces in the scoping are
356+
included
354357
355358
Parameters
356359
----------

src/ansys/dpf/core/operators/scoping/transpose.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ class transpose(Operator):
2525
meshed_region : MeshedRegion or MeshesContainer
2626
inclusive : int, optional
2727
If inclusive == 1 then all the elements/faces
28-
adjacent to the nodes ids in input
29-
are added, if inclusive == 0, only
30-
the elements/faces which have all
31-
their nodes in the scoping are
32-
included
28+
adjacent to the nodes/faces ids in
29+
input are added, if inclusive == 0,
30+
only the elements/faces which have
31+
all their nodes/faces in the scoping
32+
are included
3333
requested_location : str, optional
3434
Output scoping location for meshes with
3535
nodes, faces and elements. by
@@ -114,11 +114,11 @@ def _spec():
114114
type_names=["int32"],
115115
optional=True,
116116
document="""If inclusive == 1 then all the elements/faces
117-
adjacent to the nodes ids in input
118-
are added, if inclusive == 0, only
119-
the elements/faces which have all
120-
their nodes in the scoping are
121-
included""",
117+
adjacent to the nodes/faces ids in
118+
input are added, if inclusive == 0,
119+
only the elements/faces which have
120+
all their nodes/faces in the scoping
121+
are included""",
122122
),
123123
9: PinSpecification(
124124
name="requested_location",
@@ -253,11 +253,11 @@ def inclusive(self):
253253
"""Allows to connect inclusive input to the operator.
254254
255255
If inclusive == 1 then all the elements/faces
256-
adjacent to the nodes ids in input
257-
are added, if inclusive == 0, only
258-
the elements/faces which have all
259-
their nodes in the scoping are
260-
included
256+
adjacent to the nodes/faces ids in
257+
input are added, if inclusive == 0,
258+
only the elements/faces which have
259+
all their nodes/faces in the scoping
260+
are included
261261
262262
Parameters
263263
----------
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
160 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)