Skip to content

Commit 802f979

Browse files
committed
Website build
1 parent e7c64e3 commit 802f979

38 files changed

Lines changed: 249 additions & 1530 deletions

.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: d90650463c76001ce4fae7e2e1c30cc0
3+
config: 082ecbcbbeeaf13a176965b05301a940
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

1_quadrature.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,14 @@ <h2><span class="section-number">1.3. </span>Reference elements<a class="headerl
185185
</section>
186186
<section id="python-implementations-of-reference-elements">
187187
<h2><span class="section-number">1.4. </span>Python implementations of reference elements<a class="headerlink" href="#python-implementations-of-reference-elements" title="Permalink to this headline"></a></h2>
188-
<p>The <a class="reference internal" href="fe_utils.html#fe_utils.reference_elements.ReferenceCell" title="fe_utils.reference_elements.ReferenceCell"><code class="xref py py-class docutils literal notranslate"><span class="pre">ReferenceCell</span></code></a> class provides
188+
<p>The <code class="xref py py-class docutils literal notranslate"><span class="pre">ReferenceCell</span></code> class provides
189189
Python objects encoding the geometry and topology of the reference
190190
cell. At this stage, the relevant information is the dimension of the
191191
reference cell and the list of vertices. The topology will become
192192
important when we consider <a class="reference internal" href="3_meshes.html"><span class="doc">meshes</span></a>. The reference cells we will
193193
require for this course are the
194-
<a class="reference internal" href="fe_utils.html#fe_utils.reference_elements.ReferenceInterval" title="fe_utils.reference_elements.ReferenceInterval"><code class="xref py py-data docutils literal notranslate"><span class="pre">ReferenceInterval</span></code></a> and
195-
<a class="reference internal" href="fe_utils.html#fe_utils.reference_elements.ReferenceTriangle" title="fe_utils.reference_elements.ReferenceTriangle"><code class="xref py py-data docutils literal notranslate"><span class="pre">ReferenceTriangle</span></code></a>.</p>
194+
<code class="xref py py-data docutils literal notranslate"><span class="pre">ReferenceInterval</span></code> and
195+
<code class="xref py py-data docutils literal notranslate"><span class="pre">ReferenceTriangle</span></code>.</p>
196196
</section>
197197
<section id="quadrature-rules-on-reference-elements">
198198
<h2><span class="section-number">1.5. </span>Quadrature rules on reference elements<a class="headerlink" href="#quadrature-rules-on-reference-elements" title="Permalink to this headline"></a></h2>
@@ -297,11 +297,11 @@ <h2><span class="section-number">1.8. </span>Implementing quadrature rules in Py
297297
allowfullscreen></iframe></div>
298298
<p class="card-text">Imperial students can also <a class="reference external" href="https://imperial.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=e5f1084f-c163-46d3-b317-ac9f00c1c772">watch this video on Panopto</a></p>
299299
</div>
300-
</details><p>The <a class="reference internal" href="fe_utils.html#module-fe_utils.quadrature" title="fe_utils.quadrature"><code class="xref py py-mod docutils literal notranslate"><span class="pre">fe_utils.quadrature</span></code></a> module provides the
301-
<a class="reference internal" href="fe_utils.html#fe_utils.quadrature.QuadratureRule" title="fe_utils.quadrature.QuadratureRule"><code class="xref py py-class docutils literal notranslate"><span class="pre">QuadratureRule</span></code></a> class which records
300+
</details><p>The <code class="xref py py-mod docutils literal notranslate"><span class="pre">fe_utils.quadrature</span></code> module provides the
301+
<code class="xref py py-class docutils literal notranslate"><span class="pre">QuadratureRule</span></code> class which records
302302
quadrature points and weights for a given
303-
<a class="reference internal" href="fe_utils.html#fe_utils.reference_elements.ReferenceCell" title="fe_utils.reference_elements.ReferenceCell"><code class="xref py py-class docutils literal notranslate"><span class="pre">ReferenceCell</span></code></a>. The
304-
<a class="reference internal" href="fe_utils.html#fe_utils.quadrature.gauss_quadrature" title="fe_utils.quadrature.gauss_quadrature"><code class="xref py py-func docutils literal notranslate"><span class="pre">gauss_quadrature()</span></code></a> function creates
303+
<code class="xref py py-class docutils literal notranslate"><span class="pre">ReferenceCell</span></code>. The
304+
<code class="xref py py-func docutils literal notranslate"><span class="pre">gauss_quadrature()</span></code> function creates
305305
quadrature rules for a prescribed degree of precision and reference
306306
cell.</p>
307307
<div class="proof proof-type-exercise" id="id3">
@@ -310,7 +310,7 @@ <h2><span class="section-number">1.8. </span>Implementing quadrature rules in Py
310310
<span class="proof-type">Exercise 1.16</span>
311311

312312
</div><div class="proof-content">
313-
<p>The <a class="reference internal" href="fe_utils.html#fe_utils.quadrature.QuadratureRule.integrate" title="fe_utils.quadrature.QuadratureRule.integrate"><code class="xref py py-meth docutils literal notranslate"><span class="pre">integrate()</span></code></a> method is
313+
<p>The <code class="xref py py-meth docutils literal notranslate"><span class="pre">integrate()</span></code> method is
314314
left unimplemented. Using <a class="reference internal" href="#equation-quadrature">(1.4)</a>, implement this method.</p>
315315
<p>A test script for your method is provided in the <code class="docutils literal notranslate"><span class="pre">test</span></code> directory
316316
as <code class="docutils literal notranslate"><span class="pre">test_01_integrate.py</span></code>. Run this script to test your code:</p>
@@ -322,7 +322,7 @@ <h2><span class="section-number">1.8. </span>Implementing quadrature rules in Py
322322
</div></div><div class="admonition hint">
323323
<p class="admonition-title">Hint</p>
324324
<p>You can implement
325-
<a class="reference internal" href="fe_utils.html#fe_utils.quadrature.QuadratureRule.integrate" title="fe_utils.quadrature.QuadratureRule.integrate"><code class="xref py py-meth docutils literal notranslate"><span class="pre">integrate()</span></code></a> in one line
325+
<code class="xref py py-meth docutils literal notranslate"><span class="pre">integrate()</span></code> in one line
326326
using a <a class="reference external" href="https://docs.python.org/3/tutorial/datastructures.html#list-comprehensions">list
327327
comprehension</a> and <a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.dot.html#numpy.dot" title="(in NumPy v1.24)"><code class="xref py py-func docutils literal notranslate"><span class="pre">numpy.dot()</span></code></a>.</p>
328328
</div>
@@ -355,7 +355,7 @@ <h2><span class="section-number">1.8. </span>Implementing quadrature rules in Py
355355
</div>
356356
<div class="footer" role="contentinfo">
357357
&#169; Copyright 2014-2021, David A. Ham and Colin J. Cotter.
358-
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.4.0.
358+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.5.0.
359359
</div>
360360
</body>
361361
</html>

2_finite_elements.html

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ <h2><span class="section-number">2.3. </span>The Lagrange element nodes<a class=
243243

244244
</div><div class="proof-content">
245245
<p>Use <a class="reference internal" href="#equation-lattice">(2.6)</a> to implement
246-
<a class="reference internal" href="fe_utils.html#fe_utils.finite_elements.lagrange_points" title="fe_utils.finite_elements.lagrange_points"><code class="xref py py-func docutils literal notranslate"><span class="pre">lagrange_points()</span></code></a>. Make sure your
246+
<code class="xref py py-func docutils literal notranslate"><span class="pre">lagrange_points()</span></code>. Make sure your
247247
algorithm also works for one-dimensional elements. Some basic tests
248248
for your code are to be found in
249249
<code class="docutils literal notranslate"><span class="pre">test/test_02_lagrange_points.py</span></code>. You can also test your lagrange
@@ -311,7 +311,7 @@ <h2><span class="section-number">2.3. </span>The Lagrange element nodes<a class=
311311

312312
</div><div class="proof-content">
313313
<p>Use <a class="reference internal" href="#equation-vandermonde">(2.7)</a> to implement
314-
<a class="reference internal" href="fe_utils.html#fe_utils.finite_elements.vandermonde_matrix" title="fe_utils.finite_elements.vandermonde_matrix"><code class="xref py py-func docutils literal notranslate"><span class="pre">vandermonde_matrix()</span></code></a>. Think
314+
<code class="xref py py-func docutils literal notranslate"><span class="pre">vandermonde_matrix()</span></code>. Think
315315
carefully about how to loop over each row to construct the correct
316316
powers of <span class="math notranslate nohighlight">\(x\)</span> and <span class="math notranslate nohighlight">\(y\)</span>. For the purposes of this exercise you should
317317
ignore the <code class="docutils literal notranslate"><span class="pre">grad</span></code> argument.</p>
@@ -340,7 +340,7 @@ <h2><span class="section-number">2.5. </span>Implementing finite elements in Pyt
340340
</details><p>The <a class="reference internal" href="#def-ciarlet"><span class="std std-ref">Ciarlet triple</span></a> <span class="math notranslate nohighlight">\((K, P, N)\)</span> also provides a
341341
good abstraction for the implementation of software objects
342342
corresponding to finite elements. In our case <span class="math notranslate nohighlight">\(K\)</span> will be a
343-
<a class="reference internal" href="fe_utils.html#fe_utils.reference_elements.ReferenceCell" title="fe_utils.reference_elements.ReferenceCell"><code class="xref py py-class docutils literal notranslate"><span class="pre">ReferenceCell</span></code></a>. In this course we
343+
<code class="xref py py-class docutils literal notranslate"><span class="pre">ReferenceCell</span></code>. In this course we
344344
will only implement finite element spaces consisting of complete
345345
polynomial spaces so we will specify <span class="math notranslate nohighlight">\(P\)</span> by providing the maximum
346346
degree of the polynomials in the space. Since we will only deal with
@@ -353,7 +353,7 @@ <h2><span class="section-number">2.5. </span>Implementing finite elements in Pyt
353353

354354
</div><div class="proof-content">
355355
<p>Implement the rest of the
356-
<a class="reference internal" href="fe_utils.html#fe_utils.finite_elements.FiniteElement" title="fe_utils.finite_elements.FiniteElement"><code class="xref py py-class docutils literal notranslate"><span class="pre">FiniteElement</span></code></a> <code class="xref py py-meth docutils literal notranslate"><span class="pre">__init__()</span></code>
356+
<code class="xref py py-class docutils literal notranslate"><span class="pre">FiniteElement</span></code> <code class="xref py py-meth docutils literal notranslate"><span class="pre">__init__()</span></code>
357357
method. You should construct a Vandermonde matrix for the nodes and
358358
invert it to create the basis function coefs. Store these as
359359
<code class="docutils literal notranslate"><span class="pre">self.basis_coefs</span></code>.</p>
@@ -380,12 +380,12 @@ <h2><span class="section-number">2.6. </span>Implementing the Lagrange Elements<
380380
allowfullscreen></iframe></div>
381381
<p class="card-text">Imperial students can also <a class="reference external" href="https://imperial.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=d78e85a7-fa59-433c-ac4c-ac9f00e02668">watch this video on Panopto</a></p>
382382
</div>
383-
</details><p>The <a class="reference internal" href="fe_utils.html#fe_utils.finite_elements.FiniteElement" title="fe_utils.finite_elements.FiniteElement"><code class="xref py py-class docutils literal notranslate"><span class="pre">FiniteElement</span></code></a> class implements
383+
</details><p>The <code class="xref py py-class docutils literal notranslate"><span class="pre">FiniteElement</span></code> class implements
384384
a general finite element object assuming we have provided the cell,
385385
polynomial, degree and nodes. The
386-
<a class="reference internal" href="fe_utils.html#fe_utils.finite_elements.LagrangeElement" title="fe_utils.finite_elements.LagrangeElement"><code class="xref py py-class docutils literal notranslate"><span class="pre">LagrangeElement</span></code></a> class is a
386+
<code class="xref py py-class docutils literal notranslate"><span class="pre">LagrangeElement</span></code> class is a
387387
<a class="reference external" href="https://docs.python.org/3/tutorial/classes.html#inheritance">subclass</a> of
388-
<a class="reference internal" href="fe_utils.html#fe_utils.finite_elements.FiniteElement" title="fe_utils.finite_elements.FiniteElement"><code class="xref py py-class docutils literal notranslate"><span class="pre">FiniteElement</span></code></a> which will implement
388+
<code class="xref py py-class docutils literal notranslate"><span class="pre">FiniteElement</span></code> which will implement
389389
the particular case of the equispaced Lagrange elements.</p>
390390
<div class="proof proof-type-exercise" id="id10">
391391
<span id="ex-lagrange-element"></span>
@@ -394,12 +394,12 @@ <h2><span class="section-number">2.6. </span>Implementing the Lagrange Elements<
394394

395395
</div><div class="proof-content">
396396
<p>Implement the <code class="xref py py-meth docutils literal notranslate"><span class="pre">__init__()</span></code> method of
397-
<a class="reference internal" href="fe_utils.html#fe_utils.finite_elements.LagrangeElement" title="fe_utils.finite_elements.LagrangeElement"><code class="xref py py-class docutils literal notranslate"><span class="pre">LagrangeElement</span></code></a>. Use
398-
<a class="reference internal" href="fe_utils.html#fe_utils.finite_elements.lagrange_points" title="fe_utils.finite_elements.lagrange_points"><code class="xref py py-func docutils literal notranslate"><span class="pre">lagrange_points()</span></code></a> to obtain the
397+
<code class="xref py py-class docutils literal notranslate"><span class="pre">LagrangeElement</span></code>. Use
398+
<code class="xref py py-func docutils literal notranslate"><span class="pre">lagrange_points()</span></code> to obtain the
399399
nodes. For the purpose of this exercise, you may ignore the
400400
<code class="docutils literal notranslate"><span class="pre">entity_nodes</span></code> argument.</p>
401401
<p><strong>After</strong> you have implemented
402-
<a class="reference internal" href="fe_utils.html#fe_utils.finite_elements.FiniteElement.tabulate" title="fe_utils.finite_elements.FiniteElement.tabulate"><code class="xref py py-meth docutils literal notranslate"><span class="pre">tabulate()</span></code></a> in the
402+
<code class="xref py py-meth docutils literal notranslate"><span class="pre">tabulate()</span></code> in the
403403
next exercise, you can use
404404
<code class="docutils literal notranslate"><span class="pre">plot_lagrange_basis_functions</span></code> to visualise your
405405
Lagrange basis functions.</p>
@@ -441,7 +441,7 @@ <h2><span class="section-number">2.7. </span>Tabulating basis functions<a class=
441441
<span class="proof-type">Exercise 2.49</span>
442442

443443
</div><div class="proof-content">
444-
<p>Implement <a class="reference internal" href="fe_utils.html#fe_utils.finite_elements.FiniteElement.tabulate" title="fe_utils.finite_elements.FiniteElement.tabulate"><code class="xref py py-meth docutils literal notranslate"><span class="pre">tabulate()</span></code></a>.
444+
<p>Implement <code class="xref py py-meth docutils literal notranslate"><span class="pre">tabulate()</span></code>.
445445
You can use a Vandermonde matrix to evaluate the polynomial terms
446446
and take the matrix product of this with the basis function
447447
coefficients. The method should have at most two executable
@@ -492,7 +492,7 @@ <h2><span class="section-number">2.8. </span>Gradients of basis functions<a clas
492492
<span class="proof-type">Exercise 2.50</span>
493493

494494
</div><div class="proof-content">
495-
<p>Extend <a class="reference internal" href="fe_utils.html#fe_utils.finite_elements.vandermonde_matrix" title="fe_utils.finite_elements.vandermonde_matrix"><code class="xref py py-meth docutils literal notranslate"><span class="pre">vandermonde_matrix()</span></code></a> so that
495+
<p>Extend <code class="xref py py-meth docutils literal notranslate"><span class="pre">vandermonde_matrix()</span></code> so that
496496
setting <code class="docutils literal notranslate"><span class="pre">grad</span></code> to <code class="docutils literal notranslate"><span class="pre">True</span></code> produces a rank 3 generalised
497497
Vandermonde tensor whose indices represent points, monomial basis function,
498498
and gradient component respectively. That is:</p>
@@ -523,11 +523,11 @@ <h2><span class="section-number">2.8. </span>Gradients of basis functions<a clas
523523
<span class="proof-type">Exercise 2.51</span>
524524

525525
</div><div class="proof-content">
526-
<p>Extend <a class="reference internal" href="fe_utils.html#fe_utils.finite_elements.FiniteElement.tabulate" title="fe_utils.finite_elements.FiniteElement.tabulate"><code class="xref py py-meth docutils literal notranslate"><span class="pre">tabulate()</span></code></a> to
526+
<p>Extend <code class="xref py py-meth docutils literal notranslate"><span class="pre">tabulate()</span></code> to
527527
pass the <code class="docutils literal notranslate"><span class="pre">grad</span></code> argument through to
528-
<a class="reference internal" href="fe_utils.html#fe_utils.finite_elements.vandermonde_matrix" title="fe_utils.finite_elements.vandermonde_matrix"><code class="xref py py-meth docutils literal notranslate"><span class="pre">vandermonde_matrix()</span></code></a>. Then
528+
<code class="xref py py-meth docutils literal notranslate"><span class="pre">vandermonde_matrix()</span></code>. Then
529529
generalise the matrix product in
530-
<a class="reference internal" href="fe_utils.html#fe_utils.finite_elements.FiniteElement.tabulate" title="fe_utils.finite_elements.FiniteElement.tabulate"><code class="xref py py-meth docutils literal notranslate"><span class="pre">tabulate()</span></code></a> so that
530+
<code class="xref py py-meth docutils literal notranslate"><span class="pre">tabulate()</span></code> so that
531531
the result of this function (when <code class="docutils literal notranslate"><span class="pre">grad</span></code> is true) is a rank 3
532532
tensor:</p>
533533
<div class="math notranslate nohighlight" id="equation-2-finite-elements-8">
@@ -594,7 +594,7 @@ <h2><span class="section-number">2.9. </span>Interpolating functions to the fini
594594
<span class="proof-type">Exercise 2.52</span>
595595

596596
</div><div class="proof-content">
597-
<p>Implement <a class="reference internal" href="fe_utils.html#fe_utils.finite_elements.FiniteElement.interpolate" title="fe_utils.finite_elements.FiniteElement.interpolate"><code class="xref py py-meth docutils literal notranslate"><span class="pre">interpolate()</span></code></a>.</p>
597+
<p>Implement <code class="xref py py-meth docutils literal notranslate"><span class="pre">interpolate()</span></code>.</p>
598598
</div></div><p>Once you have done this, you can use the script provided to plot
599599
functions of your choice interpolated onto any of the finite
600600
elements you can make:</p>
@@ -628,7 +628,7 @@ <h2><span class="section-number">2.9. </span>Interpolating functions to the fini
628628
</div>
629629
<div class="footer" role="contentinfo">
630630
&#169; Copyright 2014-2021, David A. Ham and Colin J. Cotter.
631-
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.4.0.
631+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.5.0.
632632
</div>
633633
</body>
634634
</html>

0 commit comments

Comments
 (0)