mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Apply Weight Window Upon Surface Crossing (#2670)
Co-authored-by: Patrick Shriwise <pshriwise@gmail.com> Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
9b7b33c7fa
commit
9cf2f22f24
8 changed files with 97 additions and 8 deletions
|
|
@ -47,15 +47,9 @@ void collision(Particle& p)
|
|||
switch (p.type()) {
|
||||
case ParticleType::neutron:
|
||||
sample_neutron_reaction(p);
|
||||
if (settings::weight_windows_on) {
|
||||
apply_weight_windows(p);
|
||||
}
|
||||
break;
|
||||
case ParticleType::photon:
|
||||
sample_photon_reaction(p);
|
||||
if (settings::weight_windows_on) {
|
||||
apply_weight_windows(p);
|
||||
}
|
||||
break;
|
||||
case ParticleType::electron:
|
||||
sample_electron_reaction(p);
|
||||
|
|
@ -65,6 +59,9 @@ void collision(Particle& p)
|
|||
break;
|
||||
}
|
||||
|
||||
if (settings::weight_window_checkpoint_collision)
|
||||
apply_weight_windows(p);
|
||||
|
||||
// Kill particle if energy falls below cutoff
|
||||
int type = static_cast<int>(p.type());
|
||||
if (p.E() < settings::energy_cutoff[type]) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue