mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Make sure MT=4 gets written to HDF5 file (needed for ptables)
This commit is contained in:
parent
d6d77d2962
commit
8280946b7c
1 changed files with 3 additions and 2 deletions
|
|
@ -459,11 +459,12 @@ class IncidentNeutron(EqualityMixin):
|
|||
rxs_group = g.create_group('reactions')
|
||||
for rx in self.reactions.values():
|
||||
# Skip writing redundant reaction if it doesn't have photon
|
||||
# production or is a summed transmutation reaction
|
||||
# production or is a summed transmutation reaction. MT=4 is also
|
||||
# sometimes needed for probability tables.
|
||||
if rx.redundant:
|
||||
photon_rx = any(p.particle == 'photon' for p in rx.products)
|
||||
transmutation_rx = (rx.mt in (16, 103, 104, 105, 106, 107))
|
||||
if not (photon_rx or transmutation_rx):
|
||||
if not (photon_rx or transmutation_rx or rx.mt == 4):
|
||||
continue
|
||||
|
||||
rx_group = rxs_group.create_group('reaction_{:03}'.format(rx.mt))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue