Commit db4271b5 authored by Chichi Lalescu's avatar Chichi Lalescu
Browse files

Merge branch 'bugfix/NSVE-parameters' into develop

parents 8c388633 d6c14d77
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment