c
c     ==========================================
      double precision function Dxyz(mcomp,x,y)
c     ==========================================
c
      implicit none
      integer mcomp
      double precision x,y

c

      go to (11,12,13,14,15,16,17,18,19,20,21,22) mcomp


 11   continue
      Dxyz = (2.d0-2.d0*x+(2.d0*x*(-1.d0+x)*(-2.d0+x))/
     &      dsqrt(2.d0-x**2.d0 * (-2.d0+x)**2.d0) - (-2.d0+x)*y**2.d0 /
     &      dsqrt(2.d0 - y**2.d0 * (-2.d0+x)**2.d0)) / dsqrt(2.d0)
      return

 12   continue
      Dxyz = -(-2.d0+x)**2.d0 * y / 
     &      dsqrt(4.d0-2.d0*(-2.d0+x)**2.d0 * y**2.d0) 
      return

 13   continue
      Dxyz = - y/dsqrt(2.d0)
      return

 14   continue
      Dxyz = - (x-2.d0)/dsqrt(2.d0)
      return

 15   continue
      Dxyz = (-(-2.d0+x)*y**2.d0 - (-2.d0+2.d0*x-
     & 2.d0*x*(2.d0-3.d0*x+x**2.d0)/dsqrt(2.d0-(-2.d0+x)**2.d0*x**2.d0)
     & +(-2.d0+x)*y**2.d0/dsqrt(2.d0-(-2.d0+x)**2.d0*y**2.d0)) *
     & ( (-2.d0+x)*x+dsqrt(2.d0-(-2.d0+x)**2.d0*x**2.d0)-
     &    dsqrt(2.d0-(-2.d0+x)**2.d0*y**2.d0))) / 
     & (2.d0*dsqrt(1.d0-0.5d0*(-2.d0+x)**2.d0*y**2.d0-0.5d0*((-2.d0+x)*x
     & +dsqrt(2.d0-(-2.d0+x)**2.d0*x**2.d0)-dsqrt(2.d0-(-2.d0+x)**2.d0*
     & y**2.d0))**2.d0))
      return

 16   continue
      Dxyz = -(-2.d0+x)**2.d0 * ((-2.d0+x)*x+dsqrt(2.d0-(-2.d0+x)**2.d0
     &    *x**2.d0))*y / (2.d0*dsqrt(2.d0-(-2.d0+x)**2.d0 * y**2.d0)*
     &    dsqrt(1.d0-0.5d0*(-2.d0+x)**2.d0 * y**2.d0 - 
     &    0.5d0*((-2.d0+x)*x + dsqrt(2.d0-(-2.d0+x)**2.d0 * x**2.d0)
     &    - dsqrt(2.d0-(-2.d0+x)**2.d0 * y**2.d0) )**2.d0) )
      return

 17   continue
      Dxyz = (-2.d0-2.d0*x+2.d0*x*(1.d0+x)*(2.d0+x)/
     &    dsqrt(2.d0-x**2.d0*(2.d0+x)**2.d0) - (2.d0+x)*y**2.d0 /
     &    dsqrt(2.d0-(2.d0+x)**2.d0 * y**2.d0))/dsqrt(2.d0)
      return

 18   continue
      Dxyz = -(2.d0+x)**2.d0 * y / 
     &       dsqrt(4.d0-2.d0*(2.d0+x)**2.d0 * y**2.d0)
      return

 19   continue
      Dxyz = y/dsqrt(2.d0)
      return

 20   continue
      Dxyz = (2.d0+x)/dsqrt(2.d0)
      return

 21   continue
      Dxyz =  (-(2.d0+x)*y**2.d0 - (2.d0+2.d0*x-
     & 2.d0*x*(2.d0+3.d0*x+x**2.d0)/dsqrt(2.d0-(2.d0+x)**2.d0*x**2.d0)
     & +(2.d0+x)*y**2.d0/dsqrt(2.d0-(2.d0+x)**2.d0*y**2.d0)) *
     & ( (2.d0+x)*x+dsqrt(2.d0-(2.d0+x)**2.d0*x**2.d0)-
     &    dsqrt(2.d0-(2.d0+x)**2.d0*y**2.d0))) / 
     & (2.d0*dsqrt(1.d0-0.5d0*(2.d0+x)**2.d0*y**2.d0-0.5d0*((2.d0+x)*x
     & +dsqrt(2.d0-(2.d0+x)**2.d0*x**2.d0)-dsqrt(2.d0-(2.d0+x)**2.d0*
     & y**2.d0))**2.d0))
      return

 22   continue
      Dxyz = -(2.d0+x)**2.d0 * ((2.d0+x)*x+dsqrt(2.d0-(2.d0+x)**2.d0
     &    *x**2.d0))*y / (2.d0*dsqrt(2.d0-(2.d0+x)**2.d0 * y**2.d0)*
     &    dsqrt(1.d0-0.5d0*(2.d0+x)**2.d0 * y**2.d0 - 
     &    0.5d0*((2.d0+x)*x + dsqrt(2.d0-(2.d0+x)**2.d0 * x**2.d0)
     &    - dsqrt(2.d0-(2.d0+x)**2.d0 * y**2.d0) )**2.d0) )
      return

    
      end
