From d1ca3519f2c56e400311ed9d6fde91f62512da0b Mon Sep 17 00:00:00 2001 From: Adam Nelson Date: Mon, 19 May 2014 12:19:14 -0400 Subject: [PATCH] Fixed sample_angles interpolation of mu. The old way was resulting in mus outside the range of [-1,1] and was effectively using the slope of the randomly selected bin but extrapolating to the next lower bin. --- src/physics.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/physics.F90 b/src/physics.F90 index 5d3433f3be..3460873e55 100644 --- a/src/physics.F90 +++ b/src/physics.F90 @@ -1164,7 +1164,7 @@ contains ! calculate cosine mu0 = rxn % adist % data(lc + k) mu1 = rxn % adist % data(lc + k+1) - mu = mu0 + (32.0_8 * xi - k) * (mu1 - mu0) + mu = mu0 + (32.0_8 * xi - k + ONE) * (mu1 - mu0) elseif (type == ANGLE_TABULAR) then interp = int(rxn % adist % data(lc + 1))