mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
eliminate set/list redundancy
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
5160417e3e
commit
e93dd66430
1 changed files with 2 additions and 2 deletions
|
|
@ -308,8 +308,8 @@ class FluxCollapseHelper(ReactionRateHelper):
|
|||
if self._nuclides_direct is not None:
|
||||
# check if any direct tally nuclides are requested that are not
|
||||
# already loaded with the materials. Load separately if so.
|
||||
mat_nuclides = [n for mat in materials for n in mat.nuclides]
|
||||
extra_nuclides = set(self._nuclides_direct) - set(mat_nuclides)
|
||||
mat_nuclides = {n for mat in materials for n in mat.nuclides}
|
||||
extra_nuclides = set(self._nuclides_direct) - mat_nuclides
|
||||
for nuc in extra_nuclides:
|
||||
load_nuclide(nuc)
|
||||
self._rate_tally.nuclides = self._nuclides_direct
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue