Physics 795/895 -- Introduction to Scientific Computing Fall 2017

This web page: http://squirrel.sr.unh.edu/~jraeder/PHYS-795-895-F2017/index.html

Objectives:

This course is designed to teach graduate students and advanced undergraduate students the tools of the trade that are required to solve common computational tasks that come up in research. Many of these tools are very different from the graphical user interface apps that most are familiar with (mostly running on Windows/Android/IOS/OsX computers) and require a deeper knowledge of the inner workings of computers as well as mastering the command line, writing scripts, and rudimentary programming in a UNIX/Linux environment. This course does not replace a thorough programming course, but it provides the fundamentals for using programming in a research environment. This course also serves as a good preparation for IAM 751/851 and similar courses.

Topics:

  • Introduction to computer hardware and architecture
  • Operating system fundamentals
  • File systems
  • Networks
  • Compilers
  • Text editors and essential command line tools
  • Programming basics: shell, perl, C and Fortran
  • Using libraries and open source software
  • Basic data analysis: sorting, curve fitting, statistics, correlation, FFT, spectra, wavelets
  • Graphics and visualization: postscript/pdf, gnuplot, ffmpeg
  • Numerical math: linear/nonlinear systems, integration
  • Numerically solving ordinary/partial differential equations: oscillation, waves, heat/diffusion
  • Publishing using LaTeX.

Prerequisites:

There are no prerequisites except fundamental math skills (calculus, linearity) and a working brain.

Students should bring a laptop to class that is Linux/UNIX enabled. Macs and laptops running Linux are fine. Mac users need to install the Apple Developer Tools and the associated command line tools (free, either on the installation disk or from Appleā€™s Developer web site). They should also install Macports, which enables the easy installation of open source software. Windows users can use Virtualbox or something equivalent (maybe VMWARE), and within the virtual environment have a Linux distribution running, for example: Fedora. An alternative would be to boot a Linux distribution from a USB memory stick (see link 006 below or mint).

Instructor:

Prof. Joachim (Jimmy) Raeder
Space Science Center
University of New Hampshire
8 College Road
Durham, NH 03824-3525
Office: 245G Morse Hall
Phone: 603-862-3412
Fax: 603-862-3584
E-Mail: J.Raeder@unh.edu

Venue:

TR, 8:10 - 9:30, 311 DeMeritt

Communication:

Via e-mail and through this web page. Check often.

Office Hours:

Generally WF 11-12. If possible, come to the troubleshhoting session Wednesdays, 11-12, in Morse 244. If that does not work, by appointment (email). Or come by my office. Although there is no guarantee I'm in and/or available, I'll give my best.

Textbooks:

No text. The class is largely interactive. For most topics covered, many tutorials and other resources are available on the Web. For those who wan to delve deeper into numerical math I recommend:

  • Press et al., Numerical REcipes (comes in various flavors, and contains much useful code).

As for Perl, C, and Fortran tutorials and manuals, there are numerous books and I cannot recommend one over another. Amazon reviews are a good source to find out what is good and what is not.

For Students with Disabilities:

Students who require some accommodation by the instructor because of a disability must contact as early as possible the instructor and document the disability through the ACCESS Office. Any requests for special considerations relating to attendance, pedagogy, homework, etc., must be discussed with and approved by the instructor. In cooperation with the DRC, course materials can be provided in alternative formats (for example, large print, audio, diskette, or Braille). (ACCESS Office, 118 Memorial Union Building, Voice/TTY: 603-862-2607 Fax: 603-862-4043.)

Your academic success in this course is very important to me. If, during the semester, you find emotional or mental health issues are affecting that success, please contact the University’s (http://www.unhcc.unh.edu/) Counseling Center (3rd floor, Smith Hall; 603 862-2090/TTY: 7-1-1), which provides counseling appointments and other mental health services.

Grading:

  • Homework: 70%
  • Final project (or take-home exam, if you will): 30%

Homework:

Due dates will be announced with the homework and posted on this site. Homework (printouts) can either be handed in during class or dropped off into the mailbox in front of my office (245G Morse). However, I prefer homework files (codes and output) all put together into one directory named 'HW_NN_YourName', where NN is the number of the HW, tarred into a single file, and e-mailed to me (j.raeder@unh.edu). Make sure that code is well documented; I need to be able to understand what you do.

Homework that is not turned in by the due date will lose 10 points, after 1 weeks 30 points, and after 2 weeks it will no longer be accepted. I mean it! Make sure to write your name on each sheet that you turn in.

All assignments should be done in groups of at most 3 students. Group work is encouraged. Write down the names of your group partners at the top of the first sheet of your submission. If you work in a group, turn in only one copy!

List of homework assignments:


Homework 01: due Tuesday, October 2, 2017
Homework 02: due Thursday, October 12, 2017
Homework 03: due Thursday, October 18, 2017
Homework 04: due Tuesday, November 7, 2017
Homework 05: due Tuesday, November 21, 2017
Homework 06: due Thursday, November 30, 2017
Homework 07: due Thursday, December 7, 2017

Useful sites and documents



001 C-shell tutorial (short)
002 csh tutorial (long)
003 csh long (and a bit funny) tutorial
004 csh cheat sheet PDF
005 Unix cheat sheet PDF
006 Instructions to install 'mint' on a USB drive

class pages



class01  Tue, 2017-08-29   Introduction
class02  Thu, 2017-08-31   Computing
class03  Tue, 2017-09-05   Shell
class04  Thu, 2017-09-07   More Shell
class05  Tue, 2017-09-12   More csh, files, file systems
class06  Thu, 2017-09-14   Numbers, editors, perl
class07  Tue, 2017-09-19   perl basics
class08  Thu, 2017-09-21   Perl continued (HW01)
off  Tue, 2017-09-26   OFF/conference
off  Thu, 2017-09-28   OFF/conference
class09  Tue, 2017-10-03   Perl I/O, regular expressions (HW02)
class10  Thu, 2017-10-05   From Perl to Fortran
class11  Tue, 2017-10-10   FORTRAN I (HW03)
class12  Thu, 2017-10-12   Plotting with gnuplot
class13  Tue, 2017-10-17   Graphics formats, more f77
class14  Thu, 2017-10-19   Fortran: the good, the bad, and the ugly (HW04)
class15  Tue, 2017-10-24   Introduction to C, part 1 (Doug Cramer)
class16  Thu, 2017-10-26   Introduction to C, part 2 (Doug Cramer)
class17  Tue, 2017-10-31   Back to Fortran: Common blocks, Equivalence, crashes
class18  Thu, 2017-11-02   FFT, numerical libraries
off  Tue, 2017-11-07   Friday_schedule
class19  Thu, 2017-11-09   Power spectra, correlation (HW05)
class20  Tue, 2017-11-14   Integration, roots, some f90
class21  Thu, 2017-11-16   ODEs, Euler, RK, AB methods, stability
off  Tue, 2017-11-21   OFF/T-day
off  Thu, 2017-11-23   OFF/T-day
class22  Tue, 2017-11-28   PDEs, Finite Differences, elliptic problems in 1D
class23  Thu, 2017-11-30   Elliptic problems in 2d and 3d, parabolic PDEs
class24  Tue, 2017-12-05   Crank-Nicolson method, data compression, redundancy, and encryption, Creating animations and movies, ffmpeg
class25  Thu, 2017-12-07   3d Visualization, LaTeX
off  Sat, 2017-12-16   Final_project_due