Commit 491e8bec authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

use new state extractor

parent fda03b15
Pipeline #20674 passed with stage
in 10 minutes and 15 seconds
......@@ -104,17 +104,15 @@ int NSVEparticlesP2P<rnumber>::do_stats()
return EXIT_SUCCESS;
// allocate temporary data array
std::unique_ptr<double[]> pdata(new double[3*this->ps->getLocalNbParticles()]);
std::unique_ptr<double[]> pdata0 = this->ps->extractParticlesState(0, 3);
std::unique_ptr<double[]> pdata1 = this->ps->extractParticlesState(3, 6);
/// sample position
std::copy(this->ps->getParticlesState(),
this->ps->getParticlesState()+3*this->ps->getLocalNbParticles(),
pdata.get());
this->particles_sample_writer_mpi->save_dataset(
"tracers0",
"position",
this->ps->getParticlesState(),
&pdata,
pdata0.get(),
&pdata0,
this->ps->getParticlesIndexes(),
this->ps->getLocalNbParticles(),
this->ps->get_step_idx()-1);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment