Make sure time boundary doesn't prevent secondary particle creation (#3043)

This commit is contained in:
Paul Romano 2024-06-20 09:26:53 -05:00 committed by GitHub
parent 3dff03f824
commit 390005e841
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -762,13 +762,15 @@ void transport_history_based_single_particle(Particle& p)
{
while (p.alive()) {
p.event_calculate_xs();
if (!p.alive())
break;
p.event_advance();
if (p.collision_distance() > p.boundary().distance) {
p.event_cross_surface();
} else {
p.event_collide();
if (p.alive()) {
p.event_advance();
}
if (p.alive()) {
if (p.collision_distance() > p.boundary().distance) {
p.event_cross_surface();
} else if (p.alive()) {
p.event_collide();
}
}
p.event_revive_from_secondary();
}