This repository contains materials from an upper-level undergraduate / intro graduate computational physics course taught remotely in Spring 2021 at Washington University in St. Louis. The course was taught in python, and so this repo predominantly contains lecture notes, example python notebooks, and both written and python course assignments. The course syllabus contains a general overview, but was not strictly followed, so more details are provided in this readme. The course introduces many topics, and dives deeper into a few. Basic ideas of different topics were typically introduced in a longer lecture, and a high-level overview of advanced ideas in a short followup lecture. Fully expanding on these topics could easily fill several courses! Many of these assignments and examples draw from the computational physics course at CWRU.
The lectures predominantly contains
notes from weekly class lectures (ranging from half-hour to 1.5 h) as raw text files, actual lecture notes presented during lectures in the onenote
subdirectory, and
python notebook examples in the notebooks
subdirectory.
Class assignments included:
My favorite exam problem was problem 2 on exam 1, which demonstrates a leading-order equivalence between Taylor expansions, polynomial interpolation, and curve fitting.
My favorite lab assignment involved solving the Gray-Scott reaction-diffusion equations, which resulted in some nice visuals.
Class | Notes | Brief Description | Examples Codes | Assignments |
---|---|---|---|---|
Class 1 | Lec 1 | When are computational methods useful? | Arrays, vectors, and such | --- |
Class 2 | Lec 2 | Some sources of numerical error | Demo | --- |
Class 3 | Lec 3 | Optimization: 1d root finding, min/max, and interpolation | Min/max, Root finding, Interpolation | --- |
Class 4 | Lec 4 | Min/max, interpolation in >1d, extrapolation | Demo | --- |
Class 5 | Lec 5 | Solving linear systems and Eigenstuffs | Linear solvers, Eigensystems | --- |
Class 6 | Lec 6 | SVD | Demo | --- |
Class 7 | Lec 7 | Least-squares fitting and splines, Chi-square | Demo | --- |
Class 8 | Review | Class 1-7 Review | Exercises | |
Class 9 | Lec 9 | Intro to ODE solving | Demo | --- |
Class 10 | Lec 9 | More ODEs: Runge-Kutta, bounary-value methods | Richardson Extrapolation | --- |
Class 11 | Lec 11 | Error growth and stability, quadrature | Quadrature | --- |
Class 12 | Class 12 | More on error, more on quadrature | --- | --- |
Class 13 | Lec 13 | Time for PDE solving! Finite differencing and IVPs | Demo | --- |
Class 14 | Lec 14 | FD method stability | --- | --- |
Class 15 | Lec 15 | More on PDE stability | --- | --- |
Class 16 | Lec 16 | Elliptic PDEs | --- | --- |
Class 17 | Review | Class 9-16 Review | --- | Exercises |
Class 18 | Lec 18 | Intro to FFTs, Convolutions | Demo | --- |
Class 19 | Lec 19 | More FFTs, correlations | Demo | --- |
Class 20 | Lec 20 | Randomness, probability (MC, PDFs) | Markov chains, Markov chains 2, Ising model | --- |
Some additional notes on PDE stability analysis are tex'd up. Some examples of symbolic computing are here, and a quick Mathematica intro (it has advantages over Python for many things) is here. Quick examples of how to optimize code performance in python are here.