A Finite Element Based P3M Method for N-Body Problems

Natalie N. Beams, Luke N. Olson, Jonathan B. Freund

TL;DR

This paper introduces a novel finite element-based Particle-Particle-Particle-Mesh (P3M) method for efficiently and accurately computing N-body interactions. By employing specially designed polynomial screens, it allows for an exact finite element solution of the long-range interactions, enabling the use of efficient multigrid solvers and avoiding the need for Fast Fourier Transforms (FFTs).

What Problem Does This Paper Address?

Simulating systems with many interacting particles (N-body problems) is computationally intensive, especially when interactions are long-range, like electrostatic forces. Traditional methods like the Fast Multipole Method (FMM) and Particle-Mesh Ewald (PME) offer scalable solutions but have limitations. FMM can be complex to implement and its performance can be sensitive to problem geometry. PME, while efficient for periodic domains, relies on FFTs which can be a bottleneck at extreme scales and limit geometric flexibility. The core challenge is to accurately and efficiently compute these interactions, particularly the long-range components, in a way that scales well with the number of particles and is adaptable to various geometries and boundary conditions.

Methods

The paper proposes a new P3M approach that replaces the traditional Gaussian screening functions with specially designed polynomial basis functions. This key innovation leads to several advantages:

  • Exact Long-Range Solution: The polynomial screens are constructed such that the long-range part of the potential can be solved exactly using a finite element method (FEM). This avoids approximations inherent in FFT-based methods.
  • Sparse Matrix Problem: The FEM solution results in a sparse linear system, which can be efficiently solved using standard multigrid methods. This is a significant advantage over dense matrix problems.
  • No FFT Dependency: By solving the long-range interactions exactly with FEM, the method bypasses the need for FFTs, which can be beneficial for scalability on large parallel systems and for non-standard geometries.
  • Polynomial Screens: The screens are built from polynomial basis functions of order q. The FEM solver uses basis functions of order p = q+2. This allows for precise control over the decay rate of the screened potential.
  • Local Operations: While the short-range calculations are more involved than in PME, they remain local, contributing to overall scalability.

The method follows the general P3M framework: charge assignment to a mesh, solving for the smooth (long-range) potential on the mesh, transferring the potential back to charge locations, and computing short-range interactions.

Datasets

Not discussed in the paper. The paper focuses on the algorithmic development and validation through numerical experiments, rather than using pre-existing datasets.

Key Insights and Ideas

  • Polynomial Screens for Exact FEM: The core insight is that carefully chosen polynomial screens can enable an exact solution of the long-range potential using finite elements, bypassing the approximations of FFT-based methods. This is a fundamental shift from traditional PME.
  • Multigrid as a Scalable Solver: Leveraging the exact FEM formulation, the problem reduces to a sparse linear system solvable by multigrid methods, which are known for their excellent scalability, especially on parallel architectures.
  • Decoupling Accuracy and Mesh Resolution: Unlike FFT-based methods where mesh resolution dictates accuracy for the smooth part, this FEM approach allows for independent control. The accuracy of the smooth potential is exact for a given FEM discretization, and the accuracy of the short-range part is controlled by the cutoff distance and the order of the polynomial screens.
  • Flexibility in Boundary Conditions: The FEM framework naturally accommodates various boundary conditions (periodic, Dirichlet, Neumann) with minimal changes, offering greater flexibility than FFT-based methods which are most natural for periodic domains.

Key Results

  • Accuracy: The paper demonstrates that the method achieves high accuracy, with relative errors decreasing super-algebraically with increasing polynomial screen order (q). For a sample case with N=10000, the relative error was shown to converge rapidly as q increased.
  • Scalability: The method is designed for scalability, with the mesh solve exhibiting O(M) complexity (where M is the number of mesh degrees of freedom) and N-dependent components scaling favorably. The use of multigrid solvers is highlighted for their parallel efficiency.
  • Performance: While the short-range calculations are more involved than PME, the overall method is competitive. The paper presents performance models and example CPU time scalings, showing how different components contribute to the total cost.

Limitations and Future Work

  • Short-Range Calculation Complexity: The paper acknowledges that the short-range interaction calculation is more involved than in PME. This is partly due to the polynomial screens not having the same exponential decay as Gaussian screens, leading to potentially more local interactions but requiring more complex evaluation.
  • Memory Footprint: For high-order polynomial screens (q), the finite element matrices can become a significant portion of the total memory footprint, especially for finer meshes. The authors note that more optimal methods for memory management exist.
  • Moment Cancellation vs. Screen Design: The current screen design focuses on maximizing far-field decay. Future work could explore weighted objective functions for screen design to better suit specific simulation goals.
  • Non-Uniform Meshes: While the method is extensible to non-uniform meshes, the complexity of short-range potential generalization and the need for quadrature-based evaluations for each interacting pair are noted as challenges.
  • Conservation Properties: The paper focuses on potential evaluation and does not explicitly address momentum or energy conservation, which are crucial for dynamic simulations. The basis functions' non-differentiability at collocation points also poses challenges for analytical differentiation.

Summary updated

BibTeX
@article{beams2016finite,
  author = {Natalie N. Beams and Luke N. Olson and Jonathan B. Freund},
  title = {{A Finite Element Based P3M Method for N-Body Problems}},
  journal = {SIAM J. Sci. Comput.},
  year = {2016},
  doi = {10.1137/15m1014644},
}
Figure