mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
context manager review suggestion from @pshriwise
This commit is contained in:
parent
6c78d129c3
commit
48a3484c39
1 changed files with 6 additions and 6 deletions
|
|
@ -656,12 +656,12 @@ class DAGMCUniverse(UniverseBase):
|
|||
|
||||
@property
|
||||
def bounding_box(self):
|
||||
dagmc_file = h5py.File(self.filename)
|
||||
coords = dagmc_file['tstt']['nodes']['coordinates'][()]
|
||||
lower_left_corner = coords.min(axis=0)
|
||||
upper_right_corner = coords.max(axis=0)
|
||||
bounding_box = (lower_left_corner, upper_right_corner)
|
||||
return bounding_box
|
||||
with h5py.File(self.filename) as dagmc_file:
|
||||
coords = dagmc_file['tstt']['nodes']['coordinates'][()]
|
||||
lower_left_corner = coords.min(axis=0)
|
||||
upper_right_corner = coords.max(axis=0)
|
||||
bounding_box = (lower_left_corner, upper_right_corner)
|
||||
return bounding_box
|
||||
|
||||
@property
|
||||
def filename(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue