                 FMMYUK-A: Adaptive FMM Yukawa Solver 

           Developed by Jingfang Huang (lead), with contributions from
       many others, including Jun Jia, Bo Zhang, Ben-Zhuo Lu, Xiaolin Cheng.

       The FMM suite is made possible with the help and encouragements from 
              Professors Leslie Greengard and Vladimir Rokhlin
           
                         Version: Beta

This directory contains the fast multipole algorithm for the
screened Coulomb interactions. 

I. Note:
  1. The particles can be located anywhere. However the source set should be
     the same as the targets.
  2. Currently we only allow approximately 3 digits (nterms=nlambs=9) and 
     6 digits (nterms=nlambs=18) accuracy calculations.

II. Our files in this directory:
  0. license.txt: GPL 2.0 license and related information.
  1. adapyukdriver.f: the driver file for the fast multipole algorithm.
     Note that the parameters in this file need to be changed for
     for different settings.    
  2. fmmadapyuk.f: the main subroutine for the FMM algorithm.
  3. treeadap.f : subroutines for the adaptive octree structure.
  4. yukoperators.f: translation operators and subroutines for the 
     yukawa potential.
  5. parm-uniyuk.h: a header file for the precision of the algorithm,
     and variables for precomputed tables. You can find the parameters
     to change the accuracy of the algorithm (nterms and nlambs).

III. Subroutines from different sources (these files are not covered 
     by the GPL license):
  5. functions.f: functions for calculating the modified Bessel
     functions. These subroutines are from www.netlib.org. 
     Please see each subroutine for the author and reference
     information.    
  6. yuktable.f: precomputed tables for the exponential expansions.
     These subroutines are based on Norman's quadrature. Detailed
     Formulas can be found from www.netlib.org. See the file 
     for references and further information.
  7. prini.f: several printing subroutines from Greengard and Rokhlin's
     group.
  8. second.f: a subroutine to get the current system time.
      
IV. Acknowledgments:
  Most of the subroutines were developed while I was a student
  of Professor Leslie Greengard at Courant Institute of Mathematical
  Sciences at New York University. Several subroutines in this 
  release are from Leslie and Professor Vladimir Rokhlin's group 
  at Yale, including those in yuktable.f and several in prini.f. 
  Their help and encouragements are thankfully acknowledged and
  greatly appreciated.

  The work was supported by DOE (when I was a PostDoc at Courant),
  grants from NSF (to support my work at UNC at Chapel Hill), and 
  the Center for Theoretical Biological Physics (CTBP) at UCSD (most
  of the code was rewritten when I was visiting CTBP). It would be 
  impossible for me to finish this beta version release without their 
  support. We are currently actively looking for further support for 
  further improvement and many important applications of the developed 
  solvers.
 
V. Several suggestions on how to use and/or modify the code.
  1. Check adapyukdriver.f first to understand the variables
     and how to call the main subroutine in fmmadapyuk.f
  2. If you have never studied FMM before, we recommend that
     you start from Greengard and Rokhlin's paper on the new
     version of FMM (1997), instead of the new version of FMM
     for Yukawa.
  3. You can change the following parameters, see adapyukdriver.f
     and parm-adapyuk.h

     NATOMS: number of atoms.
     NTERMS: number of terms in the multipole/local expansion.
     NLAMBS: number of terms in the exponential expansion.
     BETA: the ``frequency" of the equation.

VI. Related packages.
  The following packages are closely related to this package.
  1. Uniform Yukawa code
  2. Uniform Laplace code.
  3. Adaptive Laplace code.
  4. Uniform low frequency Helmholtz code.
  5. Adaptive low frequency Helmholtz code.

  Also, the following packages are based on the FMM code.
  6. AFMPB: adaptive FMM solver for linearized Poisson Boltzman equation.
            joint work with Ben-Zhuo Lu, Xiaolin Cheng, and Andrew 
            McCammon at UCSD.
  7. FMMDD: adaptive FMM for dislocation dynamics simulations.
  8. FMMStokes: adaptive FMM for steady Stokes equations.

VII. Contact Information.
  We recommend you register before/after you download the FMM solvers.
  We are improving our code and future versions will be released soon.
  We will let you know once new versions become available.

  For information, comments and suggestions, bug reports, please contact

      Jingfang Huang, 
      CB# 3250, Phillips Hall, 
      Department of mathematics,
      University of North Carolina at Chapel Hill, 
      Chapel Hill, NC 27599-3250, USA.
      Email: huang@amath.unc.edu
      Tel: 919-962-9621.

Last Modified: 07/22/2008. 
