Instantly share code, notes, and snippets.

# tobydriscoll/TB_Lecture_40.ipynb

Created February 3, 2017 19:06
Show Gist options
• Save tobydriscoll/d11baaeb88f8145f175d3ea7eac87a95 to your computer and use it in GitHub Desktop.
TB_Lecture40
Display the source blob
Display the rendered blob
Raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Lecture 40: Preconditioning\n", "\n", "Preconditioning is a simple, general idea that can require a lot of explanation in practice. Since the convergence of a Krylov method depends (at least) on the spectral properties of the matrix, we can improve the convergence by transforming to an equivalent problem with a different matrix. Specifically, $Ax=b$ becomes $M^{-1}Ax=M^{-1}b$ for some matrix $M$. We don't typically plug in $M^{-1}$; rather we have to solve a system $Mv=u$ whenever we would want $M^{-1}u$. In essence, $M$ should be an \"easily inverted\" approximation of $A$.\n", "\n", "We'll experiment with the 5-point difference representation of the Laplacian operator on a square." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false, "scrolled": false }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "