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): ...@@ -364,8 +364,9 @@ class DNS(_code):
particle_ic = None): particle_ic = None):
assert (self.parameters['niter_todo'] % self.parameters['niter_stat'] == 0) 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_out'] == 0)
assert (self.parameters['niter_todo'] % self.parameters['niter_part'] == 0)
assert (self.parameters['niter_out'] % self.parameters['niter_stat'] == 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) assert (self.parameters['niter_out'] % self.parameters['niter_part'] == 0)
_code.write_par(self, iter0 = iter0) _code.write_par(self, iter0 = iter0)
with h5py.File(self.get_data_file_name(), 'r+') as ofile: with h5py.File(self.get_data_file_name(), 'r+') as ofile:
...@@ -786,6 +787,7 @@ class DNS(_code): ...@@ -786,6 +787,7 @@ class DNS(_code):
f['vorticity/complex/{0}'.format(0)] = data f['vorticity/complex/{0}'.format(0)] = data
f.close() f.close()
# take care of particles' initial condition # take care of particles' initial condition
if self.dns_type == 'NSVEp':
if opt.pclouds > 1: if opt.pclouds > 1:
np.random.seed(opt.particle_rand_seed) np.random.seed(opt.particle_rand_seed)
if opt.pcloud_type == 'random-cube': if opt.pcloud_type == 'random-cube':
...@@ -810,6 +812,7 @@ class DNS(_code): ...@@ -810,6 +812,7 @@ class DNS(_code):
particle_initial_condition[..., 2] += onedarray[None, :, None, None] particle_initial_condition[..., 2] += onedarray[None, :, None, None]
self.write_par( self.write_par(
particle_ic = particle_initial_condition) particle_ic = particle_initial_condition)
if self.dns_type == 'NSVEp':
if self.parameters['nparticles'] > 0: if self.parameters['nparticles'] > 0:
data = self.generate_tracer_state( data = self.generate_tracer_state(
species = 0, species = 0,
......
Supports Markdown
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