30 xs_loc, ys_loc, zs_loc, &
31 lambda_rnd, mu_rnd, rho_rnd, mpi_id)
37 integer*4 :: nn_loc, mpi_id ,nmat_rnd
38 integer*4,
dimension(nmat_rnd) :: rand_mat
39 integer*4,
dimension(nn_loc) :: loc_n_num
41 real*8,
dimension(nn_loc) :: xs_loc, ys_loc, zs_loc
42 real*8,
dimension(nn_loc),
intent(inout) :: lambda_rnd, mu_rnd, rho_rnd
44 character*70 :: file_rnd
45 integer*4 :: size_values, unit_rnd, i, js, jr
46 integer*4,
dimension(nn_loc) :: nearest_el
48 real*8 :: dist_sq, dist_sq_min
49 real*8,
dimension(nn_loc) :: dist
51 real*8,
dimension(:,:),
allocatable :: values
54 file_rnd =
'NH-FILES/NHCheck00000.dat'
56 if (mpi_id .lt. 10)
then
57 write(file_rnd(21:21),
'(i1)') mpi_id;
58 else if (mpi_id .lt. 100)
then
59 write(file_rnd(20:21),
'(i2)') mpi_id;
60 else if (mpi_id .lt. 1000)
then
61 write(file_rnd(19:21),
'(i3)') mpi_id;
62 else if (mpi_id .lt. 10000)
then
63 write(file_rnd(18:21),
'(i4)') mpi_id;
65 write(file_rnd(17:21),
'(i5)') mpi_id
68 unit_rnd = 50 + mpi_id
70 open(unit_rnd,file=file_rnd)
71 read(unit_rnd,*) size_values
73 allocate(values(size_values,6))
77 read(unit_rnd,*) values(i,1),values(i,2),values(i,3),values(i,4),values(i,5),values(i,6)
88 do jr = 1, size_values
90 dist_sq = (xs_loc(js) - values(jr,1))**2 + (ys_loc(js) - values(jr,2))**2 &
91 + (zs_loc(js) - values(jr,3))**2
93 if ( dist_sq < dist_sq_min )
then
101 mu_rnd(js) = values(nearest_el(js),6) * values(nearest_el(js),4)**2
103 lambda_rnd(js) = values(nearest_el(js),6) * values(nearest_el(js),5)**2 - 2.d0 * mu_rnd(js)
104 rho_rnd(js) = values(nearest_el(js),6);
subroutine make_random_param(loc_n_num, nn_loc, nmat_rnd, rand_mat, xs_loc, ys_loc, zs_loc, lambda_rnd, mu_rnd, rho_rnd, mpi_id)
...