c-------------------------------------
c
c  This subroutine evaluates the potential 
c      u_{\ell}(x) = \sum_{j=1}^{N} c_{\ell,j} \frac{1}{4\pi\|x-x_{j}\|}
c
c  at the source locations $x=x_{j}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    charge: double precision(nd,nsource)
c          Charge strengths, $c_{\ell,j}$
c
c
c  Output arguments:
c
c    -    pot: double precision(nd,nsource)
c          Potential at source locations, $u_{\ell}(x_{j})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential and its gradient 
c      u_{\ell}(x) = \sum_{j=1}^{N} c_{\ell,j} \frac{1}{4\pi\|x-x_{j}\|}
c
c  at the source locations $x=x_{j}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    charge: double precision(nd,nsource)
c          Charge strengths, $c_{\ell,j}$
c
c
c  Output arguments:
c
c    -    pot: double precision(nd,nsource)
c          Potential at source locations, $u_{\ell}(x_{j})$
c    -    grad: double precision(nd,3,nsource)
c          Gradient at source locations, $\nabla u_{\ell}(x_{j})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential, its gradient and its hessian
c      u_{\ell}(x) = \sum_{j=1}^{N} c_{\ell,j} \frac{1}{4\pi\|x-x_{j}\|}
c
c  at the source locations $x=x_{j}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    charge: double precision(nd,nsource)
c          Charge strengths, $c_{\ell,j}$
c
c
c  Output arguments:
c
c    -    pot: double precision(nd,nsource)
c          Potential at source locations, $u_{\ell}(x_{j})$
c    -    grad: double precision(nd,3,nsource)
c          Gradient at source locations, $\nabla u_{\ell}(x_{j})$
c    -    hess: double precision(nd,6,nsource)
c          Gradient at source locations, $\nabla \nabla u_{\ell}(x_{j})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential 
c      u_{\ell}(x) = -\sum_{j=1}^{N} v_{\ell,j} \cdot \nabla \left( 
c        \frac{1}{4\pi\|x-x_{j}\|}\right)
c
c  at the source locations $x=x_{j}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    dipvec: double precision(nd,3,nsource)
c          Dipole strengths, $v_{\ell,j}$
c
c
c  Output arguments:
c
c    -    pot: double precision(nd,nsource)
c          Potential at source locations, $u_{\ell}(x_{j})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential and its gradient 
c      u_{\ell}(x) = -\sum_{j=1}^{N} v_{\ell,j} \cdot \nabla \left( 
c        \frac{1}{4\pi\|x-x_{j}\|}\right)
c
c  at the source locations $x=x_{j}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    dipvec: double precision(nd,3,nsource)
c          Dipole strengths, $v_{\ell,j}$
c
c
c  Output arguments:
c
c    -    pot: double precision(nd,nsource)
c          Potential at source locations, $u_{\ell}(x_{j})$
c    -    grad: double precision(nd,3,nsource)
c          Gradient at source locations, $\nabla u_{\ell}(x_{j})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential, its gradient and its hessian
c      u_{\ell}(x) = -\sum_{j=1}^{N} v_{\ell,j} \cdot \nabla \left( 
c        \frac{1}{4\pi\|x-x_{j}\|}\right)
c
c  at the source locations $x=x_{j}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    dipvec: double precision(nd,3,nsource)
c          Dipole strengths, $v_{\ell,j}$
c
c
c  Output arguments:
c
c    -    pot: double precision(nd,nsource)
c          Potential at source locations, $u_{\ell}(x_{j})$
c    -    grad: double precision(nd,3,nsource)
c          Gradient at source locations, $\nabla u_{\ell}(x_{j})$
c    -    hess: double precision(nd,6,nsource)
c          Gradient at source locations, $\nabla \nabla u_{\ell}(x_{j})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential 
c      u_{\ell}(x) = \sum_{j=1}^{N} c_{\ell,j} \frac{1}{4\pi\|x-x_{j}\|} - 
c            v_{\ell,j} \cdot \nabla \left( 
c        \frac{1}{4\pi\|x-x_{j}\|}\right)
c
c  at the source locations $x=x_{j}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    charge: double precision(nd,nsource)
c          Charge strengths, $c_{\ell,j}$
c    -    dipvec: double precision(nd,3,nsource)
c          Dipole strengths, $v_{\ell,j}$
c
c
c  Output arguments:
c
c    -    pot: double precision(nd,nsource)
c          Potential at source locations, $u_{\ell}(x_{j})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential and its gradient 
c      u_{\ell}(x) = \sum_{j=1}^{N} c_{\ell,j} \frac{1}{4\pi\|x-x_{j}\|} - 
c            v_{\ell,j} \cdot \nabla \left( 
c        \frac{1}{4\pi\|x-x_{j}\|}\right)
c
c  at the source locations $x=x_{j}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    charge: double precision(nd,nsource)
c          Charge strengths, $c_{\ell,j}$
c    -    dipvec: double precision(nd,3,nsource)
c          Dipole strengths, $v_{\ell,j}$
c
c
c  Output arguments:
c
c    -    pot: double precision(nd,nsource)
c          Potential at source locations, $u_{\ell}(x_{j})$
c    -    grad: double precision(nd,3,nsource)
c          Gradient at source locations, $\nabla u_{\ell}(x_{j})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential, its gradient and its hessian
c      u_{\ell}(x) = \sum_{j=1}^{N} c_{\ell,j} \frac{1}{4\pi\|x-x_{j}\|} - 
c            v_{\ell,j} \cdot \nabla \left( 
c        \frac{1}{4\pi\|x-x_{j}\|}\right)
c
c  at the source locations $x=x_{j}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    charge: double precision(nd,nsource)
c          Charge strengths, $c_{\ell,j}$
c    -    dipvec: double precision(nd,3,nsource)
c          Dipole strengths, $v_{\ell,j}$
c
c
c  Output arguments:
c
c    -    pot: double precision(nd,nsource)
c          Potential at source locations, $u_{\ell}(x_{j})$
c    -    grad: double precision(nd,3,nsource)
c          Gradient at source locations, $\nabla u_{\ell}(x_{j})$
c    -    hess: double precision(nd,6,nsource)
c          Gradient at source locations, $\nabla \nabla u_{\ell}(x_{j})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential 
c      u_{\ell}(x) = \sum_{j=1}^{N} c_{\ell,j} \frac{1}{4\pi\|x-x_{j}\|}
c
c  at the target locations $x=t_{i}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    charge: double precision(nd,nsource)
c          Charge strengths, $c_{\ell,j}$
c    -    ntarg: integer
c          Number of targets
c    -    targ: double precision(3,ntarg)
c          Target locations, $t_{i}$
c
c
c  Output arguments:
c
c    -    pottarg: double precision(nd,ntarg)
c          Potential at target locations, $u_{\ell}(t_{i})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential and its gradient 
c      u_{\ell}(x) = \sum_{j=1}^{N} c_{\ell,j} \frac{1}{4\pi\|x-x_{j}\|}
c
c  at the target locations $x=t_{i}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    charge: double precision(nd,nsource)
c          Charge strengths, $c_{\ell,j}$
c    -    ntarg: integer
c          Number of targets
c    -    targ: double precision(3,ntarg)
c          Target locations, $t_{i}$
c
c
c  Output arguments:
c
c    -    pottarg: double precision(nd,ntarg)
c          Potential at target locations, $u_{\ell}(t_{i})$
c    -    gradtarg: double precision(nd,3,ntarg)
c          Gradient at target locations, $\nabla u_{\ell}(t_{i})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential, its gradient and its hessian
c      u_{\ell}(x) = \sum_{j=1}^{N} c_{\ell,j} \frac{1}{4\pi\|x-x_{j}\|}
c
c  at the target locations $x=t_{i}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    charge: double precision(nd,nsource)
c          Charge strengths, $c_{\ell,j}$
c    -    ntarg: integer
c          Number of targets
c    -    targ: double precision(3,ntarg)
c          Target locations, $t_{i}$
c
c
c  Output arguments:
c
c    -    pottarg: double precision(nd,ntarg)
c          Potential at target locations, $u_{\ell}(t_{i})$
c    -    gradtarg: double precision(nd,3,ntarg)
c          Gradient at target locations, $\nabla u_{\ell}(t_{i})$
c    -    hesstarg: double precision(nd,3,ntarg)
c          Hessian at target locations, $\nabla \nabla u_{\ell}(t_{i})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential 
c      u_{\ell}(x) = -\sum_{j=1}^{N} v_{\ell,j} \cdot \nabla \left( 
c        \frac{1}{4\pi\|x-x_{j}\|}\right)
c
c  at the target locations $x=t_{i}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    dipvec: double precision(nd,3,nsource)
c          Dipole strengths, $v_{\ell,j}$
c    -    ntarg: integer
c          Number of targets
c    -    targ: double precision(3,ntarg)
c          Target locations, $t_{i}$
c
c
c  Output arguments:
c
c    -    pottarg: double precision(nd,ntarg)
c          Potential at target locations, $u_{\ell}(t_{i})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential and its gradient 
c      u_{\ell}(x) = -\sum_{j=1}^{N} v_{\ell,j} \cdot \nabla \left( 
c        \frac{1}{4\pi\|x-x_{j}\|}\right)
c
c  at the target locations $x=t_{i}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    dipvec: double precision(nd,3,nsource)
c          Dipole strengths, $v_{\ell,j}$
c    -    ntarg: integer
c          Number of targets
c    -    targ: double precision(3,ntarg)
c          Target locations, $t_{i}$
c
c
c  Output arguments:
c
c    -    pottarg: double precision(nd,ntarg)
c          Potential at target locations, $u_{\ell}(t_{i})$
c    -    gradtarg: double precision(nd,3,ntarg)
c          Gradient at target locations, $\nabla u_{\ell}(t_{i})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential, its gradient and its hessian
c      u_{\ell}(x) = -\sum_{j=1}^{N} v_{\ell,j} \cdot \nabla \left( 
c        \frac{1}{4\pi\|x-x_{j}\|}\right)
c
c  at the target locations $x=t_{i}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    dipvec: double precision(nd,3,nsource)
c          Dipole strengths, $v_{\ell,j}$
c    -    ntarg: integer
c          Number of targets
c    -    targ: double precision(3,ntarg)
c          Target locations, $t_{i}$
c
c
c  Output arguments:
c
c    -    pottarg: double precision(nd,ntarg)
c          Potential at target locations, $u_{\ell}(t_{i})$
c    -    gradtarg: double precision(nd,3,ntarg)
c          Gradient at target locations, $\nabla u_{\ell}(t_{i})$
c    -    hesstarg: double precision(nd,3,ntarg)
c          Hessian at target locations, $\nabla \nabla u_{\ell}(t_{i})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential 
c      u_{\ell}(x) = \sum_{j=1}^{N} c_{\ell,j} \frac{1}{4\pi\|x-x_{j}\|} - 
c            v_{\ell,j} \cdot \nabla \left( 
c        \frac{1}{4\pi\|x-x_{j}\|}\right)
c
c  at the target locations $x=t_{i}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    charge: double precision(nd,nsource)
c          Charge strengths, $c_{\ell,j}$
c    -    dipvec: double precision(nd,3,nsource)
c          Dipole strengths, $v_{\ell,j}$
c    -    ntarg: integer
c          Number of targets
c    -    targ: double precision(3,ntarg)
c          Target locations, $t_{i}$
c
c
c  Output arguments:
c
c    -    pottarg: double precision(nd,ntarg)
c          Potential at target locations, $u_{\ell}(t_{i})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential and its gradient 
c      u_{\ell}(x) = \sum_{j=1}^{N} c_{\ell,j} \frac{1}{4\pi\|x-x_{j}\|} - 
c            v_{\ell,j} \cdot \nabla \left( 
c        \frac{1}{4\pi\|x-x_{j}\|}\right)
c
c  at the target locations $x=t_{i}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    charge: double precision(nd,nsource)
c          Charge strengths, $c_{\ell,j}$
c    -    dipvec: double precision(nd,3,nsource)
c          Dipole strengths, $v_{\ell,j}$
c    -    ntarg: integer
c          Number of targets
c    -    targ: double precision(3,ntarg)
c          Target locations, $t_{i}$
c
c
c  Output arguments:
c
c    -    pottarg: double precision(nd,ntarg)
c          Potential at target locations, $u_{\ell}(t_{i})$
c    -    gradtarg: double precision(nd,3,ntarg)
c          Gradient at target locations, $\nabla u_{\ell}(t_{i})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential, its gradient and its hessian
c      u_{\ell}(x) = \sum_{j=1}^{N} c_{\ell,j} \frac{1}{4\pi\|x-x_{j}\|} - 
c            v_{\ell,j} \cdot \nabla \left( 
c        \frac{1}{4\pi\|x-x_{j}\|}\right)
c
c  at the target locations $x=t_{i}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    charge: double precision(nd,nsource)
c          Charge strengths, $c_{\ell,j}$
c    -    dipvec: double precision(nd,3,nsource)
c          Dipole strengths, $v_{\ell,j}$
c    -    ntarg: integer
c          Number of targets
c    -    targ: double precision(3,ntarg)
c          Target locations, $t_{i}$
c
c
c  Output arguments:
c
c    -    pottarg: double precision(nd,ntarg)
c          Potential at target locations, $u_{\ell}(t_{i})$
c    -    gradtarg: double precision(nd,3,ntarg)
c          Gradient at target locations, $\nabla u_{\ell}(t_{i})$
c    -    hesstarg: double precision(nd,3,ntarg)
c          Hessian at target locations, $\nabla \nabla u_{\ell}(t_{i})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential 
c      u_{\ell}(x) = \sum_{j=1}^{N} c_{\ell,j} \frac{1}{4\pi\|x-x_{j}\|}
c
c  at the source and target locations $x=x_{j},t_{i}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    charge: double precision(nd,nsource)
c          Charge strengths, $c_{\ell,j}$
c    -    ntarg: integer
c          Number of targets
c    -    targ: double precision(3,ntarg)
c          Target locations, $t_{i}$
c
c
c  Output arguments:
c
c    -    pot: double precision(nd,nsource)
c          Potential at source locations, $u_{\ell}(x_{j})$
cc    -    pottarg: double precision(nd,ntarg)
c          Potential at target locations, $u_{\ell}(t_{i})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential and its gradient 
c      u_{\ell}(x) = \sum_{j=1}^{N} c_{\ell,j} \frac{1}{4\pi\|x-x_{j}\|}
c
c  at the source and target locations $x=x_{j},t_{i}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    charge: double precision(nd,nsource)
c          Charge strengths, $c_{\ell,j}$
c    -    ntarg: integer
c          Number of targets
c    -    targ: double precision(3,ntarg)
c          Target locations, $t_{i}$
c
c
c  Output arguments:
c
c    -    pot: double precision(nd,nsource)
c          Potential at source locations, $u_{\ell}(x_{j})$
c    -    grad: double precision(nd,3,nsource)
c          Gradient at source locations, $\nabla u_{\ell}(x_{j})$
cc    -    pottarg: double precision(nd,ntarg)
c          Potential at target locations, $u_{\ell}(t_{i})$
c    -    gradtarg: double precision(nd,3,ntarg)
c          Gradient at target locations, $\nabla u_{\ell}(t_{i})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential, its gradient and its hessian
c      u_{\ell}(x) = \sum_{j=1}^{N} c_{\ell,j} \frac{1}{4\pi\|x-x_{j}\|}
c
c  at the source and target locations $x=x_{j},t_{i}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    charge: double precision(nd,nsource)
c          Charge strengths, $c_{\ell,j}$
c    -    ntarg: integer
c          Number of targets
c    -    targ: double precision(3,ntarg)
c          Target locations, $t_{i}$
c
c
c  Output arguments:
c
c    -    pot: double precision(nd,nsource)
c          Potential at source locations, $u_{\ell}(x_{j})$
c    -    grad: double precision(nd,3,nsource)
c          Gradient at source locations, $\nabla u_{\ell}(x_{j})$
c    -    hess: double precision(nd,6,nsource)
c          Gradient at source locations, $\nabla \nabla u_{\ell}(x_{j})$
cc    -    pottarg: double precision(nd,ntarg)
c          Potential at target locations, $u_{\ell}(t_{i})$
c    -    gradtarg: double precision(nd,3,ntarg)
c          Gradient at target locations, $\nabla u_{\ell}(t_{i})$
c    -    hesstarg: double precision(nd,3,ntarg)
c          Hessian at target locations, $\nabla \nabla u_{\ell}(t_{i})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential 
c      u_{\ell}(x) = -\sum_{j=1}^{N} v_{\ell,j} \cdot \nabla \left( 
c        \frac{1}{4\pi\|x-x_{j}\|}\right)
c
c  at the source and target locations $x=x_{j},t_{i}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    dipvec: double precision(nd,3,nsource)
c          Dipole strengths, $v_{\ell,j}$
c    -    ntarg: integer
c          Number of targets
c    -    targ: double precision(3,ntarg)
c          Target locations, $t_{i}$
c
c
c  Output arguments:
c
c    -    pot: double precision(nd,nsource)
c          Potential at source locations, $u_{\ell}(x_{j})$
cc    -    pottarg: double precision(nd,ntarg)
c          Potential at target locations, $u_{\ell}(t_{i})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential and its gradient 
c      u_{\ell}(x) = -\sum_{j=1}^{N} v_{\ell,j} \cdot \nabla \left( 
c        \frac{1}{4\pi\|x-x_{j}\|}\right)
c
c  at the source and target locations $x=x_{j},t_{i}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    dipvec: double precision(nd,3,nsource)
c          Dipole strengths, $v_{\ell,j}$
c    -    ntarg: integer
c          Number of targets
c    -    targ: double precision(3,ntarg)
c          Target locations, $t_{i}$
c
c
c  Output arguments:
c
c    -    pot: double precision(nd,nsource)
c          Potential at source locations, $u_{\ell}(x_{j})$
c    -    grad: double precision(nd,3,nsource)
c          Gradient at source locations, $\nabla u_{\ell}(x_{j})$
cc    -    pottarg: double precision(nd,ntarg)
c          Potential at target locations, $u_{\ell}(t_{i})$
c    -    gradtarg: double precision(nd,3,ntarg)
c          Gradient at target locations, $\nabla u_{\ell}(t_{i})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential, its gradient and its hessian
c      u_{\ell}(x) = -\sum_{j=1}^{N} v_{\ell,j} \cdot \nabla \left( 
c        \frac{1}{4\pi\|x-x_{j}\|}\right)
c
c  at the source and target locations $x=x_{j},t_{i}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    dipvec: double precision(nd,3,nsource)
c          Dipole strengths, $v_{\ell,j}$
c    -    ntarg: integer
c          Number of targets
c    -    targ: double precision(3,ntarg)
c          Target locations, $t_{i}$
c
c
c  Output arguments:
c
c    -    pot: double precision(nd,nsource)
c          Potential at source locations, $u_{\ell}(x_{j})$
c    -    grad: double precision(nd,3,nsource)
c          Gradient at source locations, $\nabla u_{\ell}(x_{j})$
c    -    hess: double precision(nd,6,nsource)
c          Gradient at source locations, $\nabla \nabla u_{\ell}(x_{j})$
cc    -    pottarg: double precision(nd,ntarg)
c          Potential at target locations, $u_{\ell}(t_{i})$
c    -    gradtarg: double precision(nd,3,ntarg)
c          Gradient at target locations, $\nabla u_{\ell}(t_{i})$
c    -    hesstarg: double precision(nd,3,ntarg)
c          Hessian at target locations, $\nabla \nabla u_{\ell}(t_{i})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential 
c      u_{\ell}(x) = \sum_{j=1}^{N} c_{\ell,j} \frac{1}{4\pi\|x-x_{j}\|} - 
c            v_{\ell,j} \cdot \nabla \left( 
c        \frac{1}{4\pi\|x-x_{j}\|}\right)
c
c  at the source and target locations $x=x_{j},t_{i}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    charge: double precision(nd,nsource)
c          Charge strengths, $c_{\ell,j}$
c    -    dipvec: double precision(nd,3,nsource)
c          Dipole strengths, $v_{\ell,j}$
c    -    ntarg: integer
c          Number of targets
c    -    targ: double precision(3,ntarg)
c          Target locations, $t_{i}$
c
c
c  Output arguments:
c
c    -    pot: double precision(nd,nsource)
c          Potential at source locations, $u_{\ell}(x_{j})$
cc    -    pottarg: double precision(nd,ntarg)
c          Potential at target locations, $u_{\ell}(t_{i})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential and its gradient 
c      u_{\ell}(x) = \sum_{j=1}^{N} c_{\ell,j} \frac{1}{4\pi\|x-x_{j}\|} - 
c            v_{\ell,j} \cdot \nabla \left( 
c        \frac{1}{4\pi\|x-x_{j}\|}\right)
c
c  at the source and target locations $x=x_{j},t_{i}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    charge: double precision(nd,nsource)
c          Charge strengths, $c_{\ell,j}$
c    -    dipvec: double precision(nd,3,nsource)
c          Dipole strengths, $v_{\ell,j}$
c    -    ntarg: integer
c          Number of targets
c    -    targ: double precision(3,ntarg)
c          Target locations, $t_{i}$
c
c
c  Output arguments:
c
c    -    pot: double precision(nd,nsource)
c          Potential at source locations, $u_{\ell}(x_{j})$
c    -    grad: double precision(nd,3,nsource)
c          Gradient at source locations, $\nabla u_{\ell}(x_{j})$
cc    -    pottarg: double precision(nd,ntarg)
c          Potential at target locations, $u_{\ell}(t_{i})$
c    -    gradtarg: double precision(nd,3,ntarg)
c          Gradient at target locations, $\nabla u_{\ell}(t_{i})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
c-------------------------------------
c
c  This subroutine evaluates the potential, its gradient and its hessian
c      u_{\ell}(x) = \sum_{j=1}^{N} c_{\ell,j} \frac{1}{4\pi\|x-x_{j}\|} - 
c            v_{\ell,j} \cdot \nabla \left( 
c        \frac{1}{4\pi\|x-x_{j}\|}\right)
c
c  at the source and target locations $x=x_{j},t_{i}$.
c  When $x=x_{j}$, the term corresponding to $x_{j}$ is 
c  dropped from the sum.
c
c  Input arguments:
c
c    -    nd: integer
c          number of densities
c    -    eps: double precision
c          precision requested
c    -    nsource: integer
c          Number of sources
c    -    source: double precision(3,nsource)
c          Source locations, $x_{j}$
c    -    charge: double precision(nd,nsource)
c          Charge strengths, $c_{\ell,j}$
c    -    dipvec: double precision(nd,3,nsource)
c          Dipole strengths, $v_{\ell,j}$
c    -    ntarg: integer
c          Number of targets
c    -    targ: double precision(3,ntarg)
c          Target locations, $t_{i}$
c
c
c  Output arguments:
c
c    -    pot: double precision(nd,nsource)
c          Potential at source locations, $u_{\ell}(x_{j})$
c    -    grad: double precision(nd,3,nsource)
c          Gradient at source locations, $\nabla u_{\ell}(x_{j})$
c    -    hess: double precision(nd,6,nsource)
c          Gradient at source locations, $\nabla \nabla u_{\ell}(x_{j})$
cc    -    pottarg: double precision(nd,ntarg)
c          Potential at target locations, $u_{\ell}(t_{i})$
c    -    gradtarg: double precision(nd,3,ntarg)
c          Gradient at target locations, $\nabla u_{\ell}(t_{i})$
c    -    hesstarg: double precision(nd,3,ntarg)
c          Hessian at target locations, $\nabla \nabla u_{\ell}(t_{i})$
c    -    ier: integer
          Error flag; ier=0 implies successful execution, and ier=4/8 implies insufficient memory  
c
c
c--------------------------------
c
