Papers › An Accurate P³M Algorithm for Gravitational Lensing Studies in Simulations

An Accurate P³M Algorithm for Gravitational Lensing Studies in Simulations

17 Feb 2021arXiv:2102.08629links table onlyarchive 2025-07-28

Kun Xu, Yipeng Jing

The archive published only this paper's code-link row. Authors, date and abstract are from arXiv's metadata (CC0), read from the Kaggle arXiv metadata snapshot of 2026-09-12 where its title matched the archive's; the title is the archive's.

We present a two-dimensional (2D) Particle-Particle-Particle-Mesh (P³M) algorithm with an optimized Green function and adaptive softening length for gravitational lensing studies in N-Body simulations. The analytical form of the optimized Green function Ĝ(k) is given. The softening schemes (S) are studied for both the PM and the PP calculations in order for accurate force calculation and suppression of the particle discreteness effect. Our method is two orders of magnitude more accurate than the simple PM algorithm with the {\it poor man's} Green function (∝1/k²) at a scale of a few mesh cells or smaller. The force anisotropy is also much smaller than the conventional PM calculation. We can achieve a force accuracy better than 0.1 percent at all scales with our algorithm, which makes it an ideal (accurate and fast) algorithm for {\textit{micro}} lensing studies . When we apply the algorithm to computing {\textit{weak}} and {\textit{strong}} lensing quantities in N-Body simulations, the errors are dominated by the Poisson noise caused by particle discreteness. The Poisson noise can be suppressed by smoothing out the particle distribution, which can be achieved by simply choosing an adaptive softening length in the PP calculation. We have presented a criterion to set the adaptive softening length. Our algorithm is also applicable to cosmological simulations. We provide a \textsc{python} implementation \texttt{P3Mlens} for this algorithm.

PaperPDFCode

Code

kunxusjtu/P3MLens officialmentioned in paper report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections