From 76c5b3476fb88c876f5c0b2140a4cd6217302401 Mon Sep 17 00:00:00 2001 From: Cristian C Lalescu <Cristian.Lalescu@ds.mpg.de> Date: Wed, 21 Jun 2017 15:54:52 +0200 Subject: [PATCH] make tracers sample accelerations as well --- bfps/DNS.py | 1 + bfps/cpp/full_code/NSVEparticles.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bfps/DNS.py b/bfps/DNS.py index f9cf92c4..4f26b86c 100644 --- a/bfps/DNS.py +++ b/bfps/DNS.py @@ -918,6 +918,7 @@ class DNS(_code): if not os.path.exists(self.get_particle_file_name()): with h5py.File(self.get_particle_file_name(), 'w') as particle_file: particle_file.create_group('tracers0/velocity') + particle_file.create_group('tracers0/acceleration') self.run( nb_processes = opt.nb_processes, nb_threads_per_process = opt.nb_threads_per_process, diff --git a/bfps/cpp/full_code/NSVEparticles.cpp b/bfps/cpp/full_code/NSVEparticles.cpp index 6e6fd0f5..ba84b394 100644 --- a/bfps/cpp/full_code/NSVEparticles.cpp +++ b/bfps/cpp/full_code/NSVEparticles.cpp @@ -86,8 +86,13 @@ int NSVEparticles<rnumber>::do_stats() ); /// compute acceleration and sample it - this->fs->compute_Lagrangian_acceleration(this->tmp_vec_field); + this->tmp_vec_field->ift(); + sample_from_particles_system(*this->tmp_vec_field, + this->ps, + (this->simname + "_particles.h5"), + "tracers0", + "acceleration"); return EXIT_SUCCESS; } -- GitLab