mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Apply suggestions from @paulromano
Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
5b9debe542
commit
6850d4ce62
2 changed files with 4 additions and 4 deletions
|
|
@ -102,7 +102,7 @@ def bounding_box(geom_type, geom_id):
|
|||
geom_type : str
|
||||
Type of geometry object. One of ('surface', 'cell', 'universe')
|
||||
geom_id : int
|
||||
Id of the object. Can be positive or negative for surfaces.
|
||||
ID of the object. Can be positive or negative for surfaces.
|
||||
"""
|
||||
geomt = c_char_p(geom_type.encode())
|
||||
llc = np.zeros(3)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue