Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TurTLE
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
Service Desk
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
TurTLE
TurTLE
Commits
fc0d630c
There was a problem fetching the pipeline summary.
Commit
fc0d630c
authored
8 years ago
by
Cristian Lalescu
Browse files
Options
Downloads
Patches
Plain Diff
clean up PP parameter issues
parent
ab65ea34
No related branches found
No related tags found
1 merge request
!21
Bugfix/nansampling
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bfps/PP.py
+9
-51
9 additions, 51 deletions
bfps/PP.py
bfps/_base.py
+4
-3
4 additions, 3 deletions
bfps/_base.py
with
13 additions
and
54 deletions
bfps/PP.py
+
9
−
51
View file @
fc0d630c
...
@@ -359,21 +359,6 @@ class PP(_code):
...
@@ -359,21 +359,6 @@ class PP(_code):
'
--simname
'
,
'
--simname
'
,
type
=
str
,
dest
=
'
simname
'
,
type
=
str
,
dest
=
'
simname
'
,
default
=
'
test
'
)
default
=
'
test
'
)
parser
.
add_argument
(
'
-n
'
,
'
--grid-size
'
,
type
=
int
,
dest
=
'
n
'
,
default
=
32
,
metavar
=
'
N
'
,
help
=
'
code is run by default in a grid of NxNxN
'
)
for
coord
in
[
'
x
'
,
'
y
'
,
'
z
'
]:
parser
.
add_argument
(
'
--L{0}
'
.
format
(
coord
),
'
--box-length-{0}
'
.
format
(
coord
),
type
=
float
,
dest
=
'
L{0}
'
.
format
(
coord
),
default
=
2.0
,
metavar
=
'
length{0}
'
.
format
(
coord
),
help
=
'
length of the box in the {0} direction will be `length{0} x pi`
'
.
format
(
coord
))
parser
.
add_argument
(
parser
.
add_argument
(
'
--wd
'
,
'
--wd
'
,
type
=
str
,
dest
=
'
work_dir
'
,
type
=
str
,
dest
=
'
work_dir
'
,
...
@@ -384,31 +369,15 @@ class PP(_code):
...
@@ -384,31 +369,15 @@ class PP(_code):
type
=
str
,
type
=
str
,
default
=
'
single
'
)
default
=
'
single
'
)
parser
.
add_argument
(
parser
.
add_argument
(
'
--src-wd
'
,
'
--iter0
'
,
type
=
str
,
dest
=
'
src_work_dir
'
,
default
=
''
)
parser
.
add_argument
(
'
--src-simname
'
,
type
=
str
,
dest
=
'
src_simname
'
,
default
=
''
)
parser
.
add_argument
(
'
--src-iteration
'
,
type
=
int
,
type
=
int
,
dest
=
'
src_iteration
'
,
dest
=
'
iter0
'
,
default
=
0
)
default
=
0
)
parser
.
add_argument
(
parser
.
add_argument
(
'
--kMeta
'
,
'
--iter1
'
,
type
=
float
,
type
=
int
,
dest
=
'
kMeta
'
,
dest
=
'
iter1
'
,
default
=
2.0
)
default
=
0
)
parser
.
add_argument
(
'
--dtfactor
'
,
type
=
float
,
dest
=
'
dtfactor
'
,
default
=
0.5
,
help
=
'
dt is computed as DTFACTOR / N
'
)
return
None
return
None
def
particle_parser_arguments
(
def
particle_parser_arguments
(
self
,
self
,
...
@@ -493,21 +462,10 @@ class PP(_code):
...
@@ -493,21 +462,10 @@ class PP(_code):
# merge parameters if needed
# merge parameters if needed
for
k
in
self
.
pp_parameters
.
keys
():
for
k
in
self
.
pp_parameters
.
keys
():
self
.
parameters
[
k
]
=
self
.
pp_parameters
[
k
]
self
.
parameters
[
k
]
=
self
.
pp_parameters
[
k
]
if
len
(
opt
.
src_work_dir
)
==
0
:
opt
.
src_work_dir
=
os
.
path
.
realpath
(
opt
.
work_dir
)
if
type
(
opt
.
dkx
)
==
type
(
None
):
opt
.
dkx
=
2.
/
opt
.
Lx
if
type
(
opt
.
dky
)
==
type
(
None
):
opt
.
dky
=
2.
/
opt
.
Ly
if
type
(
opt
.
dkx
)
==
type
(
None
):
opt
.
dkz
=
2.
/
opt
.
Lz
if
type
(
opt
.
nx
)
==
type
(
None
):
opt
.
nx
=
opt
.
n
if
type
(
opt
.
ny
)
==
type
(
None
):
opt
.
ny
=
opt
.
n
if
type
(
opt
.
nz
)
==
type
(
None
):
opt
.
nz
=
opt
.
n
self
.
pars_from_namespace
(
opt
)
self
.
pars_from_namespace
(
opt
)
niter_out
=
self
.
get_data_file
()[
'
parameters/niter_todo
'
].
value
self
.
pp_parameters
[
'
iteration_list
'
]
=
np
.
arange
(
opt
.
iter0
,
opt
.
iter1
+
niter_out
,
niter_out
,
dtype
=
np
.
int
)
return
opt
return
opt
def
launch
(
def
launch
(
self
,
self
,
...
...
This diff is collapsed.
Click to expand it.
bfps/_base.py
+
4
−
3
View file @
fc0d630c
...
@@ -234,9 +234,10 @@ class _base(object):
...
@@ -234,9 +234,10 @@ class _base(object):
if
type
(
parameters
)
==
type
(
None
):
if
type
(
parameters
)
==
type
(
None
):
parameters
=
self
.
parameters
parameters
=
self
.
parameters
cmd_line_pars
=
vars
(
opt
)
cmd_line_pars
=
vars
(
opt
)
for
k
in
[
'
nx
'
,
'
ny
'
,
'
nz
'
]:
if
'
n
'
in
cmd_line_pars
.
keys
():
if
type
(
cmd_line_pars
[
k
])
==
type
(
None
):
for
k
in
[
'
nx
'
,
'
ny
'
,
'
nz
'
]:
cmd_line_pars
[
k
]
=
opt
.
n
if
type
(
cmd_line_pars
[
k
])
==
type
(
None
):
cmd_line_pars
[
k
]
=
opt
.
n
for
k
in
parameters
.
keys
():
for
k
in
parameters
.
keys
():
if
k
in
cmd_line_pars
.
keys
():
if
k
in
cmd_line_pars
.
keys
():
if
not
type
(
cmd_line_pars
[
k
])
==
type
(
None
):
if
not
type
(
cmd_line_pars
[
k
])
==
type
(
None
):
...
...
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