Check for multiplicity matrix tallies in routine meant to check libraries for MGMC library creation

This commit is contained in:
guillaume 2019-12-14 21:27:41 -05:00
parent e97a69069e
commit 80dc996717

View file

@ -1420,6 +1420,8 @@ class Library(object):
fixed source problem could be the target.
- Fission and kappa-fission are not required as they are only
needed to support tallies the user may wish to request.
- Scattering multiplicity should have been tallied, either using a
multiplicity or scatter and nu-scatter matrix tally.
See also
--------
@ -1470,6 +1472,16 @@ class Library(object):
'"scatter matrix", or "consistent scatter matrix" MGXS '
'type is required.')
# Make sure there is some kind of a scattering multiplicity matrix data
if 'multiplicity matrix' not in self.mgxs_types and \
('scatter matrix' not in self.mgxs_types or
'nu-scatter matrix' not in self.mgxs_types) and\
('consistent scatter matrix' not in self.mgxs_types or
'consistent nu-scatter matrix' not in self.mgxs_types):
error_flag = True
warn('A "multiplicity matrix" or both a "scatter" and "nu-scatter" '
'matrix MGXS type(s) is/are required.')
# Ensure absorption is present
if 'absorption' not in self.mgxs_types:
error_flag = True