Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TurTLE
TurTLE
Commits
db4271b5
Commit
db4271b5
authored
May 06, 2017
by
Chichi Lalescu
Browse files
Merge branch 'bugfix/NSVE-parameters' into develop
parents
8c388633
d6c14d77
Changes
1
Show whitespace changes
Inline
Side-by-side
bfps/DNS.py
View file @
db4271b5
...
...
@@ -364,8 +364,9 @@ class DNS(_code):
particle_ic
=
None
):
assert
(
self
.
parameters
[
'niter_todo'
]
%
self
.
parameters
[
'niter_stat'
]
==
0
)
assert
(
self
.
parameters
[
'niter_todo'
]
%
self
.
parameters
[
'niter_out'
]
==
0
)
assert
(
self
.
parameters
[
'niter_todo'
]
%
self
.
parameters
[
'niter_part'
]
==
0
)
assert
(
self
.
parameters
[
'niter_out'
]
%
self
.
parameters
[
'niter_stat'
]
==
0
)
if
self
.
dns_type
==
'NSVEp'
:
assert
(
self
.
parameters
[
'niter_todo'
]
%
self
.
parameters
[
'niter_part'
]
==
0
)
assert
(
self
.
parameters
[
'niter_out'
]
%
self
.
parameters
[
'niter_part'
]
==
0
)
_code
.
write_par
(
self
,
iter0
=
iter0
)
with
h5py
.
File
(
self
.
get_data_file_name
(),
'r+'
)
as
ofile
:
...
...
@@ -786,6 +787,7 @@ class DNS(_code):
f
[
'vorticity/complex/{0}'
.
format
(
0
)]
=
data
f
.
close
()
# take care of particles' initial condition
if
self
.
dns_type
==
'NSVEp'
:
if
opt
.
pclouds
>
1
:
np
.
random
.
seed
(
opt
.
particle_rand_seed
)
if
opt
.
pcloud_type
==
'random-cube'
:
...
...
@@ -810,6 +812,7 @@ class DNS(_code):
particle_initial_condition
[...,
2
]
+=
onedarray
[
None
,
:,
None
,
None
]
self
.
write_par
(
particle_ic
=
particle_initial_condition
)
if
self
.
dns_type
==
'NSVEp'
:
if
self
.
parameters
[
'nparticles'
]
>
0
:
data
=
self
.
generate_tracer_state
(
species
=
0
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment