OSU Homepage OSU / College of Mathematical and Physical Sciences / Physics

Department of Physics

Physics 6810 Computational Physics
Spring, 2016

Welcome to the Physics 6810 Computational Physics home page!
URL: http://www.physics.ohio-state.edu/~ntg/6810/compphys.php
The course information is available here plus lots of supplementary info. Please check this page regularly.

Recent changes to this page:

Contents


Assignments In and Out of Class

Class meetings in Sm1094

The following table will be filled in with materials and references as we proceed. The current links --- shown in light green --- have "before" links that should be read before class, "in-class" materials that we will use in our two-hour meeting, and "extra" references that you can use to follow up.

class date to do links to readings, handouts, codes
13-Jan-2016 before course description and info; course gameplan;
Notes: Chapter 1;
in-class Activity sheet: 1094 Activities 1;
Slides: Slides 1;
Handouts: Unix commands; recommended C++ options; GSL introduction;
Codes: session01.zip; area code listings; make_area listing; other code listings;
extra Hjorth-Jensen notes: preface; table of contents; chapter 1;
15-Jan-2016 before Notes: Chapter 2;
in-class Activity sheets: 1094 Activities 1 (continued); 1094 Activities 2;
Slides: Slides 2;
Gnuplot basics: "Plotting Data from a File with Gnuplot"; "Using a Plot File with Gnuplot"; Gnuplot 4.2 tutorial; Gnuplot 4.6 documentation;
Codes: session02.zip; quadratic equation code listings; order_of_summation1 code listing; Bessel function code listing;
extra Hjorth-Jensen notes: chapter 2;
20-Jan-2016 before Notes: Chapter 2;
in-class Activity sheet: 1094 Activities 2 (continued);
Slides: Slides 1 [recap]; Slides 2;
Handouts: [same as last time]
Codes: [same as last time]
extra Hjorth-Jensen notes: chapter 2;
22-Jan-2016 before Notes: Chapter 3;
in-class Activity sheet: 1094 Activities 2 (continued); 1094 Activities 3;
Slides: Slides 3
Handouts: Fitting with Gnuplot; Formatting with C++ Manipulators (UIC notes);
Codes: session03.zip; integ_test.cpp and integ_routines.cpp listings; derivative_test_simple.cpp listing;
extra Hjorth-Jensen notes: chapter 3; chapter 5;
27-Jan-2016 before Notes: Chapter 3;
in-class Activity sheet: 1094 Activities 3 (continued);
Slides: Slides 3 [recap]
Handouts: [same as last time]
Codes: [same as last time]
extra Hjorth-Jensen notes: chapter 3; chapter 5;
29-Jan-2016 before Notes: Chapter 4;
in-class Activity sheet: 1094 Activities 4;
Slides: Slides 4
Handouts: Integrals with Singularities [pdf];
Codes: session04.zip; pointer_test.cpp listing, derivative_test.cpp listing, qags_test.cpp listing, eigen_test.cpp listing
extra cplusplus.com tutorial on pointers; Hjorth-Jensen notes: chapter 5;
03-Feb-2016 before Notes: Chapter 4;
in-class Activity sheet: 1094 Activities 4 (cont.);
Slides: Slides 4 [recap]
Handouts: [same as last time]
Codes: [same as last time]
extra cplusplus.com tutorial on pointers;
05-Feb-2016 before Notes: Chapter 5;
in-class Activity sheet: 1094 Activities 5;
Slides: Slides 5
Handouts:
Codes: session05.zip; nan_test.cpp listing; eigen_tridiagonal.cpp listing; eigen_basis.cpp listing; harmonic_oscillator.cpp listing
extra Hjorth-Jensen notes: chapter 6; chapter 7;
10-Feb-2016 before Notes: Chapter 5; Chapter 6
in-class Activity sheet: 1094 Activities 5 (cont.);
Slides: Slides 5 [recap]
Handouts: [same as last time] plus Random round-off? ;
Codes: [same as last time]
extra
12-Feb-2016 before Notes: Chapter 6;
in-class Activity sheet: 1094 Activities 5 (cont.); 1094 Activities 6;
Slides: Slides 6
Handouts:
Codes: session06.zip; simpson_cosint_openmp.cpp listing, diffeq_routines.cpp listing; diffeq_test.cpp listing; new eigen_tridiagonal_class.cpp (with class definition) listing;
extra Hjorth-Jensen notes: chapter 8;
17-Feb-2016 before Notes: Chapter 6;
in-class Activity sheet: 1094 Activities 6 (cont.);
Slides: Slides 6 and Slides 6b
Handouts:
Codes: [same as last time]
extra Hjorth-Jensen notes: chapter 8;
19-Feb-2016 before Notes: Chapter 7;
in-class Activity sheet: 1094 Activities 7;
Slides: Slides 7
Handouts:
Codes: session07.zip; diffeq_oscillations.cpp listing; eigen_basis_class.cpp listing (first pass);
extra Hjorth-Jensen notes: chapter 8;
24-Feb-2016 before Notes: Chapter 7; Chapter 8;
in-class Activity sheet: 1094 Activities 7 (cont.); 1094 Activities 8;
Slides: Slides 8
Handouts: Plots of damped oscillations;
Codes: session08.zip; nonlinear Mathematica notebook; filename_test.cpp listing; GnuplotPipe class listing; diffeq_pendulum.cpp listing;
extra Hjorth-Jensen notes: chapter 8;
26-Feb-2016 before Notes: Chapter 8;
in-class Activity sheet: 1094 Activities 8 (cont.);
Slides: Slides 8 (cont.);
Handouts: [same as last time]
Codes: [same as last time]
extra Hjorth-Jensen notes: chapter 8;
02-Mar-2016 before Notes: Chapter 8; Chapter 9;
in-class Activity sheet: 1094 Activities 9;
Slides: Slides 9
Handouts: GDB debugger quick reference; "Using the GDB debugger";
Codes: session09.zip; Circle class and test listings; private_vs_public listing;
extra rsync Wikipedia page
04-Mar-2016 before Notes: Chapter 9; Chapter 10;
in-class Activity sheet: 1094 Activities 9 (cont.); 1094 Activities 10;
Slides: Slides 9 (cont.); Slides 10
Handouts: GSL interpolation ; Pendulum Power Spectra; clmystery guide; clmystery zip file;
Codes: session10.zip; GslSpline listing; ode_test.cpp listing;
extra Hjorth-Jensen notes: section 3.2;
09-Mar-2016 before Notes: Chapter 10; Chapter 11;
in-class Activity sheet: 1094 Activities 10 (cont.); 1094 Activities 11;
Slides: Slides 10 (cont.); Slides 11;
Handouts: Pendulum Power Spectra; GSL documentation on nonlinear least squares fitting; GSL documentation on multidimensional minimization;
Codes: session11.zip; ode_test_class.cpp and classes listing; multifit_test.cpp listing; multimin_test.cpp listing;
extra
11-Mar-2016 before Notes: Chapter 11;
in-class Activity sheet: 1094 Activities 11 (cont.);
Slides: [same as last time]
Handouts: [same as last time]
Codes: [same as last time]
extra
Spring Break
23-Mar-2016

25-Mar-2016
before Notes: Chapter 11 (cont.); Chapter 12;
in-class Activity sheet: 1094 Activities 11 (cont.); 1094 Activities 12;
Slides: Slides 11; Slides 12;
Handouts: man pages for random, urandom;
Codes: session12.zip; gaussian_random.cpp listing; random_walk.cpp listing; RandomWalk_test.cpp listing; input_check.cpp listing; factorial_debug.cpp listing;
extra Hjorth-Jensen notes: chapter 11;
30-Mar-2016

01-Apr-2016
before Notes: Chapter 12 (cont.); Chapter 13;
in-class Activity sheet: 1094 Activities 11 (cont.); 1094 Activities 12;
Slides: [same as last time]
Handouts: Binder/Heerman excerpt;
Codes: [same as last time]
Simulations: HTML5 Ising Model simulation
extra Hjorth-Jensen notes: chapter 12;
06-Apr-2016

08-Apr-2016
before Notes: Chapter 12 (cont.); Chapter 13;
in-class Activity sheet: 1094 Activities 12 (cont.); 1094 Activities 13;
Slides: Slides 13;
Handouts: Binder/Heerman excerpt;
Codes: session13.zip; sampling_test.cpp listing; ising_model.cpp listing; ising_opt.cpp listing;
Simulations: HTML5 Ising Model simulation
extra Hjorth-Jensen notes: chapter 13;
13-Apr-2016

15-Apr-2016
before Notes: Chapter 13 (cont.); Chapter 14;
in-class Activity sheet: 1094 Activities 13 (cont.); 1094 Activities 14;
Slides: Slides 13;
Handouts: Binder/Heerman excerpt;
Codes: session14.zip; autocorrelation_test.cpp listing; variational_SHO.cpp listing
Simulations: HTML5 Ising Model simulation
extra Hjorth-Jensen notes: chapter 14;
20-Apr-2016

22-Apr-2016
before Notes: Chapter 15; Chapter 16; Chapter 17;
in-class Activity sheet:
Slides:
Handouts:
Codes:
extra

Return to Contents

Supplementary Readings

A complete copy of M. Hjorth-Jensen's 2015 notes on "Computational Physics" is available as a PDF file.

Return to Contents

Problem Sets and Hints

Click on the problem set number to get a copy of the assignment. Note that there is a "target date" rather than a "due date". You need to make progress by then, but I anticipate it will take some of you longer to fully complete the assignment (after getting feedback).

Target DateAssignmentComments
01/29/16 #1a [pdf] hints, suggestions, etc.
02/05/16 #1b [pdf] hints, suggestions, etc.
02/19/16 2 [pdf] hints, suggestions, etc.
03/11/16 #3 [pdf] hints, suggestions, etc.
04/11/16 #4 [pdf] Progress report on your project.

Return to Contents


Handouts (printed and computer)

General Handouts (printed)

Last UpdatedHandoutComments
12-Jan-2016 C++ Options (pdf) "Recommended C++ Options" -- options for g++ (GNU compiler) and icpc (Intel compiler) based on the recommendations in the GSL Reference manual.
27-Dec-2010 GSL Introduction (pdf) GNU Scientific Library description from the online reference manual.
11-Jan-2016 Unix Commands (pdf) "Some Useful Unix Commands" based on various web summaries
06-Jan-2014 Gnuplot 4.6 manual (pdf) "Gnuplot 4.6: An Interactive Plotting Program"
01-Jan-2014 Gnuplot basics (pdf) "Plotting Data from a File with Gnuplot"
28-Mar-2008 Gnuplot fitting (pdf) "Finding the Slope of XY Data from a File with Gnuplot"
12-Jan-2010 Gnuplot plot files (pdf) "Using a Plot File with Gnuplot"
12-Jan-2012 Using X-Win32 (pdf) Instructions for using X-Win32 on the Physics Department computers.
01-Jan-2004 C++ Manipulators (pdf) "Formatting with Manipulators" -- brief guide found on the web.
01-Apr-2008 Tricky Integrals (pdf) "Integrals with Singularities or Discontinuous Derivatives"
09-Jan-2011 Round-off Errors (pdf) A simple empirical investigation of the distribution of round-off errors.
07-Mar-2008 GDB Debugger (pdf) "Using the GDB Debugger" -- A tutorial by example.
10-Mar-2011 Gnuplot 3d plots (pdf) "Three-Dimensional Plots with Gnuplot"

Return to Contents


Mathematica Example Notebooks

The Mathematica example notebooks used in the graduate Math Methods course are available. Take a look!

If the notebook doesn't open automatically in Mathematica when you click on the link, "right click" to save it first (to the Desktop or a session folder) and start it from within Mathematica.

Last RevisedNotebookComments
23-Sep-2011 Calculate area A simple Mathematica notebook defining a function to calculate the area of a circle, including forcing numerical output and multiple definitions of a function with different numbers of arguments. Also, making it into a program.
23-Sep-2011 Defining n! Mathematica notebook with many ways to define n!.
23-Sep-2011 Rolling dice Mathematica notebook that simulates the rolling of dice, where the outcome is a random integer from 1 to 6. Histograms are generated for different numbers of "trials" (i.e., throws of the dice), providing visualization of how the fluctuations scale with the number of trials.
25-Sep-2011 3D Square Well Mathematica notebook to find the eigenvalues of a spherical three-dimensional square well by matching solutions.
12-Feb-2009 Nonlinear Differential Equations Mathematica notebook analyzing the Duffing equation.
12-Feb-2009 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


Your comments and suggestions are appreciated.
[OSU Physics] [Math and Physical Sciences] [Ohio State University]
OSU Physics: Physics 6810 Computational Physics.
Last modified: 11:42 am, October 26, 2016.
furnstahl.1@osu.edu