Skip to content

Commit

Permalink
Avoid issue with FP imprecision in --tmax handling
Browse files Browse the repository at this point in the history
  • Loading branch information
yut23 committed Feb 21, 2025
1 parent 6ff24e5 commit ced31a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Exec/science/flame_wave/analysis/front_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ def getall(self, globmax):

def process_dataset(fname: str, args: Any) -> tuple[float, Metrics] | tuple[None, None]:
ds = load_dataset(fname)
if args.tmax is not None and ds.current_time > args.tmax:
if args.tmax is not None and ds.current_time > args.tmax + 1e-6:
return None, None
return ds.current_time, Metrics(ds, args)

Expand Down

0 comments on commit ced31a2

Please sign in to comment.