Millepede-II V04-17-05
Modules | Functions/Subroutines | Variables
randoms.f90 File Reference

Random numbers. More...

Go to the source code of this file.

Modules

module  mprand
 data for random generator
 

Functions/Subroutines

subroutine gbrshi (n, a)
 F.Gutbrod random number generator. More...
 
subroutine gbrvin (jseed, jwarm)
 initialize, but only once More...
 
subroutine gbrtim
 GBRSHI initialization using TIME(). More...
 
real(mps) function uran ()
 Random number U(0,1) using RANSHI. More...
 
real(mps) function gran ()
 Gauss random number. More...
 

Variables

integer(mpi), parameter mprand::nb =511
 
integer(mpi), parameter mprand::ia =16807
 
integer(mpi), parameter mprand::im =2147483647
 
integer(mpi), parameter mprand::iq =127773
 
integer(mpi), parameter mprand::ir =2836
 
real(mps), parameter mprand::aeps =1.0E-10
 
real(mps), parameter mprand::scalin =4.6566125E-10
 
integer(mpi), dimension(0:nb+1) mprand::mbuff
 
integer(mpi) mprand::ian
 
integer(mpi) mprand::ic
 
integer(mpi) mprand::iboost
 
integer(mpi) mprand::iseed = 4711
 
integer(mpi) mprand::istart = 0
 
integer(mpi) mprand::iwarm = 10
 

Detailed Description

Random numbers.

Author
Volker Blobel, University Hamburg, 2005-2009 (initial Fortran77 version)
Claus Kleinwort, DESY 2022 (maintenance and developement)

Random number generators for Uniform and Normal distribution:

URAN() for U(0,1)
GRAN() for N(0,1)

Definition in file randoms.f90.

Function/Subroutine Documentation

◆ gbrshi()

subroutine gbrshi ( integer(mpi), intent(in)  n,
real(mps), dimension(*), intent(out)  a 
)

F.Gutbrod random number generator.

Return N random numbers U(0,1) in array A(N). Initialization by entry GBRVIN.

Parameters
[in]nnumber of requested random number
[out]aarray of requested random number

Definition at line 59 of file randoms.f90.

References mprand::aeps, mprand::ia, mprand::ian, mprand::iboost, mprand::ic, mprand::im, mprand::iq, mprand::ir, mprand::iseed, mprand::istart, mprand::iwarm, mprand::mbuff, mprand::nb, and mprand::scalin.

Referenced by gran(), and uran().

◆ gbrtim()

subroutine gbrtim

GBRSHI initialization using TIME().

Definition at line 151 of file randoms.f90.

References gbrvin().

◆ gbrvin()

subroutine gbrvin ( integer(mpi), intent(in)  jseed,
integer(mpi), intent(in)  jwarm 
)

initialize, but only once

Parameters
[in]jseedseed
[in]jwarmwarm-up

Definition at line 111 of file randoms.f90.

References mprand::ia, mprand::ian, mprand::iboost, mprand::ic, mprand::im, mprand::iq, mprand::ir, mprand::iseed, mprand::istart, mprand::iwarm, mprand::mbuff, and mprand::nb.

Referenced by gbrtim().

◆ gran()

real(mps) function gran

Gauss random number.

Returns
random number N(0,1)

Definition at line 191 of file randoms.f90.

References gbrshi(), and gran().

Referenced by gran().

◆ uran()

real(mps) function uran

Random number U(0,1) using RANSHI.

Returns
random number U(0,1)

Definition at line 171 of file randoms.f90.

References gbrshi(), and uran().

Referenced by uran().