prod_a_x Subroutine

subroutine prod_a_x(n, nz, x, y, a_elt, irow, jptr, slvt)

Arguments

Type IntentOptional AttributesName
integer(kind=I4), intent(in) :: n
integer(kind=I4), intent(in) :: nz
real(kind=R8), intent(in), dimension(n):: x
real(kind=R8), intent(out), dimension(n):: y
real(kind=R8), intent(in), dimension(nz):: a_elt
integer(kind=I4), intent(in), dimension(nz ):: irow
integer(kind=I4), intent(in), dimension(n+1):: jptr
integer(kind=I4), intent(in) :: slvt

Called by

proc~~prod_a_x~~CalledByGraph proc~prod_a_x prod_a_x proc~verif_solution verif_solution proc~verif_solution->proc~prod_a_x program~test_solvers test_solvers program~test_solvers->proc~verif_solution

Contents

Source Code


Source Code

   subroutine prod_a_x(n, nz, x, y, a_elt, irow, jptr, slvt)
   implicit none
   integer(kind=I4), intent(in) :: n, nz, slvt
   real(kind=R8), dimension(nz), intent(in)     :: a_elt
   integer(kind=I4), dimension(nz ), intent(in) :: irow
   integer(kind=I4), dimension(n+1), intent(in) :: jptr
   real(kind=R8), dimension(n), intent(in)      :: x
   real(kind=R8), dimension(n), intent(out)     :: y
      integer(kind=I4) :: i, k, dec
      y(1:n) = 0._R8
      dec = 0
      if (slvt==UMFP .or. slvt==SULU) dec = 1
      do i = 1, n
         do k = jptr(i), jptr(i+1)-1
            y(irow(k +dec) +dec) = y(irow(k +dec) +dec) + x(i)*a_elt(k +dec)
         enddo
      enddo
   return
   endsubroutine prod_a_x