SUBROUTINE LOC ( I, J, IR, N, M, MS )

Argument Definitions (+ indicates altered content)
INTEGER            I,         +IR,         J,          M
INTEGER            MS,         N
Description
.................................................................. 
 
   subroutine loc 
 
   purpose 
      compute a vector subscript for an element in a matrix of 
      specified storage mode 
 
   usage 
      call loc (i,j,ir,n,m,ms) 
 
   description of parameters 
      i   - row number of element 
      j   - column number  of element 
      ir  - resultant vector subscript 
      n   - number of rows in matrix 
      m   - number of columns in matrix 
      ms  - one digit number for storage mode of matrix 
             0 - general 
             1 - symmetric 
             2 - diagonal 
 
   remarks 
      none 
 
   subroutines and function subprograms required 
      none 
 
   method 
      ms=0   subscript is computed for a matrix with n*m elements 
             in storage (general matrix) 
      ms=1   subscript is computed for a matrix with n*(n+1)/2 in 
             storage (upper triangle of symmetric matrix). if 
             element is in lower triangular portion, subscript is 
             corresponding element in upper triangle. 
      ms=2   subscript is computed for a matrix with n elements 
             in storage (diagonal elements of diagonal matrix). 
             if element is not on diagonal (and therefore not in 
             storage), ir is set to zero. 
 
..................................................................
Source file:loc.f
Local Variables (+ indicates altered content)
INTEGER           +IRX,       +IX,        +JX