mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Fixed bug in replacing score strings for scatter-*n in statepoint.py
This commit is contained in:
parent
96d5fb671d
commit
8c3789cb78
1 changed files with 6 additions and 2 deletions
|
|
@ -380,8 +380,12 @@ class StatePoint(object):
|
|||
for j, score in enumerate(scores):
|
||||
|
||||
# If this is a scattering moment, insert the scattering order
|
||||
if 'scatter-n' in score or 'scatter-yn' in score or 'scatter-pn' in score:
|
||||
score = score.replace('n', str(scatt_order[j]))
|
||||
if '-n' in score:
|
||||
score = score.replace('-n', '-' + str(scatt_order[j]))
|
||||
elif '-yn' in score:
|
||||
score = score.replace('-pn', '-p' + str(scatt_order[j]))
|
||||
elif '-pn' in score:
|
||||
score = score.replace('-yn', '-y' + str(scatt_order[j]))
|
||||
|
||||
tally.add_score(score)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue