We introduce an accurate and efficient method for a class of nonlocal
potential evaluations with free boundary condition, including the 3D/2D
Coulomb, 2D Poisson and 3D dipolar potentials. Our method is based on a
Gaussian-sum approximation of the singular convolution kernel and Taylor
expansion of the density. Starting from the convolution formulation, for smooth
and fast decaying densities, we make a full use of the Fourier pseudospectral
(plane wave) approximation of the density and a separable Gaussian-sum
approximation of the kernel in an interval where the singularity (the origin)
is excluded. Hence, the potential is separated into a regular integral and a
near-field singular correction integral, where the first integral is computed
with the Fourier pseudospectral method and the latter singular one can be well
resolved utilizing a low-order Taylor expansion of the density. Both
evaluations can be accelerated by fast Fourier transforms (FFT). The new method
is accurate (14-16 digits), efficient (O(NlogN) complexity), low in
storage, easily adaptable to other different kernels, applicable for
anisotropic densities and highly parallelable