Fixed bug where 0 inactive cycles led to tallies never turning on.

This commit is contained in:
Paul Romano 2012-08-01 12:47:00 -04:00
parent 31572c03fa
commit 0069d5f08a
3 changed files with 10 additions and 3 deletions

View file

@ -25,8 +25,12 @@ contains
if (master) call header("CRITICALITY TRANSPORT SIMULATION", level=1)
tallies_on = .false.
call timer_start(time_inactive)
! Start timer
if (tallies_on) then
call timer_start(time_active)
else
call timer_start(time_inactive)
end if
! Allocate particle
allocate(p)

View file

@ -125,7 +125,7 @@ module global
real(8) :: total_weight ! total starting particle weight in realization
! Flag for turning tallies on
logical :: tallies_on
logical :: tallies_on = .false.
! Assume all tallies are spatially distinct
logical :: assume_separate = .false.

View file

@ -158,6 +158,9 @@ contains
call fatal_error()
end if
! Turn on tallies if no inactive batches
if (n_inactive == 0) tallies_on = .true.
! Copy random number seed if specified
if (seed_ > 0) seed = seed_