MQDS  0.0.1
Molecular Quantum Dynamics and Spectroscopy
Functions/Subroutines | Variables
random_numbers Module Reference

This module contains the necessary functions for random number generation. More...

Functions/Subroutines

subroutine initialize_rn (my_pe)
 cdf_g, cdf_e are radial cumulative distribution functions for the ground and first excited harmonic oscillator states More...
 
real(dp) function, dimension(size(input)) uniform_rn (input)
 sample a uniform [0,1) random number More...
 
real(dp) function, dimension(size(input)) gaussian_rn (input)
 Gaussian random number generation using the Box-Mueller process with two uniform [0,1) random number. More...
 
subroutine build_current_cdfs (c_f, c_b, islice)
 This is a subroutine that builds the normalized cumulative distribution functions for the radial portion of the ground and first excited state harmonic states in polar coordinates ( \( (x - i p) \rightarrow r e^{-i \theta} \)) More...
 
subroutine sample_current_cdfs (r, rt)
 subroutine to sample the current cumulative distribution functions for the radial portion of the harmonic oscillator states More...
 
real(dp) function ground_rn ()
 This function assigns a random number distributed according to the radial portion of the ground harmonic oscillator state in polar coordinates. More...
 
real(dp) function excited_rn ()
 This function assigns a random number distributed according to the radial portion of the first excited harmonic oscillator state in polar coordinates. More...
 

Variables

real(dp), dimension(:,:), allocatable radial_f
 
real(dp), dimension(:,:), allocatable radial_b
 

Detailed Description

This module contains the necessary functions for random number generation.

Function/Subroutine Documentation

◆ build_current_cdfs()

subroutine random_numbers::build_current_cdfs ( complex(dp), dimension( nstate ), intent(in)  c_f,
complex(dp), dimension( nstate ), intent(in)  c_b,
integer, intent(in)  islice 
)

This is a subroutine that builds the normalized cumulative distribution functions for the radial portion of the ground and first excited state harmonic states in polar coordinates ( \( (x - i p) \rightarrow r e^{-i \theta} \))

◆ excited_rn()

real(dp) function random_numbers::excited_rn ( )

This function assigns a random number distributed according to the radial portion of the first excited harmonic oscillator state in polar coordinates.

◆ gaussian_rn()

real(dp) function, dimension(size(input)) random_numbers::gaussian_rn ( real(dp), dimension(:)  input)

Gaussian random number generation using the Box-Mueller process with two uniform [0,1) random number.

◆ ground_rn()

real(dp) function random_numbers::ground_rn ( )

This function assigns a random number distributed according to the radial portion of the ground harmonic oscillator state in polar coordinates.

◆ initialize_rn()

subroutine random_numbers::initialize_rn ( integer, intent(in), optional  my_pe)

cdf_g, cdf_e are radial cumulative distribution functions for the ground and first excited harmonic oscillator states

radial_f, radial_b are the full radial CDFs for forward and backward mapping variables based on linear combinations of cdf_g, cdf_e where coefficients come from final mapping variable values from previous propagation. These are what the mapping variables are sampled from Inserts the random number generation seed based upon the current time. If the calculation is being done with MPI-parallelization, this subroutine takes the processing element ID number as an argument to ensure that the seeds are unique.

◆ sample_current_cdfs()

subroutine random_numbers::sample_current_cdfs ( real(dp), dimension(nstate), intent(out)  r,
real(dp), dimension(nstate), intent(out)  rt 
)

subroutine to sample the current cumulative distribution functions for the radial portion of the harmonic oscillator states

◆ uniform_rn()

real(dp) function, dimension(size(input)) random_numbers::uniform_rn ( real(dp), dimension(:)  input)

sample a uniform [0,1) random number

Variable Documentation

◆ radial_b

real(dp), dimension(:,:), allocatable random_numbers::radial_b

◆ radial_f

real(dp), dimension(:,:), allocatable random_numbers::radial_f