Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/expose body scopings #797

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions src/ansys/dpf/post/result_workflows/_sub_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@

initial_result_workflow.add_operator(initial_result_op)

forward_shell_layer_op = operators.utility.forward()
forward_shell_layer_op = operators.utility.forward(server=server)
initial_result_workflow.add_operator(forward_shell_layer_op)
initial_result_workflow.set_input_name(_WfNames.shell_layer, forward_shell_layer_op)

Expand All @@ -226,7 +226,7 @@
name="merge::solid_shell_fields"
)
initial_result_workflow.add_operator(merge_shell_solid_fields)
shell_layer_op = operators.utility.change_shell_layers()
shell_layer_op = operators.utility.change_shell_layers(server=server)

Check warning on line 229 in src/ansys/dpf/post/result_workflows/_sub_workflows.py

View check run for this annotation

Codecov / codecov/patch

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

Added line #L229 was not covered by tests
shell_layer_op.inputs.merge(True)
initial_result_workflow.add_operator(shell_layer_op)

Expand Down Expand Up @@ -310,7 +310,9 @@
property_names: list[str],
streams_provider: StreamsContainer,
):
property_operator = operators.metadata.property_field_provider_by_name()
property_operator = operators.metadata.property_field_provider_by_name(

Check warning on line 313 in src/ansys/dpf/post/result_workflows/_sub_workflows.py

View check run for this annotation

Codecov / codecov/patch

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

Added line #L313 was not covered by tests
server=mesh._server
)
property_operator.inputs.streams_container(streams_provider)

for property_name in property_names:
Expand All @@ -323,7 +325,9 @@
# Rescope the property field to the element scoping of the mesh
# to ensure the split by property operator works correctly
rescope_op = operators.scoping.rescope_property_field(
mesh_scoping=mesh.elements.scoping, fields=property_field
mesh_scoping=mesh.elements.scoping,
fields=property_field,
server=mesh._server,
)

mesh.set_property_field(
Expand All @@ -348,6 +352,9 @@
split_scope_by_body_wf.set_output_name(
_WfNames.scoping, split_scop_op.outputs.mesh_scoping
)
split_scope_by_body_wf.set_output_name(

Check warning on line 355 in src/ansys/dpf/post/result_workflows/_sub_workflows.py

View check run for this annotation

Codecov / codecov/patch

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

Added line #L355 was not covered by tests
"ResultScopingInput", split_scop_op.outputs.mesh_scoping
)
return split_scope_by_body_wf


Expand All @@ -362,14 +369,14 @@

rescoping_wf = Workflow(server=server)

transpose_scoping_op = operators.scoping.transpose()
transpose_scoping_op = operators.scoping.transpose(server=server)

Check warning on line 372 in src/ansys/dpf/post/result_workflows/_sub_workflows.py

View check run for this annotation

Codecov / codecov/patch

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

Added line #L372 was not covered by tests
rescoping_wf.add_operator(transpose_scoping_op)
transpose_scoping_op.inputs.requested_location(rescoping.requested_location)
rescoping_wf.set_input_name(
_WfNames.mesh, transpose_scoping_op.inputs.meshed_region
)

rescoping_op = operators.scoping.rescope_fc()
rescoping_op = operators.scoping.rescope_fc(server=server)

Check warning on line 379 in src/ansys/dpf/post/result_workflows/_sub_workflows.py

View check run for this annotation

Codecov / codecov/patch

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

Added line #L379 was not covered by tests
rescoping_wf.add_operator(rescoping_op)
rescoping_op.inputs.mesh_scoping(
transpose_scoping_op.outputs.mesh_scoping_as_scoping
Expand Down