Skip to content

Commit 94439cd

Browse files
committed
Website build
1 parent 45eaa08 commit 94439cd

22 files changed

+805
-857
lines changed
2.42 KB
Binary file not shown.

L1_preliminaries.html

Lines changed: 106 additions & 106 deletions
Large diffs are not rendered by default.

L2_QR_factorisation.html

Lines changed: 67 additions & 67 deletions
Large diffs are not rendered by default.

L3_analysing_algorithms.html

Lines changed: 96 additions & 96 deletions
Large diffs are not rendered by default.

L4_LU_decomposition.html

Lines changed: 77 additions & 74 deletions
Large diffs are not rendered by default.

L5_eigenvalues.html

Lines changed: 108 additions & 108 deletions
Large diffs are not rendered by default.

L6_krylov.html

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@
4949

5050
<section id="iterative-krylov-methods-for-ax-b">
5151
<h1><span class="section-number">6. </span>Iterative Krylov methods for <span class="math notranslate nohighlight">\(Ax=b\)</span><a class="headerlink" href="#iterative-krylov-methods-for-ax-b" title="Permalink to this headline"></a></h1>
52-
<div class="admonition hint">
53-
<p class="admonition-title">Hint</p>
54-
<p>A video recording for this material is available <a class="reference external" href="https://player.vimeo.com/video/454126320">here</a>.</p>
55-
</div>
56-
<p>In the previous section we saw how iterative methods are necessary
52+
<details>
53+
<summary>
54+
Supplementary video</summary><div class="video_wrapper" style="">
55+
<iframe allowfullscreen="true" src="https://player.vimeo.com/video/454126320" style="border: 0; height: 345px; width: 560px">
56+
</iframe></div></details><p>In the previous section we saw how iterative methods are necessary
5757
(but can also be fast) for eigenvalue problems <span class="math notranslate nohighlight">\(Ax=\lambda x\)</span>.
5858
Iterative methods can also be useful for solving linear systems
5959
<span class="math notranslate nohighlight">\(Ax=b\)</span>, generating a sequence of vectors <span class="math notranslate nohighlight">\(x^k\)</span> that converge to the
@@ -73,11 +73,11 @@ <h1><span class="section-number">6. </span>Iterative Krylov methods for <span cl
7373
“matrix-free” implementation.</p>
7474
<section id="krylov-subspace-methods">
7575
<h2><span class="section-number">6.1. </span>Krylov subspace methods<a class="headerlink" href="#krylov-subspace-methods" title="Permalink to this headline"></a></h2>
76-
<div class="admonition hint">
77-
<p class="admonition-title">Hint</p>
78-
<p>A video recording for this material is available <a class="reference external" href="https://player.vimeo.com/video/454126582">here</a>.</p>
79-
</div>
80-
<p>In this section we will introduce Krylov subspace methods for solving
76+
<details>
77+
<summary>
78+
Supplementary video</summary><div class="video_wrapper" style="">
79+
<iframe allowfullscreen="true" src="https://player.vimeo.com/video/454126582" style="border: 0; height: 345px; width: 560px">
80+
</iframe></div></details><p>In this section we will introduce Krylov subspace methods for solving
8181
<span class="math notranslate nohighlight">\(Ax=b\)</span> (we will not specialise to real or symmetric matrices
8282
here). The idea is to approximate the solution using the basis</p>
8383
<div class="math notranslate nohighlight">
@@ -119,11 +119,11 @@ <h2><span class="section-number">6.2. </span>Arnoldi iteration<a class="headerli
119119
\end{pmatrix}\end{split}\]</div>
120120
</div></blockquote>
121121
<p>Then, <span class="math notranslate nohighlight">\(A\hat{Q}_n = \hat{Q}_{n+1}\tilde{H}_n\)</span>.</p>
122-
<div class="admonition hint">
123-
<p class="admonition-title">Hint</p>
124-
<p>A video recording for this material is available <a class="reference external" href="https://player.vimeo.com/video/454127181">here</a>.</p>
125-
</div>
126-
<p>Using the column space interpretation of matrix-matrix multiplication,
122+
<details>
123+
<summary>
124+
Supplementary video</summary><div class="video_wrapper" style="">
125+
<iframe allowfullscreen="true" src="https://player.vimeo.com/video/454127181" style="border: 0; height: 345px; width: 560px">
126+
</iframe></div></details><p>Using the column space interpretation of matrix-matrix multiplication,
127127
we see that the <span class="math notranslate nohighlight">\(n\)</span>-th column is</p>
128128
<blockquote>
129129
<div><div class="math notranslate nohighlight">
@@ -150,7 +150,7 @@ <h2><span class="section-number">6.2. </span>Arnoldi iteration<a class="headerli
150150
</li>
151151
<li><p>END FOR</p></li>
152152
</ul>
153-
<div class="proof proof-type-exercise" id="id9">
153+
<div class="proof proof-type-exercise" id="id1">
154154

155155
<div class="proof-title">
156156
<span class="proof-type">Exercise 6.1</span>
@@ -175,11 +175,11 @@ <h2><span class="section-number">6.2. </span>Arnoldi iteration<a class="headerli
175175
<p>then we would get <span class="math notranslate nohighlight">\(Q=Q_n\)</span>. Importantly, in the Arnoldi iteration, we
176176
never form <span class="math notranslate nohighlight">\(K_n\)</span> or <span class="math notranslate nohighlight">\(R_n\)</span> explicitly, since these are very
177177
ill-conditioned and not useful numerically.</p>
178-
<div class="admonition hint">
179-
<p class="admonition-title">Hint</p>
180-
<p>A video recording for this material is available <a class="reference external" href="https://player.vimeo.com/video/454136990">here</a>.</p>
181-
</div>
182-
<p>But what is the use of the <span class="math notranslate nohighlight">\(\tilde{H}_n\)</span> matrix? Applying
178+
<details>
179+
<summary>
180+
Supplementary video</summary><div class="video_wrapper" style="">
181+
<iframe allowfullscreen="true" src="https://player.vimeo.com/video/454136990" style="border: 0; height: 345px; width: 560px">
182+
</iframe></div></details><p>But what is the use of the <span class="math notranslate nohighlight">\(\tilde{H}_n\)</span> matrix? Applying
183183
<span class="math notranslate nohighlight">\(\hat{Q}_n^*\)</span> to <span class="math notranslate nohighlight">\(A\hat{Q}_n = \hat{Q}_{n+1}\tilde{H}_n\)</span> gives</p>
184184
<blockquote>
185185
<div><div class="math notranslate nohighlight">
@@ -193,11 +193,11 @@ <h2><span class="section-number">6.2. </span>Arnoldi iteration<a class="headerli
193193
= H_n,\end{split}\end{aligned}\end{align} \]</div>
194194
</div></blockquote>
195195
<p>where <span class="math notranslate nohighlight">\(H_n\)</span> is the <span class="math notranslate nohighlight">\(n\times n\)</span> top left-hand corner of <span class="math notranslate nohighlight">\(H\)</span>.</p>
196-
<div class="admonition hint">
197-
<p class="admonition-title">Hint</p>
198-
<p>A video recording for this material is available <a class="reference external" href="https://player.vimeo.com/video/454171516">here</a>.</p>
199-
</div>
200-
<p>The intrepretation of this is that <span class="math notranslate nohighlight">\(H_n\)</span> is the orthogonal projection
196+
<details>
197+
<summary>
198+
Supplementary video</summary><div class="video_wrapper" style="">
199+
<iframe allowfullscreen="true" src="https://player.vimeo.com/video/454171516" style="border: 0; height: 345px; width: 560px">
200+
</iframe></div></details><p>The intrepretation of this is that <span class="math notranslate nohighlight">\(H_n\)</span> is the orthogonal projection
201201
of <span class="math notranslate nohighlight">\(A\)</span> onto the Krylov subspace <span class="math notranslate nohighlight">\(\mathrm{span}(K_n)\)</span>. To see this, take any vector <span class="math notranslate nohighlight">\(v\)</span>,
202202
and project <span class="math notranslate nohighlight">\(Av\)</span> onto the the Krylov subspace <span class="math notranslate nohighlight">\(\mathrm{span}(K_n)\)</span>.</p>
203203
<blockquote>
@@ -213,11 +213,11 @@ <h2><span class="section-number">6.2. </span>Arnoldi iteration<a class="headerli
213213
</section>
214214
<section id="gmres">
215215
<h2><span class="section-number">6.3. </span>GMRES<a class="headerlink" href="#gmres" title="Permalink to this headline"></a></h2>
216-
<div class="admonition hint">
217-
<p class="admonition-title">Hint</p>
218-
<p>A video recording for this material is available <a class="reference external" href="https://player.vimeo.com/video/454171559">here</a>.</p>
219-
</div>
220-
<p>The Generalised Minimum Residual method (GMRES), due to Saad (1986),
216+
<details>
217+
<summary>
218+
Supplementary video</summary><div class="video_wrapper" style="">
219+
<iframe allowfullscreen="true" src="https://player.vimeo.com/video/454171559" style="border: 0; height: 345px; width: 560px">
220+
</iframe></div></details><p>The Generalised Minimum Residual method (GMRES), due to Saad (1986),
221221
exploits these properties of the Arnoldi iteration. The idea is
222222
that we build up the orthogonal basis for the Krylov subspaces
223223
one by one, and at each iteration we solve the projection of
@@ -253,11 +253,11 @@ <h2><span class="section-number">6.3. </span>GMRES<a class="headerlink" href="#g
253253
<p>Finding <span class="math notranslate nohighlight">\(y\)</span> to minimise <span class="math notranslate nohighlight">\(\mathcal{R}_n\)</span> requires the solution of a
254254
least squares problem, which can be computed via QR factorisation
255255
as we saw much earlier in the course.</p>
256-
<div class="admonition hint">
257-
<p class="admonition-title">Hint</p>
258-
<p>A video recording for this material is available <a class="reference external" href="https://player.vimeo.com/video/454171921">here</a>.</p>
259-
</div>
260-
<p>We are now in position to present the GMRES algorithm as pseudo-code.</p>
256+
<details>
257+
<summary>
258+
Supplementary video</summary><div class="video_wrapper" style="">
259+
<iframe allowfullscreen="true" src="https://player.vimeo.com/video/454171921" style="border: 0; height: 345px; width: 560px">
260+
</iframe></div></details><p>We are now in position to present the GMRES algorithm as pseudo-code.</p>
261261
<ul class="simple">
262262
<li><p><span class="math notranslate nohighlight">\(q_1 \gets b/\|b\|\)</span></p></li>
263263
<li><p>FOR <span class="math notranslate nohighlight">\(n=1,2,\dots\)</span></p>
@@ -270,7 +270,7 @@ <h2><span class="section-number">6.3. </span>GMRES<a class="headerlink" href="#g
270270
</li>
271271
<li><p>END FOR</p></li>
272272
</ul>
273-
<div class="proof proof-type-exercise" id="id10">
273+
<div class="proof proof-type-exercise" id="id2">
274274

275275
<div class="proof-title">
276276
<span class="proof-type">Exercise 6.2</span>
@@ -283,7 +283,7 @@ <h2><span class="section-number">6.3. </span>GMRES<a class="headerlink" href="#g
283283
should use your least squares code to solve the least squares
284284
problem. The test script <code class="docutils literal notranslate"><span class="pre">test_exercises10.py</span></code> in the <code class="docutils literal notranslate"><span class="pre">test</span></code>
285285
directory will test this function.</p>
286-
</div></div><div class="proof proof-type-exercise" id="id11">
286+
</div></div><div class="proof proof-type-exercise" id="id3">
287287

288288
<div class="proof-title">
289289
<span class="proof-type">Exercise 6.3</span>
@@ -301,7 +301,7 @@ <h2><span class="section-number">6.3. </span>GMRES<a class="headerlink" href="#g
301301
is the Q matrix for the Arnoldi iteration, and the Q matrix for
302302
the least squares problem. These are not the same.</p>
303303
</div>
304-
<div class="proof proof-type-exercise" id="id12">
304+
<div class="proof proof-type-exercise" id="id4">
305305

306306
<div class="proof-title">
307307
<span class="proof-type">Exercise 6.4</span>
@@ -328,11 +328,11 @@ <h2><span class="section-number">6.3. </span>GMRES<a class="headerlink" href="#g
328328
</div></div></section>
329329
<section id="convergence-of-gmres">
330330
<h2><span class="section-number">6.4. </span>Convergence of GMRES<a class="headerlink" href="#convergence-of-gmres" title="Permalink to this headline"></a></h2>
331-
<div class="admonition hint">
332-
<p class="admonition-title">Hint</p>
333-
<p>A video recording for this material is available <a class="reference external" href="https://player.vimeo.com/video/454198706">here</a>.</p>
334-
</div>
335-
<p>The algorithm presented as pseudocode is the way to implement GMRES
331+
<details>
332+
<summary>
333+
Supplementary video</summary><div class="video_wrapper" style="">
334+
<iframe allowfullscreen="true" src="https://player.vimeo.com/video/454198706" style="border: 0; height: 345px; width: 560px">
335+
</iframe></div></details><p>The algorithm presented as pseudocode is the way to implement GMRES
336336
efficiently. However, we can make an alternative formulation
337337
of GMRES using matrix polynomials.</p>
338338
<p>We know that <span class="math notranslate nohighlight">\(x_n\in \mathrm{span}(K_n)\)</span>, so we can write</p>
@@ -394,7 +394,7 @@ <h2><span class="section-number">6.4. </span>Convergence of GMRES<a class="heade
394394
scattered over a wide region of the complex plane: we need a very
395395
high degree polynomial to make <span class="math notranslate nohighlight">\(p(x)\)</span> small at all the eigenvalues and
396396
hence we need a very large number of iterations.</p>
397-
<div class="proof proof-type-exercise" id="id13">
397+
<div class="proof proof-type-exercise" id="id5">
398398

399399
<div class="proof-title">
400400
<span class="proof-type">Exercise 6.5</span>
@@ -411,11 +411,11 @@ <h2><span class="section-number">6.4. </span>Convergence of GMRES<a class="heade
411411
</div></div></section>
412412
<section id="preconditioning">
413413
<h2><span class="section-number">6.5. </span>Preconditioning<a class="headerlink" href="#preconditioning" title="Permalink to this headline"></a></h2>
414-
<div class="admonition hint">
415-
<p class="admonition-title">Hint</p>
416-
<p>A video recording for this material is available <a class="reference external" href="https://player.vimeo.com/video/454218547">here</a>.</p>
417-
</div>
418-
<p>This final topic has been a strong focus of computational linear algebra
414+
<details>
415+
<summary>
416+
Supplementary video</summary><div class="video_wrapper" style="">
417+
<iframe allowfullscreen="true" src="https://player.vimeo.com/video/454218547" style="border: 0; height: 345px; width: 560px">
418+
</iframe></div></details><p>This final topic has been a strong focus of computational linear algebra
419419
over the last 30 years. Typically, the matrices that we want to solve
420420
do not have eigenvalues clustered in a small number of groups, and so
421421
GMRES is slow. The solution (and the challenge) is to find a matrix
@@ -453,7 +453,7 @@ <h2><span class="section-number">6.5. </span>Preconditioning<a class="headerlink
453453
</li>
454454
<li><p>END FOR</p></li>
455455
</ul>
456-
<div class="proof proof-type-exercise" id="id14">
456+
<div class="proof proof-type-exercise" id="id6">
457457

458458
<div class="proof-title">
459459
<span class="proof-type">Exercise 6.6</span>

_modules/cla_utils/exercises6.html

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@
66
<meta charset="utf-8" />
77
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
88
<title>cla_utils.exercises6 &#8212; Computational linear algebra course 2020.0 documentation</title>
9-
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
10-
<link rel="stylesheet" href="../../_static/fenics.css" type="text/css" />
9+
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
10+
<link rel="stylesheet" type="text/css" href="../../_static/fenics.css" />
1111
<link rel="stylesheet" type="text/css" href="../../_static/proof.css" />
12-
<script id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
12+
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
1313
<script src="../../_static/jquery.js"></script>
1414
<script src="../../_static/underscore.js"></script>
1515
<script src="../../_static/doctools.js"></script>
1616
<script src="../../_static/proof.js"></script>
17-
<script async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
1817
<link rel="index" title="Index" href="../../genindex.html" />
1918
<link rel="search" title="Search" href="../../search.html" />
2019
<!--[if lte IE 6]>
@@ -56,11 +55,10 @@ <h1>Source code for cla_utils.exercises6</h1><div class="highlight"><pre>
5655

5756
<span class="sd"> :param m: integer giving the dimensions of L.</span>
5857
<span class="sd"> :param lvec: a m-k-1 dimensional numpy array.</span>
59-
6058
<span class="sd"> :return Lk: an mxm dimensional numpy array.</span>
6159

6260
<span class="sd"> &quot;&quot;&quot;</span>
63-
61+
6462
<span class="k">raise</span> <span class="ne">NotImplementedError</span></div>
6563

6664

@@ -84,13 +82,12 @@ <h1>Source code for cla_utils.exercises6</h1><div class="highlight"><pre>
8482

8583
<span class="sd"> :param L: an mxm-dimensional numpy array, assumed lower triangular</span>
8684
<span class="sd"> :param b: an mxk-dimensional numpy array, with ith column containing </span>
87-
<span class="sd"> b_i</span>
88-
85+
<span class="sd"> b_i</span>
8986
<span class="sd"> :return x: an mxk-dimensional numpy array, with ith column containing </span>
90-
<span class="sd"> the solution x_i</span>
87+
<span class="sd"> the solution x_i</span>
9188

9289
<span class="sd"> &quot;&quot;&quot;</span>
93-
90+
9491
<span class="k">raise</span> <span class="ne">NotImplementedError</span></div>
9592

9693

@@ -100,10 +97,9 @@ <h1>Source code for cla_utils.exercises6</h1><div class="highlight"><pre>
10097

10198
<span class="sd"> :param U: an mxm-dimensional numpy array, assumed upper triangular</span>
10299
<span class="sd"> :param b: an mxk-dimensional numpy array, with ith column containing </span>
103-
<span class="sd"> b_i</span>
104-
100+
<span class="sd"> b_i</span>
105101
<span class="sd"> :return x: an mxk-dimensional numpy array, with ith column containing </span>
106-
<span class="sd"> the solution x_i</span>
102+
<span class="sd"> the solution x_i</span>
107103

108104
<span class="sd"> &quot;&quot;&quot;</span>
109105

@@ -131,7 +127,7 @@ <h1>Source code for cla_utils.exercises6</h1><div class="highlight"><pre>
131127
</div>
132128
<div class="footer" role="contentinfo">
133129
&#169; Copyright 2020, Colin J. Cotter.
134-
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.4.3.
130+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.2.0.
135131
</div>
136132
</body>
137133
</html>

0 commit comments

Comments
 (0)