mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Make sure random number seed gets set properly for fixed source particle restart
This commit is contained in:
parent
e665965c60
commit
852c8ba926
1 changed files with 1 additions and 3 deletions
|
|
@ -95,13 +95,11 @@ void run_particle_restart()
|
|||
int64_t particle_seed;
|
||||
switch (previous_run_mode) {
|
||||
case RunMode::EIGENVALUE:
|
||||
case RunMode::FIXED_SOURCE:
|
||||
particle_seed = (simulation::total_gen + overall_generation() - 1) *
|
||||
settings::n_particles +
|
||||
p.id();
|
||||
break;
|
||||
case RunMode::FIXED_SOURCE:
|
||||
particle_seed = p.id();
|
||||
break;
|
||||
default:
|
||||
throw std::runtime_error {
|
||||
"Unexpected run mode: " +
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue