diff --git a/docs/source/methods/geometry.rst b/docs/source/methods/geometry.rst index c1be68f72..f642cca10 100644 --- a/docs/source/methods/geometry.rst +++ b/docs/source/methods/geometry.rst @@ -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` | diff --git a/docs/source/pythonapi/examples/mgxs-part-i.ipynb b/docs/source/pythonapi/examples/mgxs-part-i.ipynb index 104fbe759..6b78e9d53 100644 --- a/docs/source/pythonapi/examples/mgxs-part-i.ipynb +++ b/docs/source/pythonapi/examples/mgxs-part-i.ipynb @@ -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", diff --git a/docs/source/pythonapi/examples/mgxs-part-ii.ipynb b/docs/source/pythonapi/examples/mgxs-part-ii.ipynb index 593d53647..0a8d7230e 100644 --- a/docs/source/pythonapi/examples/mgxs-part-ii.ipynb +++ b/docs/source/pythonapi/examples/mgxs-part-ii.ipynb @@ -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", diff --git a/docs/source/pythonapi/examples/mgxs-part-iii.ipynb b/docs/source/pythonapi/examples/mgxs-part-iii.ipynb index a541efbf0..dcb496160 100644 --- a/docs/source/pythonapi/examples/mgxs-part-iii.ipynb +++ b/docs/source/pythonapi/examples/mgxs-part-iii.ipynb @@ -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", diff --git a/docs/source/pythonapi/examples/pandas-dataframes.ipynb b/docs/source/pythonapi/examples/pandas-dataframes.ipynb index 9e08acccd..ac5d4e410 100644 --- a/docs/source/pythonapi/examples/pandas-dataframes.ipynb +++ b/docs/source/pythonapi/examples/pandas-dataframes.ipynb @@ -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", diff --git a/docs/source/pythonapi/examples/tally-arithmetic.ipynb b/docs/source/pythonapi/examples/tally-arithmetic.ipynb index e357e73fc..3a61b0979 100644 --- a/docs/source/pythonapi/examples/tally-arithmetic.ipynb +++ b/docs/source/pythonapi/examples/tally-arithmetic.ipynb @@ -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", diff --git a/docs/source/usersguide/input.rst b/docs/source/usersguide/input.rst index 7099ebf50..bee60f221 100644 --- a/docs/source/usersguide/input.rst +++ b/docs/source/usersguide/input.rst @@ -340,10 +340,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. diff --git a/src/global.F90 b/src/global.F90 index 970f89f9b..2abbe4212 100644 --- a/src/global.F90 +++ b/src/global.F90 @@ -427,7 +427,7 @@ module global type(SetInt) :: sourcepoint_batch ! Various output options - logical :: output_summary = .false. + logical :: output_summary = .true. logical :: output_xs = .false. logical :: output_tallies = .true. diff --git a/src/input_xml.F90 b/src/input_xml.F90 index eb504f43a..49600939c 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -948,8 +948,8 @@ contains if (check_for_node(node_output, "summary")) then call get_node_value(node_output, "summary", temp_str) temp_str = to_lower(temp_str) - if (trim(temp_str) == 'true' .or. & - trim(temp_str) == '1') output_summary = .true. + if (trim(temp_str) == 'false' .or. & + trim(temp_str) == '0') output_summary = .false. end if ! Check for cross sections option diff --git a/src/secondary_header.F90 b/src/secondary_header.F90 index d85807412..7449a5793 100644 --- a/src/secondary_header.F90 +++ b/src/secondary_header.F90 @@ -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