ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
random.hpp File Reference

Random number generation using Philox. More...

#include <utils/Vector.hpp>
#include <utils/u32_to_u64.hpp>
#include <utils/uniform.hpp>
#include <Random123/philox.h>
#include <cstddef>
#include <numbers>
#include <random>
#include <vector>
+ Include dependency graph for random.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Random
 

Enumerations

enum class  RNGSalt : uint32_t {
  FLUID = 0 , PARTICLES , LANGEVIN , LANGEVIN_ROT ,
  BROWNIAN_WALK , BROWNIAN_INC , BROWNIAN_ROT_INC , BROWNIAN_ROT_WALK ,
  NPTISO0_HALF_STEP1 , NPTISO0_HALF_STEP2 , NPTISOV , SALT_DPD ,
  THERMALIZED_BOND
}
 

Functions

template<RNGSalt salt>
auto Random::philox_4_uint64s (uint64_t counter, uint32_t seed, int key1, int key2=0)
 get 4 random uint 64 from the Philox RNG
 
template<RNGSalt salt, std::size_t N = 3, std::enable_if_t<(N > 1) and(N<=4), int > = 0>
auto Random::noise_uniform (uint64_t counter, uint32_t seed, int key1, int key2=0)
 Generator for random uniform noise.
 
template<RNGSalt salt, std::size_t N = 3, class = std::enable_if_t<(N >= 1) and (N <= 4)>>
auto Random::noise_gaussian (uint64_t counter, uint32_t seed, int key1, int key2=0)
 Generator for Gaussian noise.
 
template<typename T >
std::mt19937 Random::mt19937 (T &&seed)
 Mersenne Twister with warmup.
 

Detailed Description

Random number generation using Philox.

Definition in file random.hpp.

Enumeration Type Documentation

◆ RNGSalt

enum class RNGSalt : uint32_t
strong
Enumerator
FLUID 
PARTICLES 
LANGEVIN 
LANGEVIN_ROT 
BROWNIAN_WALK 
BROWNIAN_INC 
BROWNIAN_ROT_INC 
BROWNIAN_ROT_WALK 
NPTISO0_HALF_STEP1 
NPTISO0_HALF_STEP2 
NPTISOV 
SALT_DPD 
THERMALIZED_BOND 

Definition at line 47 of file random.hpp.