mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
Bug fixes and minor comment changes
This commit is contained in:
parent
07fb1bcd7f
commit
136da0cd74
4 changed files with 12 additions and 12 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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, &
|
||||
|
|
|
|||
|
|
@ -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, &
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue