1. Homepage
  2. Programming
  3. 159.735 Assignment 4: Modelling Gravitational Lensing on a GPU

159.735 Assignment 4: Modelling Gravitational Lensing on a GPU

Engage in a Conversation
Massey159735Studies in Parallel and Distributed SystemsModelling Gravitational Lensing on a GPUC++CUDA

159.735 Assignment 4
Modelling Gravitational Lensing on a GPU CourseNana.COM

Gravitational (micro)lensing occurs when a foreground star (the lens) passes along the line-of-sight of a background star (the source). A consequence of Einstein’s theory of general relativity is that light rays do not always travel in straight lines. A light ray will follow the natural ”curvature” of space-time if it passes by an object that has mass. The result of this is that the foreground star acts as a lens on the background star. The lens star will produce two arc shaped images of the source star. More complicated image patterns are produced if there are several lens stars. In this exercise, you will see what they look like. CourseNana.COM

In gravitational lensing, the mapping between the source and the lens plane is given by the lens equation. If the two dimensional source, ζ and image positions, z, are expressed in complex form, the lens equation for NL lenses with positions zm,i and mass fractions εi is CourseNana.COM

NL ε ζ=zX i CourseNana.COM

i z ̄ z ̄m,i CourseNana.COM

In principle, given the position of the source star, one can solve this equation to derive the image positions on the source plane. In practice, this is very difficult to do, as it requires one to solve a high order complex polynomial. A conceptually simple way is to use the technique of “inverse ray tracing”. the lens plane is divided into pixels and a ray is shot from each pixel position. The corresponding position on the source plane is then calculated directly from the lens equation. If the ray shot from a particular pixel happens to land on the source star, then that pixel forms part of the gravitationally lensed image of the star. This works for simple lens configurations and very complex patterns resulting from many lenses. CourseNana.COM

The Assignment CourseNana.COM

On the Stream site, download a copy of lensing.tar and unpack this. CourseNana.COM

This package includes lenses.cpp which provides an implementation of the lens equation and a startup program lens demo.cpp You need to complete the section of the code that generates the lens image. Try the sequential version for different lens configurations. You can use ds9 to view the images. CourseNana.COM

CourseNana.COM

Note that stars are not generally of uniform brightness across their discs. They appear darker towards the edge. You can include this ”limb darkening” by weighting the lens image pixel according to where the ray lands within the source star disc. CourseNana.COM

f =1λ(1μ) μ = q1 (r/rstar)2 CourseNana.COM

and r is the distance from the center of the star where the ray lands, rstar is the radius of the star, and λ is the limb darkening coefficient (typically λ = 0.5). CourseNana.COM

Now write a CUDA implementation that runs on the GPU. You may use the GPU cards installed in the lab workstations, or any other card on which you have access. CourseNana.COM

Submission CourseNana.COM

Please submit your C or C++ source code together with a report where you should address at least the following. CourseNana.COM

  • State the GPU card that use implement your assignment. Give the number of processing units on that card and any other information that is relevant. CourseNana.COM

  • Describe how you implemented your solution to the inverse ray tracing problem on the GPUs. Marks will be awarded for thoughtful answers that demonstrate your understanding of the GPU architecture. CourseNana.COM

  • Try running your program for different problem sizes, ie try generating lens images of different resolutions and for different sizes of the lensing system. Comment on the performances you see. CourseNana.COM

    Due date: TBD
    This assignment is worth 20% of your final grade 
    CourseNana.COM

Get in Touch with Our Experts

WeChat (微信) WeChat (微信)
Whatsapp WhatsApp
Massey代写,159735代写,Studies in Parallel and Distributed Systems代写,Modelling Gravitational Lensing on a GPU代写,C++代写,CUDA代写,Massey代编,159735代编,Studies in Parallel and Distributed Systems代编,Modelling Gravitational Lensing on a GPU代编,C++代编,CUDA代编,Massey代考,159735代考,Studies in Parallel and Distributed Systems代考,Modelling Gravitational Lensing on a GPU代考,C++代考,CUDA代考,Masseyhelp,159735help,Studies in Parallel and Distributed Systemshelp,Modelling Gravitational Lensing on a GPUhelp,C++help,CUDAhelp,Massey作业代写,159735作业代写,Studies in Parallel and Distributed Systems作业代写,Modelling Gravitational Lensing on a GPU作业代写,C++作业代写,CUDA作业代写,Massey编程代写,159735编程代写,Studies in Parallel and Distributed Systems编程代写,Modelling Gravitational Lensing on a GPU编程代写,C++编程代写,CUDA编程代写,Masseyprogramming help,159735programming help,Studies in Parallel and Distributed Systemsprogramming help,Modelling Gravitational Lensing on a GPUprogramming help,C++programming help,CUDAprogramming help,Masseyassignment help,159735assignment help,Studies in Parallel and Distributed Systemsassignment help,Modelling Gravitational Lensing on a GPUassignment help,C++assignment help,CUDAassignment help,Masseysolution,159735solution,Studies in Parallel and Distributed Systemssolution,Modelling Gravitational Lensing on a GPUsolution,C++solution,CUDAsolution,