From e665965c6070d0fa6523e3beab6738bc4e586b39 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Fri, 19 Nov 2021 15:37:25 -0600 Subject: [PATCH] Ensure particles lost during event_calculate_xs are terminated --- src/simulation.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/simulation.cpp b/src/simulation.cpp index e29c4da25..35d76ed87 100644 --- a/src/simulation.cpp +++ b/src/simulation.cpp @@ -679,6 +679,8 @@ void transport_history_based_single_particle(Particle& p) { while (true) { p.event_calculate_xs(); + if (!p.alive()) + break; p.event_advance(); if (p.collision_distance() > p.boundary().distance) { p.event_cross_surface();