Skip to content

Commit c107a5d

Browse files
Updating tolerances for RK2 unit tests
1 parent 4be9a2b commit c107a5d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/test_advection.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@ def test_radialrotation(npart=10):
265265
("EE", 1e-2),
266266
("AdvDiffEM", 1e-2),
267267
("AdvDiffM1", 1e-2),
268-
("RK2", 1e-5),
269-
("RK2_3D", 1e-5),
268+
("RK2", 6e-5),
269+
("RK2_3D", 6e-5),
270270
("RK4", 1e-5),
271271
("RK4_3D", 1e-5),
272272
("RK45", 1e-4),
@@ -277,7 +277,7 @@ def test_moving_eddy(method, rtol):
277277
grid = XGrid.from_dataset(ds)
278278
U = Field("U", ds["U"], grid, interp_method=XLinear)
279279
V = Field("V", ds["V"], grid, interp_method=XLinear)
280-
if method == "RK4_3D":
280+
if method in ["RK2_3D", "RK4_3D"]:
281281
# Using W to test 3D advection (assuming same velocity as V)
282282
W = Field("W", ds["V"], grid, interp_method=XLinear)
283283
UVW = VectorField("UVW", U, V, W)
@@ -318,7 +318,7 @@ def truth_moving(x_0, y_0, t):
318318
"method, rtol",
319319
[
320320
("EE", 1e-1),
321-
("RK2", 1e-5),
321+
("RK2", 3e-3),
322322
("RK4", 1e-5),
323323
("RK45", 1e-4),
324324
],
@@ -404,7 +404,7 @@ def UpdateP(particles, fieldset): # pragma: no cover
404404
@pytest.mark.parametrize(
405405
"method, rtol",
406406
[
407-
("RK2", 5e-3),
407+
("RK2", 2e-2),
408408
("RK4", 5e-3),
409409
("RK45", 1e-4),
410410
],

0 commit comments

Comments
 (0)