Skip to content

Add alternate "delete/filter particles" functionality

Cristian Lalescu requested to merge feature/particle_index_output into develop

The final purpose of this merge request is to have "delete particles" functionality. In practice, this requires some careful handling of particle indices and labels --- these are now two distinct numbers.

So here I add

  1. A method to output particle labels.
  2. A method to "filter" particles, i.e.:
  • create a small list of interesting particles, that can be shared among MPI processes, then either
  • delete particles on the list, or
  • keep only particles on the list.

We already had a version of "keep only particles on the list" functionality, to enable field sampling on a small subset of particles. Now I tried to reverse the functionality to delete these particles.

The "delete" functionality is a bit more complicated, since labels need to be remembered.

I therefore added new "label" data to particle sets, and we need to test if the current implementation is working correctly. And we should see if it's possible to keep labels forever.

Edited by Cristian Lalescu

Merge request reports