mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Fix divide-by-zero when no inactive batches.
This commit is contained in:
parent
76ddc858d6
commit
075f8f0b89
1 changed files with 9 additions and 5 deletions
|
|
@ -1420,16 +1420,20 @@ contains
|
|||
gen_per_batch) / time_active % elapsed
|
||||
end if
|
||||
else
|
||||
speed_inactive = real(n_particles * n_inactive * gen_per_batch) / &
|
||||
time_inactive % elapsed
|
||||
if (n_inactive > 0) then
|
||||
speed_inactive = real(n_particles * n_inactive * gen_per_batch) / &
|
||||
time_inactive % elapsed
|
||||
end if
|
||||
speed_active = real(n_particles * n_active * gen_per_batch) / &
|
||||
time_active % elapsed
|
||||
end if
|
||||
|
||||
! display calculation rate
|
||||
string = to_str(speed_inactive)
|
||||
if (.not. (restart_run .and. (restart_batch >= n_inactive))) &
|
||||
write(ou,101) "Calculation Rate (inactive)", trim(string)
|
||||
if (.not. (restart_run .and. (restart_batch >= n_inactive)) &
|
||||
.and. n_inactive > 0) then
|
||||
string = to_str(speed_inactive)
|
||||
write(ou,101) "Calculation Rate (inactive)", trim(string)
|
||||
end if
|
||||
string = to_str(speed_active)
|
||||
write(ou,101) "Calculation Rate (active)", trim(string)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue