11import os .path
22
33import ansys .dpf .core as core
4+ from conftest import SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_5_0
45import numpy as np
56import pytest
67from pytest import fixture
@@ -430,6 +431,10 @@ def test_structural_temperature_elemental(self, static_simulation):
430431 assert field .data .shape == (12 ,)
431432 assert np .allclose (field .data , field_ref .data )
432433
434+ @pytest .mark .skipif (
435+ not SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_5_0 ,
436+ reason = "Available starting DPF 5.0" ,
437+ )
433438 def test_element_nodal_forces (self , allkindofcomplexity ):
434439 static_simulation = post .load_simulation (data_sources = allkindofcomplexity )
435440 element_nodal_forces = static_simulation .element_nodal_forces ()
@@ -442,6 +447,10 @@ def test_element_nodal_forces(self, allkindofcomplexity):
442447 assert field .data .shape == (103766 , 3 )
443448 assert np .allclose (field .data , field_ref .data )
444449
450+ @pytest .mark .skipif (
451+ not SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_5_0 ,
452+ reason = "Available starting DPF 5.0" ,
453+ )
445454 def test_element_nodal_forces_nodal (self , allkindofcomplexity ):
446455 static_simulation = post .load_simulation (data_sources = allkindofcomplexity )
447456 element_nodal_forces = static_simulation .element_nodal_forces_nodal ()
@@ -455,6 +464,10 @@ def test_element_nodal_forces_nodal(self, allkindofcomplexity):
455464 assert field .data .shape == (14982 , 3 )
456465 assert np .allclose (field .data , field_ref .data )
457466
467+ @pytest .mark .skipif (
468+ not SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_5_0 ,
469+ reason = "Available starting DPF 5.0" ,
470+ )
458471 def test_element_nodal_forces_elemental (self , allkindofcomplexity ):
459472 static_simulation = post .load_simulation (data_sources = allkindofcomplexity )
460473 element_nodal_forces = static_simulation .element_nodal_forces_elemental ()
@@ -974,6 +987,10 @@ def test_structural_temperature_elemental(self, transient_simulation):
974987 assert field .component_count == 1
975988 assert np .allclose (field .data , field_ref .data )
976989
990+ @pytest .mark .skipif (
991+ not SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_5_0 ,
992+ reason = "Available starting DPF 5.0" ,
993+ )
977994 def test_element_nodal_forces (self , allkindofcomplexity ):
978995 transient_simulation = post .load_simulation (
979996 data_sources = allkindofcomplexity ,
@@ -988,6 +1005,10 @@ def test_element_nodal_forces(self, allkindofcomplexity):
9881005 assert field .component_count == 3
9891006 assert np .allclose (field .data , field_ref .data )
9901007
1008+ @pytest .mark .skipif (
1009+ not SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_5_0 ,
1010+ reason = "Available starting DPF 5.0" ,
1011+ )
9911012 def test_element_nodal_forces_nodal (self , allkindofcomplexity ):
9921013 transient_simulation = post .load_simulation (
9931014 data_sources = allkindofcomplexity ,
@@ -1003,6 +1024,10 @@ def test_element_nodal_forces_nodal(self, allkindofcomplexity):
10031024 assert field .component_count == 3
10041025 assert np .allclose (field .data , field_ref .data )
10051026
1027+ @pytest .mark .skipif (
1028+ not SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_5_0 ,
1029+ reason = "Available starting DPF 5.0" ,
1030+ )
10061031 def test_element_nodal_forces_elemental (self , allkindofcomplexity ):
10071032 transient_simulation = post .load_simulation (
10081033 data_sources = allkindofcomplexity ,
@@ -1126,6 +1151,10 @@ def test_reaction_force(self, allkindofcomplexity):
11261151 assert field .component_count == 3
11271152 assert np .allclose (field .data , field_ref .data )
11281153
1154+ @pytest .mark .skipif (
1155+ not SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_5_0 ,
1156+ reason = "Available starting DPF 5.0" ,
1157+ )
11291158 def test_element_nodal_forces (self , allkindofcomplexity ):
11301159 modal_simulation = post .load_simulation (
11311160 data_sources = allkindofcomplexity ,
@@ -1140,6 +1169,10 @@ def test_element_nodal_forces(self, allkindofcomplexity):
11401169 assert field .component_count == 3
11411170 assert np .allclose (field .data , field_ref .data )
11421171
1172+ @pytest .mark .skipif (
1173+ not SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_5_0 ,
1174+ reason = "Available starting DPF 5.0" ,
1175+ )
11431176 def test_element_nodal_forces_nodal (self , allkindofcomplexity ):
11441177 modal_simulation = post .load_simulation (
11451178 data_sources = allkindofcomplexity ,
@@ -1155,6 +1188,10 @@ def test_element_nodal_forces_nodal(self, allkindofcomplexity):
11551188 assert field .component_count == 3
11561189 assert np .allclose (field .data , field_ref .data )
11571190
1191+ @pytest .mark .skipif (
1192+ not SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_5_0 ,
1193+ reason = "Available starting DPF 5.0" ,
1194+ )
11581195 def test_element_nodal_forces_elemental (self , allkindofcomplexity ):
11591196 modal_simulation = post .load_simulation (
11601197 data_sources = allkindofcomplexity ,
@@ -1582,6 +1619,10 @@ def test_reaction_force(self, allkindofcomplexity):
15821619 assert field .component_count == 3
15831620 assert np .allclose (field .data , field_ref .data )
15841621
1622+ @pytest .mark .skipif (
1623+ not SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_5_0 ,
1624+ reason = "Available starting DPF 5.0" ,
1625+ )
15851626 def test_element_nodal_forces (self , allkindofcomplexity ):
15861627 harmonic_simulation = post .load_simulation (
15871628 data_sources = allkindofcomplexity ,
@@ -1596,6 +1637,10 @@ def test_element_nodal_forces(self, allkindofcomplexity):
15961637 assert field .component_count == 3
15971638 assert np .allclose (field .data , field_ref .data )
15981639
1640+ @pytest .mark .skipif (
1641+ not SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_5_0 ,
1642+ reason = "Available starting DPF 5.0" ,
1643+ )
15991644 def test_element_nodal_forces_nodal (self , allkindofcomplexity ):
16001645 harmonic_simulation = post .load_simulation (
16011646 data_sources = allkindofcomplexity ,
@@ -1611,6 +1656,10 @@ def test_element_nodal_forces_nodal(self, allkindofcomplexity):
16111656 assert field .component_count == 3
16121657 assert np .allclose (field .data , field_ref .data )
16131658
1659+ @pytest .mark .skipif (
1660+ not SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_5_0 ,
1661+ reason = "Available starting DPF 5.0" ,
1662+ )
16141663 def test_element_nodal_forces_elemental (self , allkindofcomplexity ):
16151664 harmonic_simulation = post .load_simulation (
16161665 data_sources = allkindofcomplexity ,
0 commit comments