From e88ef6e3b51059a50d593fe6ef5d3f907caafcd3 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Tue, 18 Jun 2013 21:26:28 -0400 Subject: [PATCH] Simplify multiplying of tally uncertainties by t-value. --- src/output.F90 | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/output.F90 b/src/output.F90 index fa895f97b8..4b1b21096a 100644 --- a/src/output.F90 +++ b/src/output.F90 @@ -1603,18 +1603,15 @@ contains TALLY_LOOP: do i = 1, n_tallies t => tallies(i) - ! Multiply uncertainty by t-value if (confidence_intervals) then - do k = 1, size(t % results, 2) - do j = 1, size(t % results, 1) - ! Calculate t-value for confidence intervals - if (confidence_intervals) then - alpha = ONE - CONFIDENCE_LEVEL - t_value = t_percentile(ONE - alpha/TWO, t % n_realizations - 1) - end if - t % results(j,k) % sum_sq = t_value * t % results(j,k) % sum_sq - end do - end do + ! Calculate t-value for confidence intervals + if (confidence_intervals) then + alpha = ONE - CONFIDENCE_LEVEL + t_value = t_percentile(ONE - alpha/TWO, t % n_realizations - 1) + end if + + ! Multiply uncertainty by t-value + t % results % sum_sq = t_value * t % results % sum_sq end if ! Write header block