mit-crpg/openmc — pull request #287 by nelsonag (2014-06-27 12:06:17+00:00)
Title: Fixed erroneous results from survival biasing (try #2)

See pull request #285 for the previous request. This code fixes the issues identified in issue #241: namely that analog tallies produced with survival biasing did not match both track-length tallies and tallies with survival biasing off.
The following quantities have been fixed:
* NaNs occured under survival biasing because He-4 does not have an absorption cross-section, thus a division by 0 occurred
* fission and kappa-fission with analog tallying was incorrect
* The flux tallies w/ implicit capture were using the incorrect weight
* the n1n score was incorrectly implemented for survival biasing, as n1n was detected by seeing if wgt == last_wgt; this wasnt the right way to go about it for the case of survival biasing
* Before, the accuracy of survival-biased tallies depended on the russian roulette cutoff weight. That is no longer the case, I fixed this by moving the scatter calculation to before russian roulette and set more weights to zero after they have been killed by RR
* In the issue discussion I said I wanted to just set up a score_implicit_tally routine in addition to score_analog_tally. That still could be nice to avoid an if-block for many of the score types, but for expediency in getting v0.6 out, I didn't go that way. We can attack that later if need be.
* Tests have been updated, though there is a problem with test_source_file (new issue will be written after this is submitted)
* The code has been merged with the current state of develop.