multiplication of the system coefficient by a random factor
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R8), | intent(inout) | :: | tab(1:nz) | |||
integer(kind=I4), | intent(in) | :: | nz |
subroutine modify_a_elt(tab, nz)
implicit none
integer(kind=I4), intent(in) :: nz
real(kind=R8), intent(inout) :: tab(1:nz)
real(kind=R8), allocatable :: tmp(:)
allocate(tmp(1:nz))
call random_number(harvest=tmp(1:nz))
tmp(1:nz) = 2*tmp(1:nz) -1.0_R8
tab(1:nz) = tab(1:nz)*tmp(1:nz)
deallocate(tmp)
return
endsubroutine modify_a_elt