P410 Computing Applications in Physics
P609 Computational Physics
Department of Physics, Indiana University
Spring, 2017


go to lecture notes    go to homework assignments


Taught by: Steven Gottlieb
Meets: Tuesday and Thursday, 1:00 p.m. to 2:15 p.m. in Swain West 246A

Note that this is a cluster of Apple computers in the physics building near the Physics Forum commonly known as the Astronomy/Physics cluster. Please check to see whether you can log in before coming to class.


Computer Help

For help with the issues specific to the Astronomy/Physics Cluster in which we meet, send email to it4phys@indiana.edu. This would include issues like you cannot log in, or other problems that only a system administrator can solve.

For help with general computer issues, the Indiana University Knowedge Base is very useful.

Knowledge Base
Knowledge Base search help

Syllabus

These courses (P410/P609) in computer applications may be taken by undergraduates or graduate students. Click to examine the syllabus for the course.


About the Textbook

The textbook An Introduction to Computer Simulation Methods--- Applications to Physical Systems by Harvey Gould, Jan Tobochnik and Wolfgang Christian is now in its third edition. There is a web page for the text that you might want to visit. This edition of the text stresses object oriented programming. The previous examples in the book were in True Basic. They have now switched to Java. I don't plan to make much use of Java in our class, but students are welcome to do so. My examples will concentrate on C.


Student Academic Support Center


Material Relating to Lectures Will Appear Here

Notes for Lecture 1 - Introduction (January 10).

Notes for Lecture 2 - Axis window, UNIX Basics, Hierarchical File System, Special Characters, Redirection (January 12).

Notes for Lecture 3 - Remote access, aliases, AWK, axis, Introduction to Euler Method (January 19).

Supplementary Notes for Lecture 3 - On-line Help and Unix Tutorials Including vi and emacs Tutorials.

Here are some on-line tutorials for AWK:
   An AWK Primer
   Awk - A Tutorial and Introduction - by Bruce Barnett

Here is the official manual for the GNU version of AWK:
    GAWK: Effective AWK Programm: A User's Guide for GNU Awk by Arnold D. Robbins

Some information on choosing a shell:
   UNIX shell differences and how to change your shell
   Top Ten Reasons not to use the C shell

    Notes on Remote Access to Cluster and Files.
    Axis Documentation (PDF).
go to top of page    go to homework assignments
Notes from Fall 2016 Lectures

Notes for Lecture 1 - Introduction (January 12).

Notes for Lecture 2 - Axis window, UNIX Basics, Hierarchical File System, Special Characters, Redirection (January 14).

Supplementary Notes for Lectures 2,3 - On-line Help and Unix Tutorials Including vi and emacs Tutorials.

Here are some on-line tutorials for AWK:
   An AWK Primer
   Awk - A Tutorial and Introduction - by Bruce Barnett

Here is the official manual for the GNU version of AWK:
    GAWK: Effective AWK Programm: A User's Guide for GNU Awk by Arnold D. Robbins

Some information on choosing a shell:
   UNIX shell differences and how to change your shell
   Top Ten Reasons not to use the C shell

Notes for Lecture 3 - Remote access, aliases, AWK, axis, Introduction to Euler Method (January 19).

    Notes on Remote Access to Cluster and Files.
    Axis Documentation (PDF).

Notes for Lecture 4 - Error Analysis for the Euler Method, Shell Scripts (January 21).

Notes for Lecture 5 - Error Analysis for the Euler Method (II), Introduction to Newton's 2nd Law (January 26).

    A pdf file with discussion of the error analysis of Euler method (PDF).

Notes for Lecture 6 - More shell scripts; Energy (non)conservation, Euler vs. Euler-Cromer (January 28).

Notes for Lecture 7 - Multiple Plots; Fun with Pointers, A Body Falling in a Position Dependent Potential (February 2).

Notes for Lecture 8 - Error of the Euler-Richardson Algorithm, Extrapolation to zero height, Adaptive Step Size Code, Graphing velocity ratio vs. initial height (February 4).

Notes for Lecture 9 - Root finding, Details of secant and false position methods, Sources of Numerical Analysis Code, adapt.c, Oscillatory Motion, Non-conservation of Energy in the Euler Algorithm (February 9).

Notes for Lecture 10 - Sources of Numerical Analysis Code, Final Project, Graphing options, Higher Order Algorithms (February 11).

Notes for Lecture 11 - Introduction to Mathematica (February 16).

   Hands-on Start to Mathematica
   How-to Mathematica tutorials
   Join /the Mathematica Community

Notes for Lecture 12 - Biased Estimators, Bias Reduction and the Jackknife Method (February 18).

Notes for Lecture 13 - Energy Conservation Tests, Jackknife Bias Reduction, Hist, Blockerr, Jackknife Error (February 23).

Notes for Lecture 14 - Introduction to Chaos and Logistic Map, Fixed Points, Finding Bifurcation Points (February 25).

Notes for Lecture 15 - AHO, Finding Superstable Trajectories, GSL (March 1).

Notes for Lecture 16 - Instability and Chaos Lyapunov Exponent, Numerical Integration in One Dimension (March 3).

Notes for Lecture 17 - Numerical Integration in One Dimension, Error Estimation, Simpson's Rule Rederived, Examples (March 8).

Notes for Lecture 18 - Higher Dimensional Integrals, Testing Hit or Miss Method, Aver (March 10).

Notes for Lecture 19 - Testing Hit or Miss Method (last step) Sample Mean Method, Inverse Transform Method (March 22).

Notes for Lecture 20- Inverse Transform Method (continued), Inverse Transform Method applied to exponential distribution, Box-Muller Method, Covariance and Correlation (March 24).

Notes for Lecture 21- Previous Homework Assignment, Metropolis Method (March 29).

Notes for Lecture 22- Metropolis Method, Autocorrelations, Shell Scripts for Metropolis Method, Pseudorandom Numbers Generators (March 31).

Notes for Lecture 23- Pseudorandom Numbers Generators, Serial Correlation Tests (April 5).

Notes for Lecture 24 - Feedback Shift Register Random Number Generator, SPRNG (April 7).

   Bazavov Notes
    Monte Carlo simulations: Hidden errors from "good" random number generators

Notes for Lecture 25 - Fitting Data, Chi-square Distribution (April 12).

Notes for Lecture 26 - Chi-square Distribution, Confidence Levels, Start of Verification of Error Estimates (April 14).

Notes for Lecture 27 - Polyfit (repeated), Verification of Error Estimates (April 19).

Notes for Lecture 28 - Non-linear Data Fitting, Introduction to Parallel Computing (April 21).

Notes for Lectures 29-30 - Introduction to Parallel Computing and CUDA (April 26-28).

   The History of Supercomputers
   Introduction to GPU Programming

go to top of page    go to homework assignments


Homework Assignments Will Appear Below

Homework Assignments From Spring 2016
The first homework is due on Thursday, January 28. It involves awk and axis, if you wish to produce your graph using axis. You are welcome to use a different program as long as you can make the plots as requested.
Homework Assignment 1 (Due Thursday, January 28)

Homework Assignment 2 (Due Thursday, February 11, 2016) .

Homework Assignment 3 (Due Thursday, February 25, 2016) .

Homework Assignment 4 (Due Thursday, March 10, 2016) .

Homework Assignment 5 (Due Tuesday, April 12, 2016) .

go to top of page    go to lecture notes


Homework Assignments From Fall 2014
The first homework is due on Thursday, September 11. It involves awk and axis, if you wish to produce your graph using axis. You are welcome to use a different program as long as you can make the plots as requested.
PDF

Homework Assignment 2 (Due Tuesday, September 23, 2014) .

Homework Assignment 3 (Due Thursday, October 9, 2014) .

Homework Assignment 4 (Due Thursday, October 30, 2014) .

Homework Assignment 5 (Due Thursday, November 20, 2014) .

go to top of page    go to lecture notes


Homework Assignments From Fall 2013
The first homework is due on Thursday, September 12. It involves awk and axis, if you wish to produce your graph using axis. You are welcome to use a different program as long as you can make the plots as requested.
PDF

Homework Assignment 2 (Due Tuesday, October 1, 2013) .

Homework Assignment 3 (Due Tuesday, October 15, 2013) .

Homework Assignment 4 (Due Tuesday, October 29, 2013) .

Homework Assignment 5 (Due Tuesday, November 14, 2013) .

Homework Assignment 6 (Due Thursday, December 5, 2013) .