Skip to content

Commit

Permalink
update comments and note about 1-based indices
Browse files Browse the repository at this point in the history
  • Loading branch information
roosre committed Oct 15, 2023
1 parent dad47a4 commit 440be83
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions examples/010_harmonic_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@
failure_evaluator.inputs.strains_container(strain_at_phase)
failure_evaluator.inputs.mesh(composite_model.get_mesh())

# Note: the min/max layer indices are 1-based since
# WB 2024 R1 (server version 7 and above)
# Note: the min/max layer indices are 1-based starting with
# Workbench 2024 R1 (DPF server 7.1)
minmax_per_element = dpf.Operator("composite::minmax_per_element_operator")
minmax_per_element.inputs.fields_container(failure_evaluator)
minmax_per_element.inputs.mesh(composite_model.get_mesh())
Expand Down
4 changes: 2 additions & 2 deletions src/ansys/dpf/composites/_composite_model_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ def evaluate_failure_criteria(
# Ensure that sandwich criteria are evaluated
evaluate_failure_criterion_per_scope_op.inputs.request_sandwich_results(True)

# Note: the min/max layer indices are 1-based since
# WB 2024 R1 (server version 7 and above)
# Note: the min/max layer indices are 1-based starting with
# Workbench 2024 R1 (DPF server 7.1)
minmax_el_op = dpf.Operator("composite::minmax_per_element_operator")
minmax_el_op.inputs.fields_container(
evaluate_failure_criterion_per_scope_op.outputs.failure_container
Expand Down
3 changes: 2 additions & 1 deletion src/ansys/dpf/composites/select_indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def get_selected_indices(
The indices (nodes, layers and spots) are 0-based. Pay attention to this
when using the "composite::minmax_per_element_operator" where the
min/max layer indices are 1-based.
min/max layer indices are 1-based starting with Workbench 2024 R1
(DPF server 7.1).
"""
if layers is None:
layer_indices: Collection[int] = range(element_info.n_layers)
Expand Down
4 changes: 2 additions & 2 deletions tests/basic_workflow_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ def test_basic_workflow(dpf_server, distributed_rst):
failure_evaluator.inputs.stresses_container(stress_operator.outputs.fields_container)
failure_evaluator.inputs.mesh(mesh_provider.outputs.mesh)

# Note: the min/max layer indices are 1-based since
# WB 2024 R1 (server version 7 and above)
# Note: the min/max layer indices are 1-based starting with
# Workbench 2024 R1 (DPF server 7.1)
minmax_per_element = dpf.Operator("composite::minmax_per_element_operator")
minmax_per_element.inputs.fields_container(failure_evaluator.outputs.fields_container)
minmax_per_element.inputs.mesh(mesh_provider.outputs.mesh)
Expand Down

0 comments on commit 440be83

Please sign in to comment.