Skip to content

Commit

Permalink
write random_seed to output/random_seed.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
drbergman committed Nov 11, 2024
1 parent a37ee57 commit 1ab6978
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/PhysiCell_utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ void setup_rng( void )
warned = true;
}
std::cout << "Setting up RNG with seed " << physicell_random_seed << std::endl;

// save the seed to random_seed.txt
std::ofstream out(PhysiCell_settings.folder + "/random_seed.txt");
out << physicell_random_seed << std::endl;
out.close();

physicell_PRNG_generator.seed( physicell_random_seed );

// now get number of threads and set up a seed for each thread
Expand Down

0 comments on commit 1ab6978

Please sign in to comment.