next up previous contents
Next: 3. JTpack90 Up: 2. JTpack77 Previous: 2.5 Matrix-Vector Multiplication Routine   Contents

2.6 Dynamic Allocation of Arrays

      subroutine JT_y_eq_Ax_ELL (idim, n, maxnz, a, ja, x, y, status)
      implicit none
c
c ... Input:
      integer idim, maxnz, n
      integer ja(idim,maxnz)
      real a(idim,maxnz), x(n)
c
c ... Output:
      integer status
      real y(n)
c
c ... Local:
      integer i, j
#include ``numbers.inc''
#include ``declare-y_eq_Ax_ELL.inc''
c
#include ``allocate-y_eq_Ax_ELL.inc''
c
      xtmp(0) = zero
      call JT_y_eq_x (n, x, xtmp(1), status)
      call JT_FillVectorFloat (n, zero, y, status)
      do j=1,maxnz
         do i=1,n
           y(i) = y(i) + a(i,j)*xtmp(ja(i,j))
         enddo
      enddo
c
#include ``deallocate-y_eq_Ax_ELL.inc''
c
      return
      end



next up previous contents
Next: 3. JTpack90 Up: 2. JTpack77 Previous: 2.5 Matrix-Vector Multiplication Routine   Contents
John A. Turner