Merge remote-tracking branch 'upstream/develop' into tally-mean

This commit is contained in:
wbinventor@gmail.com 2016-02-19 13:10:28 -05:00
commit 980929379d
8 changed files with 16 additions and 12 deletions

View file

@ -84,10 +84,10 @@ to fully define the surface.
| Plane perpendicular | x-plane | :math:`x - x_0 = 0` | :math:`x_0` |
| to :math:`x`-axis | | | |
+----------------------+------------+------------------------------+-------------------------+
| Plane perpendicular | y-plane | :math:`x - x_0 = 0` | :math:`y_0` |
| Plane perpendicular | y-plane | :math:`y - y_0 = 0` | :math:`y_0` |
| to :math:`y`-axis | | | |
+----------------------+------------+------------------------------+-------------------------+
| Plane perpendicular | z-plane | :math:`x - x_0 = 0` | :math:`z_0` |
| Plane perpendicular | z-plane | :math:`z - z_0 = 0` | :math:`z_0` |
| to :math:`z`-axis | | | |
+----------------------+------------+------------------------------+-------------------------+
| Arbitrary plane | plane | :math:`Ax + By + Cz = D` | :math:`A\;B\;C\;D` |

View file

@ -341,7 +341,7 @@
"settings_file.batches = batches\n",
"settings_file.inactive = inactive\n",
"settings_file.particles = particles\n",
"settings_file.output = {'tallies': True, 'summary': True}\n",
"settings_file.output = {'tallies': True}\n",
"bounds = [-0.63, -0.63, -0.63, 0.63, 0.63, 0.63]\n",
"settings_file.source = Source(space=Box(\n",
" bounds[:3], bounds[3:], only_fissionable=True))\n",

View file

@ -286,7 +286,7 @@
"settings_file.batches = batches\n",
"settings_file.inactive = inactive\n",
"settings_file.particles = particles\n",
"settings_file.output = {'tallies': True, 'summary': True}\n",
"settings_file.output = {'tallies': True}\n",
"bounds = [-0.63, -0.63, -0.63, 0.63, 0.63, 0.63]\n",
"settings_file.source = Source(space=Box(\n",
" bounds[:3], bounds[3:], only_fissionable=True))\n",

View file

@ -392,7 +392,7 @@
"settings_file.batches = batches\n",
"settings_file.inactive = inactive\n",
"settings_file.particles = particles\n",
"settings_file.output = {'tallies': False, 'summary': True}\n",
"settings_file.output = {'tallies': False}\n",
"source_bounds = [-10.71, -10.71, -10, 10.71, 10.71, 10.]\n",
"settings_file.source = Source(Box(\n",
" source_bounds[:3], source_bounds[3:], only_fissionable=True))\n",

View file

@ -302,7 +302,7 @@
"settings_file.batches = min_batches\n",
"settings_file.inactive = inactive\n",
"settings_file.particles = particles\n",
"settings_file.output = {'tallies': False, 'summary': True}\n",
"settings_file.output = {'tallies': False}\n",
"settings_file.trigger_active = True\n",
"settings_file.trigger_max_batches = max_batches\n",
"source_bounds = [-10.71, -10.71, -10, 10.71, 10.71, 10.]\n",

View file

@ -288,7 +288,7 @@
"settings_file.batches = batches\n",
"settings_file.inactive = inactive\n",
"settings_file.particles = particles\n",
"settings_file.output = {'tallies': True, 'summary': True}\n",
"settings_file.output = {'tallies': True}\n",
"source_bounds = [-0.63, -0.63, -0.63, 0.63, 0.63, 0.63]\n",
"settings_file.source = Source(space=Box(\n",
" source_bounds[:3], source_bounds[3:]))\n",

View file

@ -312,10 +312,10 @@ out the file and "false" will not.
*Default*: false
:summary:
Writes out an ASCII summary file describing all of the user input files that
Writes out an HDF5 summary file describing all of the user input files that
were read in.
*Default*: false
*Default*: true
:tallies:
Write out an ASCII file of tally results.

View file

@ -1,5 +1,6 @@
module secondary_header
use constants, only: ZERO
use endf_header, only: Tab1
use interpolation, only: interpolate_tab1
use random_lcg, only: prn
@ -54,16 +55,19 @@ contains
real(8), intent(out) :: mu ! sampled scattering cosine
integer :: n ! number of angle-energy distributions
real(8) :: p_valid ! probability that given distribution is valid
real(8) :: prob ! cumulative probability
real(8) :: c ! sampled cumulative probability
n = size(this%applicability)
if (n > 1) then
prob = ZERO
c = prn()
do i = 1, n
! Determine probability that i-th energy distribution is sampled
p_valid = interpolate_tab1(this%applicability(i), E_in)
prob = prob + interpolate_tab1(this%applicability(i), E_in)
! If i-th distribution is sampled, sample energy from the distribution
if (prn() <= p_valid) then
if (c <= prob) then
call this%distribution(i)%obj%sample(E_in, E_out, mu)
exit
end if