mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
avoid zero division if source rate of previous result is zero (#3169)
This commit is contained in:
parent
8263f05e7e
commit
dcb25575ca
1 changed files with 3 additions and 2 deletions
|
|
@ -754,8 +754,9 @@ class Integrator(ABC):
|
|||
rates = res.rates[0]
|
||||
k = ufloat(res.k[0, 0], res.k[0, 1])
|
||||
|
||||
# Scale reaction rates by ratio of source rates
|
||||
rates *= source_rate / res.source_rate
|
||||
if res.source_rate != 0.0:
|
||||
# Scale reaction rates by ratio of source rates
|
||||
rates *= source_rate / res.source_rate
|
||||
return bos_conc, OperatorResult(k, rates)
|
||||
|
||||
def _get_start_data(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue