mit-crpg/openmc — pull request #343 by walshjon (2014-11-27 04:27:32+00:00)
Title: Kinematics

This PR adds a slight optimization to the pointwise energy grid lookup algorithm that is used when locating the index in the energy-cross section pair grid that corresponds to the current neutron energy. It restricts the searchable energy range to that which is physically possible in a couple of cases:

* In target-at-rest events that result in the need for a new cross section value, where `E'` must be less than the incident `E`, only the portion of the energy grid below `E` is searched.
* At energies where thermal target motion can result in upscatter, the searchable energy range is bounded by the lowest possible energy and the thermal cutoff energy (i.e. 400kT) plus the maximum energy that the target can possibly transfer to the neutron.
* If `E` is greater than the default thermal cutoff but we still have an upscatter (only an issue for Hydrogen, which has no thermal cutoff) only the upper portion of the energy range is searched.