Skip to content

Commit

Permalink
Merge branch 'fix_1653_bug' of https://github.com/terrapower/armi int…
Browse files Browse the repository at this point in the history
…o fix_1653_bug
  • Loading branch information
mgjarrett committed Jun 27, 2024
2 parents 2581b51 + 6a70739 commit 39f5aa9
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions armi/physics/neutronics/crossSectionGroupManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1235,15 +1235,12 @@ def createRepresentativeBlocksUsingExistingBlocks(

# create a new block collection that inherits all of the properties
# and settings from oldBlockCollection.
if oldBlockCollection._validRepresentativeBlockTypes is not None:
if len(oldBlockCollection._validRepresentativeBlockTypes) > 0:
validBlockTypes = []
for flag in oldBlockCollection._validRepresentativeBlockTypes:
validBlockTypes.append(flags._toString(Flags, flag))
else:
validBlockTypes = None
else:
validBlockTypes = None
validBlockTypes = oldBlockCollection._validRepresentativeBlockTypes
if validBlockTypes is not None and len(validBlockTypes) > 0:
validBlockTypes = [
flags._toString(Flags, flag)
for flag in oldBlockCollection._validRepresentativeBlockTypes
]
newBlockCollection = oldBlockCollection.__class__(
oldBlockCollection.allNuclidesInProblem,
validBlockTypes=validBlockTypes,
Expand Down

0 comments on commit 39f5aa9

Please sign in to comment.