Ability to write state points at specified batches.

This commit is contained in:
Paul Romano 2012-07-31 13:43:25 -04:00
parent b6e4e9ecb8
commit d4d1f63e1d
9 changed files with 90 additions and 28 deletions

View file

@ -1,15 +1,16 @@
module fixed_source
use constants, only: ZERO
use constants, only: ZERO
use global
use output, only: write_message, header
use physics, only: transport
use random_lcg, only: set_particle_seed
use source, only: initialize_particle, sample_external_source, &
copy_source_attributes
use string, only: to_str
use tally, only: synchronize_tallies
use timing, only: timer_start, timer_stop
use output, only: write_message, header
use physics, only: transport
use random_lcg, only: set_particle_seed
use source, only: initialize_particle, sample_external_source, &
copy_source_attributes
use state_point, only: create_state_point
use string, only: to_str
use tally, only: synchronize_tallies
use timing, only: timer_start, timer_stop
type(Bank), pointer :: source_site => null()
@ -97,10 +98,23 @@ contains
subroutine finalize_batch()
integer :: i ! loop index for state point batches
! Collect and accumulate tallies
call timer_start(time_ic_tallies)
call synchronize_tallies()
call timer_stop(time_ic_tallies)
! Write out state point if it's been specified for this batch
if (master) then
do i = 1, n_state_points
if (current_batch == statepoint_batch(i)) then
call create_state_point()
exit
end if
end do
end if
end subroutine finalize_batch
!===============================================================================