Skip to content

Commit

Permalink
Set name from field definition
Browse files Browse the repository at this point in the history
  • Loading branch information
janvonrickenbach committed Apr 15, 2024
1 parent 9226744 commit 94c671b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ansys/dpf/composites/_composite_model_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ def evaluate_failure_criteria(
converter_op.run()

if version_older_than(self._server, "8.2"):
# For versions before 8.1, the Reference Surface suffix
# For versions before 8.2, the Reference Surface suffix
# is not correctly preserved by the failure_measure_converter
# We add the suffix manually here.
for field in ref_surface_max_container:
Expand All @@ -536,7 +536,10 @@ def evaluate_failure_criteria(
or field.name.startswith("SM")
):
assert not field.name.endswith(REF_SURFACE_NAME)
field.name = field.name + " " + REF_SURFACE_NAME
# Set name in field definition, because setting
# the name directly is not supported for older dpf versions
field_definition = field.field_definition
field_definition.name = field_definition.name + " " + REF_SURFACE_NAME

return _merge_containers(overall_max_container, ref_surface_max_container)
else:
Expand Down

0 comments on commit 94c671b

Please sign in to comment.