Open ax3l opened 10 years ago
There is a policy that can be passed to the ParticleDescription
struct. This is e.g. PMacc::HandleGuardRegion
where leaving particles can be handled in a functor. This could then store the particles somewhere else or convert them to a "leaving" species that can then periodically be collected by a plugin.
thx!
my idea is: we move the leaving particles in each time step to an additional species (per species), called "species_leaving". It has the additional scalar record ("attribute") "tleft" that is filled with the time step the particle was moved to that (not interacting, "leaving"/"dead") species.
The output (hdf5/adios) plugins can now do the following: also dump this species (since the last dump), e.g., vectorAllLeavingSpecies.
This does not yet solve if online plugins want to access them over all time steps (because that might become memory heavy in the outer GPUs) but already is a major step forward in post-processing.
hm.... dead would be an appropriate naming, too. could also be used for absorbed/annihilated particles inside the box.
Heikman found a solution in his new calorimeter plugin #1376 that can be a very useful alternative for many other plugins (such as energy histograms, etc.):
Use in PIConGPU an new HandleGuardRegion
in ParticleDescription
as described above that does:
IPlugin
method, maybe called onParticleLeave
For futher plugins to support leaving particles, they simply have to add this onParticleLeave
method hook.
For non-moving window simulations, particle histograms with particles that leave the box can look quite awkward if some particles leave the box over time.
An idea could be to keep book of particles that leave the box (thx for the idea Peter Hilz).
Alternatively, one could add, for specific plugins like the histogram, a separate histogram that stores the influence of "lost" particles.
Status
#1394