Comparing the efficiency of GPU and CPU in gravitational lensing simulation
DOI:
https://doi.org/10.26577/ijmph.2024v15i1a6Abstract
In this study, we investigate the computational advancements in simulating gravitational lensing, particularly focusing on the Schwarzschild black hole model. The traditional approach of back ray tracing, where photons are traced back from the observer to the source, is computationally intensive, especially when aiming to achieve high-resolution images of lensing effects around black holes. By employing a numerical method that integrates the Schwarzschild metric with initial conditions derived from the observer's plane, we map the deflection of light around a black hole to generate simulated images of gravitational lensing.
The core of our study is the comparison between traditional CPU-based computations and GPU-accelerated processes using the Numba library. Our findings reveal that GPU acceleration, with its parallel processing capabilities, significantly reduces computation time, particularly as the complexity of the simulation increases with larger grid sizes. This computational efficiency is crucial for simulations of gravitational lensing, where the number of independent calculations grows exponentially with the resolution and accuracy of the desired image.
Our research underscores the importance of leveraging GPU technology for astrophysical simulations, offering a substantial improvement in performance over CPU-based methods.
Keywords: Gravitational Lensing, GPU Parallelization, Schwarzschild Black Hole, Ray Tracing Methods, Numba Library.