Skip to content

Commit

Permalink
Update crossSectionControl dict for new xsType.
Browse files Browse the repository at this point in the history
When new XS Types are created by the cross section group manager,
initialize them with the same settings as the original XS ID from
which they were created.
  • Loading branch information
mgjarrett committed Feb 22, 2024
1 parent 8d2d656 commit 235eca4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion armi/physics/neutronics/crossSectionGroupManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1019,8 +1019,10 @@ def _addXsGroupsFromBlocks(self, blockCollectionsByXsGroup, blockList):
for b in blockList:
xsID = b.getMicroSuffix()
xsSettings = self._initializeXsID(xsID)
# xsSettings.averageByComponent = True
blockCollectionType = blockCollectionFactory(
xsSettings, self.r.blueprints.allNuclidesInProblem
xsSettings,
self.r.blueprints.allNuclidesInProblem,
)
group = blockCollectionsByXsGroup.get(xsID, blockCollectionType)
group.append(b)
Expand Down Expand Up @@ -1271,6 +1273,12 @@ def _getModifiedReprBlocks(self, blockList, originalRepresentativeBlocks):
if b.getMicroSuffix() == origXSID:
b.p.xsType = newXSType

# copy XS settings to new XS ID
self.cs[CONF_CROSS_SECTION][newXSID] = copy.deepcopy(
self.cs[CONF_CROSS_SECTION][origXSID]
)
self.cs[CONF_CROSS_SECTION][newXSID].xsID = newXSID

return modifiedReprBlocks, origXSIDsFromNew

def getNextAvailableXsTypes(self, howMany=1, excludedXSTypes=None):
Expand Down

0 comments on commit 235eca4

Please sign in to comment.