mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
numpy errstate required for serr
This commit is contained in:
parent
5e8f50dd2e
commit
0bfbd2c823
1 changed files with 3 additions and 2 deletions
|
|
@ -1855,8 +1855,9 @@ class CMFDRun(object):
|
|||
kerr = abs(k_o - k_n) / k_n
|
||||
|
||||
# Calculate max error in source
|
||||
serr = np.sqrt(np.sum(np.where(s_n > 0, ((s_n-s_o) / s_n)**2, 0))
|
||||
/ len(s_n))
|
||||
with np.errstate(divide='ignore', invalid='ignore'):
|
||||
serr = np.sqrt(np.sum(np.where(s_n > 0, ((s_n-s_o) / s_n)**2, 0))
|
||||
/ len(s_n))
|
||||
|
||||
# Check for convergence
|
||||
iconv = kerr < self._cmfd_ktol and serr < self._stol
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue