# HG changeset patch # User calpe <miguel.calpe.linares@gmail.com> # Date 1538638978 -7200 # Thu Oct 04 09:42:58 2018 +0200 # Node ID e6653ef320349320e4422161eb970d036b8faec5 # Parent 569c19bde2caf0371a1dba59968a36ac6c08e9d1 Implement coef_group=None in time_stepping. diff --git a/fluidsim/solvers/ns2d/strat/time_stepping.py b/fluidsim/solvers/ns2d/strat/time_stepping.py --- a/fluidsim/solvers/ns2d/strat/time_stepping.py +++ b/fluidsim/solvers/ns2d/strat/time_stepping.py @@ -166,12 +166,19 @@ # ) # Removed phase velocity (considered not relevant) - maybe_new_dt = min( - deltat_CFL, - self.deltat_dispersion_relation, - self.deltat_group_vel, - self.deltat_max, - ) + if not self.coef_group: + maybe_new_dt = min( + deltat_CFL, + self.deltat_dispersion_relation, + self.deltat_max, + ) + else: + maybe_new_dt = min( + deltat_CFL, + self.deltat_dispersion_relation, + self.deltat_group_vel, + self.deltat_max, + ) if self.params.forcing.enable: