Skip to content
Snippets Groups Projects
Commit 11f4c388 authored by Chichi Lalescu's avatar Chichi Lalescu
Browse files

sample vorticity at particle locations

parent fb6eb882
No related branches found
No related tags found
1 merge request!23WIP: Feature/use cmake
Pipeline #
......@@ -910,6 +910,7 @@ class DNS(_code):
particle_file.create_group('tracers0/acceleration')
if self.dns_type in ['NSVEparticlesP2P']:
particle_file.create_group('tracers0/orientation')
particle_file.create_group('tracers0/vorticity')
return None
def launch_jobs(
self,
......
......@@ -90,7 +90,7 @@ int NSVEparticlesP2P<rnumber>::finalize(void)
return EXIT_SUCCESS;
}
/** \brief Compute fluid stats and sample fields at particle locations.
/** \brief Compute fluid stats and sample particle data.
*/
template <typename rnumber>
......@@ -128,29 +128,42 @@ int NSVEparticlesP2P<rnumber>::do_stats()
this->ps->getLocalNbParticles(),
this->ps->get_step_idx()-1);
///// sample velocity
//this->ps->sample_compute_field(*this->tmp_vec_field, pdata.get());
//this->particles_sample_writer_mpi->save_dataset(
// "tracers0",
// "velocity",
// this->ps->getParticlesState(),
// &pdata,
// this->ps->getParticlesIndexes(),
// this->ps->getLocalNbParticles(),
// this->ps->get_step_idx()-1);
///// compute acceleration and sample it
//this->fs->compute_Lagrangian_acceleration(this->tmp_vec_field);
//this->tmp_vec_field->ift();
//this->ps->sample_compute_field(*this->tmp_vec_field, pdata.get());
//this->particles_sample_writer_mpi->save_dataset(
// "tracers0",
// "acceleration",
// this->ps->getParticlesState(),
// &pdata,
// this->ps->getParticlesIndexes(),
// this->ps->getLocalNbParticles(),
// this->ps->get_step_idx()-1);
/// sample velocity
this->ps->sample_compute_field(*this->tmp_vec_field, pdata1.get());
this->particles_sample_writer_mpi->save_dataset(
"tracers0",
"velocity",
pdata0.get(),
&pdata1,
this->ps->getParticlesIndexes(),
this->ps->getLocalNbParticles(),
this->ps->get_step_idx()-1);
/// sample vorticity
*this->tmp_vec_field = this->fs->cvorticity->get_cdata();
this->tmp_vec_field->ift();
this->ps->sample_compute_field(*this->tmp_vec_field, pdata1.get());
this->particles_sample_writer_mpi->save_dataset(
"tracers0",
"vorticity",
pdata0.get(),
&pdata1,
this->ps->getParticlesIndexes(),
this->ps->getLocalNbParticles(),
this->ps->get_step_idx()-1);
/// compute acceleration and sample it
this->fs->compute_Lagrangian_acceleration(this->tmp_vec_field);
this->tmp_vec_field->ift();
this->ps->sample_compute_field(*this->tmp_vec_field, pdata1.get());
this->particles_sample_writer_mpi->save_dataset(
"tracers0",
"acceleration",
pdata0.get(),
&pdata1,
this->ps->getParticlesIndexes(),
this->ps->getLocalNbParticles(),
this->ps->get_step_idx()-1);
return EXIT_SUCCESS;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment