# Physics 780.20 "Computational Physics" Winter, 2009

## General Information about 780.20 Computational Physics

Course title:
Computational Physics
References:
There is no required text but there will be readings for each class session from handouts passed out in class and background notes posted online. Some useful references that we'll consult are:
Prerequisites:
The prerequisites are simply physics at least through the undergraduate 26x series (although some have successfully taken the course concurrently with 262!). It will be useful but not necessary to have some experience with Mathematica, MATLAB, Python, C, fortran, or C++. The teaching strategy is to give you computer programs and have you run and then modify (or debug) them as you follow along through worksheets. Email or visit Prof. Furnstahl if you're concerned about your preparation (e.g., if you have no experience at all).
Material:
We'll start with an overview based on the first part of the Hjorth-Jensen lecture notes and then cover selections from the rest of the notes plus topics based on the Landau/Paez text and on the instructors' latest prejudices and class interest (to be determined!). In most cases the discussion will be framed by a physics topic such as nonlinear oscillations (e.g., chaos). We'll be using programs written in C++ and Python and occasionally Matlab (or Mathematica) as we go along. Some topics we will cover along the way:
• Errors and uncertainties in computations. E.g., one should understand how to analyze whether a calculation is limited by the algorithm or round-off error. We will come back to this topic repeatedly.
• Basic computational algorithms for: integration, differentiation, differential equations, root finding. Less emphasis on theory than on understanding how well an algorithm should work (e.g., should the accuracy improve as 1/N2, where N is the number of points used and does it?) and what algorithm is appropriate for what situation (e.g., oscillatory integrals or integrands with singularities). In many (or most) cases you should be using a packaged library routine and not writing your own, so we'll learn how to use such a library and check the results.
• What you should know about: random numbers, Monte Carlo integration and simulation, matrix computing, calling Fortran libraries from C++, plus additional topics as time permits.
• Aspects of writing code: good programming practices; how to test and debug a code (C++, fortran, MATLAB, or whatever); how to tune a code to run faster.
• Aspects of a computational physics project: breaking down a project into sub-problems; implementation issues (e.g., program design, code conventions, makefiles); use of graphics for visualization; verification.
• Object-oriented programming: What is it and when is it relevant for computational problems?
• Using Mathematica or MATLAB for computational physics. This is a broad topic, of course, and we will just touch upon aspects here.
Computing Environment:
The general idea is to use basic and portable tools. The homepage will have details about setting these up on your personal computer.
• The computers in Smith 1094 can be run with Linux or Windows XP. You can choose which to use.
• For Linux users, the computer environment include the GNU tools (also available in Smith 1094). These include g++, make, indent, gdb, gprof, and editors (e.g., emacs, nedit).
• For Windows users, the computing environment will be mainly Cygwin, which simulates the GNU/Linux environment. (You can also log into a public Linux machine via an X-windows program, Xwin32.) Sometimes we will use the Dev-C++ IDE.
• We'll have the INTEL compilers (for C++ and Fortran 90/95) available on both platforms.
• We'll use gnuplot for plotting, from the command line in Cygwin or Linux and also as a standalone program on Windows.
• The GSL ("Gnu Scientific Library") is a free numerical library.
• Python is available at the command line in Cygwin or Linux, and there is a stand-alone version on Windows.
• MATLAB and Mathematica are available on all platforms for registered OSU students.
Instructor:
Prof. Richard Furnstahl
office: M2048 PRB
email: furnstahl.1@osu.edu or furnstah@mps.ohio-state.edu
phone: 292-4830 (office) or 847-4026 (home)
1094 Consultant:
office: TBA
phone: TBA
Computer Consultant:
office: 1199 PRB
phone: 292-8598 (PRB office) or 292-4269 (Stillman Hall)
Schedule:
Class meets MW from 2:30pm to 4:30pm or 3:30pm to 5:30pm in Smith 1094 (come either time). Each period will primarily be a hands-on lab session (after a short lecture/question part).
Office Hours:
By appointment (asking in class is easiest) and . . .
[to be announced] (Furnstahl)