From 945b80f8fdf492a9262887a030d518bad969ea31 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 6 Apr 2020 13:24:20 -0500 Subject: [PATCH] Address most @pshriwise comments on #1538 --- openmc/mgxs/mgxs.py | 8 ++++---- openmc/model/triso.py | 4 ++-- openmc/summary.py | 3 +-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 1b93203bb..fed437ca0 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -14,7 +14,7 @@ from openmc.mgxs import EnergyGroups # Supported cross section types -MGXS_TYPES = [ +MGXS_TYPES = ( 'total', 'transport', 'nu-transport', @@ -37,16 +37,16 @@ MGXS_TYPES = [ 'inverse-velocity', 'prompt-nu-fission', 'prompt-nu-fission matrix' -] +) # Supported domain types -DOMAIN_TYPES = [ +DOMAIN_TYPES = ( 'cell', 'distribcell', 'universe', 'material', 'mesh' -] +) # Filter types corresponding to each domain _DOMAIN_TO_FILTER = { diff --git a/openmc/model/triso.py b/openmc/model/triso.py index 183e925eb..34d398504 100644 --- a/openmc/model/triso.py +++ b/openmc/model/triso.py @@ -17,8 +17,8 @@ import openmc from openmc.checkvalue import check_type -MAX_PF_RSP = 0.38 -MAX_PF_CRP = 0.64 +MAX_PF_RSP = 0.38 # maximum packing fraction for random sequential packing +MAX_PF_CRP = 0.64 # maximum packing fraction for close random packing def _volume_sphere(r): diff --git a/openmc/summary.py b/openmc/summary.py index b77e1117a..6d1ac8d63 100644 --- a/openmc/summary.py +++ b/openmc/summary.py @@ -90,8 +90,7 @@ class Summary: def _read_macroscopics(self): if 'macroscopics/names' in self._f: names = self._f['macroscopics/names'][()] - for name in names: - self._macroscopics.append(name.decode()) + self._macroscopics = [name.decode() for name in names] def _read_geometry(self): with warnings.catch_warnings():