Skip to content

Commit

Permalink
Make sure time boundary doesn't prevent secondary particle creation (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
paulromano authored Jun 20, 2024
1 parent 3dff03f commit 390005e
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/simulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 390005e

Please sign in to comment.