pyne/pyne — pull request #556 by elliottbiondo (2014-10-30 22:11:26+00:00)
Title: Source Sampling Improvements

This PR provides a number of improvements to the source sampling module and the corresponding source.F90.

1) Improved void rejection. If a particle is sampled in void, it is now resampled within the selected mesh volume element until non-void is encountered or a user-specified limit is met. Before, it would resample the full history (not just the position) which is not statistically correct.

2) Uniform sampling is now uniform for position and analog in energy (as opposed to uniform in all of phase space). I believe this to be the more useful variance reduction scheme. In addition, this eliminates the zero-weight encountered in #528.

3) In the user-specified sampling mode, if the biased PDF only has 1 energy bin and the unbiased PDF has multiple energy bins spatial biasing is performed and energy is sampled in analog (before energy was sampled uniformly). This was done for the same reasons as 2).

Minor things:

1) The unit tests and sample calculations now use different values. It just so happens that for the values I originally chose were not particularly convenient for testing uniform sampling.

2) Sampling mode integer identifiers for the Fortran interface are now indexed from 0, rather than 1. I think 0 is just a better number to mean "analog".

After I made these changes I ran the FNG ITER benchmark problem in analog, uniform, and CADIS and got statistically equivalent results.