Configure the pseudorandom number generator (PRNG).

Allows to select method and global seeds in order to vary the initial state of the parallel PRNG.

namespace picongpu
namespace random


using Generator = pmacc::random::methods::XorMin<>

Random number generation methods.

It is not allowed to change the method and restart an already existing checkpoint.

  • pmacc::random::methods::XorMin

  • pmacc::random::methods::MRG32k3aMin

  • pmacc::random::methods::AlpakaRand

using SeedGenerator = seed::Value<42>

random number start seed

Generator to create a seed for the random number generator. Depending of the generator the seed is reproducible or or changed with each program execution.

  • seed::Value< 42 >

  • seed::FromTime

  • seed::FromEnvironment


namespace picongpu


constexpr float_64 PI = 3.141592653589793238462643383279502884197169399
constexpr float_64 UNIT_SPEED = SI::SPEED_OF_LIGHT_SI

Unit of speed.

constexpr float_X SPEED_OF_LIGHT = float_X(SI::SPEED_OF_LIGHT_SI / UNIT_SPEED)
constexpr float_64 UNITCONV_keV_to_Joule = 1.60217646e-16
constexpr float_64 UNITCONV_Joule_to_keV = (1.0 / UNITCONV_keV_to_Joule)
constexpr float_64 UNITCONV_AU_to_eV = 27.21139
constexpr float_64 UNITCONV_eV_to_AU = (1.0 / UNITCONV_AU_to_eV)
namespace SI


constexpr float_64 SPEED_OF_LIGHT_SI = 2.99792458e8

unit: m / s

constexpr float_64 MUE0_SI = PI * 4.e-7

unit: N / A^2

constexpr float_64 EPS0_SI = 1.0 / MUE0_SI / SPEED_OF_LIGHT_SI / SPEED_OF_LIGHT_SI

unit: C / (V m)

constexpr float_64 Z0_SI = MUE0_SI * SPEED_OF_LIGHT_SI

impedance of free space unit: ohm

constexpr float_64 HBAR_SI = 1.054571800e-34

reduced Planck constant unit: J * s

constexpr float_64 ELECTRON_MASS_SI = 9.109382e-31

unit: kg

constexpr float_64 ELECTRON_CHARGE_SI = -1.602176e-19

unit: C

constexpr float_64 ATOMIC_UNIT_ENERGY = 4.36e-18
constexpr float_64 ATOMIC_UNIT_EFIELD = 5.14e11
constexpr float_64 ATOMIC_UNIT_TIME = 2.4189e-17
constexpr float_64 N_AVOGADRO = 6.02214076e23

Avogadro number unit: mol^-1.

Y. Azuma et al. Improved measurement results for the Avogadro constant using a 28-Si-enriched crystal, Metrologie 52, 2015, 360-375 doi:10.1088/0026-1394/52/2/360