Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jtgrasb committed Oct 26, 2023
1 parent 1516665 commit 4d83240
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def hydro_data(bem_data):
in addition to the coefficients in `bem_data`."""
ndof = len(bem_data.influenced_dof)
friction = np.ones([ndof, ndof])
data = wot.linear_hydrodynamics(
data = wot.add_linear_friction(
bem_data, friction
)
return data
Expand Down Expand Up @@ -1303,12 +1303,12 @@ def test_round_trip(self, bem_data, data_back):


class TestLinearHydrodynamics:
"""Test function :python:`linear_hydrodynamics`."""
"""Test function :python:`add_linear_friction`."""

def test_values(self, bem_data, hydro_data):
"""Test the function returns expected values."""
mat = np.array([[1, 1], [1, 1]])
calculated = wot.linear_hydrodynamics(bem_data, mat)
calculated = wot.add_linear_friction(bem_data, mat)
xr.testing.assert_allclose(calculated, hydro_data)


Expand Down
4 changes: 2 additions & 2 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def wec_from_impedance(bem, pto, fb):
@pytest.fixture(scope='module')
def resonant_wave(f1, nfreq, fb, bem):
"""Regular wave at natural frequency of the WEC"""
hd = wot.linear_hydrodynamics(bem)
hd = wot.add_linear_friction(bem)
Zi = wot.hydrodynamic_impedance(hd)
wn = Zi['omega'][np.abs(Zi).argmin(dim='omega')].item()
waves = wot.waves.regular_wave(f1, nfreq, freq=wn/2/np.pi, amplitude=0.1)
Expand Down Expand Up @@ -234,7 +234,7 @@ def hstiff(self, fb):
@pytest.fixture(scope='class')
def hydro_impedance(self, bem):
"""Intrinsic hydrodynamic impedance"""
hd = wot.linear_hydrodynamics(bem)
hd = wot.add_linear_friction(bem)
hd = wot.check_linear_damping(hd)
Zi = wot.hydrodynamic_impedance(hd)
return Zi
Expand Down

0 comments on commit 4d83240

Please sign in to comment.