       subroutine copyit ( nelt, arrin, incin, arrout, incout )
c
c    dac:zeus3d.copyit <----------- copies input vector to output vector
c                                                           august, 1992
c
c    written by: David Clarke
c    modified 1: 09/12/94 by Robert Fiedler to correct the indices
c                in the assignment statement involving arrout.
c
c  PURPOSE:  This subroutine copies the input vector "arrin" to the
c  output vector "arrout".  It is useful if multi-dimensional arrays
c  are to be copied because this subroutine will treat the arrays as
c  1-D vectors, thereby increasing the vector length making better use
c  of the vector machine.  If "arrin" and "arrout" are 1-D vectors in
c  the calling routine, calling this routine will degrade performance
c  because of the overhead involved in calling a subroutine.  This
c  routine has the same functionality as SCOPY and is only slightly
c  slower (2%).  Unlike SCOPY, however, this is completely portable.
c
c  INPUT VARIABLES:
c    nelt      number of elements to be copied
c    arrin     vector (array) to be copied
c    incin     increment between elements of "arrin"
c    incout    increment between elements of "arrout"
c
c  OUTPUT VARIABLES:
c    arrout    output vector (array)
c
c  EXTERNALS: [NONE]
c
c-----------------------------------------------------------------------
c
c
c-----------------------------------------------------------------------
c------------------------ IMPLICIT STATEMENTS --------------------------
c-----------------------------------------------------------------------
c
       implicit      none
c
       integer       nelt    , incin   , incout  , i       , j
c
       real*8        arrin   (   *), arrout  (   *)
c
c-----------------------------------------------------------------------
c
       j = 1
       do 10 i=1,(nelt-1)*incin+1,incin
         arrout(j) = arrin(i)
         j         = j + incout
10     continue
c
       return
       end
