Skip to content

Commit 185920a

Browse files
committed
Allow source particles with energy below cutoff (will just deposit energy)
1 parent d7fc8e5 commit 185920a

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

‎docs/source/usersguide/tallies.rst‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,8 @@ The following tables show all valid scores:
269269
|heating |Total nuclear heating in units of eV per source |
270270
| |particle. For neutrons, this corresponds to MT=301 |
271271
| |produced by NJOY's HEATR module while for photons, |
272-
| |this is tallied from either direct photon energy |
273-
| |deposition (analog estimator) or pre-generated |
274-
| |photon heating number. See :ref:`methods_heating` |
272+
| |this is tallied from direct photon energy |
273+
| |deposition. See :ref:`methods_heating`. |
275274
+----------------------+---------------------------------------------------+
276275
|heating-local |Total nuclear heating in units of eV per source |
277276
| |particle assuming energy from secondary photons is |

‎src/source.cpp‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,18 +256,15 @@ SourceSite IndependentSource::sample(uint64_t* seed) const
256256
if (xt::any(energies > data::energy_max[p])) {
257257
fatal_error("Source energy above range of energies of at least "
258258
"one cross section table");
259-
} else if (xt::any(energies < data::energy_min[p])) {
260-
fatal_error("Source energy below range of energies of at least "
261-
"one cross section table");
262259
}
263260
}
264261

265262
while (true) {
266263
// Sample energy spectrum
267264
site.E = energy_->sample(seed);
268265

269-
// Resample if energy falls outside minimum or maximum particle energy
270-
if (site.E < data::energy_max[p] && site.E > data::energy_min[p])
266+
// Resample if energy falls above maximum particle energy
267+
if (site.E < data::energy_max[p])
271268
break;
272269

273270
n_reject++;

0 commit comments

Comments
 (0)