Apply suggestions from @paulromano

Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
Patrick Shriwise 2019-07-18 22:30:35 -05:00 committed by GitHub
parent 5b9debe542
commit 6850d4ce62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -487,16 +487,16 @@ openmc_bounding_box(const char* geom_type, const int32_t id, double* llc, double
if (gtype == "universe") {
// negative ids only apply to surfaces
if (id <= 0) { return OPENMC_E_GEOMETRY; }
const auto& u = model::universes[model::universe_map[id]];
const auto& u = model::universes[model::universe_map.at(id)];
bbox = u->bounding_box();
} else if (gtype == "cell") {
// negative ids only apply to surfaces
if (id <= 0) { return OPENMC_E_GEOMETRY; }
const auto& c = model::cells[model::cell_map[id]];
const auto& c = model::cells[model::cell_map.at(id)];
bbox = c->bounding_box();
} else if (gtype == "surface") {
if (id == 0) { return OPENMC_E_GEOMETRY; }
const auto& s = model::surfaces[model::surface_map[abs(id)]];
const auto& s = model::surfaces[model::surface_map.at(abs(id))];
bbox = s->bounding_box(id > 0);
} else {
std::stringstream msg;