Make sure CMFD tallies are activated

This commit is contained in:
Sterling Harper 2018-08-14 12:25:58 -04:00
parent 25b8dcd7a3
commit 3c727f7364
2 changed files with 18 additions and 2 deletions

View file

@ -11,7 +11,7 @@ module cmfd_execute
implicit none
private
public :: execute_cmfd, cmfd_init_batch
public :: execute_cmfd, cmfd_init_batch, cmfd_tally_init
contains
@ -360,6 +360,19 @@ contains
end function get_matrix_idx
!===============================================================================
! CMFD_TALLY_INIT
!===============================================================================
subroutine cmfd_tally_init()
integer :: i
if (cmfd_run) then
do i = 1, size(cmfd_tallies)
cmfd_tallies(i) % obj % active = .true.
end do
end if
end subroutine cmfd_tally_init
!===============================================================================
! CMFD_TALLY_RESET resets all cmfd tallies
!===============================================================================

View file

@ -7,7 +7,7 @@ module simulation
#endif
use bank_header, only: source_bank
use cmfd_execute, only: cmfd_init_batch, execute_cmfd
use cmfd_execute, only: cmfd_init_batch, cmfd_tally_init, execute_cmfd
use cmfd_header, only: cmfd_on
use constants, only: ZERO
use eigenvalue, only: count_source_for_ufs, calculate_average_keff, &
@ -428,6 +428,9 @@ contains
! Allocate tally results arrays if they're not allocated yet
call configure_tallies()
! Activate the CMFD tallies
call cmfd_tally_init()
! Set up material nuclide index mapping
do i = 1, n_materials
call materials(i) % init_nuclide_index()