*     *************************************************************************

      subroutine dxpycd( n, ind, x, y )

*     *************************************************************************

*     Purpose :
*     ---------

*     This routine adds vector Y to vector X.
*     The components of these vectors that are considered
*     are the components of indices IND(i) for i=1 up to
*     i=n.

*     Parameters :
*     ------------

*     n       ( int )

*       input  : number of components of Y to add to X.
*                It is also the length of array IND.
*       output : unmodified.

*     ind     ( int )

*       input  : array of length N, containing the indices
*                of the components of Y to add to X.
*       output : unmodified.

*     x       ( dble )

*       input  : a vector containing the components that
*                that will be modified.
*       output : identical to the input value, except for
*                the components of indices IND(i) for i=1
*                up to i=n, that are set to the value of
*                X(IND(i)) + Y(IND(i)).

*     y       ( dble )

*       input  : a vector containing the componenets to
*                add to X.
*       output : unmodified.

*     Routines used :
*     ---------------

*     None.

*     Programming :
*     -------------

*     D. Tuyttens

*     ========================================================================

*     Routine parameters

      integer           n, ind(*)
      double precision  x(*), y(*)

*     Internal variables

      integer           i, j

      do 10 i = 1 , n
        j = ind(i)
        x(j) = x(j) + y(i)
 10   continue
*
      return
      end