Skip to content

Commit

Permalink
courant: skip an unnecessary multiplication in dt_min computation (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
pesekon2 authored Jun 4, 2024
1 parent be53622 commit 0112b1f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions smoderp2d/courant.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,7 @@ def courant(self, delta_t):

# return dt*self.max_delta_t_mult, ratio
# return min(dt,self.max_delta_t*self.max_delta_t_mult), ratio
dt_min = min(
self.max_delta_t_mult * dt,
self.max_delta_t * self.max_delta_t_mult
)
dt_min = min(dt, self.max_delta_t) * self.max_delta_t_mult
return dt_min

# pokud je courant v povolenem rozmezi
Expand Down

0 comments on commit 0112b1f

Please sign in to comment.