Getting Ready / Prereqs

Students are assumed to know how to program in a language of their choice. Examples in the class will be provided in python.

Homework assignments will be turned in via the git version control software, managed through github for education. Students should register for a github account.

Homework

# topic assigned due PDF
1 differentiation / integration 09/07/2017 09/19/2017 homework1.pdf
2 roots / ODEs 09/21/2017 10/03/2017 homework2.pdf
3 linear algebra 10/03/2017 10/10/2017 homework3.pdf
4 FFTs 10/10/2017 10/17/2017 homework4.pdf
5 hyperbolic PDEs 10/17/2017 10/26/2017
10/31/2017
homework5.pdf
6 parabolic / elliptic PDEs 10/31/2017 11/09/2017 homework6.pdf
7 Monte Carlo / optimization 11/09/2017 11/21/2017 homework7.pdf
8 final project 12/07/2017 project.pdf

Overview

An overview of the course and logistics.

Course materials:

Basics of Computation

How computers store numbers, types of errors, ...

Course materials:
Examples:
• A simple example of integer overflow in Fortran: overflow.f90
• Determining machine epsilon in python: precision.py
• Demonstration of python's variable-sized integers: fac.py

Programming Practices

Version control, testing, ...

Course materials:
Examples:

Differentiation / Integration

Numerical approximations for sampled and analytic functions.

Examples:
• Comparison of different numerical derivatives: fprime.py
• Compound trapezoidal integration: trap.py
• Compound Simpson's integration: simp.py

Interpolation

Basic methods for reconstructing functions.

Course materials:
Examples:

Root-finding

Basic methods finding zeros.

Examples:
• Root finding example (bisection, Newton, and secant): roots.py
Multimedia:

Ordinary Differential Equations

Methods for explicit and implicit integration, boundary-value and eigenvalue problems.

Course materials:
Examples:

Linear Algebra

Basic methods for solving linear systems.

Examples:

FFTs

An overview Fourier transforms.

Course materials:
Examples:
• A discrete Fourier transform: dft.py
• Some simple examples of FFT and inverse FFT using the numpy FFT routines. These all take real-valued functions as input: fft-simple-examples.py
• Simple example of filtering in frequency space: simple-filter.py
• Some examples of a two-dimensional FFT and image processing: fft2d.py luna_bw.png (image used in the examples)
• A fast Fourier transform: fft.py
• Fortran timing of DFT vs. FFT: fft_dft.f90

Fitting

Fitting models functions to data.

Course materials:
Examples:

Advection / Hyperbolic PDEs

Finite-volume methods for linear advection and Burgers' equation.

Course materials:
Examples:
• Simple finite-difference advection (both upwind or FTCS): fdadvect.py
• Convergence for the finite-difference upwind advection: fdupwind.py fdupwind_converge.py
• Second-order finite-volume method (piecewise linear reconstruction) for linear advection: fv_advection.py
(alternately, here's a Fortran verison that also does piecewise parabolic reconstruction: advect.f90)
• Second-order finite-volume method for Burger's equation: burgers.py
Multimedia:

Laplace & Poisson Equations / Elliptic PDEs

Smoothing, multigrid, and FFT methods for elliptic equations.

Course materials:
Examples:
Multimedia:

Diffusion / Parabolic PDEs / Multiphysics PDEs

Explicit and implicit methods for the heat equation.

Course materials:
Examples:
• Time-explicit diffusion on a cell-centered grid: diffexplicit.py
• Backward-difference (implicit) diffusion: diffimplicit.py
• Crank-Nicolson differenced diffusion (direct solve): diffCNimplicit.py
• Multigrid solution of diffusion (C-N discretization): diffMG.py
• Diffusion-reaction equation, using Strang-splitting (this can be thought of as a model for a flame): diffusion-reaction.py
• Viscous burgers equation (2nd-order piecewise linear f-v method for advection + 2nd-order implicit method for diffusion): burgersvisc.py
• A cell-centered approximate projection: project.py

Monte Carlo Methods

Random sampling applied to integration and optimization.

Course materials:
Examples:
Other applications:

Genetic Algorithms

Optimization techniques using evolutionary concepts.

Course materials:
Examples:

Parallel Computing

An overview of techniques used in high performance computing.

Course materials:
Examples:

Machine Learning

Using neural networks for simple learning tasks.

Online resources: Course materials:
Examples:

Computational Fluid Dynamics

Second-order finite-volume methods for hydrodynamics.