From 2602bef154cfef5115466c01a7cdaf7c85def6b8 Mon Sep 17 00:00:00 2001 From: Jose Salcedo Perez Date: Tue, 5 Jun 2018 19:11:45 +0000 Subject: [PATCH] fixing indentations and level-spacing. Changed index in 'nuclide_header.f90' line 891 from 4 to 1 (n,gamma) to account for the re-ordering of DEPLETION_RX. --- src/nuclide_header.F90 | 31 +++++++++++++++---------------- src/simulation.F90 | 2 +- src/tallies/tally.F90 | 12 ++++++------ 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/src/nuclide_header.F90 b/src/nuclide_header.F90 index 487c71545..8b71e6bf8 100644 --- a/src/nuclide_header.F90 +++ b/src/nuclide_header.F90 @@ -888,7 +888,7 @@ contains micro_xs % reaction(:) = ZERO ! Only non-zero reaction is (n,gamma) - micro_xs % reaction(4) = sig_a - sig_f + micro_xs % reaction(1) = sig_a - sig_f end if ! Ensure these values are set @@ -983,6 +983,18 @@ contains ! Initialize entire array to zero in case we skip ! any threshold reaction. micro_xs % reaction(:) = ZERO + + !there shouldn't be a threshold check for (n,gamma). + !I know this is not very clean but I don't want to overload the loop + !with too many conditional statements for now. + i_rxn = this % reaction_index(DEPLETION_RX(1)) + if (i_rxn > 0) then + associate (xs => this % reactions(i_rxn) % xs(i_temp)) + micro_xs % reaction(1) = (ONE - f) * & + xs % value(i_grid - xs % threshold + 1) + & + f * xs % value(i_grid - xs % threshold + 2) + end associate + end if !looping from element 2 to element 6. !treating (n,gamma) differently because it is not a threshold reaction. do j = 2, 6 @@ -998,25 +1010,12 @@ contains f * xs % value(i_grid - xs % threshold + 2) ! Check if we are below the (n,2n) and/or (n,3n) reaction thresholds to ! skip remaining depletion-xs construction. - else - if (j >= 4) then - exit - end if + elseif (j >= 4) then + exit end if end associate end if end do - !there shouldn't be a threshold check for (n,gamma). - !I know this is not very clean but I don't want to overload the loop - !with too many conditional statements for now. - i_rxn = this % reaction_index(DEPLETION_RX(1)) - if (i_rxn > 0) then - associate (xs => this % reactions(i_rxn) % xs(i_temp)) - micro_xs % reaction(1) = (ONE - f) * & - xs % value(i_grid - xs % threshold + 1) + & - f * xs % value(i_grid - xs % threshold + 2) - end associate - end if end if end if diff --git a/src/simulation.F90 b/src/simulation.F90 index cdb69efb4..4f6163429 100644 --- a/src/simulation.F90 +++ b/src/simulation.F90 @@ -516,7 +516,7 @@ contains n = size(results, 3) count_per_filter = size(results, 1) * size(results, 2) call MPI_TYPE_CONTIGUOUS(count_per_filter, MPI_DOUBLE, & - result_block, mpi_err) + result_block, mpi_err) call MPI_TYPE_COMMIT(result_block, mpi_err) call MPI_BCAST(results, n, result_block, 0, mpi_intracomm, mpi_err) call MPI_TYPE_FREE(result_block, mpi_err) diff --git a/src/tallies/tally.F90 b/src/tallies/tally.F90 index fb3a15d54..b245bf524 100644 --- a/src/tallies/tally.F90 +++ b/src/tallies/tally.F90 @@ -1074,18 +1074,18 @@ contains else ! Determine index in NuclideMicroXS % reaction array select case (score_bin) - case (N_2N) - m = 4 - case (N_3N) - m = 5 - case (N_4N) - m = 6 case (N_GAMMA) m = 1 case (N_P) m = 2 case (N_A) m = 3 + case (N_2N) + m = 4 + case (N_3N) + m = 5 + case (N_4N) + m = 6 end select if (i_nuclide > 0) then