korc_rnd_numbers Module

This subroutines were taken from Numerical Recipes in Fortran 90, and provide a way for generating random numbers of 'better quality' in a faster way than build-in Fortran random generators (at least
better than those of Fortran 77). For more details we refer the user to Numerical Recipes in Fortran 90.


Uses


Contents


Variables

TypeVisibility AttributesNameInitial
integer(kind=8), public, parameter:: iv =4101842887655102017_8
integer(kind=8), public, parameter:: iw =1_8
integer(kind=8), public, parameter:: a =4294957665_8
integer(kind=8), public, parameter:: b =4294967295_8
integer(kind=8), public, parameter:: d =2862933555777941757_8
integer(kind=8), public, parameter:: e =7046029254386353087_8
real(kind=rp), public, parameter:: rcoeff =5.42101086242752217E-20_rp
type(URAND), private :: urand_vars

Interfaces

public interface u_random

  • private subroutine rand_int64(irand)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=8), intent(out), optional :: irand
  • private subroutine rand_int32(irand32)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=4), intent(out) :: irand32
  • private subroutine rand_real(rrand)

    Arguments

    Type IntentOptional AttributesName
    real(kind=rp), intent(out) :: rrand
  • public subroutine rand_real_array(rrand)

    Arguments

    Type IntentOptional AttributesName
    real(kind=rp), intent(inout), DIMENSION(:):: rrand

Derived Types

type, private :: URAND

Components

TypeVisibility AttributesNameInitial
integer(kind=8), public :: u
integer(kind=8), public :: v
integer(kind=8), public :: w

Subroutines

public subroutine init_u_random(seed)

Arguments

Type IntentOptional AttributesName
integer(kind=8), intent(in) :: seed

private subroutine rand_int64(irand)

Arguments

Type IntentOptional AttributesName
integer(kind=8), intent(out), optional :: irand

private subroutine rand_int32(irand32)

Arguments

Type IntentOptional AttributesName
integer(kind=4), intent(out) :: irand32

public subroutine rand_real_array(rrand)

Arguments

Type IntentOptional AttributesName
real(kind=rp), intent(inout), DIMENSION(:):: rrand

private subroutine rand_real(rrand)

Arguments

Type IntentOptional AttributesName
real(kind=rp), intent(out) :: rrand

public subroutine init_random_seed()

Arguments

None