From 1aa7abd7fa5c4e3047bb4d768a8d4a4cbfe1de0e Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Wed, 12 Jun 2019 15:32:37 -0500 Subject: [PATCH] Moving some comments. --- src/cell.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cell.cpp b/src/cell.cpp index 17ad62c88c..7914e9e615 100644 --- a/src/cell.cpp +++ b/src/cell.cpp @@ -1,3 +1,4 @@ + #include "openmc/cell.h" #include @@ -616,7 +617,8 @@ DAGCell::DAGCell() : Cell{} {}; std::pair DAGCell::distance(Position r, Direction u, int32_t on_surface) const { - // if we've changed direction, reset the history and update last direction + // if we've changed direction or we're not on a surface, + // reset the history and update last direction if (u != last_dir || on_surface == 0) { history.reset(); last_dir = u; @@ -633,7 +635,8 @@ DAGCell::distance(Position r, Direction u, int32_t on_surface) const int surf_idx; if (hit_surf != 0) { surf_idx = dagmc_ptr_->index_by_handle(hit_surf); - } else { // indicate that particle is lost + } else { + // indicate that particle is lost surf_idx = -1; dist = INFINITY; }