Selected Methods in N-body Simulations
This paper discusses the implementation of the particle-mesh (PM) and particle-particle particle-mesh (P3M) methods in the context of a spiral galaxy simulation. Simulations performed using both methods correctly predict the formation of characteristic spiral arms and demonstrate expected physical behavior, satisfying Newton’s second law and conserving energy and angular momentum. The PM code was written for both the CPU and GPU architectures, with the GPU version achieving threefold speedup compared to the multithreaded CPU implementation. We also describe and implement a method for lock-free parallelization of the short-range correction part of the P3M method on the CPU.
Authors
- Aleksy Balazinski
Publication Details
- Journal
- Applied Physics Research
- Published
- 2025-05-20
- DOI
- https://doi.org/10.5539/apr.v17n1p225
- Primary Topic
- Astro and Planetary Science
- Type
- article
- Field-Weighted Citation Impact
- 0.00