# Python in Scientific Computing (course not running 19-20, materials for reference) (2019-2020)

## Primary tabs

**This course will not be running in 2019-20, the materials on this page are for reference and independent study.**

This week-long course aims to teach people to program scientific software rapidly, efficiently and correctly, using the Python programming language. Python has become one of the most popular languages used in industry and government. This is mainly because it combines remarkable expressive power with very clean, simple and compact syntax; a typical Python program is 5-10 times shorter than the equivalent C++, with a corresponding decrease in development and debugging time. These same attributes explain its growing popularity in the scientific computing community. Python's elegance and power permit mathematicians to express the intent of their algorithms succinctly and beautifully.

This course will first introduce the core Python language using simple examples drawn from mathematics and physics, and then discuss some of the ecosystem of scientific libraries that has grown around it. In particular, we will introduce

- numpy and scipy, which fill a similar niche to MATLAB. The final example of this section will be to develop an efficient vectorised finite difference discretisation of the Laplace equation in a square domain.
- the FEniCS software, an extremely beautiful and elegant system for developing finite element models. The final example of this section will be to solve a steady PDE-constrained optimisation example in a nontrivial geometry via the derivation and solution of the associated Karush-Kuhn-Tucker system.

H. C. Elman, D. J. Silvester and A. J. Wathen, Finite Elements and Fast Iterative Solvers

(Oxford University Press, 1st edition 2005 or 2nd edition 2014). Chapter 1.

*Please note that e-book versions of many books in the reading lists can be found on SOLO and ORLO.*