Skip to content

Commit 8126d2d

Browse files
committed
tol adapdable
1 parent ae558cc commit 8126d2d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/mmgdynamics/dynamics.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ def mmg_dynamics(t: np.ndarray, X: np.ndarray, params: dict,
249249
def step(X: np.ndarray,params: dict, sps: float, nps_old: float,
250250
delta_old: float, fl_psi: float, fl_vel: Optional[float] = None,
251251
water_depth: Optional[float] = None, debug: bool = False,
252+
atol: float = 1e-5, rtol: float = 1e-5,
252253
**sol_options # Additional options (see help(solve_ivp))
253254
)->Any:
254255
"""Solve the MMG system for a given vessel for an arbitrarily long timestep
@@ -294,8 +295,8 @@ def step(X: np.ndarray,params: dict, sps: float, nps_old: float,
294295
sps, fl_psi,fl_vel,
295296
nps_old, delta_old),
296297
method="RK45",
297-
rtol = 1e-5,
298-
atol=1e-5,
298+
rtol = rtol,
299+
atol = atol,
299300
**sol_options
300301
)
301302

0 commit comments

Comments
 (0)