diff --git a/bfps/NavierStokes.py b/bfps/NavierStokes.py index 0eb19607221d30145fbd68d53d4fc4621af9acf8..f5b7fa4392cfa6703258d96d1603184a4a041ff3 100644 --- a/bfps/NavierStokes.py +++ b/bfps/NavierStokes.py @@ -1001,7 +1001,8 @@ class NavierStokes(_fluid_particle_base): return None def prepare_launch( self, - args = []): + args = [], + noparticles = False): opt = _code.prepare_launch(self, args = args) # with the default Lundgren forcing, I can estimate the dissipation # with nondefault forcing, figure out the amplitude for this viscosity @@ -1028,6 +1029,18 @@ class NavierStokes(_fluid_particle_base): self.name += '-QR' if len(opt.src_work_dir) == 0: opt.src_work_dir = opt.work_dir + if noparticles: + opt.nparticles = 0 + elif opt.nparticles > 0: + self.add_3D_rFFTW_field(name = 'rFFTW_acc') + self.add_interpolator( + name = 'cubic_spline', + neighbours = 1, + smoothness = 1) + self.add_particles( + integration_steps = [4], + interpolator = 'cubic_spline', + acc_name = 'rFFTW_acc') self.pars_from_namespace(opt) return opt def launch(