Winter/Spring, 2004

Welcome to the Physics 780.20 Computational Physics home page!

URL: http://www.physics.ohio-state.edu/~ntg/780/compphys.php

The course information is available here plus lots of supplementary
info. Please check this page regularly.

- 02-Jun-2004 --- Lecture notes are up to date.
- 01-Jun-2004 --- See References below for links to MPI parallel programming documentation and examples (under "MPI").
- 25-May-2004 --- Projects are due at the end of the day on June 11 (no extensions without an incomplete).
- 27-Mar-2003 --- Physics 780.20 for the spring quarter will meet in Smith 2082 (and 2076) exclusively this quarter. We'll just continue with this web page. There is a new course info page for Spring quarter.
- 26-Dec-2003 --- Some sample C++ codes using the Gnu Scientific Library (GSL) are available online. Check out the online reference manual.
- 09-Nov-2003 --- 780.20 Computational Physics preseason. The web page from last year's computational physics course is still available.

- Course description and info
- Assignments
- 2076/2082 Sessions
- General handouts and computer codes
- Class notes
- Examples --- sample codes and plots from class
- PDF copies of handouts
- Computer codes and makefiles
- Mathematica notebooks

- Send feedback to the instructorone -- anonymous or not
- Resources
- Downloads --- programs, etc.
- References -- Programming references, other texts, and useful web sites
- Mathematica Resources -- Links to tutorials for Mathematica, example notebooks, and other things

Reading | Topic | Class Period |
---|---|---|

Landau/Paez, Ch. 2 exerpt | Program implementation and number representation | 01/05/04 |

M. Hjorth-Jensen, Ch. 1 (ps.gz) (pdf) | Overview and contents | 01/05/04 |

Landau/Paez, Ch. 3 exerpt | Errors and Uncertainties in Computations | 01/07/04 |

M. Hjorth-Jensen, Ch. 2 (ps.gz) (pdf) | especially 2.2 and 2.3 | 01/07/04 |

Landau/Paez, Ch. 4 exerpt | Integration | 01/14/04 |

M. Hjorth-Jensen, Ch. 8 (ps.gz) (pdf) | Numerical Integration | 01/21/04 |

Landau/Paez, Ch. 8 | Differentiation | 01/28/04 |

M. Hjorth-Jensen, Ch. 4 (ps.gz) (pdf) | Numerical Differentiation | 01/28/04 |

Landau/Paez, Ch. 15 | Matrix Computing and Subroutine Libraries | 02/02/04 |

M. Hjorth-Jensen, Ch. 14 (ps.gz) (pdf) | Differential Equations | 02/11/04 |

Landau/Paez, Ch. 9 | Differential Equations and Oscillations | 02/11/04 |

Return to Contents

Click on the problem set number to get a copy of the assignment.

Problems from the second quarter:

Due Date | Assignment | Comments |
---|---|---|

04/15/04 | #1 | hints, suggestions, etc. |

04/30/04 | #2 | hints, suggestions, etc. |

05/14/04 | #3 | hints, suggestions, etc. |

05/24/04 | #4 | hints, suggestions, etc. |

Problems from the first quarter:

Due Date | Assignment | Comments |
---|---|---|

01/19/04 | #1 | hints, suggestions, etc. |

01/30/04 | #2 | hints, suggestions, etc. |

02/11/04 | #3 | hints, suggestions, etc. |

02/23/04 | #4 | hints, suggestions, etc. |

Return to Contents

Copies of any handouts are available from Prof. Furnstahl or online below.

Return to Contents

The notes are in PDF format only.

Class Date | Notes | Comments |
---|---|---|

05-Jan-2004 | class 1 | Course logistics and references, overview, basic C++ code, representation of numbers |

07-Jan-2004 | class 2 | round-off errors, makefile example |

12-Jan-2004 | class 3 | C++ output formatting, multiplicative round-off errors, spherical Bessel function intro |

14-Jan-2004 | class 4 | Round-off errors redux, spherical Bessel function recap, manipulators |

21-Jan-2004 | class 5 | Comments on Assignments #1 and #2, type casting, graphs, using gnuplot variables, gnuplot plotfiles |

26-Jan-2004 | class 6 | Recap integration rule approximation errors, Richardson extrapolation for derivatives and integrals |

28-Jan-2004 | class 7 | Empirical error analysis (bonus on Assignment #2), overview of pointers and structures. |

02-Feb-2004 | class 8 | Round-off error in numerical differentiation, solving the Schrodinger equation numberically, matrix method. |

04-Feb-2004 | class 9 | Comments on timing and basis functions. |

09-Feb-2004 | class 10 | Follow-up on matching conditions, speeding up the code, first look at differential equations |

11-Feb-2004 | class 11 | Projects, constructing wave functions from basis states, observations about diagonalization, variational calculation. |

16-Feb-2004 | class 12 | Estimating truncation error, more on differential equation algorithms, coupled equations. |

18-Feb-2004 | class 13 | Brief notes on session 8. |

23-Feb-2004 | class 14 | C++ strings, review of damped oscillator math and physics, characteristics of chaos. |

25-Feb-2004 | class 15 | Brief notes on finishing session 9. |

01-Mar-2004 | class 16 | Background on ode_test.cpp code (van der Pol oscillator), interpolation vs. data fitting, cubic splines. |

08-Mar-2004 | class 17 | Brief notes on random number generation. |

29-Mar-2004 | class 18 | Overview of spring quarter, 3-d plots with gnuplot, bash goodies, rsync and php. |

31-Mar-2004 | class 19 | Partial differential equations using simple finite difference methods. Three examples (two-d Laplace equation, 1-d temperature diffusion, waves on a string). |

05-Apr-2004 | class 20 | Comments on convergence checking, brief introduction to finite element method (one-d example). |

07-Apr-2004 | class 21 | Von Neumann stability analysis, Crank-Nicolson method, finite element method |

12-Apr-2004 | class 22 | Finite element method in 2D. |

14-Apr-2004 | class 23 | Final finite element comments. |

19-Apr-2004 | class 24 | Comments on Qt. |

21-Apr-2004 | class 25 | Brief followups to assignments, solving integral equations numerically, overview of Casas et al. paper. |

26-Apr-2004 | class 26 | Bound-state Schrodinger equation in momentum space, delta-shell potential. |

28-Apr-2004 | class 27 | Calling Fortran from C++. |

03-May-2004 | class 28 | Scattering phase shifts, Lippmann-Schwinger equation, finding the reaction (K) matrix). |

05-May-2004 | class 29 | Multidimensional minimization. |

10-May-2004 | class 30 | Lessons from multidimensional minimization, intro to Monte Carlo. |

12-May-2004 | class 31 | Calculation of exact one-dimensional partition function, detailed balance, the exchange integral J in the Ising model |

17-May-2004 | class 32 | Brief notes on Session 23 and 24. |

19-May-2004 | class 33 | Mathematica follow-up to Assignment 3, evaluating thermal (or other) averages, variational Monte Carlo. |

26-May-2004 | class 34 | Recap of Qt Designer, brief look at C++ classes with random walk example. |

02-Jun-2004 | class 35 | Parallel processing with MPI. |

Return to Contents

You have your choice of postscript (ps) or PDF format. If you're not sure, try PDF (and read it with Adobe Acrobat).

Last Updated | Handout | Comments |
---|---|---|

18-Jan-2004 | Gnuplot basics (ps) (pdf) | "Plotting Data from a File with Gnuplot" |

18-Jan-2004 | Gnuplot fitting (ps) (pdf) | "Finding the Slope of XY Data from a File with Gnuplot" |

18-Jan-2004 | Gnuplot plot files (ps) (pdf) | "Using a Plot File with Gnuplot" |

18-Jan-2004 | Tricky Integrals (ps) (pdf) | "Integrals with Singularities or Discontinuous Derivatives" |

12-Nov-2002 | Input in C (ps) (pdf) | "Interactive Input in C" |

22-Nov-2002 | GDB Debugger (ps) (pdf) | "Using the GDB Debugger" -- A tutorial by example. |

13-Jan-2004 | Round-off Errors (ps) (pdf) | A simple empirical investigation of the distribution of round-off errors. |

Return to Contents

- Recommended gcc options (from the GSL Reference Manual)
- C and C++ programs from the Landau/Paez text
- Example programs that use the Gnu Scientific Library (GSL). Check out the online reference manual.
- Template makefile "make_program" and the template applied to "area.c" (called "make_area")

Return to Contents

If you use Internet Explorer on a Windows machine, selecting a Mathematica notebook link should automatically open Mathematica with that notebook. On Macs or linux machines or using other browsers, you can set this behavior.

Last Revised | Notebook | Comments |
---|---|---|

02/25/04 | Nonlinear Differential Equations | Mathematica notebook analyzing the Duffing equation. |

02/25/04 | Nonlinear Differential Equations: Pendulum | Mathematica notebook analyzing the physical pendulum. |

04/18/02 | Fourier Transform Pictures | Mathematica notebook showing in pictures how to project Fourier coefficients. |

04/18/02 | Square Wave | Mathematica notebook showing a square wave being built from sine waves. |

Return to Contents

Return to Contents

- Gnuplot for Windows --- Note: There is a separate zip file for the Cygwin version, although I'm not sure there's any difference. In any case, you can run this "standalone" in Windows. Just unzip this file (e.g., using WinZip) into some convenient directory and you'll have an executable called wgnupl32.exe.
- Gnu Scientific Library (GSL)
- GSL 1.4 Fedora Core Linux, download both of these RPM files:
and install either using a package installing program (or a browser
like Konqueror in KDE) or (as superuser) give the command:

`rpm -Uvh gsl*`in the directory where the gsl*.rpm files are.

- GSL 1.4 Fedora Core Linux, download both of these RPM files:
and install either using a package installing program (or a browser
like Konqueror in KDE) or (as superuser) give the command:

Return to Contents

- Programming References
- General Tutorials
- Little Unix Programming Group (LUPG) has a variety of useful tutorials on compiling C/C++ on Unix, debugging with gdb, using makefiles, and more advanced topics as well.

- C programming
- Summary of the "C" language (from CSEE at UMBC)
- Programming in C and Subroutines using C
- C Programming Pitfalls
- Anderson Computing Introduction to C programming pitfalls

- C++ programming
- "A Very Brief Summary of How C++ Differs from C"
- Cprogramming.com -- " Cprogramming.com is a web site designed to help you learn C or C++ and provide you with C and C++ programming resources. The Getting Started with C++ section gives advice about learning C++. Learn from our C++ tutorials, or test your programming knowledge with the C++ MegaQuiz.
- Scientific C++

- C++ Libraries
- Blitz++ Numerical Library
- "Blitz++ is a C++ class library for scientific computing which provides performance on par with Fortran 77/90." Blitz++ homepage.
- Template Numerical Toolkit (TNT)

- Lapack++

- Blitz++ Numerical Library
- Makefiles
- Gnuplot
- GNUPLOT - Manual and Tutorial (from Duke Civil and Environmental Engineering)

- GNU Scientific Library (GSL)
- GSL homepage
- Online reference manual.
- Index of GSL by concept --- this may be the quickest place to start to find a particular routine
- Some sample codes that exercise GSL routines.

- Linux and Unix
- SciLinux
--- "Environment for Scientific Computing on GNU-Linux" (links to
freely available software for scientific computing on gnu-linux
- The Numerical Methods and Libraries page is particularly useful

- Little Unix Programming Group (LUPG) has a variety of useful tutorials on unix systems

- SciLinux
--- "Environment for Scientific Computing on GNU-Linux" (links to
freely available software for scientific computing on gnu-linux
- MPI
- The MPI home page is http://www-unix.mcs.anl.gov/mpi/, which has links to tutorials and other documentation. A good tutorial is "Tuning MPI Applications for Peak Performance" at http://www-unix.mcs.anl.gov/mpi/tutorial/perf/index.html
- The MPICH home page is http://www-unix.mcs.anl.gov/mpi/mpich/, which includes manual pages for the MPI commands and routines (the C names) at http://www-unix.mcs.anl.gov/mpi/www/.
- The Ohio Supercomputing Center (OSC) runs a website dealing with cluster computing: http://www.osc.edu/focus_groups/cluster/. You can follow the link to "Parallel Programming with MPI" under "OSC Training Courses Related to Cluster Computing" or go directly to: http://oscinfo.osc.edu/training/mpi, where there are tutorial materials in various formats.
- A good (but dated) online introduction to MPI is Chapter 8 "Message Passing Interface" of Ian Foster's online "Designing and Building Parallel Programs" at http://www-unix.mcs.anl.gov/dbpp/text/book.html. The rest of the book is an accessbile introduction to parallel processing.
- A website with various MPI examples in C++ is: http://www.rz.rwth-aachen.de/computing/hpc/prog/par/mpi/examples/.
- Specific information on MPI with C++ can be found at: http://parallel.ru/docs/Parallel/mpi2/node21.html.

- Reading Lists
- Computational Science Reading List --- also includes links to relevant sites
- Books on Computational Physics
- Specific Texts
- Computational Physics: Problem Solving with Computers by Rubin H. Landau and Manuel J. Paez. The webpage includes tutorial includes tutorial links and errata lists.
- Numerical Methods for Physics, 2nd Ed. by Alejandro L. Garcia. The 2nd edition has C++ program listings, as well as fortran and Matlab.
- Websites (course pages, etc.)
- Numerical Recipes Home Page and on-line books
- Courses on Computer Simulation, Computational Physics, and Complex Systems
- Computational Physics -- 3rd/4th Year Option --- Angus MacKinnon
- Developing Undergraduate Computational Physics Curriculum The CPUG Project at Oregon State University
- Physics 303/503: Computational Physics --- Charlotte Elster
- Projects in Computational Physics
- Advanced Methods in Scientific Computing --- from the University of Utah Dept. of Computer Science

Return to Contents

Your comments and suggestions are appreciated.

[OSU Physics] [Math and Physical Sciences] [Ohio State University]

Last modified: 10:11 am, December 28, 2005.

furnstahl.1@osu.edu