Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
hysop
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
particle_methods
hysop
Commits
9406c018
Commit
9406c018
authored
5 years ago
by
Jean-Baptiste Keck
Browse files
Options
Downloads
Patches
Plain Diff
change default value for args.max_dt to np.inf
parent
4ff49e5d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!16
MPI operators
Pipeline
#24511
failed
5 years ago
Stage: env
Stage: configure
Stage: build
Stage: install
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/example_utils.py
+5
-4
5 additions, 4 deletions
examples/example_utils.py
with
5 additions
and
4 deletions
examples/example_utils.py
+
5
−
4
View file @
9406c018
...
@@ -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
=
(
'
\n
Timestep and number of iterations specified in the same time,
'
msg
=
(
'
\n
Timestep 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
=
'
\n
min_dt > max_dt
'
msg
=
'
\n
min_dt > max_dt
'
self
.
error
(
msg
)
self
.
error
(
msg
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment