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

INSTRUCTOR: Prof. Wang Jian-Sheng

CLASS SCHEDULE: lectures on Tuesday/Friday 10:00-12:00, venue: LT31. Final exam Monday 23 Nov 2020, 13:00-15:00.

Lab briefing will be conducted at Computer Lab 2 (S13-M-08) on Tuesday afternoon 2-4pm and only on the weeks of new lab assignments (i.e. weeks 2, 4, 9, 11), as posted below.

TEXTBOOK: ``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 35%, midterm 15%, final 50%.

COURSE OUTLINE (lecture slides), lecture recordings are posted at LumiNUS

week 0, 3-7 Aug, no class

week 1 , 11,14 Aug, Chap 1, introduction to Python, error, accuracy, etc (hand in problem set 1 by 21 Aug Friday next week)

week 2, 18,21 Aug, Chap 2, LU decomposition (hand in problem set 2 by 28 Aug Friday), lab 1

week 3, 25,28 Aug, Chap 3, interpolation and extrapolation (hand in problems for lecture 3 on 11 Sep), model answers to week 3 tutorial problems.

week 4, 1,4 Sep, Chap 4, integration, gaussian quadrature, lab 2 (hand in problems for lecture 4 on 18 Sep)

week 5, 8,11 Sep, Chap 7, Monte Carlo integration

week 6, 15,18 Sep, Markov chain Monte Carlo methods and applications MC homework

week 7, recess week, no class

week 8, 29 sep,2 Oct, introduction to learning algorithm/neural network (midterm test at Friday lecture time)

week 9, 6,9 Oct, Chap 10, optimization, conjugate gradient, lab 3

week 10, 13,16 Oct, Chap 12, fast fourier transform

week 11, 20,23 Oct, Chap 15, modeling of data (least square), the final lab, lab 4

week 12, 27,30 Oct, Chap 16, ordinary differential equations, molecular dynamics

week 13, 3,6 Nov, ODE, continued

week 14, 10,13 Nov, boundary value problem, revision (last week)


Review Problems (with partial answers)

2008, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020. 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: IEEE 754 (PDF) floating point arithmetic, 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.