incorporated code review changes

This commit is contained in:
John Tramm 2019-12-05 19:32:12 +00:00
parent 08ce3f4614
commit 428bab4fd2
14 changed files with 82 additions and 79 deletions

View file

@ -218,6 +218,10 @@ public:
//! create a particle restart HDF5 file
void write_restart() const;
//! Gets the pointer to the particle's current PRN seed
uint64_t* current_seed();
const uint64_t* current_seed() const;
//==========================================================================
// Data members

View file

@ -43,11 +43,13 @@ double future_prn(int64_t n, uint64_t prn_seed);
//==============================================================================
//! Set a RNG seed to a unique value based on a unique particle ID by striding
//! the seed.
//! @param prn_seeds Pseudorandom number seed array
//! @param id The particle ID
//! @param offset The offset from the master seed to be used (e.g., for creating
//! different streams)
//! @return The initialized seed value
//==============================================================================
void init_seed(int64_t id, uint64_t* prn_seeds, int offset );
uint64_t init_seed(int64_t id, int offset);
//==============================================================================
//! Set the RNG seeds to unique values based on the ID of the particle. This
@ -57,7 +59,7 @@ void init_seed(int64_t id, uint64_t* prn_seeds, int offset );
//! @param id The particle ID
//==============================================================================
void init_particle_seeds(int64_t id, uint64_t* prn_seeds );
void init_particle_seeds(int64_t id, uint64_t* prn_seeds);
//==============================================================================
//! Advance the random number seed 'n' times from the current seed. This