tem_spatial_random_for Function

private function tem_spatial_random_for(me, n) result(res)

Produce random numbers

Arguments

Type IntentOptional Attributes Name
type(spatial_random_type), intent(in) :: me

Interval definition to get the random values from.

integer, intent(in) :: n

number of return values

Return Value real(kind=rk), (n)

return value of a function


Called by

proc~~tem_spatial_random_for~~CalledByGraph proc~tem_spatial_random_for tem_spatial_random_for proc~tem_spatial_for_coord tem_spatial_for_coord proc~tem_spatial_for_coord->proc~tem_spatial_random_for proc~tem_spatial_for_treeids tem_spatial_for_treeIDs proc~tem_spatial_for_treeids->proc~tem_spatial_random_for interface~tem_spatial_for tem_spatial_for interface~tem_spatial_for->proc~tem_spatial_for_coord interface~tem_spatial_for->proc~tem_spatial_for_treeids proc~tem_spatial_scalar_for_index tem_spatial_scalar_for_index interface~tem_spatial_for->proc~tem_spatial_scalar_for_index proc~tem_spatial_scalar_for_index->proc~tem_spatial_for_coord proc~tem_spacetime_for_coord tem_spacetime_for_coord proc~tem_spacetime_for_coord->interface~tem_spatial_for proc~tem_spacetime_for_treeids tem_spacetime_for_treeIDs proc~tem_spacetime_for_treeids->interface~tem_spatial_for proc~tem_spacetime_scalar_for_index tem_spacetime_scalar_for_index proc~tem_spacetime_scalar_for_index->interface~tem_spatial_for proc~tem_spacetime_scalar_for_index->proc~tem_spacetime_for_coord proc~tem_spacetime_vector_for_coord tem_spacetime_vector_for_coord proc~tem_spacetime_vector_for_coord->interface~tem_spatial_for proc~tem_spacetime_vector_for_index tem_spacetime_vector_for_index proc~tem_spacetime_vector_for_index->interface~tem_spatial_for proc~tem_spacetime_vector_for_index->proc~tem_spacetime_vector_for_coord proc~tem_spacetime_vector_for_treeids tem_spacetime_vector_for_treeIDs proc~tem_spacetime_vector_for_treeids->interface~tem_spatial_for proc~tem_spatial_scalar_storeval tem_spatial_scalar_storeVal proc~tem_spatial_scalar_storeval->interface~tem_spatial_for proc~tem_spatial_vector_storeval tem_spatial_vector_storeVal proc~tem_spatial_vector_storeval->interface~tem_spatial_for interface~tem_spacetime_for tem_spacetime_for interface~tem_spacetime_for->proc~tem_spacetime_for_coord interface~tem_spacetime_for->proc~tem_spacetime_for_treeids interface~tem_spacetime_for->proc~tem_spacetime_scalar_for_index interface~tem_spacetime_for->proc~tem_spacetime_vector_for_coord interface~tem_spacetime_for->proc~tem_spacetime_vector_for_index interface~tem_spacetime_for->proc~tem_spacetime_vector_for_treeids interface~tem_spatial_storeval tem_spatial_storeVal interface~tem_spatial_storeval->proc~tem_spatial_scalar_storeval interface~tem_spatial_storeval->proc~tem_spatial_vector_storeval proc~tem_spacetime_for_stcoord tem_spacetime_for_stcoord proc~tem_spacetime_for_stcoord->proc~tem_spacetime_for_coord

Source Code

  function tem_spatial_random_for( me, n ) result(res)
    ! -------------------------------------------------------------------- !
    !> Interval definition to get the random values from.
    type(spatial_random_type), intent(in) :: me
    !> number of return values
    integer, intent(in) :: n
    !> return value of a function
    real(kind=rk) :: res(n)
    ! -------------------------------------------------------------------- !

    call random_number(res)
    res = me%val_min + me%val_range*res

  end function tem_spatial_random_for