home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / fractal / kaos.lha / fixptlib / usrfun.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-01-27  |  714 b   |  30 lines

  1. /*
  2. Compute Jacobian and value of nonlinear eq (f^r(x) - x - xoffset)
  3. by ussing user supplied Jacobian function
  4. -----------------------------
  5. NOTE:    nonlinear equations are not handled in periodic coords
  6. Input:    r=period of an orbit, n=phase space dimension,
  7.     x[n] = coords of a current guess
  8. Output:    alpha[n][n]=DF(x) (Jacobian), beta[n]=F(x)
  9. */
  10.  
  11. void
  12. usrfun(x,alpha,beta,r,n)
  13. double *x,**alpha,*beta;
  14. int r,n;
  15. {
  16.     int i;
  17.     extern double *t_vf,*xoffset;
  18.  
  19.     /* xoffset need to be installed later */
  20.     for(i=0;i<n;i++) xoffset[i] = 0;
  21.     /* Jacobian derivative is defined */
  22.     /*
  23.     for(i=0;i<n;i++) t_vf[i] = x[i];
  24.     fderiv_user(t_vf,alpha,r,n);    
  25.     fmap_user(t_vf,r,n);
  26.     for(i=0;i<n;i++) beta[i] -=(x[i] + xoffset[i]);
  27.         
  28.     */
  29. }
  30.