From e0e5936b7918fff27f660b4234996b653eaa4880 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Thu, 15 Apr 2021 16:29:14 -0500 Subject: [PATCH] Remove separate RNG stream for photons --- include/openmc/random_lcg.h | 10 ++++------ src/particle.cpp | 6 +----- src/physics.cpp | 2 -- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/include/openmc/random_lcg.h b/include/openmc/random_lcg.h index f5d5aa15b..d73cc3ee2 100644 --- a/include/openmc/random_lcg.h +++ b/include/openmc/random_lcg.h @@ -10,13 +10,11 @@ namespace openmc { // Module constants. //============================================================================== -constexpr int N_STREAMS {6}; +constexpr int N_STREAMS {4}; constexpr int STREAM_TRACKING {0}; -constexpr int STREAM_TALLIES {1}; -constexpr int STREAM_SOURCE {2}; -constexpr int STREAM_URR_PTABLE {3}; -constexpr int STREAM_VOLUME {4}; -constexpr int STREAM_PHOTON {5}; +constexpr int STREAM_SOURCE {1}; +constexpr int STREAM_URR_PTABLE {2}; +constexpr int STREAM_VOLUME {3}; constexpr int64_t DEFAULT_SEED {1}; //============================================================================== diff --git a/src/particle.cpp b/src/particle.cpp index 2e2413174..037566290 100644 --- a/src/particle.cpp +++ b/src/particle.cpp @@ -135,11 +135,7 @@ void Particle::event_calculate_xs() { // Set the random number stream - if (type_ == Particle::Type::neutron) { - stream_ = STREAM_TRACKING; - } else { - stream_ = STREAM_PHOTON; - } + stream_ = STREAM_TRACKING; // Store pre-collision particle properties wgt_last_ = wgt_; diff --git a/src/physics.cpp b/src/physics.cpp index 8e4b027ba..4b359c92e 100644 --- a/src/physics.cpp +++ b/src/physics.cpp @@ -117,9 +117,7 @@ void sample_neutron_reaction(Particle& p) // Create secondary photons if (settings::photon_transport) { - p.stream_ = STREAM_PHOTON; sample_secondary_photons(p, i_nuclide); - p.stream_ = STREAM_TRACKING; } // If survival biasing is being used, the following subroutine adjusts the