Skip to content

Commit 050ce85

Browse files
committed
black formatting
1 parent ad928ec commit 050ce85

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

mhkit/tests/river/test_io_d3d.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,15 @@ def test_turbulent_intensity(self):
371371
ucx_size = np.size(ucx["ucx"])
372372
self.assertEqual(TI_size, ucx_size)
373373

374+
def test_calculate_grid_convergence_index(self):
375+
fine_grid = np.array([1.0, 2.0, 3.0])
376+
coarse_grid = np.array([0.5, 1.5, 2.5])
377+
refinement_ratio = 2.0
378+
gci = river.io.d3d.calculate_grid_convergence_index(
379+
fine_grid, coarse_grid, refinement_ratio
380+
)
381+
assert_array_almost_equal(gci, np.array([0.2083, 0.1042, 0.0694]), decimal=3)
382+
374383

375384
if __name__ == "__main__":
376385
unittest.main()

0 commit comments

Comments
 (0)