Skip to content

Commit ff87119

Browse files
Feat/expose body scopings (#797)
* Add more missing server args * Expose Result Scoping input
1 parent 5b09b8c commit ff87119

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

src/ansys/dpf/post/result_workflows/_sub_workflows.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def _create_initial_result_workflow(
208208

209209
initial_result_workflow.add_operator(initial_result_op)
210210

211-
forward_shell_layer_op = operators.utility.forward()
211+
forward_shell_layer_op = operators.utility.forward(server=server)
212212
initial_result_workflow.add_operator(forward_shell_layer_op)
213213
initial_result_workflow.set_input_name(_WfNames.shell_layer, forward_shell_layer_op)
214214

@@ -226,7 +226,7 @@ def _create_initial_result_workflow(
226226
name="merge::solid_shell_fields"
227227
)
228228
initial_result_workflow.add_operator(merge_shell_solid_fields)
229-
shell_layer_op = operators.utility.change_shell_layers()
229+
shell_layer_op = operators.utility.change_shell_layers(server=server)
230230
shell_layer_op.inputs.merge(True)
231231
initial_result_workflow.add_operator(shell_layer_op)
232232

@@ -310,7 +310,9 @@ def _enrich_mesh_with_property_fields(
310310
property_names: list[str],
311311
streams_provider: StreamsContainer,
312312
):
313-
property_operator = operators.metadata.property_field_provider_by_name()
313+
property_operator = operators.metadata.property_field_provider_by_name(
314+
server=mesh._server
315+
)
314316
property_operator.inputs.streams_container(streams_provider)
315317

316318
for property_name in property_names:
@@ -323,7 +325,9 @@ def _enrich_mesh_with_property_fields(
323325
# Rescope the property field to the element scoping of the mesh
324326
# to ensure the split by property operator works correctly
325327
rescope_op = operators.scoping.rescope_property_field(
326-
mesh_scoping=mesh.elements.scoping, fields=property_field
328+
mesh_scoping=mesh.elements.scoping,
329+
fields=property_field,
330+
server=mesh._server,
327331
)
328332

329333
mesh.set_property_field(
@@ -348,6 +352,9 @@ def _create_split_scope_by_body_workflow(server, body_defining_properties: list[
348352
split_scope_by_body_wf.set_output_name(
349353
_WfNames.scoping, split_scop_op.outputs.mesh_scoping
350354
)
355+
split_scope_by_body_wf.set_output_name(
356+
_WfNames.result_scoping_by_body, split_scop_op.outputs.mesh_scoping
357+
)
351358
return split_scope_by_body_wf
352359

353360

@@ -362,14 +369,14 @@ def _create_rescoping_workflow(server, rescoping: _Rescoping):
362369

363370
rescoping_wf = Workflow(server=server)
364371

365-
transpose_scoping_op = operators.scoping.transpose()
372+
transpose_scoping_op = operators.scoping.transpose(server=server)
366373
rescoping_wf.add_operator(transpose_scoping_op)
367374
transpose_scoping_op.inputs.requested_location(rescoping.requested_location)
368375
rescoping_wf.set_input_name(
369376
_WfNames.mesh, transpose_scoping_op.inputs.meshed_region
370377
)
371378

372-
rescoping_op = operators.scoping.rescope_fc()
379+
rescoping_op = operators.scoping.rescope_fc(server=server)
373380
rescoping_wf.add_operator(rescoping_op)
374381
rescoping_op.inputs.mesh_scoping(
375382
transpose_scoping_op.outputs.mesh_scoping_as_scoping

src/ansys/dpf/post/selection.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ class _WfNames:
5959
scoping = "scoping"
6060
skin_input_mesh = "skin_input_mesh"
6161
final_scoping = "final_scoping"
62+
result_scoping_by_body = "result_scoping_by_body"
6263
scoping_a = "scoping_a"
6364
scoping_b = "scoping_b"
6465
streams = "streams"

0 commit comments

Comments
 (0)