WIP: First version where particles that collide can be removed
Compare changes
This is the first version.
In the class p2p_merge_collisions
, when two particles are close, we save the larger index in a vector.
This vector of indexes can then be accessed using reset_merge_list
.
Then, it can be passed to delete_particles_from_indexes
of particles_system
.
The particles that have the corresponding indexes will be deleted. However, to avoid global communication, it is considered that the given indexes to delete belong to the given process or a direct neighbor.
So if we ask process p1 to delete particle of index i
, then i
must belong to p0, p1, or p2 (which is expected to be always true I guess).