mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Correction to plot level and index check.
This commit is contained in:
parent
53108e3459
commit
301f15139f
2 changed files with 2 additions and 2 deletions
|
|
@ -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 + 1;}
|
||||
if (level >= 0) { j = level; }
|
||||
if (found_cell) {
|
||||
data.set_value(y, x, p, j);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.at(p.coord_.at(level).cell)->id_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue