mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Handle unbounded universe
This commit is contained in:
parent
9dec183b53
commit
f805fddb6b
1 changed files with 7 additions and 2 deletions
|
|
@ -113,8 +113,13 @@ class Universe(object):
|
|||
|
||||
@property
|
||||
def bounding_box(self):
|
||||
regions = [c.region for c in self.cells.values()]
|
||||
return openmc.Union(*regions).bounding_box
|
||||
regions = [c.region for c in self.cells.values()
|
||||
if c.region is not None]
|
||||
if regions:
|
||||
return openmc.Union(*regions).bounding_box
|
||||
else:
|
||||
# Infinite bounding box
|
||||
return openmc.Intersection().bounding_box
|
||||
|
||||
@id.setter
|
||||
def id(self, universe_id):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue