From 4aae63ff770d9db1d70b175ada41e24a867b3737 Mon Sep 17 00:00:00 2001 From: Shikhar Kumar Date: Tue, 20 Feb 2018 14:38:45 -0500 Subject: [PATCH 1/7] Reorder printing calls to output CMFD data correctly --- src/output.F90 | 16 ++++++++++++---- src/simulation.F90 | 4 +++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/output.F90 b/src/output.F90 index 9a144721dc..11366b5c03 100644 --- a/src/output.F90 +++ b/src/output.F90 @@ -368,7 +368,7 @@ contains ! write out entropy info if (entropy_on) write(UNIT=OUTPUT_UNIT, FMT='(3X, F8.5)', ADVANCE='NO') & entropy % data(i) - + ! write out accumulated k-effective if after first active batch if (n > 1) then write(UNIT=OUTPUT_UNIT, FMT='(3X, F8.5," +/-",F8.5)', ADVANCE='NO') & @@ -376,6 +376,15 @@ contains else write(UNIT=OUTPUT_UNIT, FMT='(23X)', ADVANCE='NO') end if + + end subroutine print_batch_keff + +!=============================================================================== +! PRINT_BATCH_KEFF displays the last batch's tallied value of the neutron +! multiplication factor as well as the average value if we're in active batches +!=============================================================================== + + subroutine print_cmfd() ! write out cmfd keff if it is active and other display info if (cmfd_on) then @@ -396,11 +405,10 @@ contains cmfd % dom(current_batch) end select end if - ! next line write(UNIT=OUTPUT_UNIT, FMT=*) - - end subroutine print_batch_keff + + end subroutine print_cmfd !=============================================================================== ! PRINT_PLOT displays selected options for plotting diff --git a/src/simulation.F90 b/src/simulation.F90 index ef29e7832b..91c176b995 100644 --- a/src/simulation.F90 +++ b/src/simulation.F90 @@ -24,7 +24,8 @@ module simulation use nuclide_header, only: micro_xs, n_nuclides use output, only: header, print_columns, & print_batch_keff, print_generation, print_runtime, & - print_results, print_overlap_check, write_tallies + print_results, print_overlap_check, write_tallies, & + print_cmfd use particle_header, only: Particle use random_lcg, only: set_particle_seed use settings @@ -338,6 +339,7 @@ contains if (run_mode == MODE_EIGENVALUE) then ! Perform CMFD calculation if on if (cmfd_on) call execute_cmfd() + call print_cmfd() end if ! Check_triggers From 552a8b9c0c48adb124a79405c62bbaa66c849fc9 Mon Sep 17 00:00:00 2001 From: Shikhar Kumar Date: Tue, 20 Feb 2018 14:46:03 -0500 Subject: [PATCH 2/7] Add description of print_cmfd --- src/output.F90 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/output.F90 b/src/output.F90 index 11366b5c03..30219e98a2 100644 --- a/src/output.F90 +++ b/src/output.F90 @@ -368,7 +368,7 @@ contains ! write out entropy info if (entropy_on) write(UNIT=OUTPUT_UNIT, FMT='(3X, F8.5)', ADVANCE='NO') & entropy % data(i) - + ! write out accumulated k-effective if after first active batch if (n > 1) then write(UNIT=OUTPUT_UNIT, FMT='(3X, F8.5," +/-",F8.5)', ADVANCE='NO') & @@ -380,8 +380,9 @@ contains end subroutine print_batch_keff !=============================================================================== -! PRINT_BATCH_KEFF displays the last batch's tallied value of the neutron -! multiplication factor as well as the average value if we're in active batches +! PRINT_CMFD displays the CMFD related information to output after CMFD is +! executed. Will print blank line if CMFD is not on, to ensure consistent +! formatting of output columns !=============================================================================== subroutine print_cmfd() @@ -405,9 +406,10 @@ contains cmfd % dom(current_batch) end select end if + ! next line write(UNIT=OUTPUT_UNIT, FMT=*) - + end subroutine print_cmfd !=============================================================================== From f15f824c997aa214d11fb1efc85dc0604a17bcd6 Mon Sep 17 00:00:00 2001 From: Shikhar Kumar Date: Tue, 20 Feb 2018 14:48:36 -0500 Subject: [PATCH 3/7] Minor spacing fix --- src/output.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/output.F90 b/src/output.F90 index 30219e98a2..643a28b671 100644 --- a/src/output.F90 +++ b/src/output.F90 @@ -409,7 +409,7 @@ contains ! next line write(UNIT=OUTPUT_UNIT, FMT=*) - + end subroutine print_cmfd !=============================================================================== From bedf99d2fea7f92b5558119b1ebc4a6602e2c920 Mon Sep 17 00:00:00 2001 From: Shikhar Kumar Date: Thu, 1 Mar 2018 15:56:24 -0500 Subject: [PATCH 4/7] remove print_cmfd and change order in which print_batch_keff is called --- src/output.F90 | 16 +++------------- src/simulation.F90 | 8 +++----- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/src/output.F90 b/src/output.F90 index 643a28b671..6e21d9143a 100644 --- a/src/output.F90 +++ b/src/output.F90 @@ -356,9 +356,9 @@ contains integer :: n ! number of active generations ! Determine overall generation and number of active generations - i = overall_generation() + i = overall_generation() - 1 n = i - n_inactive*gen_per_batch - + ! write out information batch and option independent output write(UNIT=OUTPUT_UNIT, FMT='(2X,A9)', ADVANCE='NO') & trim(to_str(current_batch)) // "/" // trim(to_str(gen_per_batch)) @@ -377,16 +377,6 @@ contains write(UNIT=OUTPUT_UNIT, FMT='(23X)', ADVANCE='NO') end if - end subroutine print_batch_keff - -!=============================================================================== -! PRINT_CMFD displays the CMFD related information to output after CMFD is -! executed. Will print blank line if CMFD is not on, to ensure consistent -! formatting of output columns -!=============================================================================== - - subroutine print_cmfd() - ! write out cmfd keff if it is active and other display info if (cmfd_on) then write(UNIT=OUTPUT_UNIT, FMT='(3X, F8.5)', ADVANCE='NO') & @@ -410,7 +400,7 @@ contains ! next line write(UNIT=OUTPUT_UNIT, FMT=*) - end subroutine print_cmfd + end subroutine print_batch_keff !=============================================================================== ! PRINT_PLOT displays selected options for plotting diff --git a/src/simulation.F90 b/src/simulation.F90 index 91c176b995..701cd191b7 100644 --- a/src/simulation.F90 +++ b/src/simulation.F90 @@ -24,8 +24,7 @@ module simulation use nuclide_header, only: micro_xs, n_nuclides use output, only: header, print_columns, & print_batch_keff, print_generation, print_runtime, & - print_results, print_overlap_check, write_tallies, & - print_cmfd + print_results, print_overlap_check, write_tallies use particle_header, only: Particle use random_lcg, only: set_particle_seed use settings @@ -295,8 +294,6 @@ contains if (master .and. verbosity >= 7) then if (current_gen /= gen_per_batch) then call print_generation() - else - call print_batch_keff() end if end if @@ -339,7 +336,8 @@ contains if (run_mode == MODE_EIGENVALUE) then ! Perform CMFD calculation if on if (cmfd_on) call execute_cmfd() - call print_cmfd() + ! Write batch output + if (master .and. verbosity >= 7) call print_batch_keff() end if ! Check_triggers From a21947ff9804f2b6a7e0be376986ff22c99c6722 Mon Sep 17 00:00:00 2001 From: Shikhar Kumar Date: Thu, 1 Mar 2018 16:15:53 -0500 Subject: [PATCH 5/7] Remove trailing whitespace 1 --- src/output.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/output.F90 b/src/output.F90 index 6e21d9143a..349d0007ef 100644 --- a/src/output.F90 +++ b/src/output.F90 @@ -358,7 +358,7 @@ contains ! Determine overall generation and number of active generations i = overall_generation() - 1 n = i - n_inactive*gen_per_batch - + ! write out information batch and option independent output write(UNIT=OUTPUT_UNIT, FMT='(2X,A9)', ADVANCE='NO') & trim(to_str(current_batch)) // "/" // trim(to_str(gen_per_batch)) From a96a192cd535429d0d38efb148fca60992935ffe Mon Sep 17 00:00:00 2001 From: Shikhar Kumar Date: Thu, 1 Mar 2018 16:34:16 -0500 Subject: [PATCH 6/7] Remove trailing whitespace 2 --- src/output.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/output.F90 b/src/output.F90 index 349d0007ef..908f698141 100644 --- a/src/output.F90 +++ b/src/output.F90 @@ -376,7 +376,7 @@ contains else write(UNIT=OUTPUT_UNIT, FMT='(23X)', ADVANCE='NO') end if - + ! write out cmfd keff if it is active and other display info if (cmfd_on) then write(UNIT=OUTPUT_UNIT, FMT='(3X, F8.5)', ADVANCE='NO') & From 3a90b147be78d57e0e795336740eb183295589e3 Mon Sep 17 00:00:00 2001 From: Shikhar Kumar Date: Mon, 5 Mar 2018 22:40:16 -0500 Subject: [PATCH 7/7] redefine i as current_batch*gen_per_batch --- src/output.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/output.F90 b/src/output.F90 index 908f698141..25cb84d58c 100644 --- a/src/output.F90 +++ b/src/output.F90 @@ -356,7 +356,7 @@ contains integer :: n ! number of active generations ! Determine overall generation and number of active generations - i = overall_generation() - 1 + i = current_batch*gen_per_batch n = i - n_inactive*gen_per_batch ! write out information batch and option independent output