From 3c727f7364cb0f0cc6978ce12fc017b76c0d4943 Mon Sep 17 00:00:00 2001 From: Sterling Harper Date: Tue, 14 Aug 2018 12:25:58 -0400 Subject: [PATCH] Make sure CMFD tallies are activated --- src/cmfd_execute.F90 | 15 ++++++++++++++- src/simulation.F90 | 5 ++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/cmfd_execute.F90 b/src/cmfd_execute.F90 index af8d57a807..7fe153d273 100644 --- a/src/cmfd_execute.F90 +++ b/src/cmfd_execute.F90 @@ -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 !=============================================================================== diff --git a/src/simulation.F90 b/src/simulation.F90 index 00d558d140..41af5b2bab 100644 --- a/src/simulation.F90 +++ b/src/simulation.F90 @@ -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()