From 3d091a6cfbdb24242886e7a8d076852b8b085d4d Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Thu, 14 Jul 2022 16:51:22 +0100 Subject: [PATCH] returning Cell instead of Universe --- openmc/universe.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/openmc/universe.py b/openmc/universe.py index e46d4d0275..9931724fbb 100644 --- a/openmc/universe.py +++ b/openmc/universe.py @@ -762,12 +762,18 @@ class DAGMCUniverse(UniverseBase): return +lower_x & -upper_x & +lower_y & -upper_y & +lower_z & -upper_z def bounded_universe(self, **kwargs): - """Returns an openmc.Universe filled with this DAGMCUniverse and bounded - with a cell. Defaults to a box cell with a vacuum surface. kwargs are - passed directly to DAGMCUniverse.bounding_region()""" + """Returns an openmc.Cell that bounds the DAGMCUniverse and is filled + with the DAGMCUniverse. Defaults to a box cell with a vacuum surface. + kwargs are passed directly to DAGMCUniverse.bounding_region() + + Returns + ------- + openmc.Cell + cell filled with the DAGMCUniverse + """ bounding_cell = openmc.Cell(fill=self, region=self.bounding_region(**kwargs)) - return openmc.Universe(cells=[bounding_cell]) + return bounding_cell @classmethod def from_hdf5(cls, group):