Skip to content

Commit 7a410a1

Browse files
authored
Fix/retro tests 251.pre0 (#735)
* Fix retro with 2025.1.pre0 for test_averaging_per_nodal * Skip test_skin_extraction for 2025.1.pre0
1 parent 523c102 commit 7a410a1

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

tests/test_simulation.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_7_1,
3737
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_8_0,
3838
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_9_0,
39+
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_9_1,
3940
ReferenceCsvFiles,
4041
)
4142

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

1202-
if not SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_9_0:
1203-
if is_principal(mode) and result_name == "elastic_strain":
1204-
# Principal results for elastic strain were wrong before version
1205-
# 9_0 because the strain flag was not propagated correctly
1206-
# by the skin to solid mapping operator
1207-
return
1208-
12091200
time_id = 1
12101201

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

38273818
def get_expected_label_space_by_mat_id(mat_id: int):
3819+
# mapdl_element_type_id is not part of the label space before DPF 9.1
3820+
if not SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_9_1:
3821+
return {
3822+
elemental_properties.material: mat_id,
3823+
"time": 1,
3824+
}
38283825
return {
38293826
elemental_properties.material: mat_id,
38303827
"mapdl_element_type_id": mat_id,

0 commit comments

Comments
 (0)