Skip to content

Commit

Permalink
Fixing misleading comment in FuelHandler.swapCascade() (#1910)
Browse files Browse the repository at this point in the history
  • Loading branch information
john-science authored Sep 26, 2024
1 parent 727825f commit 96a5c88
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions armi/physics/fuelCycle/fuelHandlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,11 @@ def swapCascade(self, assemList):
"""
Perform swaps on a list of assemblies.
Parameters
----------
assemList: list
A list of assemblies to be shuffled.
Notes
-----
[goingOut,inter1,inter2,goingIn] will go to
Expand All @@ -899,16 +904,15 @@ def swapCascade(self, assemList):
# first check for duplicates
for assem in assemList:
if assemList.count(assem) != 1:
runLog.extra("Warning: %s is in the cascade more than once!" % assem)
runLog.warning(f"{assem} is in the cascade more than once.")

# now swap.
# now swap
levels = len(assemList)
for level in range(levels - 1):
if not assemList[level + 1]:
# If None in the cascade, just skip it. this will lead to slightly unintended shuffling if
# the user wasn't careful enough. Their problem.
runLog.extra(
"Skipping level %d in the cascade because it is none" % (level + 1)
runLog.info(
f"Skipping level {level + 1} in the cascade because it is None. Be careful, "
"this might cause an unexpected shuffling order."
)
continue
self.swapAssemblies(assemList[0], assemList[level + 1])
Expand Down

0 comments on commit 96a5c88

Please sign in to comment.