mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Handle case where user forgot to tally multiplicities or nu-scatter more gracefully
This commit is contained in:
parent
df5727cf3e
commit
e97a69069e
1 changed files with 10 additions and 0 deletions
|
|
@ -1167,6 +1167,16 @@ class Library(object):
|
|||
np.subtract(xsdata._total[i], np.sum(np.sum(
|
||||
xsdata._scatter_matrix[i][:, :, :, :, :],
|
||||
axis=4), axis=3))
|
||||
# if only scatter matrices have been tallied, multiplicity cannot
|
||||
# be accounted for
|
||||
else:
|
||||
msg = 'Scatter multiplicity (such as (n,xn) reactions) ' \
|
||||
'are ignored since multiplicity or nu-scatter matrices '\
|
||||
'were not tallied for '+xsdata_name
|
||||
warn(msg, RuntimeWarning)
|
||||
xsdata.set_scatter_matrix_mgxs(scatt_mgxs, xs_type=xs_type,
|
||||
nuclide=[nuclide],
|
||||
subdomain=subdomain)
|
||||
|
||||
return xsdata
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue