From 85a60e2390dd6c8db91940f7b753c74628472677 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Sat, 28 Jul 2012 18:21:52 -0400 Subject: [PATCH] Pick closest angular distribution for law 61. Closes #98 on github. --- src/physics.F90 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/physics.F90 b/src/physics.F90 index d566da279e..ac461e724d 100644 --- a/src/physics.F90 +++ b/src/physics.F90 @@ -1950,8 +1950,12 @@ contains E_out = E_1 + (E_out - E_i1_1)*(E_K - E_1)/(E_i1_K - E_i1_1) end if - ! Find location of correlated angular distribution - lc = int(edist % data(lc+3*NP+k)) + ! Find correlated angular distribution for closest outgoing energy bin + if (r1 - c_k < c_k1 - r1) then + lc = int(edist % data(lc + 3*NP + k)) + else + lc = int(edist % data(lc + 3*NP + k + 1)) + end if ! Check if angular distribution is isotropic if (lc == 0) then