We present a fast and spectrally accurate method for efficient computation of the three dimensional Coulomb potential with periodicity in one direction. The algorithm is FFT-based and uses the so-called Ewald decomposition, which is naturally most efficient for the triply periodic case. In this paper, we show how to extend the triply periodic Spectral Ewald method to the singly periodic case, such that the cost of computing the singly periodic potential is only marginally larger than the cost of computing the potential for the corresponding triply periodic system.In the Fourier space contribution of the Ewald decomposition, a Fourier series is obtained in the periodic direction with a Fourier integral over the non-periodic directions for each discrete wave number. We show that upsampling to resolve the integral is only needed for modes with small wave numbers. For the zero wave number, this Fourier integral has a singularity. For this mode, we effectively need to solve a free-space Poisson equation in two dimensions. A very recent idea by Vico et al. makes it possible to use FFTs to solve this problem, allowing us to unify the treatment of all modes. An adaptive 3D FFT can be established to apply different upsampling rates locally. The computational cost for other parts of the algorithm is essentially unchanged as compared to the triply periodic case, in total yielding only a small increase in both computational cost and memory usage for this singly periodic case.
Read full abstract