mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 13:15:39 -04:00
updated signatures according to new changes in how seed is set
This commit is contained in:
parent
7a51552c3e
commit
55f85b1924
1 changed files with 7 additions and 7 deletions
|
|
@ -293,7 +293,7 @@ void initialize_source()
|
|||
#endif
|
||||
|
||||
// load the symbol
|
||||
typedef Particle::Bank (*sample_t)();
|
||||
typedef Particle::Bank (*sample_t)(uint64_t *seed);
|
||||
|
||||
// reset errors
|
||||
dlerror();
|
||||
|
|
@ -315,10 +315,10 @@ void initialize_source()
|
|||
// initialize random number seed
|
||||
int64_t id = simulation::total_gen*settings::n_particles +
|
||||
simulation::work_index[mpi::rank] + i + 1;
|
||||
set_particle_seed(id);
|
||||
uint64_t seed = init_seed(id, STREAM_SOURCE);
|
||||
|
||||
// sample external source distribution
|
||||
simulation::source_bank[i] = sample_source();
|
||||
simulation::source_bank[i] = sample_source(&seed);
|
||||
}
|
||||
// release the library
|
||||
dlclose(source_library);
|
||||
|
|
@ -405,7 +405,7 @@ void fill_source_bank_fixedsource()
|
|||
}
|
||||
|
||||
// load the symbol
|
||||
typedef Particle::Bank (*sample_t)();
|
||||
typedef Particle::Bank (*sample_t)(uint64_t *seed);
|
||||
|
||||
// reset errors
|
||||
dlerror();
|
||||
|
|
@ -427,10 +427,10 @@ void fill_source_bank_fixedsource()
|
|||
// initialize random number seed
|
||||
int64_t id = simulation::total_gen*settings::n_particles +
|
||||
simulation::work_index[mpi::rank] + i + 1;
|
||||
set_particle_seed(id);
|
||||
|
||||
uint64_t seed = init_seed(id, STREAM_SOURCE);
|
||||
|
||||
// sample external source distribution
|
||||
simulation::source_bank[i] = sample_source();
|
||||
simulation::source_bank[i] = sample_source(&seed);
|
||||
}
|
||||
|
||||
// release the library
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue