From dc2e386a29657b887dacfdeb7c545cee74e34805 Mon Sep 17 00:00:00 2001 From: Olaf Schumann Date: Mon, 17 Jan 2022 08:49:46 +0100 Subject: [PATCH] Update src/secondary_thermal.cpp Co-authored-by: Paul Romano --- src/secondary_thermal.cpp | 8 +++----- tests/regression_tests/triso/results_true.dat | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/secondary_thermal.cpp b/src/secondary_thermal.cpp index 6e04092b35..3677f6ed3a 100644 --- a/src/secondary_thermal.cpp +++ b/src/secondary_thermal.cpp @@ -4,6 +4,8 @@ #include "openmc/random_lcg.h" #include "openmc/search.h" +#include + #include "xtensor/xview.hpp" #include // for log, exp @@ -38,11 +40,7 @@ void CoherentElasticAE::sample( const auto& energies {xs_.bragg_edges()}; - if (E_in < energies.front()) { - // XS is zero for E < energies[0] -> no scatter - mu = 1.0; - return; - } + Expects(E_in >= energies.front()); const int i = lower_bound_index(energies.begin(), energies.end(), E_in); diff --git a/tests/regression_tests/triso/results_true.dat b/tests/regression_tests/triso/results_true.dat index 31d4a8544f..279094ab3d 100644 --- a/tests/regression_tests/triso/results_true.dat +++ b/tests/regression_tests/triso/results_true.dat @@ -1,2 +1,2 @@ k-combined: -1.406055E+00 9.581397E-02 +1.406055E+00 9.581396E-02