Skip to content
Merged
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: 8 additions & 11 deletions tests/test_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_7_1,
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_8_0,
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_9_0,
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_9_1,
ReferenceCsvFiles,
)

Expand Down Expand Up @@ -1193,19 +1194,9 @@ def test_skin_layer6(self, static_simulation: post.StaticMechanicalSimulation):
],
)
def test_skin_extraction(skin, result_name, mode, simulation_str, request):
if not SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_8_0:
# Before 8.0, the solid mesh cannot be connected to the solid_to_skin
# operator. This yield incorrect results. Therefore we skip all the tests
# for older versions.
if not SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_9_1:
return

if not SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_9_0:
if is_principal(mode) and result_name == "elastic_strain":
# Principal results for elastic strain were wrong before version
# 9_0 because the strain flag was not propagated correctly
# by the skin to solid mapping operator
return

time_id = 1

simulation = request.getfixturevalue(simulation_str)
Expand Down Expand Up @@ -3825,6 +3816,12 @@ def test_averaging_per_body_nodal(
ref_data = get_ref_per_body_results_mechanical(ref_files[result], mesh)

def get_expected_label_space_by_mat_id(mat_id: int):
# mapdl_element_type_id is not part of the label space before DPF 9.1
Copy link
Contributor

@janvonrickenbach janvonrickenbach Oct 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PProfizi Agreed, I was not aware this functionality has recently been added

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@janvonrickenbach neither was I.
I edited your comment to remove the link to TFS as this is seen as a security issue. We should not link to internal Ansys services from public repositories.

if not SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_9_1:
return {
elemental_properties.material: mat_id,
"time": 1,
}
return {
elemental_properties.material: mat_id,
"mapdl_element_type_id": mat_id,
Expand Down
Loading