mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Fix digitize bug
This commit is contained in:
parent
72bdcbb48b
commit
11b3a1fe7b
1 changed files with 2 additions and 2 deletions
|
|
@ -1490,7 +1490,7 @@ class CMFDRun(object):
|
|||
energy_bins[idx] = 0
|
||||
idx = np.where((source_energies >= energy[0]) &
|
||||
(source_energies <= energy[-1]))
|
||||
energy_bins[idx] = ng - np.digitize(source_energies, energy)
|
||||
energy_bins[idx] = ng - np.digitize(source_energies[idx], energy)
|
||||
|
||||
# Determine weight factor of each particle based on its mesh index
|
||||
# and energy bin and updates its weight
|
||||
|
|
@ -1547,7 +1547,7 @@ class CMFDRun(object):
|
|||
energy_bins[idx] = ng - 1
|
||||
idx = np.where((source_energies >= energy[0]) &
|
||||
(source_energies <= energy[-1]))
|
||||
energy_bins[idx] = np.digitize(source_energies, energy) - 1
|
||||
energy_bins[idx] = np.digitize(source_energies[idx], energy) - 1
|
||||
|
||||
# Determine all unique combinations of mesh bin and energy bin, and
|
||||
# count number of particles that belong to these combinations
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue