su2hmc
Loading...
Searching...
No Matches
random.h File Reference

Header for random number configuration. More...

#include <gsl/gsl_rng.h>
#include <par_mpi.h>
Include dependency graph for random.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int ranset (unsigned long *seed)
 Seed the ranlux generator from GSL.
int Par_ranset (unsigned long *seed, int iread)
 Uses the rank to get a new seed. Copying from the FORTRAN description here c create new seeds in range seed to 9*seed c having a range of 0*seed gave an unfortunate pattern c in the underlying value of ds(1) (it was always 10 times bigger c on the last processor). This does not appear to happen with 9.
int Gauss_z (Complex *ps, unsigned int n, const Complex mu, const double sigma)
 Generates a vector of normally distributed random double precision complex numbers using the Box-Muller Method.
int Gauss_d (double *ps, unsigned int n, const double mu, const double sigma)
 Generates a vector of normally distributed random double precision numbers using the Box-Muller Method.
int Gauss_c (Complex_f *ps, unsigned int n, const Complex_f mu, const float sigma)
 Generates a vector of normally distributed random single precision complex numbers using the Box-Muller Method.
int Gauss_f (float *ps, unsigned int n, const float mu, const float sigma)
 Generates a vector of normally distributed random single precision numbers using the Box-Muller Method.
int Par_ranread (char *filename, double *ranval)
 Reads ps from a file Since this function is very similar to Par_sread, I'm not really going to comment it check there if you are confused about things.
double Par_granf ()
 Generates a random double which is then sent to the other ranks.

Variables

gsl_rng * ranlux_instd
 RANLUX instance.
unsigned long seed
 RANLUX seed.

Detailed Description

Header for random number configuration.

Definition in file random.h.

Variable Documentation

◆ ranlux_instd

gsl_rng* ranlux_instd
extern

RANLUX instance.

Definition at line 16 of file random.c.

◆ seed

unsigned long seed
extern

RANLUX seed.

Definition at line 18 of file random.c.