==========================================================
 
        FIND THE ELEMENT ON THE LONGITUDINAL COORDINATE xs
        (ACCELERATED VERSION)
 
        xs should be of type REAL (*8) but the type is already set
        whenn you call "common-initi.f"
        nn (INTEGER) is returns the index position of the element at xs.
        i.e. alat(nn,*).
        The index position is written in the 'ELEMENT pos' column
        in optic-function1 file, "optic-function1" is produced
        by setting a flag to 1 in the parameter-micromap file.
 
        The element position (nn) exists for xs_entrance <= xs < xs_exit.
 
        Note: If for example we have xs at a thin element followed
              immediately by a thick element, the returned nn will
              be that of the thick element!
 
 ==========================================================
 
subroutine FINDELEA(XS,NN)
 
COMMONS: 
common-initi.f
 
SUBROUTINES USED:
  "common-initi.f"
  messages_n
 
micromap-index
Mon Jul 17 08:57:31 CEST 2017