From 40ec743caff68db528eb8dbfccae75e8cdae8235 Mon Sep 17 00:00:00 2001 From: Gavin Ridley Date: Fri, 5 Mar 2021 11:10:19 -0500 Subject: [PATCH] reset coordinates in exhaustive cell search for track output --- src/geometry.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/geometry.cpp b/src/geometry.cpp index ea8892674..84b37dc1a 100644 --- a/src/geometry.cpp +++ b/src/geometry.cpp @@ -275,6 +275,10 @@ bool brute_force_find_cell(Particle& p) p.n_coord_ = 1; i_universe = model::root_universe; } + // Reset all the deeper coordinate levels. + for (int i = p.n_coord_; i < p.coord_.size(); i++) { + p.coord_[i].reset(); + } return find_cell_inner(p, nullptr); }