84 System::System &system, std::vector<CollisionPair> &local_collision_queue) {
87 auto const &box_geo = *system.
box_geo;
98 auto const global_max_seen_particle = boost::mpi::all_reduce(
99 ::comm_cart, cell_structure.get_max_local_particle_id(),
100 boost::mpi::maximum<int>());
102 int current_vs_pid = global_max_seen_particle + 1;
105 for (
auto &c : global_collision_queue) {
108 Particle *p1 = cell_structure.get_local_particle(c.first);
109 Particle *p2 = cell_structure.get_local_particle(c.second);
131 auto const vec21 = box_geo.get_mi_vector(p1->
pos(), p2->
pos());
138 min_global_cut, current_vs_pid, pos,
142 p1 = cell_structure.get_local_particle(c.first);
143 p2 = cell_structure.get_local_particle(c.second);
148 handle_particle(p1, pos1);
152 handle_particle(p2, pos2);
158 if (n_partners == 1) {
160 const int bondG[] = {current_vs_pid - 2};
162 if (
auto p = cell_structure.get_local_particle(current_vs_pid - 1))
165 if (n_partners == 2) {
167 const int bondG[] = {c.first, c.second};
169 if (
auto p = cell_structure.get_local_particle(current_vs_pid - 1))
171 if (
auto p = cell_structure.get_local_particle(current_vs_pid - 2))
176#ifdef ADDITIONAL_CHECKS
178 "Nodes disagree about current_vs_pid");
182 if (not global_collision_queue.empty()) {
184 cell_structure.update_ghosts_and_resort_particle(
void place_vs_and_relate_to_particle(CellStructure &cell_structure, BoxGeometry const &box_geo, int const part_type_vs, double const min_global_cut, int const current_vs_pid, Utils::Vector3d const &pos, int const relate_to)
Struct holding all information for one particle.
auto const & bonds() const
void set_can_rotate_all_axes()