Skip to content
Snippets Groups Projects
Commit 9406c018 authored by Jean-Baptiste Keck's avatar Jean-Baptiste Keck
Browse files

change default value for args.max_dt to np.inf

parent 4ff49e5d
No related branches found
No related tags found
1 merge request!16MPI operators
Pipeline #24511 failed
...@@ -463,10 +463,10 @@ class HysopArgParser(argparse.ArgumentParser): ...@@ -463,10 +463,10 @@ class HysopArgParser(argparse.ArgumentParser):
help=('Specify timestep instead of a number of iterations '+ help=('Specify timestep instead of a number of iterations '+
'(has priority over number of iterations).'+ '(has priority over number of iterations).'+
' This will be the initial timestep when using adaptive timestep.')) ' This will be the initial timestep when using adaptive timestep.'))
simu.add_argument('-mindt', '--min-timestep', type=float, default=None, simu.add_argument('-mindt', '--min-timestep', type=float,
dest='min_dt', default=np.finfo(np.float64).eps, dest='min_dt',
help='Enforce a minimal timestep.') help='Enforce a minimal timestep.')
simu.add_argument('-maxdt', '--max-timestep', type=float, default=None, simu.add_argument('-maxdt', '--max-timestep', type=float, default=np.inf,
dest='max_dt', dest='max_dt',
help='Enforce a maximal timestep.') help='Enforce a maximal timestep.')
simu.add_argument('-cfl', '--cfl', type=float, default=None, simu.add_argument('-cfl', '--cfl', type=float, default=None,
...@@ -519,7 +519,8 @@ class HysopArgParser(argparse.ArgumentParser): ...@@ -519,7 +519,8 @@ class HysopArgParser(argparse.ArgumentParser):
msg=('\nTimestep and number of iterations specified in the same time, ' msg=('\nTimestep and number of iterations specified in the same time, '
+ 'using timestep.') + 'using timestep.')
warnings.warn(msg, HysopArgumentWarning) warnings.warn(msg, HysopArgumentWarning)
if ((args.min_dt is not None) and (args.max_dt is not None) and (args.min_dt > args.max_dt)): if ((args.min_dt is not None) and (args.max_dt is not None)
and (args.min_dt > args.max_dt)):
msg='\nmin_dt > max_dt' msg='\nmin_dt > max_dt'
self.error(msg) self.error(msg)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment