JefiGPU: Jefimenko's equations on GPU
We have implemented a GPU version of the Jefimenko's equations — JefiGPU. Given the proper distributions of the source terms ρ (charge density) and J (current density) in the source volume, the algorithm gives the electromagnetic fields in the observational region (not necessarily overlaps the...
Saved in:
Published in | Computer physics communications Vol. 276; p. 108328 |
---|---|
Main Authors | , , , , |
Format | Journal Article |
Language | English |
Published |
Elsevier B.V
01.07.2022
|
Subjects | |
Online Access | Get full text |
Cover
Loading…
Summary: | We have implemented a GPU version of the Jefimenko's equations — JefiGPU. Given the proper distributions of the source terms ρ (charge density) and J (current density) in the source volume, the algorithm gives the electromagnetic fields in the observational region (not necessarily overlaps the vicinity of the sources). To verify the accuracy of the GPU implementation, we have compared the obtained results with that of the theoretical ones. Our results show that the deviations of the GPU results from the theoretical ones are around 5%. Meanwhile, we have also compared the performance of the GPU implementation with a CPU version. Finally, we have studied the parameter dependence of the execution time and memory consumption on one NVIDIA Tesla V100 card. Our code can be consistently coupled to RBG (Relativistic Boltzmann equations on GPUs) and many other GPU-based algorithms in physics.
Program Title: JefiGPU
CPC Library link to program files:https://doi.org/10.17632/6vnghzknx4.1
Developer's repository link:https://github.com/Juenjie/CRBMG
Code Ocean capsule:https://codeocean.com/capsule/9007956
Licensing provisions: Apache-2.0
Programming language: Python
Nature of problem: Jefimenko's equations are numerically stable with given sources ρ (charge density) and J (current density). Providing proper sources, Jefimenko's equations can give the electromagnetic fields without boundary conditions. However, the relevant integrations of the Jefimenko's equations involve a 4D space-time which is both memory and time consuming. With the help of the state-of-art GPU technique, these integrations can be evaluated with acceptable accuracy and execution time. In the present work, we have implemented a GPU version of the Jefimenko's equations and tested the accuracy and the performance of the code.
Solution method: The GPU code mainly deals with the implementation of the integrations in Jefimenko's equations. Each CUDA kernel corresponds to a spatial point of E and B. The integrations involving the source region and the retarded time are performed in each CUDA kernel. Ray, Numba and Cupy packages are used to manipulate the scaling of GPU allocation and evaluation. |
---|---|
ISSN: | 0010-4655 1879-2944 |
DOI: | 10.1016/j.cpc.2022.108328 |