Rearranged use of tallies_on and inactive/active timers.

This commit is contained in:
Paul Romano 2012-12-04 15:02:11 -05:00
parent a819b4db40
commit 6e4cdd4c4b
2 changed files with 16 additions and 22 deletions

View file

@ -45,6 +45,9 @@ contains
! Display column titles
call print_columns()
! Turn on inactive timer
call timer_start(time_inactive)
! ==========================================================================
! LOOP OVER BATCHES
BATCH_LOOP: do current_batch = 1, n_batches
@ -113,19 +116,22 @@ contains
! Reset total starting particle weight used for normalizing tallies
total_weight = ZERO
if (current_batch == n_inactive + 1) then
! Switch from inactive batch timer to active batch timer
call timer_stop(time_inactive)
call timer_start(time_active)
! Enable active batches (and tallies_on if it hasn't been enabled)
active_batches = .true.
tallies_on = .true.
! Add user tallies to active tallies list
call setup_active_usertallies()
end if
! check CMFD initialize batch
if (cmfd_run) call cmfd_init_batch()
if (current_batch == n_inactive + 1) then
! This will start the active timer at the first non-inactive batch
! (including batch 1 if there are no inactive batches).
call timer_start(time_active)
elseif (current_batch == 1) then
! If there are inactive batches, start the inactive timer on the first
! batch.
call timer_start(time_inactive)
end if
end subroutine initialize_batch
!===============================================================================
@ -189,15 +195,6 @@ contains
end if
end do
! Turn tallies on once inactive batches are complete
if (current_batch == n_inactive) then
tallies_on = .true.
active_batches = .true.
call timer_stop(time_inactive)
call timer_start(time_active)
call setup_active_usertallies()
end if
end subroutine finalize_batch
!===============================================================================

View file

@ -177,9 +177,6 @@ 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_