set_seed Subroutine

private subroutine set_seed(self, the_seed)

Set a seed for the rng

Type Bound

rng_t

Arguments

Type IntentOptional Attributes Name
class(rng_t), intent(inout) :: self
integer(kind=i8), intent(in) :: the_seed(2)

Calls

proc~~set_seed~~CallsGraph proc~set_seed rng_t%set_seed proc~jump rng_t%jump proc~set_seed->proc~jump proc~next rng_t%next proc~jump->proc~next proc~rotl rotl proc~next->proc~rotl

Called by

proc~~set_seed~~CalledByGraph proc~set_seed rng_t%set_seed proc~particle_base_init particle_base_init proc~particle_base_init->proc~set_seed proc~particles_init particles_init proc~particles_init->proc~particle_base_init

Source Code

  subroutine set_seed(self, the_seed)
    class(rng_t), intent(inout) :: self
    integer(i8), intent(in)     :: the_seed(2)

    self%s = the_seed

    ! Simulate calls to next() to improve randomness of first number
    call self%jump()
  end subroutine set_seed