PC5215, ``Numerical Recipes with Applications'' Semester I, Aug-Nov 2023

INSTRUCTOR: Prof. Wang Jian-Sheng

CLASS SCHEDULE: Tue/Fri 10:00-12:00 at S12-04-03. Final exam Monday 4 Dec 2023 9:00am at S13-M-09, For more info, login to Canvas.

TEXTBOOKS: "Introducing Python", B. Lubanovic; ``Numerical Recipes in C (1992), the Art of Scientific Computing,'' W. H. Press, etc.

MODULE DESCRIPTION: Covers computational techniques for the solution of problems arising in physics and engineering, with an emphasis on molecular simulation and modelling. Topics will be from the text, "Numerical Recipes", Press et al, supplemented with example problems in materials and condensed matter physics. The textbook is in C, but this course will use Python for programming. This course insures that graduate students intend to do research in computational physics will have sufficient background in computational methods and programming experience. Assessment: 4 labs + assignments 40%, midterm 15%, final 45%.

COURSE OUTLINE (lecture slides)

week 0, 7-11 Aug, no class

week 1 , 15,18 Aug, introduction, Python

week 2, 22,25 Aug, Chap 1, Python continued, floating point representation, error, accuracy, etc

week 3, 29 Aug, Chap 2, LU decomposition, lab 1 (no class on 1 Sep, polling day)

week 4, 5,8 Sep, Chap 3, interpolation and extrapolation

week 5, 12,15 Sep, Chap 4, integration, gaussian quadrature, lab 2

week 6, 19,22 Sep, Chap 7, Monte Carlo integration

week 7, recess week, no class

week 8, 3,6 Oct, Monte Carlo method, (midterm test at Friday lecture time)

week 9, 10,13 Oct, introduction to machine learning, lab 3

week 10, 17,20 Oct, Chap 10, optimization, conjugate gradient

week 11, 24,27 Oct, Chap 15, modeling of data (least square)

week 12, 31 Oct, 3 Nov, Chap 16, ordinary differential equations, molecular dynamics, the final lab, lab 4

week 13, 7 Nov, ODE, continued (no class on 10 Friday, Welling-Being Day)

week 14, 14,17 Nov, Chap 17, boundary value problem, revision (last week)

---

Review Problems (with partial answers)

2008, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2022, 2023. final exam and answers.

Some sample codes: stability.py, ludcmp.py, polint.py, trapzd.py, mnist.py, conjugategradient.py, nfit.dat, testieee.c, main-eigen.c, eigen.c, sort.c, fft.c.

Some interesting sites related to the course: LAPACK, an easy to read article on conjugate gradient method, fast Fourier transform FFTW, symplectic integrator.

To install a python interpreter on Windows, go to https://www.python.org, and follow the download link for Windows or your preferred OS.