Astronomy 615: Fall 2011
"Computational Astrophysics"This course will provide the astronomy student with a basic knowledge of numerical methods in astrophysics. By the end of the course students should be comfortable working in a Unix environment, compiling and running codes, and employing a variety of visualization techniques to analyze the results. This process will be motivated by concrete examples of modern problems in astrophysics that demand numerical approaches.
The exact details of the material covered will depend on the existing level of computer sophistication among the class participants. However, in broad outline the major course topics will include linear algebra, root finding, leastsquare fitting, Monte Carlo methods, numerical integration, Nbody methods, fluid dynamics, FFTs and timeseries analysis.
Schedule
Instructor: Massimo Ricotti Class: room CSS 0201 Lectures: Tuesday and Thursday from 2:00pm to 3:15pm First class: Thu Sept 1 Last class: Tu Dec 13
What's New?
Nov 26: Problem Set #6 posted (the last one!). 
Nov 18: Problem Set #5 posted. 
Nov 8: Problem Set #4 posted. 
Oct 19: Problem Set #3 posted It is long, start early! 
Oct 4: Problem Set #2 posted. 
Sept 22: Tutorial on GNU's GDB Debugger. 
Sept 20: Problem Set #1 posted. 
Sept 13: Play with C examples and "Makefile mistery". 
Sept 06: Survey results posted. 
Contact info and Notes
 Office: room CSS 0213
 Email: ricotti "at" astro "dot" umd "dot" edu
 Phone: (301) 405 5097
 Office hours: Monday 3:30pm4:30pm or by appointment
 Class web page: http://www.astro.umd.edu/~ricotti/NEWWEB/teaching/current.html
Course Outline
The Syllabus is available in HTML and PDF format.
Date  Lecture  Reading (NRiC)  Lecture Notes  

#1  Sep 01  Introduction to the course     
#2  Sep 06  Computer architecture    class02.pdf 
#3  Sep 08  Introduction to UNIX  tutorial   
#4  Sep 13  Introduction to C  1.11.2, tutorial   
#5  Sep 15  Introduction to C (cont.)  1.11.2, tutorial   
#6  Sep 20  Introduction to visualization  tutorial  class05.pdf 
#7  Sep 22  Data representation  1.3  class05.pdf 
#8  Sep 27  Linear algebra, part 1 (GaussJordan elimination)  2.02.3  class06.pdf 
#9  Sep 29  Linear algebra, part 2 (LU & SVD decomposition)  2.42.6  class07.pdf 
#10  Oct 04  Root finding in 1D  9.09.1, 9.4, 9.6  class08.pdf 
#11  Oct 06  Root finding in multiD, and numerical differentiation  5.7  class09.pdf 
#12  Oct 11  Statistics and the KS test  14.014.3  class10.pdf 
#13  Oct 13  Leastsquares fitting  15.015.2, 15.415.5  class11.pdf 
  Oct 18  MIDTERM     
#14  Oct 20  Random numbers and cryptography  7.07.2  class12.pdf 
#15  Oct 25  Numerical integration  7.6, 4.04.4, 4.6  class13.pdf 
#16  Oct 27  Integration of ODEs, part 1 (IVPs)  16.016.1  class14.pdf 
#17  Nov 01  Integration of ODEs, part 2 (leapfrog)    class15.pdf 
#18  Nov 03  Integration of ODEs, part 3 (stiff ODEs & 2pt BVPs)  16.6, 17.0  class16.pdf 
#19  Nov 08  Integration of ODEs, part 4    class17.pdf 
#20  Nov 10  Nbody techniques, part 1    class18.pdf 
#21  Nov 15  Nbody techniques, part 2 (PP)  19.0, 19.419.6  class19.pdf 
#22  Nov 17  Nbody techniques, part 3 and 4 (PM)    class20.pdfclass21.pdf< 
#23  Nov 22  Integration of PDEs, part 1 (ell & hyp)  19.2  class22.pdf 
  Nov 24  no class (Thanksgiving)     
#24  Nov 29  Integration of PDEs, part 2 (hyp & par)  19.2  class23.pdf 
#25  Dec 01  Guest lecturer: Anton Dorodnitsyn    
#26  Dec 06  Fluid dynamics, part 1 (eqns)  19.3  class24.pdf 
#27  Dec 08  Fluid dynamics, part 2 (methods)    class25.pdf 
#28  Dec 13  Parallel Computing (CPU and GPU)     
  Not covered  Fourier transform, part 1 (intro)  12.012.1, 19.4  class26.pdf 
  Not covered  Fourier transform, part 2 (FFT)  12.2, 13.013.2, 13.4  class27.pdf 
  Not covered  Other topics    class28.pdf 
Textbooks
 There are no required textbooks
 Recommended:
 Numerical recipes in FORTRAN [or in C], by Press, W.H. et al.
Course Grading
 Homework 75%
 Midterm 10%
 Final 15%
Note that the homework is the most important part of the class. However, because this is a graduate class, there will be 2 questions in the qualifyer exam concerning this class. So, midterm and final are a necessary evil to prepare you for the qualifyer. In class participation is strongly encouraged.
Class Survey Results
The starting level of computer and programming competence of the students in this class (measured the first day of class) is "Novice/Beginner" as indicated by the result of the class survey. The survey results are available in HTML and PDF format. I will start the lectures with simple and, for some of you, obvious concepts and finish with more complex and challenging topics that should entertain even the most experienced students in the class.
Homework
Homework will be assigned every week or every other week. Their due dates will be announced at the time they are assigned. On the due date the students will be expected to turn in their homework in class. The homework turned in will be graded and returned to the students. I will provide solutions and discuss them in class.
Link to Numerical Recipes sources in C and in FORTRAN: it is preferable to compile the recipes as separate files rather than cut and paste the functions into your source code.
Note that in order to use NRiC routines the easiest way is to include nr.h header file and nrutil.c and nrutil.h to use vectors and matrices. You can find these files here.
Problem set  Date  Problem Set  Solutions  Extras  
Assigned  Due  
#1  Sept 20  Sept 29  HTML/PDF  HTML/PDF  
#2  Oct 4  Oct 13  HTML/PDF  HTML/PDF  data  
#3  Oct 19  Nov 3  HTML/PDF  HTML/PDF  data  
#4  Nov 8  Nov 15  HTML/PDF  HTML/PDF  
#5  Nov 16  Dec 1  HTML/PDF  HTML/PDF  
#6  Nov 26  Dec 13  HTML/PDF  HTML/PDF  movie 
Tutorials

Old Class Notes

Useful Links
Debugger's Links: Using GNU's GDB Debugger Debugging Floating Point Exceptions OpenMP links: OpenMP.org OpenMP Tutorial Wiki OpenMPCUDA and GPU computing: Nvidia webpage with examples to download Wiki OpenCL Wiki CUDA Check out the UMD Astronomy Computing Wiki! (In the listings below, a "W" link indicates a Wikipedia entry on the topic is available.) Online Tutorials
