# PX390 Scientific Computing

##### Organiser: Ben McMillan

##### Weighting: 15 CATS

This module should help you develop C programming skills. The module will consist of some lectures and a series of programming exercises designed to illustrate important aspects of program design. The module will also cover some important numerical techniques used in data processing in physics. Aspects relating to the reliability, accuracy and efficiency of these techniques will be discussed, as well as other issues such as making software user friendly, and data transfer between platforms. The module will be assessed on the basis of the exercises completed during the module and some project work.

**Aims:**

To develop proficiency in the solution of physics problems and to understand the fundamentals of numerical computation using the C programming language, which underpins modern software.

**Objectives:**

You should

- Be able to program in the C language, and be familiar with the development cycle and debugging tools
- Understand how computer hardware implements numerical operations and the implications for numerical software
- Select appropriate algorithms to solve physics problems, including those that involve partial differential equations
- Be able to test your code and determine the size of numerical errors.

**Syllabus:**

- The C Syntax and the development cycle. The underlying representation of data in hardware will be discussed, and the methods by which the C language reveals this low-level description through the use of pointers.
- Tools for debugging and verifying C programs will be introduced, and coding standards and effective programming techniques introduced to reinforce the concepts of modularity and clarity in code writing.
- Numerical representation of mathematical objects, and, in particular, multi-dimensional functions, will be introduced. Numerical integration will be used to illustrate concepts of numerical accuracy and the relationship of numerical methods to function properties.
- Algorithms for solving chaotic and stochastic differential equations will be explored, and robustness and reproducibility will be quantified.
- The finite difference method will be explained, along with concepts of numerical convergence and stability.
- Minimisation techniques and the use of the weak form of equations will be used to introduce finite-element and variational approaches.
- Data structures, and in particular lists and tree algorithms. Use of these in physics problems, in particular, n-body codes.

**Commitment:** 10 lectures + 15 2 hour workshops.

**Assessment:** The module is 100% assessed. 6 assignments with weightings 10%, 10%, 20%, 20%, 20% and 20%.

This module has a home page.

**Leads from:** PX277 Computational Physics

**Leads to:** PX425 High Performance Computing in Physics