mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Get proper indices for zero flux error
This commit is contained in:
parent
f3286c6601
commit
0f1b0a2ac6
1 changed files with 3 additions and 2 deletions
|
|
@ -1945,9 +1945,10 @@ class CMFDRun(object):
|
|||
np.sum(self._flux_rate, axis=4), 0.0)
|
||||
|
||||
# Detect zero flux, abort if located and cmfd is on
|
||||
if np.any(self._flux[is_accel[...,:]] < _TINY_BIT) and self._cmfd_on:
|
||||
zero_flux = np.logical_and(self._flux < _TINY_BIT, is_accel[...,np.newaxis])
|
||||
if np.any(zero_flux) and self._cmfd_on:
|
||||
# Get index of first zero flux in flux array
|
||||
idx = np.argwhere(self._flux[is_accel[...,:]] < _TINY_BIT)[0]
|
||||
idx = np.argwhere(zero_flux)[0]
|
||||
|
||||
# Throw error message (one-based indexing)
|
||||
# Index of group is flipped
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue