mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Allow source particles with energy below cutoff (will just deposit energy)
This commit is contained in:
parent
d7fc8e59a2
commit
185920a7f1
2 changed files with 4 additions and 8 deletions
|
|
@ -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++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue