Winter, 2005

Welcome to the Physics 780.20 Computational Physics home page!

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

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

- 14-Feb-2005 --- A copy of the "Bash Prompt HOWTO" has been added to the handouts section.
- 28-Dec-2004 --- Some sample C++ codes using the Gnu Scientific Library (GSL) are available. (Version 1.6 of GSL was just released on Dec 31, but will not be available in class immediately.) These examples will be updated and expanded as the quarter progresses. Check out the online reference manual.
- 10-Nov-2004 --- 780.20 Computational Physics preseason. The web page from last year's (two quarter) computational physics course is still available. Check there to get an idea of how the course is run. Topics are subject to change!

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

- Send feedback to the instructor -- 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 |
---|---|---|

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

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

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

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

M. Hjorth-Jensen, Ch. 14 (ps.gz) (pdf) | Differential Equations | 01/31/05 |

M. Hjorth-Jensen, Ch. 9 (ps.gz) (pdf) | Outline of the Monte-Carlo Strategy | 02/21/05 |

M. Hjorth-Jensen, Ch. 10 (ps.gz) (pdf) | Random walks and the Metropolis Algorithm | 02/23/05 |

M. Hjorth-Jensen, Ch. 11 (ps.gz) (pdf) | Monte Carlo Methods in Statistical Physics | TBA |

M. Hjorth-Jensen, Ch. 12 (ps.gz) (pdf) | Quantum Monte-Carlo Methods | TBA |

Return to Contents

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

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

01/15/05 | #1 [pdf] | hints, suggestions, etc. |

01/28/05 | #2 [pdf] | hints, suggestions, etc. |

02/12/05 | #3 [pdf] | hints, suggestions, etc. |

03/05/05 | #4 [pdf] | hints, suggestions, etc. |

Return to Contents

Copies of any handouts are available from Prof. Furnstahl or online below. After the first class, please read the session notes before that session meets. Use "tar xfvz" to unpack the .tarz files.

Date of Session | Overview | Notes | Packed Files | Handouts |
---|---|---|---|---|

01/03/05 | Session 1 | notes [pdf] | session01.tarz | Unix commands [ps]; C++ options [pdf] [ps]; GSL intro [ps]; Hjorth-Jensen contents [pdf] [ps]; area.cpp [ps] and make_area [ps] prinouts |

01/05/05 | Session 2 | notes [pdf] | session02.tarz | Gnuplot basics [pdf] [ps]; Gnuplot tutorial; |

01/10/05 | Session 3 | notes [pdf] | session03.tarz | Fitting with Gnuplot [pdf] [ps]; Formatting with C++ Manipulators (UIC notes) [pdf]; Integrals with Singularities [pdf] [ps]; integ_test.cpp [ps] and integ_routines.cpp [ps] printouts |

01/19/05 | Session 4 | notes [pdf] | session04.tarz | Gnuplot plot files [pdf] [ps]; Random round-off? [pdf] [ps]; |

01/26/05 | Session 5 | notes [pdf] | session05.tarz | nan_test1.cpp [ps], eigen_basis.cpp [ps], and harmonic_oscillator.cpp [ps] printouts |

01/31/05 | Session 6 | notes [pdf] | session06.tarz | diffeq_test.cpp [ps] and diffeq_routines.cpp [ps] printouts |

02/02/05 | Session 7 | notes [pdf] | session07.tarz | diffeq_oscillations.cpp [ps] printout |

02/06/05 | Session 8 | notes [pdf] | session08.tarz | Plots of damped oscillations [pdf] [ps]; filename_test.cpp printout [ps]; gnuplot_pipe.h printout [ps]; diffeq_pendulum.cpp printout [ps]; |

02/14/05 | Session 9 | notes [pdf] | session09.tarz | GSL interpolation [pdf] [ps]; |

02/16/05 | Session 10 | notes [pdf] | session10.tarz | multifit_test.cpp printout [ps]; multimin_test.cpp printout [ps]; |

02/21/05 | Session 11 | notes [pdf] | session11.tarz | man pages for random, urandom [ps]; random_walk.cpp printout [ps]; random_walk_class_test.cpp printout [ps]; |

02/23/05 | Session 12 | notes [pdf] | session12.tarz | sampling_test.cpp printout [ps]; ising_model.cpp printout [ps]; ising_opt.cpp printout [ps]; |

02/28/05 | Session 13 | notes [pdf] | session13.tarz | autocorrelation_test.cpp printout [ps]; Variational_SHO_metro.cpp printout [ps]; |

03/02/05 | Session 14 | notes [pdf] | session14.tarz | multimin_nacl.cpp printout [ps]; multimin_sa_compare.cpp printout [ps]; multimin_sim.cpp printout [ps]; |

03/07/05 | Session 15 | notes [pdf] | session15.tarz | gnuplot 3d plots [pdf] [ps]; gdb debugging [pdf] [ps]; gdb reference card [ps]; eqheat.cpp printout [ps]; check_primes.c printout [ps]; square_test.cpp printout [ps]; eigen_basis.cpp [ps]; 3d_shape.dat |

03/09/05 | Session 16 | notes [pdf] | session16.tarz | deltashell_boundstates.cpp printout [ps] |

Return to Contents

You (mostly) 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 |
---|---|---|

01-Jan-2004 | C++ Manipulators (pdf) | "Formatting with Manipulators" -- brief guide found on the web. |

01-Jan-2004 | C++ Options (ps) (pdf) | "Recommended C++ Options" -- options for g++ (GNU compiler) and icpc (Intel compiler) based on the recommendations in the GSL Reference manual. |

06-Mar-2005 | GDB Debugger (ps) (pdf) | "Using the GDB Debugger" -- A tutorial by example. |

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

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

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

28-Mar-2004 | Gnuplot 3d plots (ps) (pdf) | "Three-Dimensional Plots with Gnuplot" |

01-Jan-2005 | GSL Introduction (ps) | GNU Scientific Library description from the online reference manual. |

13-Feb-2005 | GSL Interpolation (ps) (pdf) | "Using GSL Interpolation Functions" |

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

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

09-Jan-2005 | Tricky Integrals (ps) (pdf) | "Integrals with Singularities or Discontinuous Derivatives" |

01-Jan-2005 | Unix Commands (ps) | "Some Useful Unix Commands" based on various web summaries |

16-Nov-2003 | Bash Prompt HOWTO (pdf) | Creating and controlling terminal and xterm Bash prompts, compiled by Giles Orr. |

Return to Contents

- Recommended gcc and g++ (and icpc, the Intel compiler) 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.5 for 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.5 for 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: 02:11 pm, January 07, 2006.

furnstahl.1@osu.edu