program random_data_prb ! !******************************************************************************* ! !! RANDOM_DATA_PRB demonstrates the routines in RANDOM_DATA. ! implicit none ! call timestamp ( ) write ( *, '(a)' ) ' ' write ( *, '(a)' ) 'RANDOM_DATA_PRB' write ( *, '(a)' ) ' Create and write random sets of points.' write ( *, '(a)' ) ' ' call test01 call test02 call test03 call test04 call test05 write ( *, '(a)' ) ' ' write ( *, '(a)' ) 'RANDOM_DATA_PRB' write ( *, '(a)' ) ' Normal end of execution.' stop end subroutine test01 ! !******************************************************************************* ! !! TEST01 tests CREATE_NORMAL. ! implicit none ! integer, parameter :: m = 2 integer, parameter :: n = 100 ! integer iunit real x(m,n) ! write ( *, '(a)' ) 'TEST01' write ( *, '(a)' ) ' CREATE_NORMAL generates normal random points.' write ( *, '(a)' ) ' ' write ( *, '(a,i6)' ) ' Spatial dimension is ', m write ( *, '(a,i6)' ) ' Number of points to create is ', n call create_normal ( m, n, x ) call rescale_block01 ( m, n, x ) call write_open ( iunit, 'normal.txt' ) call write_data ( iunit, m, n, x ) call write_close ( iunit ) return end subroutine test02 ! !******************************************************************************* ! !! TEST02 tests CREATE_UNIFORM_BLOCK01. ! implicit none ! integer, parameter :: m = 3 integer, parameter :: n = 100 ! integer iunit real x(m,n) ! write ( *, '(a)' ) ' ' write ( *, '(a)' ) 'TEST02' write ( *, '(a)' ) ' CREATE_UNIFORM_BLOCK01 generates uniform random ' write ( *, '(a)' ) ' points in a block.' write ( *, '(a)' ) ' ' write ( *, '(a,i6)' ) ' Spatial dimension is ', m write ( *, '(a,i6)' ) ' Number of points to create is ', n call create_uniform_block01 ( m, n, x ) call write_open ( iunit, 'uniform_block01.txt' ) call write_data ( iunit, m, n, x ) call write_close ( iunit ) return end subroutine test03 ! !******************************************************************************* ! !! TEST03 tests CREATE_BROWNIAN. ! implicit none ! integer, parameter :: m = 3 integer, parameter :: n = 100 ! integer iunit real x(m,n) ! write ( *, '(a)' ) ' ' write ( *, '(a)' ) 'TEST02:' write ( *, '(a)' ) ' CREATE_BROWNIAN generates Brownian random points.' write ( *, '(a)' ) ' ' write ( *, '(a,i6)' ) ' Spatial dimension is ', m write ( *, '(a,i6)' ) ' Number of points to create is ', n call create_brownian ( m, n, x ) call rescale_block01 ( m, n, x ) call write_open ( iunit, 'brownian.txt' ) call write_data ( iunit, m, n, x ) call write_close ( iunit ) return end subroutine test04 ! !******************************************************************************* ! !! TEST04 tests CREATE_UNIFORM_SPHERE01. ! implicit none ! integer, parameter :: m = 3 integer, parameter :: n = 100 ! integer iunit real x(m,n) ! write ( *, '(a)' ) ' ' write ( *, '(a)' ) 'TEST04' write ( *, '(a)' ) ' CREATE_UNIFORM_SPHERE01 generates uniform random ' write ( *, '(a)' ) ' points in a sphere.' write ( *, '(a)' ) ' ' write ( *, '(a,i6)' ) ' Spatial dimension is ', m write ( *, '(a,i6)' ) ' Number of points to create is ', n call create_uniform_sphere01 ( m, n, x ) call write_open ( iunit, 'uniform_sphere01.txt' ) call write_data ( iunit, m, n, x ) call write_close ( iunit ) return end subroutine test05 ! !******************************************************************************* ! !! TEST05 tests CREATE_UNIFORM_ANNULUS01. ! implicit none ! integer, parameter :: m = 2 integer, parameter :: n = 100 ! integer iunit real r real x(m,n) ! r = 0.8E+00 write ( *, '(a)' ) ' ' write ( *, '(a)' ) 'TEST05' write ( *, '(a)' ) ' CREATE_UNIFORM_ANNULUS01 generates uniform ' write ( *, '(a)' ) ' random points in an annulus.' write ( *, '(a)' ) ' ' write ( *, '(a,i6)' ) ' Spatial dimension is ', m write ( *, '(a,i6)' ) ' Number of points to create is ', n write ( *, '(a,g14.6)' ) ' Inner radius is R = ', r call create_uniform_annulus01 ( m, n, x, r ) call write_open ( iunit, 'uniform_annulus01.txt' ) call write_data ( iunit, m, n, x ) call write_close ( iunit ) return end