mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 05:05:30 -04:00
added particle based seed initialization. Now for sampling functions to use the new seeds.
This commit is contained in:
parent
5c7e7ff13f
commit
0ebfae4ef5
4 changed files with 24 additions and 21 deletions
|
|
@ -473,10 +473,14 @@ void initialize_history(Particle* p, int64_t index_source)
|
|||
// set identifier for particle
|
||||
p->id_ = simulation::work_index[mpi::rank] + index_source;
|
||||
|
||||
// TODO: Why doesn't this include the particle skip offset?
|
||||
// ANSWER: Stride is included in the set seed function, which actually forwards based
|
||||
// on the master_seed.
|
||||
// set random number seed
|
||||
int64_t particle_seed = (simulation::total_gen + overall_generation() - 1)
|
||||
* settings::n_particles + p->id_;
|
||||
set_particle_seed(particle_seed);
|
||||
//set_particle_seed(particle_seed);
|
||||
set_particle_seed(particle_seed, p->prn_seeds);
|
||||
|
||||
// set particle trace
|
||||
simulation::trace = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue