From 185920a7f1c99f6943934289c5a574e9e1dbb45a Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 5 Dec 2022 16:19:58 -0600 Subject: [PATCH] Allow source particles with energy below cutoff (will just deposit energy) --- docs/source/usersguide/tallies.rst | 5 ++--- src/source.cpp | 7 ++----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/docs/source/usersguide/tallies.rst b/docs/source/usersguide/tallies.rst index da2c5f26d..97ca319a2 100644 --- a/docs/source/usersguide/tallies.rst +++ b/docs/source/usersguide/tallies.rst @@ -269,9 +269,8 @@ The following tables show all valid scores: |heating |Total nuclear heating in units of eV per source | | |particle. For neutrons, this corresponds to MT=301 | | |produced by NJOY's HEATR module while for photons, | - | |this is tallied from either direct photon energy | - | |deposition (analog estimator) or pre-generated | - | |photon heating number. See :ref:`methods_heating` | + | |this is tallied from direct photon energy | + | |deposition. See :ref:`methods_heating`. | +----------------------+---------------------------------------------------+ |heating-local |Total nuclear heating in units of eV per source | | |particle assuming energy from secondary photons is | diff --git a/src/source.cpp b/src/source.cpp index d201e3c03..3a80e1156 100644 --- a/src/source.cpp +++ b/src/source.cpp @@ -256,9 +256,6 @@ SourceSite IndependentSource::sample(uint64_t* seed) const if (xt::any(energies > data::energy_max[p])) { fatal_error("Source energy above range of energies of at least " "one cross section table"); - } else if (xt::any(energies < data::energy_min[p])) { - fatal_error("Source energy below range of energies of at least " - "one cross section table"); } } @@ -266,8 +263,8 @@ SourceSite IndependentSource::sample(uint64_t* seed) const // Sample energy spectrum site.E = energy_->sample(seed); - // Resample if energy falls outside minimum or maximum particle energy - if (site.E < data::energy_max[p] && site.E > data::energy_min[p]) + // Resample if energy falls above maximum particle energy + if (site.E < data::energy_max[p]) break; n_reject++;