diff --git a/demos/eigenvalues_QG_basinmodes/qgbasinmodes.py.rst b/demos/eigenvalues_QG_basinmodes/qgbasinmodes.py.rst index 33c5b02d4a..415afaee40 100644 --- a/demos/eigenvalues_QG_basinmodes/qgbasinmodes.py.rst +++ b/demos/eigenvalues_QG_basinmodes/qgbasinmodes.py.rst @@ -138,7 +138,7 @@ We define the Test Function :math:`\phi` and the Trial Function To build the weak formulation of our equation we need to build two PETSc matrices in the form of a generalized eigenvalue problem, :math:`A\psi = \lambda M\psi`. This eigenproblem takes `restrict=True` to help -users to avoid convergence failures by removing eigenvalues on the +users to avoid convergence failures by removing eigenvalues on the boundary, while preserving the original function space for the eigenmodes. :: eigenproblem = LinearEigenproblem( diff --git a/docs/source/adjoint.rst b/docs/source/adjoint.rst index e9298ae6f7..5dbc237ebe 100644 --- a/docs/source/adjoint.rst +++ b/docs/source/adjoint.rst @@ -81,7 +81,7 @@ Consider now the function signatures of the symbols in :eq:`eq:djdm`. Here we ar only concerned with the arguments, as these determine the sizes of the resulting assembled tensors: -.. math:: +.. math:: :label: \frac{\mathrm{d}\hat{J}}{\mathrm{d}m}: M\rightarrow \mathbb{R} @@ -102,16 +102,16 @@ Instead, we define: .. math:: :label: eq:adjoint - + \lambda^*(\in V\rightarrow\mathbb{R}) = -\frac{\partial J}{\partial u}\frac{\partial f}{\partial u}^{-1}. We actually solve the adjoint to this equation. That is find `\lambda \in V` -such that: +such that: .. math:: :label: - \frac{\partial f}{\partial u}^{*}(u, m; \lambda, v) = + \frac{\partial f}{\partial u}^{*}(u, m; \lambda, v) = -\frac{\partial J}{\partial u}(u, m; v) \qquad \forall v \in V. Note that these terms include `u`, so it is first necessary to solve @@ -144,8 +144,8 @@ How Firedrake and Pyadjoint automate derivative calculation ----------------------------------------------------------- Firedrake automates the process in the preceding section using the methodology -first published in :cite:`Farrell2013` using the implementation in -`Pyadjoint `__ :cite:`Mitusch2019`. +first published in :cite:`Farrell2013` using the implementation in +`Pyadjoint `__ :cite:`Mitusch2019`. The essence of this process is: @@ -273,7 +273,7 @@ The sequence of recorded operations is stored on an object called the tape. The currently active tape can be accessed by calling :func:`~pyadjoint.get_working_tape`. The user usually has limited direct interaction with the tape, but there is some useful information which can be -extracted. +extracted. Visualising the tape ~~~~~~~~~~~~~~~~~~~~ @@ -289,11 +289,11 @@ are to be found on `the pygraphviz website .. _fig-tape: -.. figure:: images/tape.pdf +.. figure:: images/tape.svg A visualisation of the Burgers equation example above shortened to a single timestep. Operations (blocks) recorded on the tape are shown as grey - rectangles, while taped variables are shown as ovals. + rectangles, while taped variables are shown as ovals. The numbered blocks in the tape visualisation are as follows: @@ -423,4 +423,4 @@ themselves with this since annotated operations will return overloaded types. :filter: False Farrell2013 - Mitusch2019 \ No newline at end of file + Mitusch2019 diff --git a/docs/source/aims_25.rst b/docs/source/aims_25.rst index d3d9048a9b..893b8de42c 100644 --- a/docs/source/aims_25.rst +++ b/docs/source/aims_25.rst @@ -22,7 +22,7 @@ reading is available on the links above. .. list-table:: - * - + * - - **Tuesday** - **Wednesday** - **Thursday** @@ -32,7 +32,7 @@ reading is available on the links above. - `Function spaces and inner products `__ - `The Ciarlet finite element `__ - `Nonlinear problems `__ - - Devito: inverse tomography + - Devito: `sympy `__, `Devito `__, `Acoustic Wave equation `__ - Software for adjoints: differentiable programming * - **Late AM** - `Our first finite element problem `__ @@ -44,13 +44,13 @@ reading is available on the links above. - Firedrake practical 1: `Helmholtz Equation `__ - `Systems with more than one variable `__ - An introduction to solvers and preconditioners - - Devito: inverse tomography + - Devito: `Full Waveform Inversion `__ - `Deep learning introduction `__, `practical `__ * - **Late PM** - Firedrake practical 2: `Dirichlet boundary conditions `__ - Firedrake practical 4: `mixed Poisson `__ - Firedrake practical 6: `solvers `__ - - Adjoint practical 1: `Burgers again `__ + - Adjoint practical 1: `Burgers again `__ - `Scientific machine learning `__, `practical `__ diff --git a/docs/source/images/tape.svg b/docs/source/images/tape.svg new file mode 100644 index 0000000000..d001b14fda --- /dev/null +++ b/docs/source/images/tape.svg @@ -0,0 +1,1746 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +