Allow source particles with energy below cutoff (will just deposit energy)

This commit is contained in:
Paul Romano 2022-12-05 16:19:58 -06:00
parent d7fc8e59a2
commit 185920a7f1
2 changed files with 4 additions and 8 deletions

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