modify_a_elt Subroutine

subroutine modify_a_elt(tab, nz)

Arguments

Type IntentOptional AttributesName
real(kind=R8), intent(inout) :: tab(1:nz)
integer(kind=I4), intent(in) :: nz

Called by

proc~~modify_a_elt~~CalledByGraph proc~modify_a_elt modify_a_elt program~test_solvers test_solvers program~test_solvers->proc~modify_a_elt

Contents

Source Code


Source Code

   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