From 9c62259645cf6f1e8977f67f4bd17c6e96613039 Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Wed, 2 Sep 2020 23:27:43 -0500 Subject: [PATCH] Adjusting the level value. --- include/openmc/plot.h | 2 +- src/plot.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/openmc/plot.h b/include/openmc/plot.h index e7682d7d52..c5397a3e3c 100644 --- a/include/openmc/plot.h +++ b/include/openmc/plot.h @@ -184,7 +184,7 @@ T PlotBase::get_map() const { // local variables bool found_cell = find_cell(p, 0); j = p.n_coord_ - 1; - if (level >= 0) {j = level;} + if (level >= 0) {j = level + 1;} if (found_cell) { data.set_value(y, x, p, j); } diff --git a/src/plot.cpp b/src/plot.cpp index 2baf0e74cd..e1261e44e3 100644 --- a/src/plot.cpp +++ b/src/plot.cpp @@ -42,7 +42,7 @@ IdData::IdData(size_t h_res, size_t v_res) void IdData::set_value(size_t y, size_t x, const Particle& p, int level) { // set cell data - if (p.n_coord_ <= level) { + if (p.n_coord_ < level) { data_(y, x, 0) = NOT_FOUND; } else { data_(y, x, 0) = model::cells[p.coord_[level].cell]->id_;