unif_01 Function

private function unif_01(self)

Get a uniform [0,1) random real (double precision)

Type Bound

rng_t

Arguments

Type IntentOptional Attributes Name
class(rng_t), intent(inout) :: self

Return Value real(kind=dp)


Calls

proc~~unif_01~~CallsGraph proc~unif_01 rng_t%unif_01 proc~next rng_t%next proc~unif_01->proc~next proc~rotl rotl proc~next->proc~rotl

Called by

proc~~unif_01~~CalledByGraph proc~unif_01 rng_t%unif_01 proc~advect_create_particles advect_create_particles proc~advect_create_particles->proc~unif_01 proc~circle rng_t%circle proc~circle->proc~unif_01 proc~gca_create_particles gca_create_particles proc~gca_create_particles->proc~unif_01 proc~lorentz_create_particles Lorentz_create_particles proc~lorentz_create_particles->proc~unif_01 proc~poisson rng_t%poisson proc~poisson->proc~unif_01 proc~sample_create_particles sample_create_particles proc~sample_create_particles->proc~unif_01 proc~sphere rng_t%sphere proc~sphere->proc~unif_01 proc~two_normals rng_t%two_normals proc~two_normals->proc~unif_01 proc~unif_01_vec rng_t%unif_01_vec proc~unif_01_vec->proc~unif_01 proc~get_maxwellian_velocity get_maxwellian_velocity proc~get_maxwellian_velocity->proc~sphere proc~normal rng_t%normal proc~get_maxwellian_velocity->proc~normal proc~get_uniform_pos get_uniform_pos proc~get_uniform_pos->proc~unif_01_vec proc~normal->proc~two_normals proc~particles_create particles_create proc~particles_create->proc~advect_create_particles proc~particles_create->proc~gca_create_particles proc~particles_create->proc~lorentz_create_particles proc~particles_create->proc~sample_create_particles proc~main main proc~main->proc~particles_create program~agile agile program~agile->proc~main

Source Code

  real(dp) function unif_01(self)
    class(rng_t), intent(inout) :: self
    integer(i8)                 :: x
    real(dp)                    :: tmp

    x   = self%next()
    x   = ior(shiftl(1023_i8, 52), shiftr(x, 12))
    unif_01 = transfer(x, tmp) - 1.0_dp
  end function unif_01