Computational Physics

Evening
Absolute necessity
A laptop running some flavour of Linux (preferably Ubuntu), with wireless networking capability, and standard C and Fortran compilers and libraries.
Lecture days
Mondays, Wednesdays, Fridays at 11:30 AM, starting Feb 1, 2010
Tutor
M. Padmanath
Exams
A drop test will be administered to those who register for the course and want to drop the course. The rest of the course will have no written exam. The evaluation will be based on classroom performance and assigned individual projects.
Important dates
  • Synchronization of software at 5 PM, January 29, 2010 (A 301)
  • First lecture at 11:30 AM, February 1, 2010 (A 301)
  • Drop test at 11:00 AM, February 13, 2010 (AG 69)

Course on Computational Physics, 2010

Introductory Computational Physics

Introduction

Glass, steel, air, water

This is a course on solving physics problems algorithmically: using a combination of analysis and modern computer based numerical techniques. The first, and main, desired outcome of this course is to enable you to frame physics research in terms of well-posed problems, which then have algorithmic solutions. The second desired outcome is to learn basic techniques in the three main areas of linear problems, finite differences and stochastic methods.

On the way we will meet interesting concepts such as iterations, fixed points and chaos, computability, hardness and NP completeness, the Church-Turing thesis and randomness.

Pre-requisites

À la recherche du temps perdu

If you want to take this course then you must have a good knowledge of the elements of differential equations, linear algebra and statistics at the level of being able to solve most exercises in Arfken. Understanding the power of computation is one of the purposes of this course, so you should know either C or Fortran (C++ or Fortran 90 will do, but not Java). Code development will take place in class, so you need a laptop running linux and loaded with either C or Fortran compiler and libraries.

This course will not teach elementary mathematical physics or programming languages. If you want to brush up on C use Kernighan and Ritchie. If you want to brush up on Fortran 90 then use Metcalf and Reid. You will need to learn Mathematica. This computer algebra system is available in the computer center, and you can use it by remote login to specific machines there. If you don't know anything about it, then download this introduction notebook and run it. You can also look at their web site and the book by Wolfram.

Knowledge of the document preparation system TEχ is not mandatory, but merely useful. You can start by looking at the source and pdf of a small style guide, and then continue reading on line.

Laptop configuration

Light, colour, shape

First the hardware. You need to have a laptop with a dual or quad core Intel CPU running at a speed of over 1 GHz. You should have a RAM of at least 1 GB. Your laptop should have wireless. As for the software: for interoperability with the software that I'm putting together for the course, you need to run a linux operating system. Also, you need to load Intel C and FORTRAN compilers and libraries. These licences will run on a server in TIFR and you should set up your machine to be a client. We will have a meeting at 5 PM on January 29 to synchronize software.

Remember that your performance during the class is one of the inputs into your course grades. So make sure that you have working hardware and software before the lectures begin on February 1.

Evaluation

Drop Test

Mouldy leaf

If you think you know the material that will be covered in this course, then you are very strongly urged to take a drop test. Send me mail at the email address "sgupta+cp2010" (at mailhost) asking to register for the test. A drop test will be administered on February 13 to those who register by that date. Make sure that you don't miss the deadline, because this will be your last chance to gain credits without doing any work. No other drop test will be administered.

Course Evaluation

Upward spiral

Evaluation for this course will be a combination of performance metrics based on classroom work, assignments and individual projects.

Classroom work will consist of actual problem solving in the form of written programs and their demonstrated outputs. For this work it is absolutely essential that each student brings a laptop to every class.

Individual projects will be assigned in the first half of the course. I propose to spend the last 15 (approximately) contact hours of the course in hands-on exercises and student seminars on their progress in the respective projects. Each student will be required to submit a project report and the complete set of programs which gave the data in the report. All these inputs will be used for the evaluation.

Course contents

Assam below

The first half of the course will involve hands-on work on your laptop during the classroom hours. In the second half, each student will be assigned a problem to solve, and the classroom hours will be used for seminars and progress reports by each of the students.

The mathematical context of modern physics
Section 0
C code, F90 code, Mathematica, Notes
We look at some problems in modern day research level physics and try to understand when traditional mathematical techniques of analysis are not sufficient. We try to develop the methods of reducing some examples to well-posed mathematical questions which need numerical solution. We try to understand why traditional mathematical analysis is still a good starting point from which to explore the physics of such systems more deeply.
The representation of numbers in a computer
Section 1.1
C code, F90 code, Mathematica, Notes
The notion of floating point numbers. Why real numbers are unreal. Determining the precision of any computer. Summing infinite series. How one loses precision. How errors propagate through a computation.
The first basic technique: linear algebra
Section 1.2
C code, F90 code, Mathematica, Notes
A very large set of problems that we handle today are essentially linear. This is because quantum mechanics is linear. Numerical methods of linear algebra therefore play are very large part in computational physics. We learn solutions of equations and finding eigenproperties, understand the scaling properties of algorithms and learn about serial and parallel computation.
The second basic technique: function approximation and finite differences
Section 1.3
C code, F90 code, Mathematica, Spreadsheets, Notes
The differential calculus and associated notions of smoothness, etc, underlie classical techniques of mathematical physics. Numerical methods instead use the calculus of finite differences. Much of traditional numerical methods dealt with these techniques. We learn function evaluation, differentiation, integration and the solution of differential equations.
The third basic technique: stochastic variables
Section 1.4
C code, F90 code, Mathematica, Notes
Classical methods of mathematical physics are not best suited to handle randomness and fluctuations. The major developments of the past century brought randomness into the center of physics. Numerical methods are the primary tool to handle this. We learn statistical methods of data analysis, inference and modelling and stochastic evolution equations.
Solving real problems
Section 2
C code, F90 code, Mathematica, Notes
In this part of the course the above techniques are applied to reasearch level problems. There are no lectures in this part of the course: only seminars and problem-solving sessions.

References

Course references

Computational Physics — an Introduction Franz J. Vesely 2001 Plenum Publishers
This is the primary reference book for the first part of the course. A copy is reserved for reference during the course in the A-block library.
The Art of Computer Programming (Volume 2) Seminumerical Algorithms D. E. Knuth 2000 Addison Wesley
The ultimate reference book for computer arithmetic and random number generation from one of the founding fathers of computer science. It is absolutely necessary to read through it some time during the course. A copy is reserved for reference during the course in the A-block library. After you've read the book and solved all the exercises, you can expand you mind a little more by taking a look at Knuth's home page.
Matrix Computations G. H. Golub and C. F. van Loan 1996 Johns Hopkins University Press
One of the standard modern references for algorithms in linear algebra: covers everything from efficient multiplication of matrices to modern iterative techniques for matrix and eigenvalue problems. Contains a nice introduction to the BLAS (Basic Linear Algebra System) library. Golub was one of the foremost numerical analysts in recent years. A copy is reserved for reference during the course in the A-block library.
Numerical Methods for Mathematics, Science and Engineering J. H. Mathews 200? Prentice-Hall of India
This book covers the usual complement of basic algorithms in numerical mathematics. Some people may find this to be an useful book because it is written at a very elementary level and contains a large number of exercises for self-testing.

Optional references

Computational Physics N. J. Giordano, H. Nakanishi 2006 Pearson Prentice Hall
This books contains a large number of examples of systems described by differential equations. There are nice examples of how realistic systems are built out of simpler components, and how the additional physics affects the behaviour of the system. A copy is reserved for reference during the course in the A-block library.
Computational Physics R. H. Landau, M. J. Paez, C. C. Bordeianu 2007 Wiley-VCH
This books deals with the usual material covered in older numerical analysis courses with more examples and less of the analysis. It provides context and longer descriptions, as well as example problems, to supplement material in Numerical Recipes. A copy is reserved for reference during the course in the A-block library.
A Survey of Computational Physics R. H. Landau, M. J. Paez, C. C. Bordeianu 2008 Princeton University Press
This book extends the material of the previous one by including more details, and presents techniques used in some modern day research level computation. A copy is reserved for reference during the course in the A-block library.
Computational Physics J. M. Thijssen 2007 Cambridge University Press
This book presents techniques used in computational condensed matter physics. A copy is reserved during the course in the A-block library.

Pre-requisites and background

Mathematical Methods for Physicists G. Arfken 200? Academic Press
This is a standard reference for most of the mathematical methods that are needed for this course: matrices and vectors, complex variables, differential equations, special functions and elementary group theory.
The C Programming Language Brian W. Kernighan and Dennis M. Ritchie 1988 Prentice Hall Software
A guide to ANSI standard C written by the developers of the language. It shows how to take advantage of C's rich set of operators, economy of expression, improved control flow, and data structures. This is the gold standard for books on C.
Fortran 90/95 Explained Michael Metcalf and John Reid 2002 Oxford University Press
A guide to the object oriented version of FORTRAN which explains the language elements and structures in the Fortran 90/95 standard.

Manuals

The Mathematica Book Stephen Wolfram 2002 Cambridge University Press
This is a manual for the Mathematica computer algebra system, and is an encyclopedic documentation of the system. It has everything, although it may be difficult to find what you want the first time around.
Numerical Recipes William H. Press, Saul A. Teukolsky, William T. Vetterling, Brian P. Flannery 200? Cambridge University Press
This is the basic textbook for the course. There are multiple editions aimed at different languages, and a web site. Use whichever version you are interested in, but make sure that you identify section numbers and material correctly.

Copyright: Sourendu Gupta; Last modified on 28 Oct, 2009.