Remove separate RNG stream for photons

This commit is contained in:
Paul Romano 2021-04-15 16:29:14 -05:00
parent 8a07feebcb
commit e0e5936b79
3 changed files with 5 additions and 13 deletions

View file

@ -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};
//==============================================================================

View file

@ -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_;

View file

@ -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