celeritas
celeritas copied to clipboard
Implement on-device error reporting
With https://github.com/celeritas-project/celeritas/pull/685 we have the first case of detecting and killing a particle due to an erroneous condition. We'll probably have other cases (surface crossings, convergence issues, ...) that might stop a particle before its time, and rather than doing something arbitrary like removing or depositing its energy, we should alert the user like Geant4 does. We might consider allowing a set of action IDs that are flagged as error conditions, and before the secondary creation step (where killed tracks are destroyed) we dump the state of those tracks to CPU and display them.