diff --git a/bfps/cpp/full_code/NSVEcomplex_particles.cpp b/bfps/cpp/full_code/NSVEcomplex_particles.cpp index 364827cf21241f38ae37d8794868c788da3d7bad..9b910e9bb7a5aaf6b36d884858a095ff9971dffa 100644 --- a/bfps/cpp/full_code/NSVEcomplex_particles.cpp +++ b/bfps/cpp/full_code/NSVEcomplex_particles.cpp @@ -42,7 +42,6 @@ int NSVEcomplex_particles<rnumber>::initialize(void) current_p2p_computer.setEnable(this->enable_p2p); particles_inner_computer<double, long long int> current_particles_inner_computer(inner_v0); - this->enable_inner = false; current_particles_inner_computer.setEnable(enable_inner); @@ -94,7 +93,11 @@ int NSVEcomplex_particles<rnumber>::step(void) if(this->enable_vorticity_omega){ *this->tmp_vec_field = this->fs->cvorticity->get_cdata(); this->tmp_vec_field->ift(); - this->ps->completeLoopWithVorticity(this->dt, *this->tmp_vec_field); + std::unique_ptr<double[]> sampled_vorticity(new double[3*this->ps->getLocalNbParticles()]); + std::fill_n(sampled_vorticity.get(), 3*this->ps->getLocalNbParticles(), 0); + this->ps->sample_compute_field(*this->tmp_vec_field, sampled_vorticity.get()); + DEBUG_MSG("sampled vorticity is %g\n", sampled_vorticity[0]); + this->ps->completeLoopWithVorticity(this->dt, sampled_vorticity.get()); } else{ this->ps->completeLoop(this->dt);