Skip to content

Commit 5770566

Browse files
pyansys-ci-botrlagharafacantonPProfizi
authored
Update generated code for DPF 242_rcs_242_after on master (#1448)
* update generated code * Revert correct licensing behavior * debug * Move one test to other file * update generated code * Temporary skip of remote_operator tests * revert * revert prints * revert CI * missing print * readd tests * Revert "missing print" This reverts commit ded2061. * Revert "Revert "missing print"" This reverts commit 77455f5. * Revert "readd tests" This reverts commit 4d56b19. * Revert "Temporary skip of remote_operator tests" This reverts commit 777909b. * SKIP Docker jobs Signed-off-by: paul.profizi <[email protected]> * Reapply "Temporary skip of remote_operator tests" This reverts commit 07cbc3a. * SKIP test_entry.py/test_apply_context when in 231 on Linux Signed-off-by: paul.profizi <[email protected]> SKIP test_entry.py/test_apply_context when in 231 on Linux Signed-off-by: paul.profizi <[email protected]> SKIP test_entry.py/test_apply_context when in 231 on Linux Signed-off-by: paul.profizi <[email protected]> SKIP test_entry.py/test_apply_context when in 231 on Linux Signed-off-by: paul.profizi <[email protected]> --------- Signed-off-by: paul.profizi <[email protected]> Co-authored-by: rlagha <[email protected]> Co-authored-by: Rafael Canton <[email protected]> Co-authored-by: rafacanton <[email protected]> Co-authored-by: paul.profizi <[email protected]>
1 parent 5a77146 commit 5770566

File tree

69 files changed

+4730
-151
lines changed

Some content is hidden

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

69 files changed

+4730
-151
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -126,24 +126,24 @@ jobs:
126126
test_any: true
127127
secrets: inherit
128128

129-
docker_tests:
130-
name: "Build and Test on Docker"
131-
uses: ./.github/workflows/test_docker.yml
132-
needs: pick_server_suffix
133-
with:
134-
ANSYS_VERSION: "242"
135-
standalone_suffix: ${{needs.pick_server_suffix.outputs.suffix}}
136-
secrets: inherit
137-
138-
docker_examples:
139-
name: "Run examples on Docker"
140-
uses: ./.github/workflows/examples_docker.yml
141-
needs: pick_server_suffix
142-
with:
143-
ANSYS_VERSION: "242"
144-
python_versions: '["3.9"]'
145-
standalone_suffix: ${{needs.pick_server_suffix.outputs.suffix}}
146-
secrets: inherit
129+
# docker_tests:
130+
# name: "Build and Test on Docker"
131+
# uses: ./.github/workflows/test_docker.yml
132+
# needs: pick_server_suffix
133+
# with:
134+
# ANSYS_VERSION: "242"
135+
# standalone_suffix: ${{needs.pick_server_suffix.outputs.suffix}}
136+
# secrets: inherit
137+
#
138+
# docker_examples:
139+
# name: "Run examples on Docker"
140+
# uses: ./.github/workflows/examples_docker.yml
141+
# needs: pick_server_suffix
142+
# with:
143+
# ANSYS_VERSION: "242"
144+
# python_versions: '["3.9"]'
145+
# standalone_suffix: ${{needs.pick_server_suffix.outputs.suffix}}
146+
# secrets: inherit
147147

148148
docs:
149149
if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft

doc/source/_static/dpf_operators.html

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

src/ansys/dpf/core/operators/geo/normals_provider_nl.py

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

1313

1414
class normals_provider_nl(Operator):
15-
"""Computes the normals on nodes/elements based on integration points
16-
(more accurate for non-linear elements) on a skin mesh.
15+
"""Computes the normals on nodes/faces/elements based on integration
16+
points (more accurate for non-linear elements) on a skin mesh.
1717
1818
Parameters
1919
----------
2020
mesh : MeshedRegion
21-
Skin or shell mesh region.
21+
Skin, face, or shell mesh region.
2222
mesh_scoping : Scoping, optional
2323
Elemental, elementalnodal, or nodal scoping.
2424
location derived from this.
@@ -75,16 +75,17 @@ def __init__(
7575

7676
@staticmethod
7777
def _spec():
78-
description = """Computes the normals on nodes/elements based on integration points
79-
(more accurate for non-linear elements) on a skin mesh."""
78+
description = """Computes the normals on nodes/faces/elements based on integration
79+
points (more accurate for non-linear elements) on a skin
80+
mesh."""
8081
spec = Specification(
8182
description=description,
8283
map_input_pin_spec={
8384
0: PinSpecification(
8485
name="mesh",
8586
type_names=["abstract_meshed_region"],
8687
optional=False,
87-
document="""Skin or shell mesh region.""",
88+
document="""Skin, face, or shell mesh region.""",
8889
),
8990
1: PinSpecification(
9091
name="mesh_scoping",
@@ -182,7 +183,7 @@ def __init__(self, op: Operator):
182183
def mesh(self):
183184
"""Allows to connect mesh input to the operator.
184185
185-
Skin or shell mesh region.
186+
Skin, face, or shell mesh region.
186187
187188
Parameters
188189
----------

src/ansys/dpf/core/operators/logic/elementary_data_selector.py

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@ class elementary_data_selector(Operator):
2020
elementary_data_index : int
2121
One or several elementary data index that
2222
will be extracted from the initial
23-
field.
23+
field. for field with nature matrix,
24+
this is the line indices to extract.
2425
default_value : float, optional
2526
Set a default value for elementary data that
2627
do not exist.
28+
elementary_data_index_2 : int, optional
29+
For field with nature matrix, this is the
30+
column indices to extract.
2731
2832
2933
Examples
@@ -40,12 +44,15 @@ class elementary_data_selector(Operator):
4044
>>> op.inputs.elementary_data_index.connect(my_elementary_data_index)
4145
>>> my_default_value = float()
4246
>>> op.inputs.default_value.connect(my_default_value)
47+
>>> my_elementary_data_index_2 = int()
48+
>>> op.inputs.elementary_data_index_2.connect(my_elementary_data_index_2)
4349
4450
>>> # Instantiate operator and connect inputs in one line
4551
>>> op = dpf.operators.logic.elementary_data_selector(
4652
... field=my_field,
4753
... elementary_data_index=my_elementary_data_index,
4854
... default_value=my_default_value,
55+
... elementary_data_index_2=my_elementary_data_index_2,
4956
... )
5057
5158
>>> # Get output data
@@ -57,6 +64,7 @@ def __init__(
5764
field=None,
5865
elementary_data_index=None,
5966
default_value=None,
67+
elementary_data_index_2=None,
6068
config=None,
6169
server=None,
6270
):
@@ -69,6 +77,8 @@ def __init__(
6977
self.inputs.elementary_data_index.connect(elementary_data_index)
7078
if default_value is not None:
7179
self.inputs.default_value.connect(default_value)
80+
if elementary_data_index_2 is not None:
81+
self.inputs.elementary_data_index_2.connect(elementary_data_index_2)
7282

7383
@staticmethod
7484
def _spec():
@@ -90,7 +100,8 @@ def _spec():
90100
optional=False,
91101
document="""One or several elementary data index that
92102
will be extracted from the initial
93-
field.""",
103+
field. for field with nature matrix,
104+
this is the line indices to extract.""",
94105
),
95106
2: PinSpecification(
96107
name="default_value",
@@ -99,6 +110,13 @@ def _spec():
99110
document="""Set a default value for elementary data that
100111
do not exist.""",
101112
),
113+
3: PinSpecification(
114+
name="elementary_data_index_2",
115+
type_names=["int32", "vector<int32>"],
116+
optional=True,
117+
document="""For field with nature matrix, this is the
118+
column indices to extract.""",
119+
),
102120
},
103121
map_output_pin_spec={
104122
0: PinSpecification(
@@ -162,6 +180,8 @@ class InputsElementaryDataSelector(_Inputs):
162180
>>> op.inputs.elementary_data_index.connect(my_elementary_data_index)
163181
>>> my_default_value = float()
164182
>>> op.inputs.default_value.connect(my_default_value)
183+
>>> my_elementary_data_index_2 = int()
184+
>>> op.inputs.elementary_data_index_2.connect(my_elementary_data_index_2)
165185
"""
166186

167187
def __init__(self, op: Operator):
@@ -176,6 +196,10 @@ def __init__(self, op: Operator):
176196
elementary_data_selector._spec().input_pin(2), 2, op, -1
177197
)
178198
self._inputs.append(self._default_value)
199+
self._elementary_data_index_2 = Input(
200+
elementary_data_selector._spec().input_pin(3), 3, op, -1
201+
)
202+
self._inputs.append(self._elementary_data_index_2)
179203

180204
@property
181205
def field(self):
@@ -201,7 +225,8 @@ def elementary_data_index(self):
201225
202226
One or several elementary data index that
203227
will be extracted from the initial
204-
field.
228+
field. for field with nature matrix,
229+
this is the line indices to extract.
205230
206231
Parameters
207232
----------
@@ -238,6 +263,27 @@ def default_value(self):
238263
"""
239264
return self._default_value
240265

266+
@property
267+
def elementary_data_index_2(self):
268+
"""Allows to connect elementary_data_index_2 input to the operator.
269+
270+
For field with nature matrix, this is the
271+
column indices to extract.
272+
273+
Parameters
274+
----------
275+
my_elementary_data_index_2 : int
276+
277+
Examples
278+
--------
279+
>>> from ansys.dpf import core as dpf
280+
>>> op = dpf.operators.logic.elementary_data_selector()
281+
>>> op.inputs.elementary_data_index_2.connect(my_elementary_data_index_2)
282+
>>> # or
283+
>>> op.inputs.elementary_data_index_2(my_elementary_data_index_2)
284+
"""
285+
return self._elementary_data_index_2
286+
241287

242288
class OutputsElementaryDataSelector(_Outputs):
243289
"""Intermediate class used to get outputs from

src/ansys/dpf/core/operators/logic/elementary_data_selector_fc.py

Lines changed: 55 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,14 @@ class elementary_data_selector_fc(Operator):
1919
----------
2020
fields_container : FieldsContainer or Field
2121
elementary_data_index : int
22-
One or several elementary data index that
22+
One or several elementary data indices that
2323
will be extracted from the initial
24-
field.
24+
field. for a field with a nature
25+
matrix, this extracts the line
26+
indices.
27+
elementary_data_index_2 : int, optional
28+
For a field with nature matrix, this extracts
29+
the column indices.
2530
2631
2732
Examples
@@ -36,11 +41,14 @@ class elementary_data_selector_fc(Operator):
3641
>>> op.inputs.fields_container.connect(my_fields_container)
3742
>>> my_elementary_data_index = int()
3843
>>> op.inputs.elementary_data_index.connect(my_elementary_data_index)
44+
>>> my_elementary_data_index_2 = int()
45+
>>> op.inputs.elementary_data_index_2.connect(my_elementary_data_index_2)
3946
4047
>>> # Instantiate operator and connect inputs in one line
4148
>>> op = dpf.operators.logic.elementary_data_selector_fc(
4249
... fields_container=my_fields_container,
4350
... elementary_data_index=my_elementary_data_index,
51+
... elementary_data_index_2=my_elementary_data_index_2,
4452
... )
4553
4654
>>> # Get output data
@@ -51,6 +59,7 @@ def __init__(
5159
self,
5260
fields_container=None,
5361
elementary_data_index=None,
62+
elementary_data_index_2=None,
5463
config=None,
5564
server=None,
5665
):
@@ -63,6 +72,8 @@ def __init__(
6372
self.inputs.fields_container.connect(fields_container)
6473
if elementary_data_index is not None:
6574
self.inputs.elementary_data_index.connect(elementary_data_index)
75+
if elementary_data_index_2 is not None:
76+
self.inputs.elementary_data_index_2.connect(elementary_data_index_2)
6677

6778
@staticmethod
6879
def _spec():
@@ -81,9 +92,18 @@ def _spec():
8192
name="elementary_data_index",
8293
type_names=["int32", "vector<int32>"],
8394
optional=False,
84-
document="""One or several elementary data index that
95+
document="""One or several elementary data indices that
8596
will be extracted from the initial
86-
field.""",
97+
field. for a field with a nature
98+
matrix, this extracts the line
99+
indices.""",
100+
),
101+
3: PinSpecification(
102+
name="elementary_data_index_2",
103+
type_names=["int32", "vector<int32>"],
104+
optional=True,
105+
document="""For a field with nature matrix, this extracts
106+
the column indices.""",
87107
),
88108
},
89109
map_output_pin_spec={
@@ -148,6 +168,8 @@ class InputsElementaryDataSelectorFc(_Inputs):
148168
>>> op.inputs.fields_container.connect(my_fields_container)
149169
>>> my_elementary_data_index = int()
150170
>>> op.inputs.elementary_data_index.connect(my_elementary_data_index)
171+
>>> my_elementary_data_index_2 = int()
172+
>>> op.inputs.elementary_data_index_2.connect(my_elementary_data_index_2)
151173
"""
152174

153175
def __init__(self, op: Operator):
@@ -160,6 +182,10 @@ def __init__(self, op: Operator):
160182
elementary_data_selector_fc._spec().input_pin(1), 1, op, -1
161183
)
162184
self._inputs.append(self._elementary_data_index)
185+
self._elementary_data_index_2 = Input(
186+
elementary_data_selector_fc._spec().input_pin(3), 3, op, -1
187+
)
188+
self._inputs.append(self._elementary_data_index_2)
163189

164190
@property
165191
def fields_container(self):
@@ -183,9 +209,11 @@ def fields_container(self):
183209
def elementary_data_index(self):
184210
"""Allows to connect elementary_data_index input to the operator.
185211
186-
One or several elementary data index that
212+
One or several elementary data indices that
187213
will be extracted from the initial
188-
field.
214+
field. for a field with a nature
215+
matrix, this extracts the line
216+
indices.
189217
190218
Parameters
191219
----------
@@ -201,6 +229,27 @@ def elementary_data_index(self):
201229
"""
202230
return self._elementary_data_index
203231

232+
@property
233+
def elementary_data_index_2(self):
234+
"""Allows to connect elementary_data_index_2 input to the operator.
235+
236+
For a field with nature matrix, this extracts
237+
the column indices.
238+
239+
Parameters
240+
----------
241+
my_elementary_data_index_2 : int
242+
243+
Examples
244+
--------
245+
>>> from ansys.dpf import core as dpf
246+
>>> op = dpf.operators.logic.elementary_data_selector_fc()
247+
>>> op.inputs.elementary_data_index_2.connect(my_elementary_data_index_2)
248+
>>> # or
249+
>>> op.inputs.elementary_data_index_2(my_elementary_data_index_2)
250+
"""
251+
return self._elementary_data_index_2
252+
204253

205254
class OutputsElementaryDataSelectorFc(_Outputs):
206255
"""Intermediate class used to get outputs from

src/ansys/dpf/core/operators/logic/enrich_materials.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class enrich_materials(Operator):
1919
----------
2020
MaterialContainer :
2121
streams : StreamsContainer or FieldsContainer
22-
streams_mapping : Class Dataprocessing::Cpropertyfieldscontainer
22+
streams_mapping : PropertyFieldsContainer
2323
2424
2525
Examples
@@ -34,7 +34,7 @@ class enrich_materials(Operator):
3434
>>> op.inputs.MaterialContainer.connect(my_MaterialContainer)
3535
>>> my_streams = dpf.StreamsContainer()
3636
>>> op.inputs.streams.connect(my_streams)
37-
>>> my_streams_mapping = dpf.Class Dataprocessing::Cpropertyfieldscontainer()
37+
>>> my_streams_mapping = dpf.PropertyFieldsContainer()
3838
>>> op.inputs.streams_mapping.connect(my_streams_mapping)
3939
4040
>>> # Instantiate operator and connect inputs in one line
@@ -87,7 +87,7 @@ def _spec():
8787
),
8888
2: PinSpecification(
8989
name="streams_mapping",
90-
type_names=["class dataProcessing::CPropertyFieldsContainer"],
90+
type_names=["property_fields_container"],
9191
optional=False,
9292
document="""""",
9393
),
@@ -152,7 +152,7 @@ class InputsEnrichMaterials(_Inputs):
152152
>>> op.inputs.MaterialContainer.connect(my_MaterialContainer)
153153
>>> my_streams = dpf.StreamsContainer()
154154
>>> op.inputs.streams.connect(my_streams)
155-
>>> my_streams_mapping = dpf.Class Dataprocessing::Cpropertyfieldscontainer()
155+
>>> my_streams_mapping = dpf.PropertyFieldsContainer()
156156
>>> op.inputs.streams_mapping.connect(my_streams_mapping)
157157
"""
158158

@@ -209,7 +209,7 @@ def streams_mapping(self):
209209
210210
Parameters
211211
----------
212-
my_streams_mapping : Class Dataprocessing::Cpropertyfieldscontainer
212+
my_streams_mapping : PropertyFieldsContainer
213213
214214
Examples
215215
--------

0 commit comments

Comments
 (0)