mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Return list of str from FY helpers update_tally_nuclides
This commit is contained in:
parent
61232248df
commit
1e5cfe0961
2 changed files with 6 additions and 6 deletions
|
|
@ -458,13 +458,13 @@ class FissionYieldHelper(ABC):
|
|||
|
||||
Returns
|
||||
-------
|
||||
nuclides : tuple of str
|
||||
nuclides : list of str
|
||||
Union of nuclides that the :class:`openmc.deplete.Operator`
|
||||
says have non-zero densities at this stage and those that
|
||||
have yield data. Sorted by nuclide name
|
||||
|
||||
"""
|
||||
return tuple(sorted(self._chain_set & set(nuclides)))
|
||||
return sorted(self._chain_set & set(nuclides))
|
||||
|
||||
@classmethod
|
||||
def from_operator(cls, operator, **kwargs):
|
||||
|
|
@ -550,7 +550,7 @@ class TalliedFissionYieldHelper(FissionYieldHelper):
|
|||
|
||||
Returns
|
||||
-------
|
||||
nuclides : tuple of str
|
||||
nuclides : list of str
|
||||
Union of input nuclides and those that have multiple sets
|
||||
of yield data. Sorted by nuclide name
|
||||
|
||||
|
|
@ -562,7 +562,7 @@ class TalliedFissionYieldHelper(FissionYieldHelper):
|
|||
assert self._fission_rate_tally is not None, (
|
||||
"Run generate_tallies first")
|
||||
overlap = set(self._chain_nuclides).intersection(set(nuclides))
|
||||
nuclides = tuple(sorted(overlap))
|
||||
nuclides = sorted(overlap)
|
||||
self._tally_nucs = [self._chain_nuclides[n] for n in nuclides]
|
||||
self._fission_rate_tally.nuclides = nuclides
|
||||
return nuclides
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ def test_cutoff_helper(materials, nuclide_bundle, therm_frac):
|
|||
|
||||
non_zero_nucs = [n.name for n in nuclide_bundle]
|
||||
tally_nucs = helper.update_tally_nuclides(non_zero_nucs)
|
||||
assert tally_nucs == ("Pu239", "U235",)
|
||||
assert tally_nucs == ["Pu239", "U235",]
|
||||
|
||||
# Check tallies
|
||||
fission_tally = helper._fission_rate_tally
|
||||
|
|
@ -249,7 +249,7 @@ def test_averaged_helper(materials, nuclide_bundle, avg_energy):
|
|||
helper.generate_tallies(materials, [0])
|
||||
tallied_nucs = helper.update_tally_nuclides(
|
||||
[n.name for n in nuclide_bundle])
|
||||
assert tallied_nucs == ("Pu239", "U235")
|
||||
assert tallied_nucs == ["Pu239", "U235"]
|
||||
|
||||
# check generated tallies
|
||||
fission_tally = helper._fission_rate_tally
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue