      SUBROUTINE SCANVC(V,VE,IE,NUMEL,LEN)
C
C THIS ROUTINE SCANS A VECTOR AND PLACES THE NUMEL LARGEST
C  ELEMENTS IN VE AND THEIR INDICES IN IE.
C
C INPUT:
C       V - THE VECTOR TO BE SEARCHED (LENGTH: LEN).
C      VE - THE VECTOR WHICH CONTAINS THE NUMEL LARGEST ABSOLUTE
C           VALUES IN V (LENGTH: LEN).
C      IE - THE INDICES CORRESPONDING TO THE ENTRIES IN VE (LENGTH: LEN).
C
CEND
      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
      DIMENSION V(LEN),VE(NUMEL),IE(NUMEL)
      CALL ZERO(VE,NUMEL)
      CALL IZERO(IE,NUMEL) 
      VE(1)=V(1)
      IE(1)=1
      DO 10 I=2,LEN,1
       IF(DABS(V(I)).GT.DABS(VE(NUMEL)))THEN
        DO 20 J=NUMEL,1,-1
         IF(DABS(V(I)).GT.DABS(VE(J)))JHIT=J
 20     CONTINUE
        CALL SHIFTV(VE,IE,JHIT,NUMEL)
        VE(JHIT)=V(I)
        IE(JHIT)=I
       ENDIF
10    CONTINUE
      RETURN
      END
