mit-crpg/openmc — pull request #202 by paulromano (2013-07-29 02:48:20+00:00)
Title: Major refactor of physics module

The basic motive behind this pull request is to refactor the physics module to not be dependent on a global Particle variable. This will allow us to call physics routines from tallies and eventually be able to have true collision and track-length estimators for all filters/scores. To summarize the major changes:

- The Particle `p` is no longer a global variable. It is declared in `eigenvalue` or `fixed_source` and passed into subsequent routines.
- `source` no longer depends on `physics`
- The transport routine was taken out of `physics` module and put into a new `tracking` module. The `physics` module no longer depends on the `tally` module.
- Maxwell and Watt spectrum routines moved into the `math` module
- Much of the `physics` module was significantly changed
- Introduced `sample_nuclide` routine -- has an option to sample a nuclide based on the total, scattering, or fission cross sections. Only total is used right now but the others may be useful for tally purposes.
- Absorption estimator changed to be consistent with other codes -- before the denominator used was the macroscopic absorption cross section for the material, whereas now it's the microscopic absorption cross section for the nuclide
- `rotate_angle` changed from subroutine to function
- Introduced new routines -- `absorption`, `russian_roulette`, `scatter`
- Sampling of fission energy taken out of `create_fission_sites` and put in new routine `sample_fission_energy

All in all, the changes make the `physics` routine much more maintainable and will allow us to call physics routines from the tally module if need be.