Skip to content

Commit

Permalink
update composite_model_test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
roosre committed May 31, 2024
1 parent b6f07f7 commit b3369b6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/ansys/dpf/composites/_composite_model_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ def ply_types(self) -> dict[str, int]:
This property can be used to filter analysis plies
or element layers by ply type. Ply type is one of
the following values ``regular``,
``woven``, ``honeycomb core``, ``sandwich core``,
``isotropic homogeneous core``, ``orthotropic homogeneous core``,
``woven``, ``honeycomb_core``,
``isotropic_homogeneous_core``, ``orthotropic_homogeneous_core``,
``isotropic``, ``adhesive``, ``undefined``. Regular stands for uni-directional.
"""
helper_op = _create_material_container_helper_op(self._material_operators.material_provider)
Expand All @@ -232,7 +232,7 @@ def ply_types(self) -> dict[str, int]:
else:
raise RuntimeError(
"Ply types are not available in the current server version. "
"Use at least 2025 R1 pre0."
"Use at least 9.0 (2025 R1 pre0)."
)

@_deprecated_composite_definition_label
Expand Down
5 changes: 5 additions & 0 deletions src/ansys/dpf/composites/server_helpers/_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ class _DpfVersionInfo:
"2024 R2 pre 2",
"DPF Composites: Failure measure conversion preserves Reference Surface suffix",
),
"9.0": _DpfVersionInfo(
"9.0",
"2025 R1 pre 0",
"DPF Composites: exposure of ply type.",
),
}


Expand Down
8 changes: 3 additions & 5 deletions tests/composite_model_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,12 @@ def test_basic_functionality_of_composite_model(dpf_server, data_files, distribu
for mat_name in ref_material_names:
assert mat_name in mat_names.keys()

# todo: server version of the current 2025 R1 pre0 build
# is still 8.2. This should become 8.3 or 9.0 soon.
if version_equal_or_later(dpf_server, "8.2"):
if version_equal_or_later(dpf_server, "9.0"):
ref_ply_types = [
"regular",
"woven",
"honeycomb core",
"isotropic",
"honeycomb_core",
"undefined",
]
ply_types = composite_model.ply_types
assert len(ply_types) == len(ref_ply_types)
Expand Down

0 comments on commit b3369b6

Please sign in to comment.