12 use,
intrinsic :: iso_c_binding
28 subroutine random_c(kk, pp) bind(C,name='random_f')
29 use,
intrinsic :: iso_c_binding
31 integer(c_int),
intent(in) :: kk
32 real(kind=c_double),
intent(out) :: pp(*)
49 real(kind=kind_real),
intent(inout) :: xx(:)
50 real(kind=c_double) :: zz(size(xx))
54 if (
size(zz) > 0)
call random_c(nn, zz(1))
64 real(kind=kind_real),
intent(inout) :: xx(:,:)
65 real(kind=c_double) :: zz(size(xx))
69 if (
size(zz) > 0)
call random_c(nn, zz(1))
70 xx = reshape(zz, shape(xx))
79 real(kind=kind_real),
intent(inout) :: xx(:,:,:)
80 real(kind=c_double) :: zz(size(xx))
84 if (
size(zz) > 0)
call random_c(nn, zz(1))
85 xx = reshape(zz, shape(xx))
Fortran generic for generating random 1d, 2d and 3d arrays.
subroutine random_vector_3(xx)
Generate a random 3d array of reals.
subroutine random_vector_2(xx)
Generate a random 2d array of reals.
subroutine random_vector_1(xx)
Generate a random 1d array of reals.
Fortran module for generating random vectors.