mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Fixed error in energy filtering for tallies.
This commit is contained in:
parent
551ef9aef6
commit
dd08327837
2 changed files with 5 additions and 5 deletions
|
|
@ -99,7 +99,7 @@ contains
|
|||
call timer_start(time_intercycle)
|
||||
|
||||
! Collect tallies
|
||||
call synchronize_tallies()
|
||||
if (tallies_on) call synchronize_tallies()
|
||||
|
||||
! Distribute fission bank across processors evenly
|
||||
call synchronize_bank(i_cycle)
|
||||
|
|
|
|||
|
|
@ -318,10 +318,10 @@ contains
|
|||
n = t % n_bins(T_ENERGYIN)
|
||||
if (n > 0) then
|
||||
! check if energy of the particle is within energy bins
|
||||
if (p % E < t % energy_in(1) .or. p % E > t % energy_in(n)) cycle
|
||||
if (p % E < t % energy_in(1) .or. p % E > t % energy_in(n + 1)) cycle
|
||||
|
||||
! search to find incoming energy bin
|
||||
bins(T_ENERGYIN) = binary_search(t % energy_in, n, p % E)
|
||||
bins(T_ENERGYIN) = binary_search(t % energy_in, n + 1, p % E)
|
||||
else
|
||||
bins(T_ENERGYIN) = 1
|
||||
end if
|
||||
|
|
@ -330,10 +330,10 @@ contains
|
|||
n = t % n_bins(T_ENERGYOUT)
|
||||
if (n > 0) then
|
||||
! check if energy of the particle is within energy bins
|
||||
if (p % E < t % energy_out(1) .or. p % E > t % energy_out(n)) cycle
|
||||
if (p % E < t % energy_out(1) .or. p % E > t % energy_out(n + 1)) cycle
|
||||
|
||||
! search to find incoming energy bin
|
||||
bins(T_ENERGYOUT) = binary_search(t % energy_out, n, p % E)
|
||||
bins(T_ENERGYOUT) = binary_search(t % energy_out, n + 1, p % E)
|
||||
else
|
||||
bins(T_ENERGYOUT) = 1
|
||||
end if
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue