From f805fddb6b2efd4ff44b3c491448ddccd57294ad Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Thu, 9 Mar 2017 15:48:23 -0600 Subject: [PATCH] Handle unbounded universe --- openmc/universe.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/openmc/universe.py b/openmc/universe.py index 71bb2ab624..0d5b8395a5 100644 --- a/openmc/universe.py +++ b/openmc/universe.py @@ -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):