mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 05:05:30 -04:00
Move number of batches, generations, particles to settings.h
This commit is contained in:
parent
13341ba59b
commit
d1cc9fd9c6
11 changed files with 43 additions and 31 deletions
|
|
@ -273,7 +273,8 @@ void initialize_source()
|
|||
// Generation source sites from specified distribution in user input
|
||||
for (int64_t i = 0; i < openmc_work; ++i) {
|
||||
// initialize random number seed
|
||||
int64_t id = openmc_total_gen*n_particles + work_index[openmc::mpi::rank] + i + 1;
|
||||
int64_t id = openmc_total_gen*settings::n_particles +
|
||||
work_index[openmc::mpi::rank] + i + 1;
|
||||
set_particle_seed(id);
|
||||
|
||||
// sample external source distribution
|
||||
|
|
@ -365,8 +366,8 @@ extern "C" void fill_source_bank_fixedsource()
|
|||
|
||||
for (int64_t i = 0; i < openmc_work; ++i) {
|
||||
// initialize random number seed
|
||||
int64_t id = (openmc_total_gen + overall_generation())*n_particles +
|
||||
work_index[openmc::mpi::rank] + i + 1;
|
||||
int64_t id = (openmc_total_gen + overall_generation()) *
|
||||
settings::n_particles + work_index[openmc::mpi::rank] + i + 1;
|
||||
set_particle_seed(id);
|
||||
|
||||
// sample external source distribution
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue