openmc-dev / openmc

OpenMC Monte Carlo Code
https://docs.openmc.org
Other
699 stars 444 forks source link

Added fix to cfloat_endf for length 11 endf floats #2967

Closed aidancrilly closed 2 weeks ago

aidancrilly commented 2 weeks ago

Description

Fix for issue also found in endf-python (see PR:https://github.com/paulromano/endf-python/pull/7).

Some ENDF files have length 11 floats. E.g. ENDF/B-VIII.0 incident neutron data for deuterium there is -2.225002+6 at the beginning of the MF = 3, MT = 16 record. This is the QM/QI value.

The current float converter has arr length 12 so doesn't have space for both the e and the null terminator. Therefore the above example makes the code crash.

The proposed change is simply to make the arr length 13 to accommodate the length 11 endf floats.