From 349c2a804bb43239f9806653442fa58ed7267247 Mon Sep 17 00:00:00 2001 From: Shikhar Kumar Date: Thu, 20 Sep 2018 14:00:32 -0400 Subject: [PATCH 01/11] Add CMFD helper functions to access entropy_on, is_master, current_batch, implement vector_write --- openmc/capi/core.py | 20 ++++++++++++++++++++ openmc/capi/settings.py | 4 +++- src/cmfd_data.F90 | 2 +- src/cmfd_solver.F90 | 11 ++++++++--- src/tallies/tally_header.F90 | 2 ++ src/vector_header.F90 | 17 ++++++++++++++++- 6 files changed, 50 insertions(+), 6 deletions(-) diff --git a/openmc/capi/core.py b/openmc/capi/core.py index 53c3c32bd6..7e4d29afc3 100644 --- a/openmc/capi/core.py +++ b/openmc/capi/core.py @@ -62,6 +62,16 @@ def calculate_volumes(): _dll.openmc_calculate_volumes() +def current_batch(): + """Return the current batch of the simulation. + Returns + ------- + int + Current batch of the simulation + """ + return c_int.in_dll(_dll, 'openmc_current_batch').value + + def finalize(): """Finalize simulation and free memory""" _dll.openmc_finalize() @@ -214,6 +224,16 @@ def keff(): return (mean, std_dev) +def master(): + """Return whether processor is master processor or not. + Returns + ------- + bool + Whether is master processor or not + """ + return c_bool.in_dll(_dll, 'openmc_master').value + + def next_batch(): """Run next batch. diff --git a/openmc/capi/settings.py b/openmc/capi/settings.py index 1063d6463e..af6dd7d7a2 100644 --- a/openmc/capi/settings.py +++ b/openmc/capi/settings.py @@ -1,4 +1,5 @@ -from ctypes import c_int, c_int32, c_int64, c_double, c_char_p, POINTER +from ctypes import (c_int, c_int32, c_int64, c_double, c_char_p, c_bool, + POINTER) from . import _dll from .core import _DLLGlobal @@ -17,6 +18,7 @@ _dll.openmc_get_seed.restype = c_int64 class _Settings(object): # Attributes that are accessed through a descriptor batches = _DLLGlobal(c_int32, 'n_batches') + entropy_on = _DLLGlobal(c_bool, 'entropy_on') generations_per_batch = _DLLGlobal(c_int32, 'gen_per_batch') inactive = _DLLGlobal(c_int32, 'n_inactive') particles = _DLLGlobal(c_int64, 'n_particles') diff --git a/src/cmfd_data.F90 b/src/cmfd_data.F90 index ec07a4d04c..32a85cabfd 100644 --- a/src/cmfd_data.F90 +++ b/src/cmfd_data.F90 @@ -254,7 +254,7 @@ contains ! Set the energy bin if needed if (energy_filters) then - filter_matches(i_filter_ein) % bins % data(1) = ng - h + 1 + filter_matches(i_filter_ein) % bins % data(1) = 12*(ng - h) + 1 end if score_index = 0 diff --git a/src/cmfd_solver.F90 b/src/cmfd_solver.F90 index 99d482480a..01404d9b0e 100644 --- a/src/cmfd_solver.F90 +++ b/src/cmfd_solver.F90 @@ -146,8 +146,13 @@ contains call loss % assemble() call prod % assemble() if (cmfd_write_matrices) then - call loss % write('loss.dat') - call prod % write('prod.dat') + if (adjoint) then + call loss % write('adj_loss.dat') + call prod % write('adj_prod.dat') + else + call loss % write('loss.dat') + call prod % write('prod.dat') + end if end if ! Set norms to 0 @@ -740,7 +745,7 @@ contains else filename = 'fluxvec.dat' end if - ! TODO: call phi_n % write(filename) + call phi_n % write(filename) end if end subroutine extract_results diff --git a/src/tallies/tally_header.F90 b/src/tallies/tally_header.F90 index 367214a930..db84056812 100644 --- a/src/tallies/tally_header.F90 +++ b/src/tallies/tally_header.F90 @@ -280,6 +280,7 @@ contains end subroutine tally_allocate_results + function tally_set_filters(this, filter_indices) result(err) class(TallyObject), intent(inout) :: this integer(C_INT32_T), intent(in) :: filter_indices(:) @@ -1025,6 +1026,7 @@ contains end if end function openmc_tally_set_scores + function openmc_tally_set_type(index, type) result(err) bind(C) ! Update the type of a tally that is already allocated integer(C_INT32_T), value, intent(in) :: index diff --git a/src/vector_header.F90 b/src/vector_header.F90 index 1ada0fba74..dadaaa48ca 100644 --- a/src/vector_header.F90 +++ b/src/vector_header.F90 @@ -14,7 +14,7 @@ module vector_header procedure :: destroy => vector_destroy procedure :: add_value => vector_add_value procedure :: copy => vector_copy - ! TODO: procedure :: write => vector_write + procedure :: write => vector_write end type Vector contains @@ -88,4 +88,19 @@ contains end subroutine vector_copy +!=============================================================================== +! VECTOR_WRITE writes a vector to file +!=============================================================================== + subroutine vector_write(self, filename) + class(Vector), target, intent(inout) :: self ! vector instance + character(*), intent(in) :: filename ! filename to output to + integer :: unit_ + integer :: i + open(newunit=unit_, file=filename) + do i = 1, self % n + write(unit_,*) i, self % data(i) + end do + close(unit_) + end subroutine vector_write + end module vector_header From c818b5a50b945d51425e9cab32161a45b97129f0 Mon Sep 17 00:00:00 2001 From: Shikhar Kumar Date: Thu, 20 Sep 2018 14:06:13 -0400 Subject: [PATCH 02/11] Update spacing --- openmc/capi/core.py | 12 ++++++++---- src/vector_header.F90 | 21 ++++++++++++++------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/openmc/capi/core.py b/openmc/capi/core.py index 7e4d29afc3..fa6517488d 100644 --- a/openmc/capi/core.py +++ b/openmc/capi/core.py @@ -64,11 +64,13 @@ def calculate_volumes(): def current_batch(): """Return the current batch of the simulation. - Returns + + Returns ------- int Current batch of the simulation - """ + + """ return c_int.in_dll(_dll, 'openmc_current_batch').value @@ -226,11 +228,13 @@ def keff(): def master(): """Return whether processor is master processor or not. - Returns + + Returns ------- bool Whether is master processor or not - """ + + """ return c_bool.in_dll(_dll, 'openmc_master').value diff --git a/src/vector_header.F90 b/src/vector_header.F90 index dadaaa48ca..27d773f888 100644 --- a/src/vector_header.F90 +++ b/src/vector_header.F90 @@ -91,16 +91,23 @@ contains !=============================================================================== ! VECTOR_WRITE writes a vector to file !=============================================================================== - subroutine vector_write(self, filename) - class(Vector), target, intent(inout) :: self ! vector instance + + subroutine vector_write(self, filename) + + class(Vector), target, intent(inout) :: self ! vector instance character(*), intent(in) :: filename ! filename to output to - integer :: unit_ + + integer :: unit_ integer :: i - open(newunit=unit_, file=filename) - do i = 1, self % n + + open(newunit=unit_, file=filename) + + do i = 1, self % n write(unit_,*) i, self % data(i) end do - close(unit_) - end subroutine vector_write + + close(unit_) + + end subroutine vector_write end module vector_header From 8a551b807450b60aa8b48363028b3eede4ef3dda Mon Sep 17 00:00:00 2001 From: Shikhar Kumar Date: Thu, 20 Sep 2018 14:33:13 -0400 Subject: [PATCH 03/11] Expose run_CE througb C API --- openmc/capi/settings.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openmc/capi/settings.py b/openmc/capi/settings.py index af6dd7d7a2..115962395d 100644 --- a/openmc/capi/settings.py +++ b/openmc/capi/settings.py @@ -22,6 +22,7 @@ class _Settings(object): generations_per_batch = _DLLGlobal(c_int32, 'gen_per_batch') inactive = _DLLGlobal(c_int32, 'n_inactive') particles = _DLLGlobal(c_int64, 'n_particles') + run_CE = _DLLGlobal(c_bool, 'run_CE') verbosity = _DLLGlobal(c_int, 'verbosity') @property From 852cbb0109f3db6cd5f79d41902a66a6a617788d Mon Sep 17 00:00:00 2001 From: Shikhar Kumar Date: Tue, 25 Sep 2018 19:53:28 -0400 Subject: [PATCH 04/11] Initial pass at fixing issue #1053 --- src/simulation.F90 | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/simulation.F90 b/src/simulation.F90 index 176dfb921b..481e9203b7 100644 --- a/src/simulation.F90 +++ b/src/simulation.F90 @@ -204,7 +204,8 @@ contains ! Reset total starting particle weight used for normalizing tallies total_weight = ZERO - if (n_inactive > 0 .and. current_batch == 1) then + if ((n_inactive > 0 .and. current_batch == 1) .or. & + (restart_run .and. restart_batch <= n_inactive .and. current_batch == restart_batch)) then ! Turn on inactive timer call time_inactive % start() elseif (current_batch == n_inactive + 1) then @@ -394,7 +395,7 @@ contains subroutine replay_batch_history ! Write message at beginning - if (current_batch == 1) then + if (n_realizations == 0) then call write_message("Replaying history from state point...", 6) end if @@ -414,10 +415,12 @@ contains end if ! Increment n_realizations as would ordinarily be done in finalize_batch - if (reduce_tallies) then - n_realizations = n_realizations + 1 - else - n_realizations = n_realizations + n_procs + if (current_batch > n_inactive) then + if (reduce_tallies) then + n_realizations = n_realizations + 1 + else + n_realizations = n_realizations + n_procs + end if end if ! Write message at end @@ -503,6 +506,12 @@ contains else current_batch = restart_batch - n_realizations*n_procs end if + ! If simulation restarted from inactive batch, decrement current_batch + ! by one to replay an additional batch so that keff is set before resuming + ! simulation + if (restart_batch <= n_inactive) then + current_batch = current_batch - 1 + end if n_realizations = 0 end if From 47cd40849c76bb51eb75671a83f2231a69dccda4 Mon Sep 17 00:00:00 2001 From: Shikhar Kumar Date: Wed, 26 Sep 2018 17:21:15 -0400 Subject: [PATCH 05/11] Remove whitespace, add more comments --- src/simulation.F90 | 4 ++-- src/vector_header.F90 | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/simulation.F90 b/src/simulation.F90 index 481e9203b7..f9fcc62bd5 100644 --- a/src/simulation.F90 +++ b/src/simulation.F90 @@ -205,7 +205,7 @@ contains total_weight = ZERO if ((n_inactive > 0 .and. current_batch == 1) .or. & - (restart_run .and. restart_batch <= n_inactive .and. current_batch == restart_batch)) then + (restart_run .and. restart_batch <= n_inactive .and. current_batch == restart_batch)) then ! Turn on inactive timer call time_inactive % start() elseif (current_batch == n_inactive + 1) then @@ -414,7 +414,7 @@ contains end do end if - ! Increment n_realizations as would ordinarily be done in finalize_batch + ! Increment n_realizations if in active batches as would ordinarily be done in finalize_batch if (current_batch > n_inactive) then if (reduce_tallies) then n_realizations = n_realizations + 1 diff --git a/src/vector_header.F90 b/src/vector_header.F90 index 27d773f888..fd7726c79e 100644 --- a/src/vector_header.F90 +++ b/src/vector_header.F90 @@ -91,23 +91,23 @@ contains !=============================================================================== ! VECTOR_WRITE writes a vector to file !=============================================================================== - + subroutine vector_write(self, filename) - + class(Vector), target, intent(inout) :: self ! vector instance character(*), intent(in) :: filename ! filename to output to - + integer :: unit_ integer :: i - + open(newunit=unit_, file=filename) - + do i = 1, self % n write(unit_,*) i, self % data(i) end do - + close(unit_) - + end subroutine vector_write end module vector_header From 3ec09e8124116d3ce6d1ca867a9809a875bbab0b Mon Sep 17 00:00:00 2001 From: Shikhar Kumar Date: Tue, 2 Oct 2018 18:15:55 -0400 Subject: [PATCH 06/11] Redefine score_index to reflect correct order of bins --- src/cmfd_data.F90 | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/cmfd_data.F90 b/src/cmfd_data.F90 index 32a85cabfd..bf33bbd8eb 100644 --- a/src/cmfd_data.F90 +++ b/src/cmfd_data.F90 @@ -254,7 +254,7 @@ contains ! Set the energy bin if needed if (energy_filters) then - filter_matches(i_filter_ein) % bins % data(1) = 12*(ng - h) + 1 + filter_matches(i_filter_ein) % bins % data(1) = ng - h end if score_index = 0 @@ -265,39 +265,39 @@ contains ! Left surface cmfd % current(1,h,i,j,k) = t % results(RESULT_SUM, 1, & - score_index + OUT_LEFT) + score_index + ng*OUT_LEFT) cmfd % current(2,h,i,j,k) = t % results(RESULT_SUM, 1, & - score_index + IN_LEFT) + score_index + ng*IN_LEFT) ! Right surface cmfd % current(3,h,i,j,k) = t % results(RESULT_SUM, 1, & - score_index + IN_RIGHT) + score_index + ng*IN_RIGHT) cmfd % current(4,h,i,j,k) = t % results(RESULT_SUM, 1, & - score_index + OUT_RIGHT) + score_index + ng*OUT_RIGHT) ! Back surface cmfd % current(5,h,i,j,k) = t % results(RESULT_SUM, 1, & - score_index + OUT_BACK) + score_index + ng*OUT_BACK) cmfd % current(6,h,i,j,k) = t % results(RESULT_SUM, 1, & - score_index + IN_BACK) + score_index + ng*IN_BACK) ! Front surface cmfd % current(7,h,i,j,k) = t % results(RESULT_SUM, 1, & - score_index + IN_FRONT) + score_index + ng*IN_FRONT) cmfd % current(8,h,i,j,k) = t % results(RESULT_SUM, 1, & - score_index + OUT_FRONT) + score_index + ng*OUT_FRONT) ! Left surface cmfd % current(9,h,i,j,k) = t % results(RESULT_SUM, 1, & - score_index + OUT_BOTTOM) + score_index + ng*OUT_BOTTOM) cmfd % current(10,h,i,j,k) = t % results(RESULT_SUM, 1, & - score_index + IN_BOTTOM) + score_index + ng*IN_BOTTOM) ! Right surface cmfd % current(11,h,i,j,k) = t % results(RESULT_SUM, 1, & - score_index + IN_TOP) + score_index + ng*IN_TOP) cmfd % current(12,h,i,j,k) = t % results(RESULT_SUM, 1, & - score_index + OUT_TOP) + score_index + ng*OUT_TOP) else if (ital == 4) then From f216ee3fb43da3a18062d90e00eb315f5c135416 Mon Sep 17 00:00:00 2001 From: Shikhar Kumar Date: Tue, 2 Oct 2018 22:02:54 -0400 Subject: [PATCH 07/11] First pass at removing replay_batch_history --- src/simulation.F90 | 71 ++------------------------------------------- src/state_point.F90 | 16 +++++++++- 2 files changed, 17 insertions(+), 70 deletions(-) diff --git a/src/simulation.F90 b/src/simulation.F90 index f9fcc62bd5..b51962a17e 100644 --- a/src/simulation.F90 +++ b/src/simulation.F90 @@ -87,13 +87,6 @@ contains call initialize_batch() - ! Handle restart runs - if (restart_run .and. current_batch <= restart_batch) then - call replay_batch_history() - status = STATUS_EXIT_NORMAL - return - end if - ! ======================================================================= ! LOOP OVER GENERATIONS GENERATION_LOOP: do current_gen = 1, gen_per_batch @@ -205,7 +198,7 @@ contains total_weight = ZERO if ((n_inactive > 0 .and. current_batch == 1) .or. & - (restart_run .and. restart_batch <= n_inactive .and. current_batch == restart_batch)) then + (restart_run .and. restart_batch < n_inactive .and. current_batch == restart_batch + 1)) then ! Turn on inactive timer call time_inactive % start() elseif (current_batch == n_inactive + 1) then @@ -387,48 +380,6 @@ contains end subroutine finalize_batch -!=============================================================================== -! REPLAY_BATCH_HISTORY displays keff and entropy for each generation within a -! batch using data read from a state point file -!=============================================================================== - - subroutine replay_batch_history - - ! Write message at beginning - if (n_realizations == 0) then - call write_message("Replaying history from state point...", 6) - end if - - if (run_mode == MODE_EIGENVALUE) then - do current_gen = 1, gen_per_batch - call calculate_average_keff() - - ! print out batch keff - if (verbosity >= 7) then - if (current_gen < gen_per_batch) then - if (master) call print_generation() - else - if (master) call print_batch_keff() - end if - end if - end do - end if - - ! Increment n_realizations if in active batches as would ordinarily be done in finalize_batch - if (current_batch > n_inactive) then - if (reduce_tallies) then - n_realizations = n_realizations + 1 - else - n_realizations = n_realizations + n_procs - end if - end if - - ! Write message at end - if (current_batch == restart_batch) then - call write_message("Resuming simulation...", 6) - end if - - end subroutine replay_batch_history !=============================================================================== ! INITIALIZE_SIMULATION @@ -492,29 +443,11 @@ contains ! file if (restart_run) then call load_state_point() + call write_message("Resuming simulation...", 6) else call initialize_source() end if - ! In restart, set the batch to begin from in order to reproduce the correct - ! average keff (used in sampling the fission bank). Use n_realizations from - ! the statepoint rather than n_inactive in case openmc_reset was called in - ! the previous run. - if (restart_run) then - if (reduce_tallies) then - current_batch = restart_batch - n_realizations - else - current_batch = restart_batch - n_realizations*n_procs - end if - ! If simulation restarted from inactive batch, decrement current_batch - ! by one to replay an additional batch so that keff is set before resuming - ! simulation - if (restart_batch <= n_inactive) then - current_batch = current_batch - 1 - end if - n_realizations = 0 - end if - ! Display header if (master) then if (run_mode == MODE_FIXEDSOURCE) then diff --git a/src/state_point.F90 b/src/state_point.F90 index 526066c529..91d0f10908 100644 --- a/src/state_point.F90 +++ b/src/state_point.F90 @@ -16,7 +16,7 @@ module state_point use bank_header, only: Bank use cmfd_header use constants - use eigenvalue, only: openmc_get_keff + use eigenvalue, only: openmc_get_keff, k_sum use endf, only: reaction_name use error, only: fatal_error, warning, write_message use hdf5_interface @@ -749,6 +749,20 @@ contains ! Read number of realizations for global tallies call read_dataset(n_realizations, file_id, "n_realizations", indep=.true.) + ! Set k_sum, keff, and current_batch based on whether restart file is part + ! of active cycle or inactive cycle + if (restart_batch > n_inactive) then + do i = n_inactive + 1, restart_batch + k_sum(1) = k_sum(1) + k_generation % data(i) + k_sum(2) = k_sum(2) + k_generation % data(i)**2 + end do + n = gen_per_batch*n_realizations + keff = k_sum(1) / n + else + keff = k_generation % data(n) + end if + current_batch = restart_batch + ! Check to make sure source bank is present if (path_source_point == path_state_point .and. .not. source_present) then call fatal_error("Source bank must be contained in statepoint restart & From 6ad57ae11dbba47dd335e3ec1f9e08f19b598433 Mon Sep 17 00:00:00 2001 From: Shikhar Kumar Date: Tue, 2 Oct 2018 22:13:52 -0400 Subject: [PATCH 08/11] Turn on active timer for restart run in actives --- src/simulation.F90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/simulation.F90 b/src/simulation.F90 index b51962a17e..b1087e21d2 100644 --- a/src/simulation.F90 +++ b/src/simulation.F90 @@ -201,7 +201,8 @@ contains (restart_run .and. restart_batch < n_inactive .and. current_batch == restart_batch + 1)) then ! Turn on inactive timer call time_inactive % start() - elseif (current_batch == n_inactive + 1) then + elseif ((current_batch == n_inactive + 1) .or. & + (restart_run .and. restart_batch > n_inactive .and. current_batch == restart_batch + 1)) then ! Switch from inactive batch timer to active batch timer call time_inactive % stop() call time_active % start() From 8feefcd13a5b14fa174da562b29f9d0653bbc9d4 Mon Sep 17 00:00:00 2001 From: Shikhar Kumar Date: Wed, 3 Oct 2018 11:38:07 -0400 Subject: [PATCH 09/11] Fix travis error --- tests/unit_tests/test_capi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit_tests/test_capi.py b/tests/unit_tests/test_capi.py index 9d3bc106d2..ae2d927191 100644 --- a/tests/unit_tests/test_capi.py +++ b/tests/unit_tests/test_capi.py @@ -375,13 +375,13 @@ def test_restart(capi_init): openmc.capi.next_batch() keff0 = openmc.capi.keff() - # Restart the simulation from the statepoint and the 5 active batches. + # Restart the simulation from the statepoint and the 3 remaining active batches. openmc.capi.simulation_finalize() openmc.capi.hard_reset() openmc.capi.finalize() openmc.capi.init(args=('-r', 'restart_test.h5')) openmc.capi.simulation_init() - for i in range(5): + for i in range(3): openmc.capi.next_batch() keff1 = openmc.capi.keff() openmc.capi.simulation_finalize() From 4db16feec7cd417adcad77d692613f000d8f1081 Mon Sep 17 00:00:00 2001 From: Shikhar Kumar Date: Thu, 4 Oct 2018 21:27:50 -0400 Subject: [PATCH 10/11] Fix cmfd tally indexing --- src/cmfd_data.F90 | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/cmfd_data.F90 b/src/cmfd_data.F90 index bf33bbd8eb..ef85949b9c 100644 --- a/src/cmfd_data.F90 +++ b/src/cmfd_data.F90 @@ -254,7 +254,7 @@ contains ! Set the energy bin if needed if (energy_filters) then - filter_matches(i_filter_ein) % bins % data(1) = ng - h + filter_matches(i_filter_ein) % bins % data(1) = ng - h + 1 end if score_index = 0 @@ -265,39 +265,39 @@ contains ! Left surface cmfd % current(1,h,i,j,k) = t % results(RESULT_SUM, 1, & - score_index + ng*OUT_LEFT) + score_index + 1 + ng*(OUT_LEFT - 1)) cmfd % current(2,h,i,j,k) = t % results(RESULT_SUM, 1, & - score_index + ng*IN_LEFT) + score_index + 1 + ng*(IN_LEFT - 1)) ! Right surface cmfd % current(3,h,i,j,k) = t % results(RESULT_SUM, 1, & - score_index + ng*IN_RIGHT) + score_index + 1 + ng*(IN_RIGHT - 1)) cmfd % current(4,h,i,j,k) = t % results(RESULT_SUM, 1, & - score_index + ng*OUT_RIGHT) + score_index + 1 + ng*(OUT_RIGHT - 1)) ! Back surface cmfd % current(5,h,i,j,k) = t % results(RESULT_SUM, 1, & - score_index + ng*OUT_BACK) + score_index + 1 + ng*(OUT_BACK - 1)) cmfd % current(6,h,i,j,k) = t % results(RESULT_SUM, 1, & - score_index + ng*IN_BACK) + score_index + 1 + ng*(IN_BACK - 1)) ! Front surface cmfd % current(7,h,i,j,k) = t % results(RESULT_SUM, 1, & - score_index + ng*IN_FRONT) + score_index + 1 + ng*(IN_FRONT - 1)) cmfd % current(8,h,i,j,k) = t % results(RESULT_SUM, 1, & - score_index + ng*OUT_FRONT) + score_index + 1 + ng*(OUT_FRONT - 1)) ! Left surface cmfd % current(9,h,i,j,k) = t % results(RESULT_SUM, 1, & - score_index + ng*OUT_BOTTOM) + score_index + 1 + ng*(OUT_BOTTOM - 1)) cmfd % current(10,h,i,j,k) = t % results(RESULT_SUM, 1, & - score_index + ng*IN_BOTTOM) + score_index + 1 + ng*(IN_BOTTOM - 1)) ! Right surface cmfd % current(11,h,i,j,k) = t % results(RESULT_SUM, 1, & - score_index + ng*IN_TOP) + score_index + 1 + ng*(IN_TOP - 1)) cmfd % current(12,h,i,j,k) = t % results(RESULT_SUM, 1, & - score_index + ng*OUT_TOP) + score_index + 1 + ng*(OUT_TOP - 1)) else if (ital == 4) then From c9a3900842d9fb1450c00c0ae6d9d02acea4c4db Mon Sep 17 00:00:00 2001 From: Shikhar Kumar Date: Thu, 4 Oct 2018 22:07:01 -0400 Subject: [PATCH 11/11] Remove print statement in cmfd_execute.cpp --- src/cmfd_execute.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/cmfd_execute.cpp b/src/cmfd_execute.cpp index 7774cfe1d2..740c1f51f0 100644 --- a/src/cmfd_execute.cpp +++ b/src/cmfd_execute.cpp @@ -25,8 +25,6 @@ cmfd_populate_sourcecounts(int n_energy, const double* energies, auto& m = meshes.at(index_cmfd_mesh); xt::xarray counts = m->count_sites(openmc_work, source_bank, n_energy, energies, outside); - std::cout << counts << "\n"; - // Copy data from the xarray into the source counts array std::copy(counts.begin(), counts.end(), source_counts); }