Tutorial¶
This tutorial teaches Jacobi’s method, the Gauss–Seidel method and successive over-relaxation (SOR) for \(Ax = b\), and how to verify your code: to show, with evidence, how its convergence relates to the theory on specified test problems. Work through the sections in order; each one ends with something to do.
Section |
Topic |
|---|---|
Setting up Python and running |
|
Linear systems: direct and iterative methods |
|
Jacobi’s method: write |
|
Primer: the iteration matrix and the spectral radius |
|
Gauss–Seidel and SOR: write |
|
Comparing the methods: sweeps, size and the choice of \(\omega\) |
|
When the methods fail |
|
Residual, error and when to stop |
|
Reading your report and choosing a project brief |
What you need: a computer with Python 3.10 or later, NumPy, SciPy and Matplotlib. Plan several sessions; setup, tutorial and project time depend on your background. The code and reports work offline after installation; section 0 explains how to prepare formatted tutorial material for offline reading.
What you should know already: matrices and vectors, eigenvalues, and basic Python (variables, loops, functions, and NumPy arrays). Unit A1 is helpful but not required.
What you hand in: your student folder (including steps.py,
student_info.txt and completed CONTRIBUTION.md), your verification report,
and the agreed assignment or project write-up. For a project brief, also
submit the experiment scripts or notebooks, any additional inputs, and the
command and working directory that reproduce a named figure or table.
Further reading: Driscoll and Braun’s Fundamentals of Numerical Computation, Python edition provides additional explanations and examples. Your lecturer’s course text should guide the depth of theory expected.