      SUBROUTINE PIVOT (NORM,MAX,IBAR,I1,I2)
C
C        THIS SUBROUTINE COMPUTES THE MAXIMAL ELEMENT (MAX) OF THE
C        VECTOR  NORM(I1, ... ,I2)  AND ITS LOCATION IBAR.
C
C     *** PARTIALLY MODIFIED BY ALAN J. LAUB, UNIVERSITY OF SOUTHERN
C         CALIFORNIA, FEB. 1981.
C
      DOUBLE PRECISION NORM(1),MAX
      IBAR = I1
      MAX = NORM(I1)
      I11 = I1+1
      IF (I11 .GT. I2) RETURN
      DO 10 I = I11,I2
         IF (MAX .GE. NORM(I)) GO TO 10
         MAX = NORM(I)
         IBAR = I
   10 CONTINUE
      RETURN
      END
