m_ran_num Module

Module providing random number generation procedures. Uses Intel MKL VSL.


Uses

  • module~~m_ran_num~~UsesGraph module~m_ran_num m_ran_num mkl_vsl mkl_vsl module~m_ran_num->mkl_vsl mkl_vsl_type mkl_vsl_type module~m_ran_num->mkl_vsl_type module~m_precision m_precision module~m_ran_num->module~m_precision iso_fortran_env iso_fortran_env module~m_precision->iso_fortran_env

Used by

  • module~~m_ran_num~~UsedByGraph module~m_ran_num m_ran_num module~m_mc_moves m_mc_moves module~m_mc_moves->module~m_ran_num module~m_setup m_setup module~m_setup->module~m_ran_num module~m_mc_solver m_mc_solver module~m_setup->module~m_mc_solver module~m_mc_solver->module~m_mc_moves program~main main program~main->module~m_setup program~main->module~m_mc_solver

Functions

public function get_uniform(lb, ub) result(res)

Arguments

Type IntentOptional Attributes Name
real(kind=rp), intent(in) :: lb
real(kind=rp), intent(in) :: ub

Return Value real(kind=rp)

public function get_iuniform(lb, ub) result(res)

Arguments

Type IntentOptional Attributes Name
integer(kind=ip), intent(in) :: lb
integer(kind=ip), intent(in) :: ub

Return Value integer(kind=ip)


Subroutines

public subroutine init_stream(fn)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: fn

public subroutine delete_stream()

Arguments

None

public subroutine load_stream(fn)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: fn

public subroutine save_seed(fn)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: fn

public subroutine save_stream(fn)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: fn

public subroutine get_rv_uniform(lb, ub, rv, block_size)

Arguments

Type IntentOptional Attributes Name
real(kind=rp), intent(in) :: lb
real(kind=rp), intent(in) :: ub
real(kind=rp), intent(out), dimension(:) :: rv
integer(kind=ip), intent(in), optional :: block_size

public subroutine get_rv_iuniform(lb, ub, rv, block_size)

Arguments

Type IntentOptional Attributes Name
integer(kind=ip), intent(in) :: lb
integer(kind=ip), intent(in) :: ub
integer(kind=ip), intent(out), dimension(:) :: rv
integer(kind=ip), intent(in), optional :: block_size

public subroutine get_rv_gaussian(mean, std_dev, rv, block_size)

Arguments

Type IntentOptional Attributes Name
real(kind=rp), intent(in) :: mean
real(kind=rp), intent(in) :: std_dev
real(kind=rp), intent(out), dimension(:) :: rv
integer(kind=ip), intent(in), optional :: block_size

public subroutine ransphere(r)

Generates a random vector from the surface of a unit sphere. Algorithm from Allen & Tildesley (ed 1) p. 349.

Arguments

Type IntentOptional Attributes Name
real(kind=rp), intent(out), dimension(3) :: r(3)