Skip to content
Snippets Groups Projects
Commit e55287af authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

Merge branch 'feature/sample-vorticity' into 'develop'

Feature/sample vorticity

See merge request clalescu/turtle!27
parents 043158ed c1c03726
Branches
Tags
1 merge request!27Feature/sample vorticity
Pipeline #80144 passed
...@@ -1098,6 +1098,7 @@ class DNS(_code): ...@@ -1098,6 +1098,7 @@ class DNS(_code):
particle_file.create_group('tracers0/velocity_gradient') particle_file.create_group('tracers0/velocity_gradient')
if self.dns_type in ['NSVE_Stokes_particles']: if self.dns_type in ['NSVE_Stokes_particles']:
particle_file.create_group('tracers0/momentum') particle_file.create_group('tracers0/momentum')
particle_file.create_group('tracers0/vorticity')
if self.dns_type in ['NSVEp_extra_sampling']: if self.dns_type in ['NSVEp_extra_sampling']:
particle_file.create_group('tracers0/velocity_gradient') particle_file.create_group('tracers0/velocity_gradient')
particle_file.create_group('tracers0/pressure') particle_file.create_group('tracers0/pressure')
......
...@@ -183,6 +183,20 @@ int NSVE_Stokes_particles<rnumber>::do_stats() ...@@ -183,6 +183,20 @@ int NSVE_Stokes_particles<rnumber>::do_stats()
this->ps->getLocalNbParticles(), this->ps->getLocalNbParticles(),
this->ps->get_step_idx()-1); this->ps->get_step_idx()-1);
/// sample vorticity
std::fill_n(pdata1.get(), 3*this->ps->getLocalNbParticles(), 0);
*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->template save_dataset<3>(
"tracers0",
"vorticity",
pdata0.get(),
&pdata1,
this->ps->getParticlesIndexes(),
this->ps->getLocalNbParticles(),
this->ps->get_step_idx()-1);
// deallocate temporary data array // deallocate temporary data array
delete[] pdata0.release(); delete[] pdata0.release();
delete[] pdata1.release(); delete[] pdata1.release();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment