diff --git a/examples/python/pincell_multigroup/build-xml.py b/examples/python/pincell_multigroup/build-xml.py index 9cc23300d..337044508 100644 --- a/examples/python/pincell_multigroup/build-xml.py +++ b/examples/python/pincell_multigroup/build-xml.py @@ -13,7 +13,7 @@ inactive = 10 particles = 1000 ############################################################################### -# Exporting to OpenMC mgxs.xml file +# Exporting to OpenMC mgxs.h5 file ############################################################################### # Instantiate the energy group data diff --git a/src/mgxs_data.F90 b/src/mgxs_data.F90 index f823304c0..3a0d7c4b4 100644 --- a/src/mgxs_data.F90 +++ b/src/mgxs_data.F90 @@ -183,7 +183,7 @@ contains end select ! Do not read materials which we do not actually use in the problem to - ! save space + ! reduce storage if (allocated(kTs(i_mat) % data)) then call macro_xs(i_mat) % obj % combine(kTs(i_mat), mat, nuclides_MG, & num_energy_groups, num_delayed_groups, max_order, & diff --git a/src/mgxs_header.F90 b/src/mgxs_header.F90 index 0fe48f7c9..e1f1c2fa1 100644 --- a/src/mgxs_header.F90 +++ b/src/mgxs_header.F90 @@ -1108,7 +1108,7 @@ module mgxs_header deallocate(input_scatt) ! Now get the multiplication matrix - if (object_exists(scatt_grp, 'multiplicity matrix')) then + if (object_exists(scatt_grp, 'multiplicity_matrix')) then ! Now use this information to find the length of a container array ! to hold the flattened data @@ -1120,7 +1120,7 @@ module mgxs_header ! Allocate flattened array allocate(temp_arr(length)) - call read_dataset(temp_arr, scatt_grp, "multiplicity matrix") + call read_dataset(temp_arr, scatt_grp, "multiplicity_matrix") ! Convert temp_arr to a jagged array ((gin) % data(gout)) for ! passing to ScattData @@ -2092,7 +2092,7 @@ module mgxs_header deallocate(input_scatt) ! Now get the multiplication matrix - if (object_exists(scatt_grp, 'multiplicity matrix')) then + if (object_exists(scatt_grp, 'multiplicity_matrix')) then ! Now use this information to find the length of a container array ! to hold the flattened data @@ -2108,7 +2108,7 @@ module mgxs_header ! Allocate flattened array allocate(temp_1d(length)) - call read_dataset(temp_1d, scatt_grp, "multiplicity matrix") + call read_dataset(temp_1d, scatt_grp, "multiplicity_matrix") ! Convert temp_1d to a jagged array ((gin) % data(gout)) for passing ! to ScattData @@ -2959,9 +2959,9 @@ module mgxs_header ! Now create our jagged data from the dense data call jagged_from_dense_2D(scatt_coeffs(:, :, :, iazi, ipol), & - jagged_scatt) + jagged_scatt, gmin, gmax) call jagged_from_dense_1D(temp_mult(:, :, iazi, ipol), & - jagged_mult, gmin, gmax) + jagged_mult) ! Initialize the ScattData Object call this % xs(t) % scatter(iazi, ipol) % obj % init(gmin, & diff --git a/src/scattdata_header.F90 b/src/scattdata_header.F90 index 684be88b8..3d9df0bbf 100644 --- a/src/scattdata_header.F90 +++ b/src/scattdata_header.F90 @@ -266,12 +266,12 @@ contains allocate(matrix(groups)) do gin = 1, groups allocate(matrix(gin) % data(order, gmin(gin):gmax(gin))) - matrix(gin) % data = coeffs(gin) % data + matrix(gin) % data(:, :) = coeffs(gin) % data(:, :) end do ! Get scattxs value allocate(this % scattxs(groups)) - ! Get this by summing the un-normalized P0 coefficient in matrix + ! Get this by summing the un-normalized angular distribution in matrix ! over all outgoing groups do gin = 1, groups this % scattxs(gin) = sum(matrix(gin) % data(:, :)) @@ -317,7 +317,7 @@ contains this % dist(gin) % data(imu - 1, gout) end do - ! Now make sure integral norms to zero + ! Normalize the integral to unity norm = this % dist(gin) % data(order, gout) if (norm > ZERO) then this % fmu(gin) % data(:, gout) = & @@ -578,7 +578,7 @@ contains imu = 1 else imu = binary_search(this % dist(gin) % data(:, gout), & - size(this % dist(gin) % data(:, gout)), xi) + size(this % dist(gin) % data(:, gout)), xi) + 1 end if ! Randomly select a mu in this bin.