P3M
Particle–Particle–Particle–Mesh is a Fourier-based Ewald summation method to calculate potentials in N-body simulations.
The potential could be the electrostatic potential among N point charges i.e. molecular dynamics, the gravitational potential among N gas particles in e.g. smoothed particle hydrodynamics, or any other useful function. It is based on the particle mesh method, where particles are interpolated onto a grid, and the potential is solved for this grid. This interpolation introduces errors in the force calculation, particularly for particles that are close together. Essentially, the particles are forced to have a lower spatial resolution during the force calculation. The P3M algorithm attempts to remedy this by calculating the potential through a direct sum for particles that are close, and through the particle mesh method for particles that are separated by some distance.