deallog << "Before sort particle id " << particle->get_id()
<< " is in cell " << particle->get_surrounding_cell(tr)
<< " on process " << Utilities::MPI::this_mpi_process(tr.get_communicator())
- << std::flush << std::endl;
+ << std::flush << std::endl;
}
for (auto particle = particle_handler.begin(); particle != particle_handler.end(); ++particle)
deallog << "After sort particle id " << particle->get_id()
- << " is in cell " << particle->get_surrounding_cell(tr)
- << " on process " << Utilities::MPI::this_mpi_process(tr.get_communicator())
- << std::flush << std::endl;
+ << " is in cell " << particle->get_surrounding_cell(tr)
+ << " on process " << Utilities::MPI::this_mpi_process(tr.get_communicator())
+ << std::flush << std::endl;
// Move all points up by 0.5. This will change cell for particle 1, and will
// move particle 2 out of the domain. Note that we need to change the coordinate
particle_handler.sort_particles_into_subdomains_and_cells();
for (auto particle = particle_handler.begin(); particle != particle_handler.end(); ++particle)
deallog << "After shift particle id " << particle->get_id()
- << " is in cell " << particle->get_surrounding_cell(tr)
- << " on process " << Utilities::MPI::this_mpi_process(tr.get_communicator())
- << std::flush << std::endl;
+ << " is in cell " << particle->get_surrounding_cell(tr)
+ << " on process " << Utilities::MPI::this_mpi_process(tr.get_communicator())
+ << std::flush << std::endl;
}
// is possible (in particular that the order of serialization/deserialization is preserved).
tr.signals.pre_distributed_refinement.connect(std::bind(&Particles::ParticleHandler<dim,spacedim>::register_store_callback_function,
&particle_handler,
- false));
+ false));
tr.signals.post_distributed_refinement.connect(std::bind(&Particles::ParticleHandler<dim,spacedim>::register_load_callback_function,
&particle_handler,
- false));
+ false));
create_regular_particle_distribution(particle_handler,tr);
for (auto particle = particle_handler.begin(); particle != particle_handler.end(); ++particle)
deallog << "Before refinement particle id " << particle->get_id()
- << " is in cell " << particle->get_surrounding_cell(tr) << std::endl;
+ << " is in cell " << particle->get_surrounding_cell(tr) << std::endl;
// Check that all particles are moved to children
tr.refine_global(1);
for (auto particle = particle_handler.begin(); particle != particle_handler.end(); ++particle)
deallog << "After refinement particle id " << particle->get_id()
- << " is in cell " << particle->get_surrounding_cell(tr) << std::endl;
+ << " is in cell " << particle->get_surrounding_cell(tr) << std::endl;
// Reverse the refinement and check again
for (auto cell = tr.begin_active(); cell != tr.end(); ++cell)
- cell->set_coarsen_flag();
+ cell->set_coarsen_flag();
tr.execute_coarsening_and_refinement();
for (auto particle = particle_handler.begin(); particle != particle_handler.end(); ++particle)
deallog << "After coarsening particle id " << particle->get_id()
- << " is in cell " << particle->get_surrounding_cell(tr) << std::endl;
+ << " is in cell " << particle->get_surrounding_cell(tr) << std::endl;
}
deallog << "OK" << std::endl;
// When doing this, check that transferring a solution and particles during the same refinement
// is possible (in particular that the order of serialization/deserialization is preserved).
tr.signals.pre_distributed_save.connect(std::bind(&Particles::ParticleHandler<dim,spacedim>::register_store_callback_function,
- &particle_handler,
- true));
+ &particle_handler,
+ true));
// save data to archive
std::ostringstream oss;
// When doing this, check that transferring a solution and particles during the same refinement
// is possible (in particular that the order of serialization/deserialization is preserved).
tr.signals.post_distributed_load.connect(std::bind(&Particles::ParticleHandler<dim,spacedim>::register_load_callback_function,
- &particle_handler,
- true));
+ &particle_handler,
+ true));
// verify correctness of the serialization. Note that the deserialization of the
// particle handler has to happen before the triangulation (otherwise it does not know