Physics 3340/6361 - Computational Physics - Fall 2019

Many contemporary problems in Physics are of such complexity they may only be approached with numerical and computer-based solution methods. These methods, however, come with a caveat:

"Never in the history of mankind has it been possible to produce so many wrong answers so quickly!" - Carl-Erik Fröberg

We must therefore carefully study the fundamentals of Computational Physics to be sure we are getting the right answers from our programs!

Required textbook

"Numerical Mathematics and Computing" by E. Ward Cheney and David R. Kincaid

Recommended edition:
7th edition (2013)
ISBN: 1-133-10371-5
Acceptable edition:
6th edition (2008)
ISBN: 495-11475-8
Acceptable edition:
5th edition (2004)
ISBN: 0534389937

Note: This text should not be confused with another text "Numerical Analysis: Mathematics of Scientific Computing" also by Kincaid and Cheney

Syllabus (also available on Canvas)

Lecture slides

The lecture slides in PDF format for each major class topic will be posted on Canvas. You may download and use for working the homework problems and during open-book exams.

Office Hours

Mondays 1:30 - 3:00pm, Room 26 Fondren Science Building, and Wednesdays 1:30 - 3:00pm, Room 60 Fondren Science Building, or at other times by appointment. I can also generally be found in the KNW2300 lab, Room 202 Junkins, Tuesdays and Thursdays 2:00 - 4:50pm


This is a hands-on class where you learn mostly by working on the homework exercises. Homework assignments will usually be posted on Canvas by Monday evenings and will usually be due Monday nights by upload into Canvas. In fairness to the students who have submitted their assignments on time, late submissions are eligible for only 50% credit. Then once the solutions have been posted on Canvas of course no credit can be awarded for an assignment.

Although our class meetings for Physics 3340 and 6361 are common, many of the weekly homework problems assigned to Physics 6361 students are more difficult than the problems assigned to Physics 3340 students. However, students in 3340 may optionally submit a 6361 problem instead of the corresponding 3340 problem for bonus credit.

Programming Development Tools

In this course, along with your computational physics material, you will learn how to use the Linux operating system with command line interaction, which is the computing environment common in scientific laboratories. A virtual Ubuntu Linux operating system that will run on the Oracle VirtualBox tool on your personal laptop or desktop computer has been prepared for the class. This will provide you with a computing environment that is similar to that in the labs in the SMU Physics department. For instructions how to set up and run this virtual operating system, see the VirtualBox instructions.

Alternatively, the Linux lab computer systems or your office computer in the Physics department, with its gcc Gnu C compiler, can be used to develop numerical analysis programs for assignments in this course. Your native laptop or home computer system is also an acceptable programming platform, as long as it has the gcc Gnu C compiler and the gnuplot plotting tool (see below). Generally MacOS laptops have gcc, and gnuplot can be optionally installed. If you have a laptop or home computer running Microsoft Windows you may install the lightweight MinGW and MSys packages to develop your C programs. The MinGW project home page provides more details and documentation on the MinGW package.

Plotting Tool

We'll be making extensive use of the gnuplot plotting program in this course. Refer to this manual for documentation. This tool is a standard part of Linux systems, and is available on the class virtual Linux system as well as the Physics department systems. If you are working on a native laptop or desktop system, gnuplot is also available for the Windows platform, and you may download either 32-bit Windows binary installer or 64-bit Windows binary installer and install it as well.

Some recent versions of gnuplot have arranged the default colors for the plotted curves to be some pastel, difficult to distinguish hues. To get more reasonable plot colors by default with the recent versions of gnuplot, place the lines:

set linetype 1 linecolor rgb 'red'
set linetype 2 linecolor rgb 'green'
set linetype 3 linecolor rgb 'blue'
set linetype 4 linecolor rgb 'yellow'
set linetype 5 linecolor rgb 'cyan'
set linetype 6 linecolor rgb 'violet'

in a file named '.gnuplot' in your Linux home directory.

Program editing

You may use any plain text editor you feel comfortable with when working on Linux systems, such as gedit, xemacs, nedit, vim, or others, to compose your numerical programs. The gedit editor that is included in the class virtual Linux system is a good choice, as it has special color-coded text display modes for source files of C and other languages that makes program development easier.

Class Resources

Other online Tutorials and resources

Back to John Fattaruso's home page