mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Using default constructor when returning unbounded boxes.
This commit is contained in:
parent
6d97188413
commit
07c9083446
2 changed files with 6 additions and 6 deletions
|
|
@ -207,9 +207,9 @@ Universe::to_hdf5(hid_t universes_group) const
|
|||
}
|
||||
|
||||
BoundingBox Universe::bounding_box() const {
|
||||
BoundingBox bbox = {INFTY, -INFTY, INFTY, -INFTY, INFTY, -INFTY};
|
||||
BoundingBox bbox;
|
||||
if (cells_.size() == 0) {
|
||||
bbox = {-INFTY, INFTY, -INFTY, -INFTY, INFTY};
|
||||
return {};
|
||||
} else {
|
||||
for (const auto& cell : cells_) {
|
||||
auto& c = model::cells[cell];
|
||||
|
|
|
|||
|
|
@ -653,7 +653,7 @@ BoundingBox SurfaceXCylinder::bounding_box(bool pos_side) const {
|
|||
if (!pos_side) {
|
||||
return {-INFTY, INFTY, y0_ - radius_, y0_ + radius_, z0_ - radius_, z0_ + radius_};
|
||||
} else {
|
||||
return {-INFTY, INFTY, -INFTY, INFTY, -INFTY, INFTY};
|
||||
return {};
|
||||
}
|
||||
}
|
||||
//==============================================================================
|
||||
|
|
@ -693,7 +693,7 @@ BoundingBox SurfaceYCylinder::bounding_box(bool pos_side) const {
|
|||
if (!pos_side) {
|
||||
return {x0_ - radius_, x0_ + radius_, -INFTY, INFTY, z0_ - radius_, z0_ + radius_};
|
||||
} else {
|
||||
return {-INFTY, INFTY, -INFTY, INFTY, -INFTY, INFTY};
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -734,7 +734,7 @@ BoundingBox SurfaceZCylinder::bounding_box(bool pos_side) const {
|
|||
if (!pos_side) {
|
||||
return {x0_ - radius_, x0_ + radius_, y0_ - radius_, y0_ + radius_, -INFTY, INFTY};
|
||||
} else {
|
||||
return {-INFTY, INFTY, -INFTY, INFTY, -INFTY, INFTY};
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -813,7 +813,7 @@ BoundingBox SurfaceSphere::bounding_box(bool pos_side) const {
|
|||
y0_ - radius_, y0_ + radius_,
|
||||
z0_ - radius_, z0_ + radius_};
|
||||
} else {
|
||||
return {-INFTY, INFTY, -INFTY, INFTY, -INFTY, INFTY};
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue