Skip to content

chr1shr/am225_examples

Repository files navigation

Harvard Applied Math 225: Code examples
=======================================
Harvard AM225 is a graduate course in scientific computing that covers a
variety of advanced topics in numerical analysis, algorithm design, and
high-performance computing. This course was developed by Chris H. Rycroft
and taught at Harvard during the Spring 2018, 2020, and 2021 semesters.
The main website is now located here:

https://people.math.wisc.edu/~chr/am225

This Git repository contains example codes from the course. The codes are
primarily written in C++ using the OpenMP library for multithreading. Some
additional programs in Python are provided.

Compiling
=========
The programs make use of the GNU Make utility for automatic building. Each
directory contains a "Makefile", which contains the compilation rules for
each program.

Each directory looks for a common configuration file called "config.mk" in the
top level of the repository, which sets the compiler name and various compiler
options.

To begin, you must create a "config.mk" file from one of the templates
provided in the "config" directory. The simplest method is to create a symlink
(shortcut) from one of the templates. On a Linux system, this can be done by
typing:

ln -s config/config.mk.linux config.mk

On a Mac system using GCC 12 installed with MacPorts (www.macports.org), use
the following:

ln -s config/config.mk.mac_mp config.mk

On a Mac system using GCC 12 installed with Homebrew (https://brew.sh), use
the following:

ln -s config/config.mk.mac_hb config.mk

For a custom configuration, copy one of the files from the "config" directory
into the root directory, and then manually edit it.

Once the "config.mk" file is created, change into one of the project
directories and type "make" to compile everything.

Organization
============
The course is divided into six units:

- Unit 0: Introduction and multithreaded programming
- Unit 1: Advanced ODE integration methods and theory
- Unit 2: Advanced numerical linear algebra
- Unit 3: Finite element methods
- Unit 4: Finite volume methods
- Unit 5: Special topics in scientific computing

Each Unit has several different directories with programs within them:

0a_root_finding - Introductory root finding examples

0b_cpp+openmp - C++ and OpenMP examples

1a_ode_solvers - A variety of ODE solvers (RK4, Euler, Ralston, etc.)

1b_extrap+do - Dense output examples and extrapolation solvers

1c_dop853 - The eighth-order Dormand-Prince DOP853 integrator

1d_symplectic - Symplectic integration examples

2a_linking - Small example of linking to precompiled binary object files.

2b_lapack+krylov - Examples using BLAS, LAPACK. Krylov methods applied to a
radial basis function test case.

2c_fft+ddecomp - Fast Fourier Transform and domain decomposition examples

3a_f_element - Finite element examples

4a_f_volume - Finite volume examples. Comparison to finite difference methods.

4b_traffic - Example programs to simulate the traffic equation, a nonlinear
hyperbolic conservation law

5a_fluid_sim - Simulation of incompressible fluids using Chorin's projection
method

5b_lsm_fmm - Level set method and the fast marching method examples

tgmg - An prototype 2D templated multigrid library developed by the Rycroft
group, which is required by the incompressible fluid simulation

About

Harvard Applied Math 225: Code Examples

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published