Skip to content

dmikha/GPUmaps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

GPUmaps

A PyCUDA script for intergrating along line-of-sight on GPU. The intention of the code is to get a fast postprocessing tool to produce synthetic emission maps from MHD data. The script consists of several stages, which (i) read the data from MHD simulations; (ii) process a template for CUDA C code; (iii) copy the data to the GPU device and run block of GPU processes, and (iv) retrieve synthetic map from the device and create a visual file using matplotlib.

The MHD box coordinates do not match the "real world" Cartesian coordinates (where the synthetic maps are computed: XY is the plane of sky and Z axis directed along line-of-sight), and the "real world" coordinates need to be transforms to the MHD box coordinates. As the obtained coordinated do not match the nodes of the MHD grid, one needs to assign some emission coefficient at that specific location. This requires obtaining nearby nodes from the MHD array and approximating the value. To obtain the nearby nodes we used a recursive high-efficiency algorithm suitable for monotonic arrays. To determine the emission coefficient at the revealed location, we used a bilinear approximation method. This resulted in a sectionally linear dependence of the emission coefficient, thus any high-order integration methods are not justified for the integration over the line-of-sight. We therefore utilized the trapezoidal integration rule.

About

PyCUDA script for intergrating over the line-of-sight

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages