Merge pull request #2319 from paulromano/allow-low-source-energies

Allow source particles with energy below cutoff
This commit is contained in:
Paul Romano 2022-12-07 22:32:26 -06:00 committed by GitHub
commit 3addc25319
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 8 deletions

View file

@ -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 |

View file

@ -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++;