Skip to content

Commit

Permalink
fix bug velocity unit (#1130)
Browse files Browse the repository at this point in the history
* Comment deprecated tests

* UPdate lsdyna tests for velocity units

* Remove unneeded import

* Update tests and check version for lsdyna tests
  • Loading branch information
MichaelNale authored Aug 31, 2023
1 parent 57b6b54 commit c603f27
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/test_lsdyna.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import pytest
import conftest
from ansys.dpf import core as dpf
from ansys.dpf.core.check_version import server_meet_version


@pytest.mark.skipif(
Expand Down Expand Up @@ -72,8 +73,12 @@ def test_lsdyna_generic(d3plot_files):
global_velocity_model = model.results.global_velocity().eval()

assert np.allclose(global_velocity_fc[0].data[0], global_velocity_model[0].data[0])
# assert global_velocity_fc[0].unit == "mm*Hz"
# assert global_velocity_model[0].unit == "mm*Hz"
if server_meet_version("7.1", global_velocity_op._server):
assert global_velocity_fc[0].unit == "mm/s"
assert global_velocity_model[0].unit == "mm/s"
else:
assert global_velocity_fc[0].unit == "mm*Hz"
assert global_velocity_model[0].unit == "mm*Hz"

# ------------------------------------------------- Initial Coordinates

Expand Down

0 comments on commit c603f27

Please sign in to comment.