Spectral Solvers of Maxwell’s Equations in Particle-in-Cell Codes: Numerical Schemes and Parallel Implementation - Panova, E. (Lobachevskii journal of mathematics, 2025)
To solve Maxwell’s equations, particle-in-cell (PIC) simulation codes typically use the Finite-Difference Time-Domain (FDTD) method, which is subject to numerical dispersion. In contrast, spectral solvers are free of numerical dispersion effects and provide a high-quality solution. This paper discusses some issues encountered when integrating spectral solvers into PIC codes. We describe a technique to implement a Perfectly Matched Layer (PML) in PIC codes with spectral solvers. We also propose a modified total-field/scattered-field (TFSF) method for effectively generating electromagnetic field at the boundary of a computational domain in case of an arbitrary-order field solver. The schemes under consideration have been successfully implemented in the PICADOR code using the OpenMP and MPI technologies. We demonstrate that spectral field solvers allow us to significantly decrease a computational grid resolution and achieve a performance gain, despite the additional overhead of performing Fast Fourier Transform (FFT).