Add option for survival biasing source normalization (#3070)

Co-authored-by: Patrick Shriwise <pshriwise@gmail.com>
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
Perry 2025-03-06 16:00:29 -08:00 committed by GitHub
parent 9bfce4ee1c
commit e8c9134ff6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 76 additions and 26 deletions

View file

@ -586,6 +586,9 @@ void initialize_history(Particle& p, int64_t index_source)
// Reset weight window ratio
p.ww_factor() = 0.0;
// set particle history start weight
p.wgt_born() = p.wgt();
// Reset pulse_height_storage
std::fill(p.pht_storage().begin(), p.pht_storage().end(), 0);
@ -610,7 +613,7 @@ void initialize_history(Particle& p, int64_t index_source)
write_message("Simulating Particle {}", p.id());
}
// Add paricle's starting weight to count for normalizing tallies later
// Add particle's starting weight to count for normalizing tallies later
#pragma omp atomic
simulation::total_weight += p.wgt();