From f2fadc814f03d36bd09d61f05df0bdb41e126f02 Mon Sep 17 00:00:00 2001 From: JDBetteridge Date: Tue, 15 Nov 2022 18:26:08 +0000 Subject: [PATCH 01/30] Reformated demos and docs so make LaTeX runs --- .github/workflows/docs.yml | 3 +++ demos/DG_advection/DG_advection.py.rst | 12 +++++----- .../extruded_continuity.py.rst | 4 ++-- .../higher_order_mass_lumping.py.rst | 2 +- .../linear_fluid_structure_interaction.py.rst | 4 ++-- .../saddle_point_systems.py.rst | 24 +++++++++++-------- docs/source/conf.py | 23 ++++++++++++++++-- scripts/firedrake-install | 1 + 8 files changed, 50 insertions(+), 23 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 5deda24139..234e041d2a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,6 +28,7 @@ jobs: python -m pip install -e . python -m pip install sphinx python -m pip install sphinxcontrib-bibtex + python -m pip install sphinxcontrib-svg2pdfconverter python -m pip install bibtexparser python -m pip install numpydoc python -m pip install git+https://github.com/sphinx-contrib/youtube.git @@ -43,3 +44,5 @@ jobs: . /home/firedrake/firedrake/bin/activate cd docs make html + make latex + make latexpdf diff --git a/demos/DG_advection/DG_advection.py.rst b/demos/DG_advection/DG_advection.py.rst index da5be9622e..826704e0ec 100644 --- a/demos/DG_advection/DG_advection.py.rst +++ b/demos/DG_advection/DG_advection.py.rst @@ -80,12 +80,12 @@ exterior facets :math:`\Gamma_\mathrm{ext}` appears exactly once in .. math:: \int_\Omega \! \phi \frac{\partial q}{\partial t} \, \mathrm{d} x - = \int_\Omega \! q \nabla \cdot (\phi \vec{u}) \, \mathrm{d} x - - \int_{\Gamma_\mathrm{int}} \! \widetilde{q}(\phi_+ \vec{u} \cdot \vec{n}_+ - + \phi_- \vec{u} \cdot \vec{n}_-) \, \mathrm{d} S - - \int_{\Gamma_\rlap{\mathrm{ext, inflow}}} \phi q_\mathrm{in} \vec{u} \cdot - \vec{n} \, \mathrm{d} s - - \int_{\Gamma_\rlap{\mathrm{ext, outflow}}} \phi q \vec{u} \cdot + &= \int_\Omega \! q \nabla \cdot (\phi \vec{u}) \, \mathrm{d} x\\ + &\quad- \int_{\Gamma_\mathrm{int}} \! \widetilde{q}(\phi_+ \vec{u} \cdot \vec{n}_+ + + \phi_- \vec{u} \cdot \vec{n}_-) \, \mathrm{d} S\\ + &\quad- \int_{\Gamma_{\mathrlap{\mathrm{ext, inflow}}}} \phi q_\mathrm{in} \vec{u} \cdot + \vec{n} \, \mathrm{d} s\\ + &\quad- \int_{\Gamma_{\mathrlap{\mathrm{ext, outflow}}}} \phi q \vec{u} \cdot \vec{n} \, \mathrm{d} s \qquad \forall \phi \in V. diff --git a/demos/extruded_continuity/extruded_continuity.py.rst b/demos/extruded_continuity/extruded_continuity.py.rst index fc38218b38..ea965bbf96 100644 --- a/demos/extruded_continuity/extruded_continuity.py.rst +++ b/demos/extruded_continuity/extruded_continuity.py.rst @@ -26,12 +26,12 @@ set of equations are then .. math:: -\int_\Omega \! q \vec{u_0} \cdot \nabla \phi \, \mathrm{d} x - + \int_{\Gamma_\rlap{\mathrm{ext, outflow}}} \! \phi q \vec{u} \cdot \vec{n} + + \int_{\Gamma_{\mathrlap{\mathrm{ext, outflow}}}} \! \phi q \vec{u} \cdot \vec{n} \, \mathrm{d} s + \int_{\Gamma_\mathrm{int}} \! (\phi_+ \vec{u} \cdot \vec{n}_+ + \phi_- \vec{u} \cdot \vec{n}_-) \widetilde{q} \, \mathrm{d} S \quad = \quad - -\int_{\Gamma_\rlap{\mathrm{ext, inflow}}} \phi q_\mathrm{in} \vec{u} \cdot + -\int_{\Gamma_{\mathrlap{\mathrm{ext, inflow}}}} \phi q_\mathrm{in} \vec{u} \cdot \vec{n} \, \mathrm{d} s \quad \forall \ \phi \in V, We will take the domain :math:`\Omega` to be the cuboid diff --git a/demos/higher_order_mass_lumping/higher_order_mass_lumping.py.rst b/demos/higher_order_mass_lumping/higher_order_mass_lumping.py.rst index aca4f11032..bb217a8e4f 100644 --- a/demos/higher_order_mass_lumping/higher_order_mass_lumping.py.rst +++ b/demos/higher_order_mass_lumping/higher_order_mass_lumping.py.rst @@ -36,7 +36,7 @@ The weak formulation is finding :math:`u \in V` such that: <\partial_t(\rho \partial_t u), v> + a(u,v) = (f,w) -where :math:`<\cdot, \cdot>` denotes the pairing between :math:`H^{-1}(\Omega)` and :math:`H^{1}_{0}(\Omega)`, :math:`(\cdot, \cdot)` denotes the :math:`L^{2}(\Omega)` inner product, and :math:`a(\cdot, \cdot) : H^{1}_{0}(\Omega) \times H^{1}_{0}(\Omega)\rightarrow ℝ` is the elliptic operator given by: +where :math:`<\cdot, \cdot>` denotes the pairing between :math:`H^{-1}(\Omega)` and :math:`H^{1}_{0}(\Omega)`, :math:`(\cdot, \cdot)` denotes the :math:`L^{2}(\Omega)` inner product, and :math:`a(\cdot, \cdot) : H^{1}_{0}(\Omega) \times H^{1}_{0}(\Omega)\rightarrow \mathbb{R}` is the elliptic operator given by: .. math:: diff --git a/demos/linear_fluid_structure_interaction/linear_fluid_structure_interaction.py.rst b/demos/linear_fluid_structure_interaction/linear_fluid_structure_interaction.py.rst index 015ae52f0f..e2ddb40b49 100644 --- a/demos/linear_fluid_structure_interaction/linear_fluid_structure_interaction.py.rst +++ b/demos/linear_fluid_structure_interaction/linear_fluid_structure_interaction.py.rst @@ -38,7 +38,7 @@ After numerous manipulations (described in detail in :cite:`Salwa:2017`) and eva .. math:: - \begin{align} + \begin{aligned} & \int v \phi^{n+1} \, {\mathrm d} S_f = \int v (\phi^n - \Delta t \eta^n) \, {\mathrm d} S_f \\ & \int \rho_0 {\bf v} \cdot {\bf U}^{n+1} \, {\mathrm d} x_S \underline{ + \int {\bf n} \cdot {\bf v} \, \phi^{n+1} \, {\mathrm d} s_s} = \rho_0 \int {\bf v} \cdot {\bf U}^n \, {\mathrm d} x_S \nonumber\\ & \hspace{5cm} - \Delta t \int \left( \lambda \nabla \cdot {\bf v} \nabla \cdot {\bf X}^n + \mu \frac{\partial X^n_j}{\partial x_i} \left( \frac{\partial v_i}{\partial x_j} + \frac{\partial v_j}{\partial x_i} \right) \right) \, {\mathrm d} x_S \underline{ + \int {\bf n} \cdot {\bf v} \, \phi^n \, {\mathrm d} s_s } @@ -46,7 +46,7 @@ After numerous manipulations (described in detail in :cite:`Salwa:2017`) and eva & \int \nabla v \cdot \nabla \phi^{n+1} \, {\mathrm d} x_F \underline{ - \int v {\bf n} \cdot {\bf U}^{n+1} \, {\mathrm d} s_s }= 0 \\ %\hspace{1cm} (+ \text{Dirichlet BC at } \partial \Omega_f)\\ & \int v \eta^{n+1} \, {\mathrm d} S_f = \int v \eta^n \, {\mathrm d} S_f + \Delta t \int \nabla v \cdot \nabla \phi^{n+1} \, {\mathrm d} x_F \underline{ - \Delta t \int v {\bf n} \cdot {\bf U}^{n+1}\, {\mathrm d} s_s }\\ & \int {\bf v} \cdot {\bf X}^{n+1} \, {\mathrm d} x_S = \int {\bf v} \cdot ( {\bf X}^n + \Delta t {\bf U}^{n+1} ) \, {\mathrm d} x_S \, . - \end{align} + \end{aligned} The underlined terms are the coupling terms. Note that the first equation for :math:`\phi` at the free surface is solved on the free surface only, the last equation for :math:`{\bf X}` in the structure domain, while the others are solved in both domains. Moreover, the second and third equations for :math:`\phi` and :math:`{\bf U}` need to be solved simultaneously. The geometry of the system with initial condition is shown below. diff --git a/demos/saddle_point_pc/saddle_point_systems.py.rst b/demos/saddle_point_pc/saddle_point_systems.py.rst index 1b90b92b0a..d010e8d13c 100644 --- a/demos/saddle_point_pc/saddle_point_systems.py.rst +++ b/demos/saddle_point_pc/saddle_point_systems.py.rst @@ -22,21 +22,25 @@ domain :math:`\Omega` satisfying .. math:: + \begin{aligned} \sigma - \nabla u &= 0 \quad &\textrm{on}\ \Omega\\ \nabla \cdot \sigma &= -f \quad &\textrm{on}\ \Omega\\ u &= u_0 \quad &\textrm{on}\ \Gamma_D\\ \sigma \cdot n &= g \quad &\textrm{on}\ \Gamma_N + \end{aligned} for some specified function :math:`f`. We now seek :math:`(u, \sigma) \in V \times \Sigma` such that .. math:: + \begin{aligned} \int_\Omega \sigma \cdot \tau + (\nabla \cdot \tau)\, u\,\mathrm{d}x &= \int_\Gamma (\tau \cdot n)\,u\,\mathrm{d}s &\quad \forall\ \tau \in \Sigma, \\ \int_\Omega (\nabla \cdot \sigma)\,v\,\mathrm{d}x &= -\int_\Omega f\,v\,\mathrm{d}x &\quad \forall\ v \in V. + \end{aligned} A stable choice of discrete spaces for this problem is to pick :math:`\Sigma_h \subset \Sigma` to be the lowest order Raviart-Thomas @@ -82,10 +86,10 @@ problem. We will need some trial and test functions for the spaces:: # sigma, u = TrialFunctions(W) tau, v = TestFunctions(W) - + along with a function to hold the forcing term, living in the discontinuous space. :: - + # f = Function(V) @@ -125,7 +129,7 @@ a :class:`~.LinearSolver` object from this function, so we preassemble the operators to build it. It is here that we must specify whether we want a monolithic matrix or not, by setting the matrix type parameter to :func:`~.assemble`. :: - + # if block_matrix: mat_type = 'nest' @@ -170,12 +174,12 @@ GMRES with a restart length of 100, :: "ksp_gmres_restart": 100, solve to a relative tolerance of 1e-8, :: - - # + + # "ksp_rtol": 1e-8, and precondition with ILU(0). :: - + # "pc_type": "ilu", } @@ -278,7 +282,7 @@ the preconditioned operator will have at most three distinct eigenvalues :cite:`Murphy:2000` and hence GMRES should converge in at most three iterations. To try this, we start out by exactly inverting :math:`A` and :math:`S` to check the convergence. :: - + "fieldsplit_0_ksp_type": "cg", "fieldsplit_0_pc_type": "ilu", "fieldsplit_0_ksp_rtol": 1e-12, @@ -480,7 +484,7 @@ variable. We can provide it as an :class:`~.AuxiliaryOperatorPC` via a python pr + (gamma/h)*inner(u, v)*ds) bcs = None return (a_dg, bcs) - + parameters = { "ksp_type": "gmres", "ksp_rtol": 1e-8, @@ -494,7 +498,7 @@ variable. We can provide it as an :class:`~.AuxiliaryOperatorPC` via a python pr "fieldsplit_1_pc_python_type": __name__+ ".DGLaplacian", "fieldsplit_1_aux_pc_type": "hypre" } - + print("DG approximation for S_p") for n in range(8): solver, w = build_problem(n, parameters, aP=None, block_matrix=False) @@ -538,7 +542,7 @@ providing a function that constructs this operator to our def riesz(W): sigma, u = TrialFunctions(W) tau, v = TestFunctions(W) - + return (dot(sigma, tau) + div(sigma)*div(tau) + u*v)*dx Now we set up the solver parameters. We will still use a diff --git a/docs/source/conf.py b/docs/source/conf.py index 58c070737d..a3cdf6b52e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -30,9 +30,15 @@ 'sphinx.ext.graphviz', 'sphinxcontrib.youtube', 'sphinxcontrib.bibtex', + 'sphinxcontrib.inkscapeconverter', 'numpydoc'] -mathjax_path = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML' +mathjax_path = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.2/es5/tex-mml-chtml.min.js' + +mathjax3_config = { + 'loader': {'load': ['[tex]/mathtools']}, + 'tex': {'packages': {'[+]': ['mathtools']}} +} # Both the class’ and the __init__ method’s docstring are concatenated and # inserted into the class definition @@ -189,7 +195,20 @@ # Additional stuff for the LaTeX preamble. 'preamble': r'''\newcommand{\require}[1]{} -\usepackage{cancel}''', +\usepackage{cancel} + +%\sphinxDUC{2730}{\ding{80}} +\sphinxDUC{27F6}{$\rightarrow$} +\sphinxDUC{2208}{$\in$} +\sphinxDUC{2200}{$\forall$} +\sphinxDUC{2218}{$\circ$} +\sphinxDUC{22C5}{$\cdot$} +\sphinxDUC{25A3}{$\boxdot$} +% Sphinx equivalent of +% \DeclareUnicodeCharacter{}{} +''', + + 'extrapackages': r'''\usepackage{mathtools}''' } # Grouping the document tree into LaTeX files. List of tuples diff --git a/scripts/firedrake-install b/scripts/firedrake-install index afb39f5baf..ae1969ba84 100755 --- a/scripts/firedrake-install +++ b/scripts/firedrake-install @@ -1419,6 +1419,7 @@ def install_documentation_dependencies(): run_pip(["install", "-U", "sphinx"]) run_pip(["install", "-U", "sphinx-autobuild"]) run_pip(["install", "-U", "sphinxcontrib-bibtex"]) + run_pip(["install", "-U", "sphinxcontrib-svg2pdfconverter"]) run_pip(["install", "-U", "bibtexparser"]) run_pip(["install", "-U", "sphinxcontrib-youtube"]) run_pip(["install", "-U", "numpydoc"]) From 6eaeb6b71b5efa2374550f7cbfbd9d3f48190579 Mon Sep 17 00:00:00 2001 From: JDBetteridge Date: Wed, 16 Nov 2022 11:35:47 +0000 Subject: [PATCH 02/30] Install inkscape to build docs --- .github/workflows/docs.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 234e041d2a..8196d26820 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -22,6 +22,11 @@ jobs: # part of the jobs steps: - uses: actions/checkout@v2 + - name: System dependencies + run: | + apt-get update + apt-get -y dist-upgrade + apt-get -y install inkscape - name: Install run: | . /home/firedrake/firedrake/bin/activate From 55f8d635828dc8e72eac980de3f92bad86ab2de6 Mon Sep 17 00:00:00 2001 From: JDBetteridge Date: Wed, 16 Nov 2022 11:51:41 +0000 Subject: [PATCH 03/30] Need texlive to make manual.pdf --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8196d26820..9fcd484d99 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -26,7 +26,7 @@ jobs: run: | apt-get update apt-get -y dist-upgrade - apt-get -y install inkscape + apt-get -y install inkscape texlive-full - name: Install run: | . /home/firedrake/firedrake/bin/activate From 609a01460e0d7312426158a909adc4d03b1979d3 Mon Sep 17 00:00:00 2001 From: JDBetteridge Date: Thu, 17 Nov 2022 15:58:01 +0000 Subject: [PATCH 04/30] Change side by side image alignment to fix generated LaTeX --- docs/source/extruded-meshes.rst | 48 ++++++++++++++++----------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/docs/source/extruded-meshes.rst b/docs/source/extruded-meshes.rst index f44f269014..b8f45238eb 100644 --- a/docs/source/extruded-meshes.rst +++ b/docs/source/extruded-meshes.rst @@ -103,13 +103,13 @@ same effect: The base mesh and extruded mesh are shown below. -.. figure:: images/UnitSquare44.png - :scale: 60 % - :align: left +.. |square| image:: images/UnitSquare44.png + :width: 49 % -.. figure:: images/UnifExt.png - :scale: 54 % - :align: right +.. |cube| image:: images/UnifExt.png + :width: 49 % + +|square| |cube| Radial Extrusion ~~~~~~~~~~~~~~~~ @@ -125,13 +125,13 @@ which a circle is extruded into an annulus, is: The base mesh and extruded mesh are shown below. -.. figure:: images/CircleMM20.png - :scale: 64 % - :align: left +.. |circle| image:: images/CircleMM20.png + :width: 49 % + +.. |annulus| image:: images/RadExt2D.png + :width: 49 % -.. figure:: images/RadExt2D.png - :scale: 65 % - :align: right +|circle| |annulus| An example in 3 dimensions, in which a sphere is extruded into a spherical annulus, is: @@ -143,13 +143,13 @@ annulus, is: The base mesh and part of the extruded mesh are shown below. -.. figure:: images/Icos3.png - :scale: 65 % - :align: left +.. |isocahedralsphere| image:: images/Icos3.png + :width: 49 % -.. figure:: images/RadExt3D.png - :scale: 69 % - :align: right +.. |isocahedralshell| image:: images/RadExt3D.png + :width: 49 % + +|isocahedralsphere| |isocahedralshell| Hedgehog Extrusion ~~~~~~~~~~~~~~~~~~ @@ -173,13 +173,13 @@ annulus, is: The 2D and 3D hedgehog-extruded meshes are shown below. -.. figure:: images/HedgeExt2D.png - :scale: 62 % - :align: left +.. |hedge2d| image:: images/HedgeExt2D.png + :width: 49 % + +.. |hedge3d| image:: images/HedgeExt3D.png + :width: 49 % -.. figure:: images/HedgeExt3D.png - :scale: 67 % - :align: right +|hedge2d| |hedge3d| Custom Extrusion ~~~~~~~~~~~~~~~~ From c122114a7c34048c78ac0df7aa7d5632613f12e5 Mon Sep 17 00:00:00 2001 From: JDBetteridge Date: Thu, 17 Nov 2022 15:58:34 +0000 Subject: [PATCH 05/30] Fix very broken docstring in SupermeshProjectBlock --- firedrake/adjoint/blocks.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/firedrake/adjoint/blocks.py b/firedrake/adjoint/blocks.py index 967b33bbe5..8ba81ead04 100644 --- a/firedrake/adjoint/blocks.py +++ b/firedrake/adjoint/blocks.py @@ -702,16 +702,19 @@ class SupermeshProjectBlock(Block, Backend): Projecting a source from :math:`V_A` to :math:`V_B` amounts to solving the linear system - .. math:: + .. math:: M_B * v_B = M_{AB} * v_A, - where :math:`M_B` is the mass matrix on :math:`V_B`, :math:`M_{AB}` is the - mixed mass matrix for :math:`V_A` and :math:`V_B` and :math:`v_A` and - :math:`v_B` are vector representations of the source and target - :class:`.Function`s. + where + * :math:`M_B` is the mass matrix on :math:`V_B`, + * :math:`M_{AB}` is the mixed mass matrix for :math:`V_A` + and :math:`V_B`, + * :math:`v_A` and :math:`v_B` are vector representations of + the source and target :class:`.Function` s. This can be broken into two steps: Step 1. form RHS, multiplying the source with the mixed mass matrix; + Step 2. solve linear system. """ def __init__(self, source, target_space, target, bcs=[], **kwargs): From 627b42516a66127f00fa74658ed547cb43cb99bc Mon Sep 17 00:00:00 2001 From: JDBetteridge Date: Thu, 19 Jan 2023 11:38:47 +0000 Subject: [PATCH 06/30] USe poptitle add logo, compile with lualatex --- docs/source/_static/poptitle.sty | 105 +++++++++++++++++++++++++++++++ docs/source/conf.py | 44 ++++++++++--- 2 files changed, 139 insertions(+), 10 deletions(-) create mode 100644 docs/source/_static/poptitle.sty diff --git a/docs/source/_static/poptitle.sty b/docs/source/_static/poptitle.sty new file mode 100644 index 0000000000..09eb223cc5 --- /dev/null +++ b/docs/source/_static/poptitle.sty @@ -0,0 +1,105 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{poptitle}[2023/01/18 Firedrake manual title page.] + +\RequirePackage{fontspec} +\setsansfont{TeX Gyre Heros} +\RequirePackage[british]{babel} +\RequirePackage[utf8]{inputenc} +\RequirePackage[absolute]{textpos} +\RequirePackage{xcolor} +\RequirePackage{graphicx} +\RequirePackage{etoolbox} +\RequirePackage[ + type={CC}, + modifier={by}, + version={4.0}, +]{doclicense} +\RequirePackage{fmtcount} +\RequirePackage{hyperref} +\RequirePackage{titling} + +\newcommand{\editions}{} +\newcommand{\edition}[1]{\listadd{\editions}{#1}} +\makeatletter +\providecommand\subtitle[1]{\renewcommand\thesubtitle{#1}} +\newcommand\thesubtitle{\@latex@error{No \noexpand\subtitle given}\@ehc} +\makeatother + +\setlength{\TPHorizModule}{1mm} +\setlength{\TPVertModule}{\TPHorizModule} +\textblockorigin{0mm}{0mm} + + +\definecolor{imperialblue}{cmyk}{1,.61,0,.45} + +\newcommand{\poptitlepages}{ +\clearpage +\thispagestyle{empty} + \newcounter{edcnt} + \setcounter{edcnt}{0} + \renewcommand*{\do}[1]{\stepcounter{edcnt} +\ifdefined\thisedition + \renewcommand{\thisedition}{\Ordinalstring{edcnt} edition} +\else + \newcommand{\thisedition}{} +\fi +} + \dolistloop{\editions} + +% \begin{textblock}{70}(17.5,17.5) +% \noindent\includegraphics[width=70mm]{imperial.pdf} +% \end{textblock} +% \begin{textblock}{210}(0,279) +% \noindent\rule{210mm}{.5mm} +% \end{textblock} +% \begin{textblock}{30}(190,-5) +% {\color{imperialblue} +% \noindent\rule[-5mm]{21mm}{300mm}} +% \end{textblock} +% \begin{textblock}{210}(17.5,284.5) +% {\sffamily\fontsize{25}{30}\selectfont +% \noindent Course Notes in Mathematics} +% \end{textblock} +% \begin{textblock}{30}(185,284.5) +% {\sffamily\fontsize{25}{30}\selectfont\centering\color{white}\bfseries +% \thevolcnt + +% } +% %\rule{15mm,297mm} +%\end{textblock} +\begin{textblock}{154}(17.5,74.25) + \setlength{\parskip}{2ex} + {\sffamily\fontsize{25}{30}\selectfont\noindent\thetitle} + + {\sffamily\fontsize{17}{20}\selectfont\noindent\thesubtitle + \vspace{\parskip} + + \noindent\Large\theauthor + \vspace{7\parskip} + + \noindent{\itshape\thisedition}} +\end{textblock} + +\mbox{} +\pagebreak + +\begin{textblock}{146}[0,1](17.5,230.5) + { + %\hypersetup{urlcolor=imperialblue} + \sffamily\fontsize{12}{14}\selectfont + \setcounter{edcnt}{0} + \renewcommand*{\do}[1]{\stepcounter{edcnt}\noindent\Ordinalstring{edcnt} edition: ##1 + \vspace{1ex} + + } + \dolistloop{\editions} + \vspace{2ex} + \noindent\copyright\ \theauthor + \doclicenseThis + } +\end{textblock} +\mbox{} +\setcounter{page}{0} +\thispagestyle{empty} +\clearpage +} diff --git a/docs/source/conf.py b/docs/source/conf.py index a3cdf6b52e..d186845968 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -186,6 +186,13 @@ # -- Options for LaTeX output -------------------------------------------- +latex_engine = 'lualatex' +latex_use_xindy = False + +latex_additional_files = [ + '_static/poptitle.sty' + ] + latex_elements = { # The paper size ('letterpaper' or 'a4paper'). 'papersize': 'a4paper', @@ -193,38 +200,54 @@ # The font size ('10pt', '11pt' or '12pt'). #'pointsize': '10pt', + 'babel': r'\usepackage[british]{babel}', + # Additional stuff for the LaTeX preamble. 'preamble': r'''\newcommand{\require}[1]{} \usepackage{cancel} %\sphinxDUC{2730}{\ding{80}} -\sphinxDUC{27F6}{$\rightarrow$} -\sphinxDUC{2208}{$\in$} -\sphinxDUC{2200}{$\forall$} -\sphinxDUC{2218}{$\circ$} -\sphinxDUC{22C5}{$\cdot$} -\sphinxDUC{25A3}{$\boxdot$} +%\sphinxDUC{27F6}{$\rightarrow$} +%\sphinxDUC{2208}{$\in$} +%\sphinxDUC{2200}{$\forall$} +%\sphinxDUC{2218}{$\circ$} +%\sphinxDUC{22C5}{$\cdot$} +%\sphinxDUC{25A3}{$\boxdot$} % Sphinx equivalent of % \DeclareUnicodeCharacter{}{} + +% The default sphinx colouring colours a lot of links that are actually dead in +% the book version. +\definecolor{internallinkcolor}{HTML}{c52b03} +\definecolor{externallinkcolor}{HTML}{e55d05} +%\hypersetup{linkcolor=internallinkcolor} +\hypersetup{linkcolor=black} +%\hypersetup{urlcolor=externallinkcolor} +\hypersetup{urlcolor=black} +\usepackage{poptitle} +\subtitle{} +\edition{2023} ''', - 'extrapackages': r'''\usepackage{mathtools}''' + 'extrapackages': r'''\usepackage{mathtools}''', + + 'maketitle' : r'\poptitlepages' } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'Firedrake.tex', u'Firedrake Documentation', + ('index', 'Firedrake.tex', u'User Manual', u'the Firedrake team', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. -#latex_logo = None +latex_logo = '_themes/firedrake/static/banner.png' # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. -#latex_use_parts = False +latex_use_parts = True # If true, show page references after internal links. #latex_show_pagerefs = False @@ -237,6 +260,7 @@ # If false, no module index is generated. #latex_domain_indices = True +latex_docclass = {"manual": "book"} # -- Options for manual page output -------------------------------------- From 5d09927bc3bc2fb58ff794124d2e748ffeff316d Mon Sep 17 00:00:00 2001 From: JDBetteridge Date: Thu, 26 Jan 2023 16:52:01 +0000 Subject: [PATCH 07/30] Finally got sections to behave in PDF --- docs/source/advanced_tut.rst | 24 ++++++ docs/source/book.rst | 14 ++++ docs/source/book_intro.rst | 11 +++ docs/source/citing.rst | 8 +- docs/source/conf.py | 36 ++++----- docs/source/contact.rst | 4 +- docs/source/documentation.rst | 145 ++++++++++------------------------ docs/source/download.rst | 4 +- docs/source/index.rst | 14 ---- docs/source/intro_tut.rst | 18 +++++ docs/source/manual.rst | 28 +++++++ docs/source/team.rst | 3 + 12 files changed, 167 insertions(+), 142 deletions(-) create mode 100644 docs/source/advanced_tut.rst create mode 100644 docs/source/book.rst create mode 100644 docs/source/book_intro.rst create mode 100644 docs/source/intro_tut.rst create mode 100644 docs/source/manual.rst diff --git a/docs/source/advanced_tut.rst b/docs/source/advanced_tut.rst new file mode 100644 index 0000000000..2a6989643e --- /dev/null +++ b/docs/source/advanced_tut.rst @@ -0,0 +1,24 @@ +Advanced tutorials +================== + +These tutorials demonstrate some more advanced features of Firedrake's +PDE solving capabilities, such as block-preconditioning mixed finite +element systems. + +.. toctree:: + :maxdepth: 1 + + Printing in parallel. + Benney-Luke nonlinear wave equation. + Solving the one-layer Quasi-Geostrophic equations. + Computing eigenmodes of the Quasi-Geostrophic equations using SLEPc. + A Quasi-Geostrophic wind driven gyre. + Preconditioning saddle-point systems, using the mixed Poisson problem as an example. + The Camassa-Holm equation, a nonlinear integrable PDE. + The Monge-Ampère equation, a nonlinear PDE, demonstrating fieldsplit preconditioning. + Preconditioning using geometric multigrid. + Linear mixed fluid-structure interaction system. + Mass lumping for a high order spectral wave equation. + Block preconditioning for the Stokes equation. + A pressure-convection-diffusion preconditioner for the Navier-Stokes equations. + Rayleigh-Benard convection. diff --git a/docs/source/book.rst b/docs/source/book.rst new file mode 100644 index 0000000000..e4f9ecbf57 --- /dev/null +++ b/docs/source/book.rst @@ -0,0 +1,14 @@ +:orphan: + +==================== +The Firedrake Manual +==================== + +.. toctree:: + + book_intro + manual + intro_tut + advanced_tut + firedrake + funding diff --git a/docs/source/book_intro.rst b/docs/source/book_intro.rst new file mode 100644 index 0000000000..ecf4049e55 --- /dev/null +++ b/docs/source/book_intro.rst @@ -0,0 +1,11 @@ +============ +Introduction +============ + +.. toctree:: + + index + team + download + citing + contact diff --git a/docs/source/citing.rst b/docs/source/citing.rst index c7181f18d4..2747eb97b4 100644 --- a/docs/source/citing.rst +++ b/docs/source/citing.rst @@ -1,4 +1,6 @@ -:orphan: true +.. raw:: latex + + \clearpage ================== Citing Firedrake @@ -38,8 +40,8 @@ COFFEE papers :cite:`Luporini2015` and :cite:`Luporini2017`. If you make use of matrix-free functionality and custom block preconditioning, please cite :cite:`Kirby2017`. -If you would like to help us to keep track of research directly -benefitting from Firedrake, please feel free to add your paper in +If you would like to help us to keep track of research directly +benefitting from Firedrake, please feel free to add your paper in bibtex format in the `bibliography for firedrake applications `_. diff --git a/docs/source/conf.py b/docs/source/conf.py index d186845968..c172df0f68 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -186,12 +186,12 @@ # -- Options for LaTeX output -------------------------------------------- -latex_engine = 'lualatex' -latex_use_xindy = False +# ~ latex_engine = 'lualatex' +# ~ latex_use_xindy = False -latex_additional_files = [ - '_static/poptitle.sty' - ] +# ~ latex_additional_files = [ + # ~ '_static/poptitle.sty' + # ~ ] latex_elements = { # The paper size ('letterpaper' or 'a4paper'). @@ -206,13 +206,13 @@ 'preamble': r'''\newcommand{\require}[1]{} \usepackage{cancel} -%\sphinxDUC{2730}{\ding{80}} -%\sphinxDUC{27F6}{$\rightarrow$} -%\sphinxDUC{2208}{$\in$} -%\sphinxDUC{2200}{$\forall$} -%\sphinxDUC{2218}{$\circ$} -%\sphinxDUC{22C5}{$\cdot$} -%\sphinxDUC{25A3}{$\boxdot$} +% \sphinxDUC{2730}{\ding{80}} +\sphinxDUC{27F6}{$\rightarrow$} +\sphinxDUC{2208}{$\in$} +\sphinxDUC{2200}{$\forall$} +\sphinxDUC{2218}{$\circ$} +\sphinxDUC{22C5}{$\cdot$} +\sphinxDUC{25A3}{$\boxdot$} % Sphinx equivalent of % \DeclareUnicodeCharacter{}{} @@ -224,20 +224,20 @@ \hypersetup{linkcolor=black} %\hypersetup{urlcolor=externallinkcolor} \hypersetup{urlcolor=black} -\usepackage{poptitle} -\subtitle{} -\edition{2023} +%\usepackage{poptitle} +%\subtitle{} +%\edition{2023} ''', 'extrapackages': r'''\usepackage{mathtools}''', - 'maketitle' : r'\poptitlepages' + # ~ 'maketitle' : r'\poptitlepages' } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'Firedrake.tex', u'User Manual', + ('book', 'Firedrake.tex', u'User Manual', u'the Firedrake team', 'manual'), ] @@ -247,7 +247,7 @@ # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. -latex_use_parts = True +#latex_use_parts = True # If true, show page references after internal links. #latex_show_pagerefs = False diff --git a/docs/source/contact.rst b/docs/source/contact.rst index 30ef51b71d..d80b30c712 100644 --- a/docs/source/contact.rst +++ b/docs/source/contact.rst @@ -1,4 +1,6 @@ -:orphan: true +.. raw:: latex + + \clearpage ================ Getting in touch diff --git a/docs/source/documentation.rst b/docs/source/documentation.rst index cdc0097bc6..34a43da723 100644 --- a/docs/source/documentation.rst +++ b/docs/source/documentation.rst @@ -1,121 +1,56 @@ -.. only:: html - - .. sidebar:: Current development information. - - Firedrake and PyOP2 are continually tested using `GitHub actions `__. +:orphan: - Latest Firedrake status: |firedrakebuild| +.. _firedrake_tutorials: - .. |firedrakebuild| image:: https://github.com/firedrakeproject/firedrake/actions/workflows/build.yml/badge.svg - :target: https://github.com/firedrakeproject/firedrake/actions/workflows/build.yml +.. only:: html - Firedrake and its components are developed on `GitHub - `__ where we also maintain Firedrake-ready - versions of the `FEniCS `__ components - UFL. + .. sidebar:: Current development information. - * `Firedrake on GitHub `__ - * `TSFC on GitHub `__ - * `PyOP2 on GitHub `__ - * `FIAT on GitHub `__ - * `Firedrake version of UFL on GitHub `__ + Firedrake and PyOP2 are continually tested using `GitHub actions `__. - Getting started - =============== + Latest Firedrake status: |firedrakebuild|_ + .. |firedrakebuild| image:: https://github.com/firedrakeproject/firedrake/actions/workflows/build.yml/badge.svg + .. _firedrakebuild: https://github.com/firedrakeproject/firedrake/actions/workflows/build.yml - The first step is to download and install Firedrake and its - dependencies. For full instructions, see :doc:`obtaining Firedrake - `. + Firedrake and its components are developed on `GitHub + `__ where we also maintain Firedrake-ready + versions of the `FEniCS `__ components + UFL. - .. _firedrake_tutorials: + * `Firedrake on GitHub `__ + * `TSFC on GitHub `__ + * `PyOP2 on GitHub `__ + * `FIAT on GitHub `__ + * `Firedrake version of UFL on GitHub `__ -Introductory Tutorials -====================== + Getting started + =============== -Once you've built Firedrake, you'll want to actually solve some -PDEs. Below are a few tutorial examples to get you started. + The first step is to download and install Firedrake and its + dependencies. For full instructions, see :doc:`obtaining Firedrake + `. -.. toctree:: - :maxdepth: 1 + .. include:: intro_tut.rst - A basic Helmholtz equation. - The Burgers equation, a non-linear, unsteady example. - A mixed formulation of the Poisson equation. - A time-dependent DG advection equation using upwinding. - An extruded mesh example, using a steady-state continuity equation. - A linear wave equation with optional mass lumping. - Creating Firedrake-compatible meshes in Gmsh. + Jupyter notebooks + ----------------- -Jupyter notebooks ------------------ + In addition to the documented tutorials, we also have some `Jupyter + notebooks `__ that are a more interactive way of + getting to know Firedrake. They are described in more detail :doc:`on + their own page `. -In addition to the documented tutorials, we also have some `Jupyter -notebooks `__ that are a more interactive way of -getting to know Firedrake. They are described in more detail :doc:`on -their own page `. + Youtube Channel + --------------- + Firedrake has a `youtube channel `__ where recorded tutorials are occasionally uploaded. -Youtube Channel ---------------- -Firedrake has a `youtube channel `__ where recorded tutorials are occasionally uploaded. + API documentation + ================= -.. only:: html + The complete list of all the classes and methods in Firedrake is + available at the :doc:`firedrake` page. The same information is + :ref:`indexed ` in alphabetical order. Another very + effective mechanism is the site :ref:`search engine `. - API documentation - ================= - - The complete list of all the classes and methods in Firedrake is - available at the :doc:`firedrake` page. The same information is - :ref:`indexed ` in alphabetical order. Another very - effective mechanism is the site :ref:`search engine `. - -Manual -====== - -Once you have worked through the tutorials, the user manual is the -next step. It goes in to more detail on how to set up and solve -finite element problems in Firedrake. - -.. toctree:: - :maxdepth: 2 - - variational-problems - solving-interface - boundary_conditions - r-space - extruded-meshes - mesh-coordinates - interpolation - point-evaluation - visualisation - checkpointing - matrix-free - preconditioning - petsc-interface - parallelism - zenodo - optimising - -Advanced tutorials -================== - -These tutorials demonstrate some more advanced features of Firedrake's -PDE solving capabilities, such as block-preconditioning mixed finite -element systems. - -.. toctree:: - :maxdepth: 1 - - Printing in parallel. - Benney-Luke nonlinear wave equation. - Solving the one-layer Quasi-Geostrophic equations. - Computing eigenmodes of the Quasi-Geostrophic equations using SLEPc. - A Quasi-Geostrophic wind driven gyre. - Preconditioning saddle-point systems, using the mixed Poisson problem as an example. - The Camassa-Holm equation, a nonlinear integrable PDE. - The Monge-Ampère equation, a nonlinear PDE, demonstrating fieldsplit preconditioning. - Preconditioning using geometric multigrid. - Linear mixed fluid-structure interaction system. - Mass lumping for a high order spectral wave equation. - Block preconditioning for the Stokes equation. - A pressure-convection-diffusion preconditioner for the Navier-Stokes equations. - Rayleigh-Benard convection. + .. include:: manual.rst + .. include:: advanced_tut.rst diff --git a/docs/source/download.rst b/docs/source/download.rst index f8e99d6602..bc3c253a36 100644 --- a/docs/source/download.rst +++ b/docs/source/download.rst @@ -1,4 +1,6 @@ -:orphan: true +.. raw:: latex + + \clearpage =================== Obtaining Firedrake diff --git a/docs/source/index.rst b/docs/source/index.rst index c1ac198ab3..79cbaa7ed5 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -9,11 +9,6 @@
-.. only:: latex - - Introduction - ------------ - Firedrake is an automated system for the solution of partial differential equations using the finite element method (FEM). Firedrake uses sophisticated code generation to provide @@ -45,12 +40,3 @@ Features: :width: 450px River plume simulated with the Firedrake-based `Thetis ocean model `_. - -.. only:: latex - - .. toctree:: - - documentation - firedrake - funding - team diff --git a/docs/source/intro_tut.rst b/docs/source/intro_tut.rst new file mode 100644 index 0000000000..6f31f420b1 --- /dev/null +++ b/docs/source/intro_tut.rst @@ -0,0 +1,18 @@ +Introductory Tutorials +====================== + +.. only:: html + + Once you've built Firedrake, you'll want to actually solve some + PDEs. Below are a few tutorial examples to get you started. + +.. toctree:: + :maxdepth: 1 + + A basic Helmholtz equation. + The Burgers equation, a non-linear, unsteady example. + A mixed formulation of the Poisson equation. + A time-dependent DG advection equation using upwinding. + An extruded mesh example, using a steady-state continuity equation. + A linear wave equation with optional mass lumping. + Creating Firedrake-compatible meshes in Gmsh. diff --git a/docs/source/manual.rst b/docs/source/manual.rst new file mode 100644 index 0000000000..b66d6d231e --- /dev/null +++ b/docs/source/manual.rst @@ -0,0 +1,28 @@ +Manual +====== + +.. only:: html + + Once you have worked through the tutorials, the user manual is the + next step. It goes in to more detail on how to set up and solve + finite element problems in Firedrake. + +.. toctree:: + :maxdepth: 2 + + variational-problems + solving-interface + boundary_conditions + r-space + extruded-meshes + mesh-coordinates + interpolation + point-evaluation + visualisation + checkpointing + matrix-free + preconditioning + petsc-interface + parallelism + zenodo + optimising diff --git a/docs/source/team.rst b/docs/source/team.rst index 111e3bba6e..d3d35dd02c 100644 --- a/docs/source/team.rst +++ b/docs/source/team.rst @@ -1,3 +1,6 @@ +.. raw:: latex + + \clearpage The Firedrake team ================== From 58e8ec2ee743597219f4976df7bb4d2d12238de5 Mon Sep 17 00:00:00 2001 From: JDBetteridge Date: Thu, 26 Jan 2023 18:29:38 +0000 Subject: [PATCH 08/30] Tweaked style --- .../{poptitle.sty => sphinxpoptitle.sty} | 35 +++++-------------- docs/source/book.rst | 18 ++++++++++ docs/source/conf.py | 19 +++++----- 3 files changed, 38 insertions(+), 34 deletions(-) rename docs/source/_static/{poptitle.sty => sphinxpoptitle.sty} (68%) diff --git a/docs/source/_static/poptitle.sty b/docs/source/_static/sphinxpoptitle.sty similarity index 68% rename from docs/source/_static/poptitle.sty rename to docs/source/_static/sphinxpoptitle.sty index 09eb223cc5..a2fc59b029 100644 --- a/docs/source/_static/poptitle.sty +++ b/docs/source/_static/sphinxpoptitle.sty @@ -1,8 +1,8 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{poptitle}[2023/01/18 Firedrake manual title page.] +\ProvidesPackage{sphinxpoptitle}[2023/01/18 Firedrake manual title page.] -\RequirePackage{fontspec} -\setsansfont{TeX Gyre Heros} +%\RequirePackage{fontspec} +%\setsansfont{TeX Gyre Heros} \RequirePackage[british]{babel} \RequirePackage[utf8]{inputenc} \RequirePackage[absolute]{textpos} @@ -17,6 +17,7 @@ \RequirePackage{fmtcount} \RequirePackage{hyperref} \RequirePackage{titling} +\RequirePackage{sphinx} \newcommand{\editions}{} \newcommand{\edition}[1]{\listadd{\editions}{#1}} @@ -32,7 +33,7 @@ \definecolor{imperialblue}{cmyk}{1,.61,0,.45} -\newcommand{\poptitlepages}{ +\newcommand{\sphinxpoptitlepages}{ \clearpage \thispagestyle{empty} \newcounter{edcnt} @@ -46,29 +47,12 @@ } \dolistloop{\editions} -% \begin{textblock}{70}(17.5,17.5) -% \noindent\includegraphics[width=70mm]{imperial.pdf} -% \end{textblock} -% \begin{textblock}{210}(0,279) -% \noindent\rule{210mm}{.5mm} -% \end{textblock} -% \begin{textblock}{30}(190,-5) -% {\color{imperialblue} -% \noindent\rule[-5mm]{21mm}{300mm}} -% \end{textblock} -% \begin{textblock}{210}(17.5,284.5) -% {\sffamily\fontsize{25}{30}\selectfont -% \noindent Course Notes in Mathematics} -% \end{textblock} -% \begin{textblock}{30}(185,284.5) -% {\sffamily\fontsize{25}{30}\selectfont\centering\color{white}\bfseries -% \thevolcnt - -% } -% %\rule{15mm,297mm} -%\end{textblock} \begin{textblock}{154}(17.5,74.25) \setlength{\parskip}{2ex} + + \sphinxlogo + \vspace{7\parskip} + {\sffamily\fontsize{25}{30}\selectfont\noindent\thetitle} {\sffamily\fontsize{17}{20}\selectfont\noindent\thesubtitle @@ -85,7 +69,6 @@ \begin{textblock}{146}[0,1](17.5,230.5) { - %\hypersetup{urlcolor=imperialblue} \sffamily\fontsize{12}{14}\selectfont \setcounter{edcnt}{0} \renewcommand*{\do}[1]{\stepcounter{edcnt}\noindent\Ordinalstring{edcnt} edition: ##1 diff --git a/docs/source/book.rst b/docs/source/book.rst index e4f9ecbf57..46ba5c4e95 100644 --- a/docs/source/book.rst +++ b/docs/source/book.rst @@ -4,9 +4,27 @@ The Firedrake Manual ==================== +.. raw:: latex + + \frontmatter + .. toctree:: book_intro + +.. raw:: latex + + \mainmatter + +.. container:: preface + + .. toctree:: + + book_intro + +.. toctree:: + :numbered: + manual intro_tut advanced_tut diff --git a/docs/source/conf.py b/docs/source/conf.py index c172df0f68..520d29f992 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -189,16 +189,16 @@ # ~ latex_engine = 'lualatex' # ~ latex_use_xindy = False -# ~ latex_additional_files = [ - # ~ '_static/poptitle.sty' - # ~ ] +latex_additional_files = [ + '_static/sphinxpoptitle.sty' + ] latex_elements = { # The paper size ('letterpaper' or 'a4paper'). 'papersize': 'a4paper', # The font size ('10pt', '11pt' or '12pt'). - #'pointsize': '10pt', + 'pointsize': '11pt', 'babel': r'\usepackage[british]{babel}', @@ -216,6 +216,9 @@ % Sphinx equivalent of % \DeclareUnicodeCharacter{}{} +% Make text sans-serif +\renewcommand{\familydefault}{\sfdefault} + % The default sphinx colouring colours a lot of links that are actually dead in % the book version. \definecolor{internallinkcolor}{HTML}{c52b03} @@ -224,14 +227,14 @@ \hypersetup{linkcolor=black} %\hypersetup{urlcolor=externallinkcolor} \hypersetup{urlcolor=black} -%\usepackage{poptitle} -%\subtitle{} -%\edition{2023} +\usepackage{sphinxpoptitle} +\subtitle{} +\edition{2023} ''', 'extrapackages': r'''\usepackage{mathtools}''', - # ~ 'maketitle' : r'\poptitlepages' + 'maketitle' : r'\sphinxpoptitlepages' } # Grouping the document tree into LaTeX files. List of tuples From 01c6e89b35216d27a864be0face0a09d93c83aab Mon Sep 17 00:00:00 2001 From: JDBetteridge Date: Sat, 28 Jan 2023 00:19:12 +0000 Subject: [PATCH 09/30] Unify author list, new teams page --- docs/Makefile | 13 ++-- docs/source/authors.rst_t | 32 +++++++++ docs/source/book.rst | 1 - docs/source/conf.py | 17 ++++- docs/source/team.ini | 131 +++++++++++++++++++++++++++++++++++++ docs/source/team.rst_t | 132 ++++++++++++++++++++++++++++++++++++++ docs/source/team2.py | 100 +++++++++++++++++++++++++++++ 7 files changed, 417 insertions(+), 9 deletions(-) create mode 100644 docs/source/authors.rst_t create mode 100644 docs/source/team.ini create mode 100644 docs/source/team.rst_t create mode 100644 docs/source/team2.py diff --git a/docs/Makefile b/docs/Makefile index 038f7e5c0d..3b7fe23738 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -43,7 +43,7 @@ help: TARGETS = html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext -GENERATED_FILES = source/teamgrid.rst source/teaminactive.rst source/demos source/element_list.csv +GENERATED_FILES = source/team.rst source/demos source/element_list.csv publish: html # The raw IP address is used to circumvent some dns fiddling which @@ -73,11 +73,14 @@ copy_demos: source/element_list.csv: source/element_list.py cd source; python element_list.py -source/teamgrid.rst: source/team.py - cd source; python team.py teamgrid.rst +#~ source/teamgrid.rst: source/team.py +#~ cd source; python team.py teamgrid.rst -source/teaminactive.rst: source/team.py - cd source; python team.py teaminactive.rst +#~ source/teaminactive.rst: source/team.py +#~ cd source; python team.py teaminactive.rst + +source/team.rst: source/team2.py + cd source; python team2.py; mv AUTHORS.rst ../.. apidoc: $(GENERATED_FILES) copy_demos sphinx-apidoc -f -T -o source/ ../firedrake ../firedrake/cython/*.so diff --git a/docs/source/authors.rst_t b/docs/source/authors.rst_t new file mode 100644 index 0000000000..4175c3b59c --- /dev/null +++ b/docs/source/authors.rst_t @@ -0,0 +1,32 @@ +:orphan: + +.. + This file is generated by team.py using the team.rst_t template and team.ini. + DO NOT EDIT DIRECTLY + To add your name and/or institution edit the relevant sections of + docs/source/team.ini + +======= +AUTHORS +======= + +Firedrake has been contributed to by the following: + +Institutions +------------ + +{% for institute, ilink in institution_set %} +{{ "{:.<30}<{}>".format(institute, ilink) }} +{% endfor %} + + +Individuals +----------- + +{% for name, link in individual_set %} +{% if link %} +{{ "{:.<30}<{}>".format(name, link.split(',')[0]) }} +{% else %} +{{ name }} +{% endif %} +{% endfor %} diff --git a/docs/source/book.rst b/docs/source/book.rst index 46ba5c4e95..843385642b 100644 --- a/docs/source/book.rst +++ b/docs/source/book.rst @@ -23,7 +23,6 @@ The Firedrake Manual book_intro .. toctree:: - :numbered: manual intro_tut diff --git a/docs/source/conf.py b/docs/source/conf.py index 520d29f992..4303a6e168 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -59,6 +59,17 @@ # General information about the project. project = u'Firedrake' +# Author +from configparser import ConfigParser, ExtendedInterpolation + +team = ConfigParser(interpolation=ExtendedInterpolation()) +team.optionxform = lambda x: x +team.read('team.ini') + +author_list = list(team['active-team'].keys()) +author_list += list(team['inactive-team'].keys()) +author = ', '.join(author_list) + # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. @@ -241,7 +252,7 @@ # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ ('book', 'Firedrake.tex', u'User Manual', - u'the Firedrake team', 'manual'), + ' \\and '.join(author_list), 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -272,7 +283,7 @@ # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'firedrake', u'Firedrake Documentation', - [u'the Firedrake team'], 1) + author, 1) ] # If true, show URL addresses after external links. @@ -286,7 +297,7 @@ # dir menu entry, description, category) texinfo_documents = [ ('index', 'Firedrake', u'Firedrake Documentation', - u'the Firedrake team', 'Firedrake', 'One line description of project.', + author, 'Firedrake', 'One line description of project.', 'Miscellaneous'), ] diff --git a/docs/source/team.ini b/docs/source/team.ini new file mode 100644 index 0000000000..a7742be466 --- /dev/null +++ b/docs/source/team.ini @@ -0,0 +1,131 @@ +[a] +icl: http://www.imperial.ac.uk +gh: https://github.com + +[dev-institution] +# Use format +# institution: institution_website +# +# then complete a section with: +# +# [institution] +# department: website +Imperial College London: http://www.imperial.ac.uk +Durham University: https://www.durham.ac.uk +Baylor University: https://www.baylor.edu +University of Washington: http://www.washington.edu + +[Imperial College London] +Department of Mathematics: ${a:icl}/mathematics +Department of Computing: ${a:icl}/computing +Department of Earth Science and Engineering: ${a:icl}/ese + +[Durham University] +Department of Computer Science: ${dev-institution:Durham University}/computer.science + +[Baylor University] +Department of Mathematics: ${dev-institution:Baylor University}/math + +[University of Washington] +Applied Physics Laboratory: http://www.apl.washington.edu/ + +[active-team] +# Use format +# name : personal-webpage, image-link +David Ham: http://www.imperial.ac.uk/people/david.ham +Paul Kelly: http://www.imperial.ac.uk/people/p.kelly +Lawrence Mitchell: +Colin Cotter: http://www.imperial.ac.uk/people/colin.cotter +Rob Kirby: http://www.baylor.edu/math/index.php?id=90540 +Koki Sagiyama: http://www.imperial.ac.uk/people/k.sagiyama +Nacime Bouziani: https://www.imperial.ac.uk/people/n.bouziani18 +Sophia Vorderwuelbecke: https://www.imperial.ac.uk/people/s.vorderwuelbecke18 +Tom Gregory: https://www.imperial.ac.uk/people/t.gregory18 +Jack Betteridge: https://www.imperial.ac.uk/people/j.betteridge, https://upload.wikimedia.org/wikipedia/commons/thumb/a/a1/Mallard2.jpg/632px-Mallard2.jpg +Daniel Shapero: http://psc.apl.uw.edu/people/investigators/daniel-shapero/ +Reuben Hill: https://www.imperial.ac.uk/people/reuben.hill10 +Connor Ward: https://www.imperial.ac.uk/people/c.ward20 + +[inactive-team] +Thomas Gibson: +Miklós Homolya: +Tianjiao (TJ) Sun: https://www.doc.ic.ac.uk/~ts2914/ +Andrew McRae: https://www2.physics.ox.ac.uk/contacts/people/mcraea +Fabio Luporini: http://www.imperial.ac.uk/people/f.luporini12 +Alastair Gregory: +Michael Lange: https://www.linkedin.com/in/michael-lange-56675994/ +Simon Funke: http://www.simonfunke.com +Florian Rathgeber: https://kynan.github.io +Doru Bercea: +Graham Markall: https://gmarkall.wordpress.com + +[contributing-institution] +Imperial College London: http://www.imperial.ac.uk +University of Bath: http://www.bath.ac.uk +University of Leeds: https://www.leeds.ac.uk +University of Oxford: https://www.ox.ac.uk +Durham University: https://www.durham.ac.uk + +[contributing-individual] +Julian Andrej: +Nicolas Barral: https://nicolasbarral.fr +Nicholas Barton: +Tom Bendall: +Doru Bercea: +George Boutsioukis: +Romain Brault: +Pablo Brubeck: +Ed Bueler: +Henrik Buesing: +Justin Chang: +Cyrus Cheng: +Teodoro Fields Collin: +Colin Cotter: +Joshua Coutinho: +Patrick E. Farrell: https://www.maths.ox.ac.uk/people/patrick.farrell +Simon Funke: +Melina Giagiozis: +Thomas Gibson: +Tim Greaves: +Alastair Gregory: +David Ham: +Christopher Hawkes: +Miklós Homolya: +Christian Jacobs: +Darko Janeković: +Nick Johnson: +Anna Kalogirou: +Tuomas Kärnä: https://www.tuomaskarna.com +Paul Kelly: +Rob Kirby: +Stephan Kramer: https://www.imperial.ac.uk/people/s.kramer +Michael Lange: +Nicolas Loriant: +Fabio Luporini: +Scott MacLachlan: https://www.math.mun.ca/~smaclachlan/ +Graham Markall: +India Marsden: +Geordie McBain: +Andrew McRae: +Oliver Meister: https://www5.in.tum.de/wiki/index.php/Dipl.-Inf._Oliver_Meister +Lawrence Mitchell: +Eike Mueller: +Reuben W. Nixon-Hill: +Alberto Paganini: https://www2.le.ac.uk/departments/mathematics/extranet/staff-material/staff-profiles/alberto-paganini +Francis Poulin: +Florian Rathgeber: +Asbjørn Nilsen Riseth: +Hannah Rittich: +Francis P. Russell: +Thomas Roy: +Tomasz Salwa: +Kaho Sato: +Ben Sepanski: https://bensepanski.github.io +Daniel Shapero: +Jemma Shipton: +Tianjiao (TJ) Sun: +Sophia Vorderwuelbecke: +Joe Wallwork: https://www.imperial.ac.uk/people/j.wallwork16 +Connor Ward: +Florian Wechsung: https://florianwechsung.github.io +Fangyi Zhou: diff --git a/docs/source/team.rst_t b/docs/source/team.rst_t new file mode 100644 index 0000000000..0bf273d92b --- /dev/null +++ b/docs/source/team.rst_t @@ -0,0 +1,132 @@ +:orphan: + +.. + This file is generated by team.py using the team.rst_t template and team.ini. + DO NOT EDIT DIRECTLY + To add your name and/or institution edit the relevant sections of + docs/source/team.ini + +.. raw:: latex + + \clearpage + +The Firedrake team +================== + +Firedrake is brought to you by + +{% for institute, ilink in team['dev-institution'].items() %} +* `{{ institute }} <{{ ilink }}>`_ + + {% for dept, dlink in team[institute].items() %} + * `{{ dept }} <{{ dlink }}>`__ + + {% endfor %} + +{% endfor %} +and the broad community of Firedrake users who contribute to its +development. + +Active team members +------------------- + +{% for name, links in team['active-team'].items() %} +{% set parts = links.split(',') %} +{% set website = parts[0] %} +{% set img_name = name.split()[0].lower().encode("punycode").decode() %} +{% set img_name = img_name[:-1] if img_name[-1] == "-" else img_name %} +.. |{{ name }}| image:: /images/{{ img_name }}.* + :width: 70% +{% if website %} +.. _{{ name }}: {{ website }} +{% endif %} +{% endfor %} + +{% set coldashes = atable.width + 5 %} +{% set template = "{{:{}}}".format(coldashes) %} +{{ ("-" * coldashes).join("+" * (atable.ncols + 1)) }} +{% for ii in atable.rows %} +|{% for jj in atable.cols %} +{% if atable[ii, jj][1] %} +{{ template.format(" |{}|_".format(atable[ii, jj][0])) }}{% elif atable[ii, jj][0] %} +{{ template.format(" |{}|".format(atable[ii, jj][0])) }}{% else %} +{{ " "*coldashes }}{% endif %} +|{% endfor %} + +|{% for jj in atable.cols %}{{ " "*coldashes }}|{% endfor %} + +|{% for jj in atable.cols %} +{% if atable[ii, jj][1] %} +{{ template.format(" `{}`_".format(atable[ii, jj][0])) }}{% elif atable[ii, jj][0] %} +{{ template.format(" {}".format(atable[ii, jj][0])) }}{% else %} +{{ " "*coldashes }}{% endif %} +|{% endfor %} + +{{ ("-" * coldashes).join("+" * (atable.ncols + 1)) }} +{% endfor %} + +Former team members +------------------- + +{% for name, links in team['inactive-team'].items() %} +{% set parts = links.split(',') %} +{% set website = parts[0] %} +{% set img_name = name.split()[0].lower().encode("punycode").decode() %} +{% set img_name = img_name[:-1] if img_name[-1] == "-" else img_name %} +.. |{{ name }}| image:: /images/{{ img_name }}.* + :width: 70% +{% if website %} +.. _{{ name }}: {{ website }} +{% endif %} +{% endfor %} + +{% set coldashes = itable.width + 5 %} +{% set template = "{{:{}}}".format(coldashes) %} +{{ ("-" * coldashes).join("+" * (itable.ncols + 1)) }} +{% for ii in itable.rows %} +|{% for jj in itable.cols %} +{% if itable[ii, jj][1] %} +{{ template.format(" |{}|_".format(itable[ii, jj][0])) }}{% elif itable[ii, jj][0] %} +{{ template.format(" |{}|".format(itable[ii, jj][0])) }}{% else %} +{{ " "*coldashes }}{% endif %} +|{% endfor %} + +|{% for jj in itable.cols %}{{ " "*coldashes }}|{% endfor %} + +|{% for jj in itable.cols %} +{% if itable[ii, jj][1] %} +{{ template.format(" `{}`_".format(itable[ii, jj][0])) }}{% elif itable[ii, jj][0] %} +{{ template.format(" {}".format(itable[ii, jj][0])) }}{% else %} +{{ " "*coldashes }}{% endif %} +|{% endfor %} + +{{ ("-" * coldashes).join("+" * (itable.ncols + 1)) }} +{% endfor %} + + + +Other contributors +------------------ + +{% for name, link in ctable.data %} +{% if link %} +.. _{{ name }}: {{ link.split(',')[0] }} +{% endif %} +{% endfor %} + +{% set coldashes = ctable.width + 5 %} +{% set template = "{{:^{}}}".format(coldashes) %} +{{ ("-" * coldashes).join("+" * (ctable.ncols + 1)) }} +{% for ii in ctable.rows %} +|{% for jj in ctable.cols %} +{% if ctable[jj, ii][1] %} +{{ template.format(" `{}`_".format(ctable[jj, ii][0])) }}{% elif ctable[jj, ii][0] %} +{{ template.format(" {}".format(ctable[jj, ii][0])) }}{% else %} +{{ " "*coldashes }}{% endif %} +|{% endfor %} + +{{ ("-" * coldashes).join("+" * (ctable.ncols + 1)) }} +{% endfor %} + +And more! Please contact us if you believe your name has been left off +this list in error. diff --git a/docs/source/team2.py b/docs/source/team2.py new file mode 100644 index 0000000000..41f315b0fc --- /dev/null +++ b/docs/source/team2.py @@ -0,0 +1,100 @@ +from configparser import ConfigParser, ExtendedInterpolation +from itertools import chain +from jinja2 import Environment, FileSystemLoader, select_autoescape +from urllib.request import urlopen + + +class Table: + def __init__(self, data, cols, transpose=False): + self.data = [*data] + if isinstance(self.data[0], str): + self.width = max(map(len, self.data)) + self.blank = "" + else: + self.width = max(map(len, [d[0] for d in self.data])) + self.blank = tuple([""]*len(self.data[0])) + self.ncols = cols + rows, r = divmod(len(data), cols) + self.nrows = rows + 1 if r else rows + self.transpose = transpose + + def __len__(self): + return len(self.data) + + def __getitem__(self, key): + if self.transpose: + idx = key[0] * self.nrows + key[1] + else: + idx = key[0] * self.ncols + key[1] + return self.data[idx] if idx < len(self) else self.blank + + @property + def cols(self): + return range(self.ncols) + + @property + def rows(self): + return range(self.nrows) + + +def cache_web_image(name, url): + img_name = name.split()[0].lower().encode("punycode").decode() + img_name = img_name[:-1] if img_name[-1] == "-" else img_name + with urlopen(url) as response, open("images/" + img_name + "." + url[-3:], "wb") as fh: + fh.write(response.read()) + + +# +team = ConfigParser(interpolation=ExtendedInterpolation()) +team.optionxform = lambda x: x +team.read("team.ini") + +# +for name, links in team["active-team"].items(): + parts = links.split(",") + if parts[1:]: + website = parts[1] + cache_web_image(name, website) + +# +env = Environment( + loader=FileSystemLoader("."), + autoescape=select_autoescape(), + trim_blocks=True, + lstrip_blocks=True +) + +# +extra = [*team["contributing-individual"].items()] +exclude = [*team["active-team"].keys()] + [*team["inactive-team"].keys()] +extra = [e for e in extra if e[0] not in exclude] + +# +team_rst = env.get_template("team.rst_t") +with open("team.rst", "w") as fh: + fh.write(team_rst.render( + team=team, + atable=Table(team["active-team"].items(), 4), + itable=Table(team["inactive-team"].items(), 4), + ctable=Table(extra, 3, transpose=True) + )) + +# +authors_rst = env.get_template("authors.rst_t") + +institution_set = set(chain( + team["dev-institution"].items(), team["contributing-institution"].items() +)) +institution_set = list(institution_set) +institution_set.sort(key=lambda x: x[0]) + +individual_set = dict(team["contributing-individual"].items()) +individual_set.update(team["active-team"].items()) +individual_set.update(team["inactive-team"].items()) +individual_set = list(individual_set.items()) +individual_set.sort(key=lambda x: x[0].split()[-1]) +with open("AUTHORS.rst", "w") as fh: + fh.write(authors_rst.render( + institution_set=institution_set, + individual_set=individual_set + )) From 28f5eb9b9cd4295759582e29315c00b87881b0ac Mon Sep 17 00:00:00 2001 From: JDBetteridge Date: Sat, 28 Jan 2023 00:20:48 +0000 Subject: [PATCH 10/30] New AUTHORS --- AUTHORS | 67 ------------------------------------- AUTHORS.rst | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+), 67 deletions(-) delete mode 100644 AUTHORS create mode 100644 AUTHORS.rst diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index fb198fc826..0000000000 --- a/AUTHORS +++ /dev/null @@ -1,67 +0,0 @@ - -Firedrake has been contributed to by the following: - -Institutions ------------- - -Imperial College London -University of Bath -University of Leeds -University of Oxford -Durham University - -Individuals ------------ - -Julian Andrej -S. Nic Barton -Tom Bendall -Gheorghe-Teodor Bercea -George Boutsioukis -Ed Bueler -Henrik Buesing -Justin Chang -Teodoro Fields Collin -Colin Cotter -Patrick Farrell -Simon Funke -Thomas Gibson -Tim Greaves -Alastair Gregory -David A Ham -Christopher Hawkes -Miklós Homolya -Christian Jacobs -Nick Johnson -Anna Kalogirou -Tuomas Karna -Paul H.J. Kelly -Rob Kirby -Stephan Kramer -Michael Lange -Nicolas Loriant -Fabio Luporini -Graham Markall -Geordie McBain -Andrew McRae -Lawrence Mitchell -Eike Mueller -Alberto Paganini -Francis Poulin -Florian Rathgeber -Asbjørn Nilsen Riseth -Hannah Rittich -Francis P. Russell -Thomas Roy -Tomasz Salwa -Kaho Sato -Ben Sepanski -Dan Shapero -Jemma Shipton -Tianjiao Sun -Connor Ward -Florian Wechsung -Fangyi Zhou -Cyrus Cheng -Reuben W. Nixon-Hill -Sophia Vorderwuelbecke diff --git a/AUTHORS.rst b/AUTHORS.rst new file mode 100644 index 0000000000..9b112c1bbc --- /dev/null +++ b/AUTHORS.rst @@ -0,0 +1,96 @@ +:orphan: + +.. + This file is generated by team.py using the team.rst_t template and team.ini. + DO NOT EDIT DIRECTLY + To add your name and/or institution edit the relevant sections of + docs/source/team.ini + +======= +AUTHORS +======= + +Firedrake has been contributed to by the following: + +Institutions +------------ + +Baylor University............. +Durham University............. +Imperial College London....... +University of Bath............ +University of Leeds........... +University of Oxford.......... +University of Washington...... + + +Individuals +----------- + +Julian Andrej +Nicolas Barral................ +Nicholas Barton +Tom Bendall +Doru Bercea +Jack Betteridge............... +George Boutsioukis +Nacime Bouziani............... +Romain Brault +Pablo Brubeck +Ed Bueler +Henrik Buesing +Justin Chang +Cyrus Cheng +Teodoro Fields Collin +Colin Cotter.................. +Joshua Coutinho +Patrick E. Farrell............ +Simon Funke................... +Melina Giagiozis +Thomas Gibson +Tim Greaves +Alastair Gregory +Tom Gregory................... +David Ham..................... +Christopher Hawkes +Reuben Hill................... +Miklós Homolya +Christian Jacobs +Darko Janeković +Nick Johnson +Anna Kalogirou +Paul Kelly.................... +Rob Kirby..................... +Stephan Kramer................ +Tuomas Kärnä.................. +Michael Lange................. +Nicolas Loriant +Fabio Luporini................ +Scott MacLachlan.............. +Graham Markall................ +India Marsden +Geordie McBain +Andrew McRae.................. +Oliver Meister................ +Lawrence Mitchell +Eike Mueller +Reuben W. Nixon-Hill +Alberto Paganini.............. +Francis Poulin +Florian Rathgeber............. +Asbjørn Nilsen Riseth +Hannah Rittich +Thomas Roy +Francis P. Russell +Koki Sagiyama................. +Tomasz Salwa +Kaho Sato +Ben Sepanski.................. +Daniel Shapero................ +Jemma Shipton +Tianjiao (TJ) Sun............. +Sophia Vorderwuelbecke........ +Joe Wallwork.................. +Connor Ward................... +Florian Wechsung.............. +Fangyi Zhou From f6351d019c3f9f2e8f430e207f1f99c7382898f7 Mon Sep 17 00:00:00 2001 From: JDBetteridge Date: Mon, 30 Jan 2023 12:05:39 +0000 Subject: [PATCH 11/30] Remove static team.rst file --- docs/source/authors.rst_t | 4 +-- docs/source/team.rst | 76 --------------------------------------- 2 files changed, 2 insertions(+), 78 deletions(-) delete mode 100644 docs/source/team.rst diff --git a/docs/source/authors.rst_t b/docs/source/authors.rst_t index 4175c3b59c..b73316028c 100644 --- a/docs/source/authors.rst_t +++ b/docs/source/authors.rst_t @@ -1,5 +1,3 @@ -:orphan: - .. This file is generated by team.py using the team.rst_t template and team.ini. DO NOT EDIT DIRECTLY @@ -17,6 +15,7 @@ Institutions {% for institute, ilink in institution_set %} {{ "{:.<30}<{}>".format(institute, ilink) }} + {% endfor %} @@ -29,4 +28,5 @@ Individuals {% else %} {{ name }} {% endif %} + {% endfor %} diff --git a/docs/source/team.rst b/docs/source/team.rst deleted file mode 100644 index d3d35dd02c..0000000000 --- a/docs/source/team.rst +++ /dev/null @@ -1,76 +0,0 @@ -.. raw:: latex - - \clearpage - -The Firedrake team -================== - -Firedrake is brought to you by the departments of `Mathematics -`_, `Computing -`_, and `Earth Science and -Engineering `_ at `Imperial College -London `_, the `Department of Computer -Science `_ at `Durham -University `_, the `Department of -Mathematics `_ at `Baylor University -`_, the `Applied Physics Laboratory -`_ at the `University of Washington -`_ and the broad community of Firedrake -users who contribute to its development. - -Active team members -------------------- - -.. include:: teamgrid.rst - -Former team members -------------------- - -.. include:: teaminactive.rst - - -Other contributors ------------------- - -`Nicolas Barral `_ - -Nicholas Barton - -George Boutsioukis - -Romain Brault - -Pablo Brubeck - -Joshua Coutinho - -`Patrick E. Farrell `_ - -Melina Giagiozis - -Darko Janeković - -`Tuomas Kärnä `_ - -`Stephan Kramer `_ - -Nicolas Loriant - -`Scott MacLachlan `__ - -India Marsden - -`Oliver Meister `_ - -`Alberto Paganini `_ - -Kaho Sato - -`Ben Sepanski `__ - -`Joe Wallwork `_ - -`Florian Wechsung `_ - -And more! Please contact us if you believe your name has been left off -this list in error. From 8c9f2d3040ed13088efe4afc9a97deea57cb7885 Mon Sep 17 00:00:00 2001 From: JDBetteridge Date: Mon, 30 Jan 2023 12:07:22 +0000 Subject: [PATCH 12/30] Update Patrick's website --- AUTHORS.rst | 76 ++++++++++++++++++++++++++++++++++++++++++-- docs/source/team.ini | 2 +- 2 files changed, 75 insertions(+), 3 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index 9b112c1bbc..964f86d2fb 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -1,5 +1,3 @@ -:orphan: - .. This file is generated by team.py using the team.rst_t template and team.ini. DO NOT EDIT DIRECTLY @@ -16,81 +14,155 @@ Institutions ------------ Baylor University............. + Durham University............. + Imperial College London....... + University of Bath............ + University of Leeds........... + University of Oxford.......... + University of Washington...... + Individuals ----------- Julian Andrej + Nicolas Barral................ + Nicholas Barton + Tom Bendall + Doru Bercea + Jack Betteridge............... + George Boutsioukis + Nacime Bouziani............... + Romain Brault + Pablo Brubeck + Ed Bueler + Henrik Buesing + Justin Chang + Cyrus Cheng + Teodoro Fields Collin + Colin Cotter.................. + Joshua Coutinho + Patrick E. Farrell............ + Simon Funke................... + Melina Giagiozis + Thomas Gibson + Tim Greaves + Alastair Gregory + Tom Gregory................... + David Ham..................... + Christopher Hawkes + Reuben Hill................... + Miklós Homolya + Christian Jacobs + Darko Janeković + Nick Johnson + Anna Kalogirou + Paul Kelly.................... + Rob Kirby..................... + Stephan Kramer................ + Tuomas Kärnä.................. + Michael Lange................. + Nicolas Loriant + Fabio Luporini................ + Scott MacLachlan.............. + Graham Markall................ + India Marsden + Geordie McBain + Andrew McRae.................. + Oliver Meister................ + Lawrence Mitchell + Eike Mueller + Reuben W. Nixon-Hill + Alberto Paganini.............. + Francis Poulin + Florian Rathgeber............. + Asbjørn Nilsen Riseth + Hannah Rittich + Thomas Roy + Francis P. Russell + Koki Sagiyama................. + Tomasz Salwa + Kaho Sato + Ben Sepanski.................. + Daniel Shapero................ + Jemma Shipton + Tianjiao (TJ) Sun............. + Sophia Vorderwuelbecke........ + Joe Wallwork.................. + Connor Ward................... + Florian Wechsung.............. + Fangyi Zhou + diff --git a/docs/source/team.ini b/docs/source/team.ini index a7742be466..d4f46ff47a 100644 --- a/docs/source/team.ini +++ b/docs/source/team.ini @@ -82,7 +82,7 @@ Cyrus Cheng: Teodoro Fields Collin: Colin Cotter: Joshua Coutinho: -Patrick E. Farrell: https://www.maths.ox.ac.uk/people/patrick.farrell +Patrick E. Farrell: https://pefarrell.org Simon Funke: Melina Giagiozis: Thomas Gibson: From 768ca54615f5760532b700def96e3b1cf5e44e2c Mon Sep 17 00:00:00 2001 From: JDBetteridge Date: Mon, 30 Jan 2023 14:32:34 +0000 Subject: [PATCH 13/30] More tweaking --- AUTHORS.rst | 6 +- demos/benney_luke/benney_luke.py.rst | 16 ++++-- .../linear_fluid_structure_interaction.py.rst | 19 ++++--- docs/source/conf.py | 57 ++++++++++--------- docs/source/team.ini | 5 +- docs/source/team.rst_t | 2 - firedrake/preconditioners/pcd.py | 5 +- firedrake/slate/slate.py | 10 ++-- .../slate/static_condensation/la_utils.py | 8 +-- 9 files changed, 71 insertions(+), 57 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index 964f86d2fb..5be0f65e4b 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -66,7 +66,7 @@ Colin Cotter.................. Joshua Coutinho -Patrick E. Farrell............ +Patrick E. Farrell............ Simon Funke................... @@ -84,8 +84,6 @@ David Ham..................... Christopher Hawkes -Reuben Hill................... - Miklós Homolya Christian Jacobs @@ -126,7 +124,7 @@ Lawrence Mitchell Eike Mueller -Reuben W. Nixon-Hill +Reuben Nixon-Hill............. Alberto Paganini.............. diff --git a/demos/benney_luke/benney_luke.py.rst b/demos/benney_luke/benney_luke.py.rst index 609cd43682..2307814e2a 100644 --- a/demos/benney_luke/benney_luke.py.rst +++ b/demos/benney_luke/benney_luke.py.rst @@ -53,10 +53,18 @@ Note that the Neumann boundary conditions have been used to remove every surface .. math:: - \int_{\Omega} \frac{\phi^{n+1/2}-\phi^n}{\frac{1}{2}\!dt}\,v + \frac{\mu}{2}\nabla\left(\frac{\phi^{n+1/2}-\phi^n}{\frac{1}{2}\!dt}\right)\cdot\nabla v + \eta^n\,v + \frac{\epsilon}{2}\nabla\phi^{n+1/2}\cdot\nabla\phi^{n+1/2}\,v \,dx\,dy &= 0 \\ - \int_{\Omega} q^{n+1/2}\,v - \frac{2}{3}\nabla\phi^{n+1/2}\cdot\nabla v \,dx\,dy &= 0 \\ - \int_{\Omega} \frac{\eta^{n+1}-\eta^n}{dt}\,v + \frac{\mu}{2}\nabla\left(\frac{\eta^{n+1}-\eta^n}{dt}\right)\cdot\nabla v - \frac{1}{2}\Bigl( \left(1+\epsilon\eta^{n+1}\right) + \left(1+\epsilon\eta^n\right) \Bigr)\nabla\phi^{n+1/2}\cdot\nabla v - \mu\nabla q^{n+1/2}\cdot\nabla v \,dx\,dy &= 0 \\ - \int_{\Omega} \frac{\phi^{n+1}-\phi^{n+1/2}}{\frac{1}{2}\!dt}\,v + \frac{\mu}{2}\nabla\left(\frac{\phi^{n+1}-\phi^{n+1/2}}{\frac{1}{2}\!dt}\right)\cdot\nabla v + \eta^{n+1}\,v + \frac{\epsilon}{2}\nabla\phi^{n+1/2}\cdot\nabla\phi^{n+1/2}\,v \,dx\,dy &= 0 \\ + \int_{\Omega} \frac{\phi^{n+1/2}-\phi^n}{\frac{1}{2}\!dt}\,v + \frac{\mu}{2}\nabla\left(\frac{\phi^{n+1/2}-\phi^n}{\frac{1}{2}\!dt}\right)\cdot\nabla v \hspace{8em}\\ + + \eta^n\,v + \frac{\epsilon}{2}\nabla\phi^{n+1/2}\cdot\nabla\phi^{n+1/2}\,v \,dx\,dy &= 0 \\\\ + % + \int_{\Omega} q^{n+1/2}\,v - \frac{2}{3}\nabla\phi^{n+1/2}\cdot\nabla v \,dx\,dy &= 0 \\\\ + % + \int_{\Omega} \frac{\eta^{n+1}-\eta^n}{dt}\,v + \frac{\mu}{2}\nabla\left(\frac{\eta^{n+1}-\eta^n}{dt}\right)\cdot\nabla v \hspace{8em}\\ + - \frac{1}{2}\Bigl( \left(1+\epsilon\eta^{n+1}\right) + \left(1+\epsilon\eta^n\right) \Bigr)\nabla\phi^{n+1/2}\cdot\nabla v \hspace{4em}\\ + - \mu\nabla q^{n+1/2}\cdot\nabla v \,dx\,dy &= 0 \\\\ + % + \int_{\Omega} \frac{\phi^{n+1}-\phi^{n+1/2}}{\frac{1}{2}\!dt}\,v + \frac{\mu}{2}\nabla\left(\frac{\phi^{n+1}-\phi^{n+1/2}}{\frac{1}{2}\!dt}\right)\cdot\nabla v \hspace{8em}\\ + + \eta^{n+1}\,v + \frac{\epsilon}{2}\nabla\phi^{n+1/2}\cdot\nabla\phi^{n+1/2}\,v \,dx\,dy &= 0 \\\\ + % \int_{\Omega} q^{n+1}\,v - \frac{2}{3}\nabla\phi^{n+1}\cdot\nabla v \,dx\,dy &= 0. Furthermore, we note that the Benney-Luke equations admit asymptotic solutions (correct up to order :math:`\epsilon`). The "exact" solutions can be found by assuming one-dimensional travelling waves of the type diff --git a/demos/linear_fluid_structure_interaction/linear_fluid_structure_interaction.py.rst b/demos/linear_fluid_structure_interaction/linear_fluid_structure_interaction.py.rst index e2ddb40b49..0c2711f08e 100644 --- a/demos/linear_fluid_structure_interaction/linear_fluid_structure_interaction.py.rst +++ b/demos/linear_fluid_structure_interaction/linear_fluid_structure_interaction.py.rst @@ -39,13 +39,18 @@ After numerous manipulations (described in detail in :cite:`Salwa:2017`) and eva .. math:: \begin{aligned} - & \int v \phi^{n+1} \, {\mathrm d} S_f = \int v (\phi^n - \Delta t \eta^n) \, {\mathrm d} S_f \\ - & \int \rho_0 {\bf v} \cdot {\bf U}^{n+1} \, {\mathrm d} x_S \underline{ + \int {\bf n} \cdot {\bf v} \, \phi^{n+1} \, {\mathrm d} s_s} = \rho_0 \int {\bf v} \cdot {\bf U}^n \, {\mathrm d} x_S \nonumber\\ - & \hspace{5cm} - \Delta t \int \left( \lambda \nabla \cdot {\bf v} \nabla \cdot {\bf X}^n + \mu \frac{\partial X^n_j}{\partial x_i} \left( \frac{\partial v_i}{\partial x_j} + \frac{\partial v_j}{\partial x_i} \right) \right) \, {\mathrm d} x_S \underline{ + \int {\bf n} \cdot {\bf v} \, \phi^n \, {\mathrm d} s_s } - \\ - & \int \nabla v \cdot \nabla \phi^{n+1} \, {\mathrm d} x_F \underline{ - \int v {\bf n} \cdot {\bf U}^{n+1} \, {\mathrm d} s_s }= 0 \\ %\hspace{1cm} (+ \text{Dirichlet BC at } \partial \Omega_f)\\ - & \int v \eta^{n+1} \, {\mathrm d} S_f = \int v \eta^n \, {\mathrm d} S_f + \Delta t \int \nabla v \cdot \nabla \phi^{n+1} \, {\mathrm d} x_F \underline{ - \Delta t \int v {\bf n} \cdot {\bf U}^{n+1}\, {\mathrm d} s_s }\\ - & \int {\bf v} \cdot {\bf X}^{n+1} \, {\mathrm d} x_S = \int {\bf v} \cdot ( {\bf X}^n + \Delta t {\bf U}^{n+1} ) \, {\mathrm d} x_S \, . + \int v \phi^{n+1} \, {\mathrm d} S_f &= \int v (\phi^n - \Delta t \eta^n) \, {\mathrm d} S_f \\\\ + % + \int \rho_0 {\bf v} \cdot {\bf U}^{n+1} \, {\mathrm d} x_S\ \underline{+ \int {\bf n} \cdot {\bf v} \, \phi^{n+1} \, {\mathrm d} s_s} &= \rho_0 \int {\bf v} \cdot {\bf U}^n \, {\mathrm d} x_S \nonumber\\ + &\hspace{4em}- \Delta t \int \left( \lambda \nabla \cdot {\bf v} \nabla \cdot {\bf X}^n + \mu \frac{\partial X^n_j}{\partial x_i} \left( \frac{\partial v_i}{\partial x_j} + \frac{\partial v_j}{\partial x_i} \right) \right) \, {\mathrm d} x_S \\ + &\hspace{8em}\underline{ + \int {\bf n} \cdot {\bf v} \, \phi^n \, {\mathrm d} s_s }\\\\ + % + \int \nabla v \cdot \nabla \phi^{n+1} \, {\mathrm d} x_F\ \underline{- \int v {\bf n} \cdot {\bf U}^{n+1} \, {\mathrm d} s_s } &= 0 \\\\ %\hspace{1cm} (+ \text{Dirichlet BC at } \partial \Omega_f)\\ + % + \int v \eta^{n+1} \, {\mathrm d} S_f &= \int v \eta^n \, {\mathrm d} S_f + \Delta t \int \nabla v \cdot \nabla \phi^{n+1} \, {\mathrm d} x_F\\ + &\hspace{4em}\underline{- \Delta t \int v {\bf n} \cdot {\bf U}^{n+1}\, {\mathrm d} s_s }\\\\ + % + \int {\bf v} \cdot {\bf X}^{n+1} \, {\mathrm d} x_S &= \int {\bf v} \cdot ( {\bf X}^n + \Delta t {\bf U}^{n+1} ) \, {\mathrm d} x_S \, . \end{aligned} The underlined terms are the coupling terms. Note that the first equation for :math:`\phi` at the free surface is solved on the free surface only, the last equation for :math:`{\bf X}` in the structure domain, while the others are solved in both domains. Moreover, the second and third equations for :math:`\phi` and :math:`{\bf U}` need to be solved simultaneously. The geometry of the system with initial condition is shown below. diff --git a/docs/source/conf.py b/docs/source/conf.py index 4303a6e168..7ae7618568 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -23,21 +23,23 @@ # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc', - 'sphinx.ext.mathjax', - 'sphinx.ext.intersphinx', - 'sphinx.ext.viewcode', - 'sphinx.ext.graphviz', - 'sphinxcontrib.youtube', - 'sphinxcontrib.bibtex', - 'sphinxcontrib.inkscapeconverter', - 'numpydoc'] +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx.ext.mathjax', + 'sphinx.ext.intersphinx', + 'sphinx.ext.viewcode', + 'sphinx.ext.graphviz', + 'sphinxcontrib.youtube', + 'sphinxcontrib.bibtex', + 'sphinxcontrib.inkscapeconverter', + 'numpydoc' +] mathjax_path = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.2/es5/tex-mml-chtml.min.js' mathjax3_config = { - 'loader': {'load': ['[tex]/mathtools']}, - 'tex': {'packages': {'[+]': ['mathtools']}} + 'loader': {'load': ['[tex]/mathtools']}, + 'tex': {'packages': {'[+]': ['mathtools']}} } # Both the class’ and the __init__ method’s docstring are concatenated and @@ -197,12 +199,9 @@ # -- Options for LaTeX output -------------------------------------------- -# ~ latex_engine = 'lualatex' -# ~ latex_use_xindy = False - latex_additional_files = [ - '_static/sphinxpoptitle.sty' - ] + '_static/sphinxpoptitle.sty' +] latex_elements = { # The paper size ('letterpaper' or 'a4paper'). @@ -245,14 +244,15 @@ 'extrapackages': r'''\usepackage{mathtools}''', - 'maketitle' : r'\sphinxpoptitlepages' + 'maketitle': r'\sphinxpoptitlepages', + + 'makeindex': r'\usepackage[columns=1]{idxlayout}\makeindex' } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('book', 'Firedrake.tex', u'User Manual', - ' \\and '.join(author_list), 'manual'), + ('book', 'Firedrake.tex', u'User Manual', r' \and '.join(author_list), 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -261,7 +261,7 @@ # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. -#latex_use_parts = True +#latex_use_parts = False # If true, show page references after internal links. #latex_show_pagerefs = False @@ -282,8 +282,7 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'firedrake', u'Firedrake Documentation', - author, 1) + ('index', 'firedrake', u'Firedrake Documentation', author, 1) ] # If true, show URL addresses after external links. @@ -295,11 +294,15 @@ # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) -texinfo_documents = [ - ('index', 'Firedrake', u'Firedrake Documentation', - author, 'Firedrake', 'One line description of project.', - 'Miscellaneous'), -] +texinfo_documents = [( + 'index', + 'Firedrake', + u'Firedrake Documentation', + author, + 'Firedrake', + 'One line description of project.', + 'Miscellaneous' +),] # Documents to append as an appendix to all manuals. #texinfo_appendices = [] diff --git a/docs/source/team.ini b/docs/source/team.ini index d4f46ff47a..2528e5a200 100644 --- a/docs/source/team.ini +++ b/docs/source/team.ini @@ -1,4 +1,5 @@ [a] +# A section for short links icl: http://www.imperial.ac.uk gh: https://github.com @@ -43,7 +44,7 @@ Sophia Vorderwuelbecke: https://www.imperial.ac.uk/people/s.vorderwuelbecke18 Tom Gregory: https://www.imperial.ac.uk/people/t.gregory18 Jack Betteridge: https://www.imperial.ac.uk/people/j.betteridge, https://upload.wikimedia.org/wikipedia/commons/thumb/a/a1/Mallard2.jpg/632px-Mallard2.jpg Daniel Shapero: http://psc.apl.uw.edu/people/investigators/daniel-shapero/ -Reuben Hill: https://www.imperial.ac.uk/people/reuben.hill10 +Reuben Nixon-Hill: https://www.imperial.ac.uk/people/reuben.hill10 Connor Ward: https://www.imperial.ac.uk/people/c.ward20 [inactive-team] @@ -110,7 +111,7 @@ Andrew McRae: Oliver Meister: https://www5.in.tum.de/wiki/index.php/Dipl.-Inf._Oliver_Meister Lawrence Mitchell: Eike Mueller: -Reuben W. Nixon-Hill: +Reuben Nixon-Hill: Alberto Paganini: https://www2.le.ac.uk/departments/mathematics/extranet/staff-material/staff-profiles/alberto-paganini Francis Poulin: Florian Rathgeber: diff --git a/docs/source/team.rst_t b/docs/source/team.rst_t index 0bf273d92b..3d52bb15c5 100644 --- a/docs/source/team.rst_t +++ b/docs/source/team.rst_t @@ -1,5 +1,3 @@ -:orphan: - .. This file is generated by team.py using the team.rst_t template and team.ini. DO NOT EDIT DIRECTLY diff --git a/firedrake/preconditioners/pcd.py b/firedrake/preconditioners/pcd.py index 8ceebae391..978000e930 100644 --- a/firedrake/preconditioners/pcd.py +++ b/firedrake/preconditioners/pcd.py @@ -17,8 +17,9 @@ class PCDPC(PCBase): S^{-1} \sim K^{-1} F_p M^{-1} - Where :math:`K = \\nabla^2`, :math:`M = \mathbb{I}` and - :math:`F_p = 1/\mathrm{Re} \\nabla^2 + u\cdot\\nabla`. + Where :math:`K = \nabla^2`, + :math:`F_p = (1/\mathrm{Re}) \nabla^2 + u\cdot\nabla` + and :math:`M = \mathbb{I}`. The inverse of :math:`K` is approximated by a KSP which can be controlled using the options prefix ``pcd_Kp_``. diff --git a/firedrake/slate/slate.py b/firedrake/slate/slate.py index 03311c47d8..f2f2b034e7 100644 --- a/firedrake/slate/slate.py +++ b/firedrake/slate/slate.py @@ -570,7 +570,7 @@ def _key(self): class Block(TensorBase): - """This class represents a tensor corresponding + r"""This class represents a tensor corresponding to particular block of a mixed tensor. Depending on the indices provided, the subblocks can span multiple test/trial spaces. @@ -600,21 +600,21 @@ class Block(TensorBase): .. math:: - \\begin{bmatrix} + \begin{bmatrix} A & B & C \\ D & E & F \\ G & H & J - \\end{bmatrix} + \end{bmatrix} Providing the 2-tuple ((0, 1), (0, 1)) returns a tensor corresponding to the upper 2x2 block: .. math:: - \\begin{bmatrix} + \begin{bmatrix} A & B \\ D & E - \\end{bmatrix} + \end{bmatrix} More generally, argument indices of the form `(idr, idc)` produces a tensor of block-size `len(idr)` x `len(idc)` diff --git a/firedrake/slate/static_condensation/la_utils.py b/firedrake/slate/static_condensation/la_utils.py index 96dd84e349..0748558a77 100644 --- a/firedrake/slate/static_condensation/la_utils.py +++ b/firedrake/slate/static_condensation/la_utils.py @@ -454,10 +454,10 @@ def build_schur(self, rhs, non_zero_saddle_rhs=None): .. code-block:: text - A.inv = [[I, -A00.inv * A01] * [[A00.inv, 0 ] * [[I, 0] - [0, I ]] [0, S.inv]] [-A10* A00.inv, I]] - -------------------- ----------------- ------------------- - block1 block2 block3 + A.inv=[[I, -A00.inv * A01] * [[A00.inv, 0 ] * [[I, 0] + [0, I ]] [0, S.inv]] [-A10* A00.inv, I]] + -------------------- ----------------- ------------------ + block1 block2 block3 with the (inner) schur complement S = A11 - A10 * A00.inv * A01 """ From bda233ede918e3ae8c15c9c5dad17eb1ff8633b3 Mon Sep 17 00:00:00 2001 From: JDBetteridge Date: Mon, 30 Jan 2023 15:21:11 +0000 Subject: [PATCH 14/30] Remove dead lines from Makefile --- docs/Makefile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 3b7fe23738..86d8fd8515 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -73,12 +73,6 @@ copy_demos: source/element_list.csv: source/element_list.py cd source; python element_list.py -#~ source/teamgrid.rst: source/team.py -#~ cd source; python team.py teamgrid.rst - -#~ source/teaminactive.rst: source/team.py -#~ cd source; python team.py teaminactive.rst - source/team.rst: source/team2.py cd source; python team2.py; mv AUTHORS.rst ../.. From 188957ef5647ee4a49f64f44b15ea14c4f25dc13 Mon Sep 17 00:00:00 2001 From: JDBetteridge Date: Thu, 2 Feb 2023 10:59:57 +0000 Subject: [PATCH 15/30] Add Patrick, Pablo and India to active dev team, Oxford to dev institutions --- AUTHORS.rst | 2 +- docs/source/authors.rst_t | 2 +- docs/source/team.ini | 10 ++++++---- docs/source/team.rst_t | 8 ++++---- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index 5be0f65e4b..7d7ae613a4 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -112,7 +112,7 @@ Scott MacLachlan.............. Graham Markall................ -India Marsden +India Marsden................. Geordie McBain diff --git a/docs/source/authors.rst_t b/docs/source/authors.rst_t index b73316028c..298e583fd3 100644 --- a/docs/source/authors.rst_t +++ b/docs/source/authors.rst_t @@ -23,7 +23,7 @@ Individuals ----------- {% for name, link in individual_set %} -{% if link %} +{% if link.split(',')[0] %} {{ "{:.<30}<{}>".format(name, link.split(',')[0]) }} {% else %} {{ name }} diff --git a/docs/source/team.ini b/docs/source/team.ini index 2528e5a200..b21f28f081 100644 --- a/docs/source/team.ini +++ b/docs/source/team.ini @@ -12,7 +12,7 @@ gh: https://github.com # [institution] # department: website Imperial College London: http://www.imperial.ac.uk -Durham University: https://www.durham.ac.uk +University of Oxford: https://www.ox.ac.uk Baylor University: https://www.baylor.edu University of Washington: http://www.washington.edu @@ -21,8 +21,8 @@ Department of Mathematics: ${a:icl}/mathematics Department of Computing: ${a:icl}/computing Department of Earth Science and Engineering: ${a:icl}/ese -[Durham University] -Department of Computer Science: ${dev-institution:Durham University}/computer.science +[University of Oxford] +Mathematical Institute: https://www.maths.ox.ac.uk [Baylor University] Department of Mathematics: ${dev-institution:Baylor University}/math @@ -46,6 +46,9 @@ Jack Betteridge: https://www.imperial.ac.uk/people/j.betteridge, https://upload. Daniel Shapero: http://psc.apl.uw.edu/people/investigators/daniel-shapero/ Reuben Nixon-Hill: https://www.imperial.ac.uk/people/reuben.hill10 Connor Ward: https://www.imperial.ac.uk/people/c.ward20 +Patrick E. Farrell: https://pefarrell.org, https://pefarrell.org/images/profile.jpg +Pablo Brubeck: , https://pefarrell.org/images/brubeck.jpg +India Marsden: https://www.maths.ox.ac.uk/people/india.marsden, https://pefarrell.org/images/marsden.jpg [inactive-team] Thomas Gibson: @@ -83,7 +86,6 @@ Cyrus Cheng: Teodoro Fields Collin: Colin Cotter: Joshua Coutinho: -Patrick E. Farrell: https://pefarrell.org Simon Funke: Melina Giagiozis: Thomas Gibson: diff --git a/docs/source/team.rst_t b/docs/source/team.rst_t index 3d52bb15c5..4726e7fd90 100644 --- a/docs/source/team.rst_t +++ b/docs/source/team.rst_t @@ -45,7 +45,7 @@ Active team members {{ ("-" * coldashes).join("+" * (atable.ncols + 1)) }} {% for ii in atable.rows %} |{% for jj in atable.cols %} -{% if atable[ii, jj][1] %} +{% if atable[ii, jj][1].split(",")[0] %} {{ template.format(" |{}|_".format(atable[ii, jj][0])) }}{% elif atable[ii, jj][0] %} {{ template.format(" |{}|".format(atable[ii, jj][0])) }}{% else %} {{ " "*coldashes }}{% endif %} @@ -54,7 +54,7 @@ Active team members |{% for jj in atable.cols %}{{ " "*coldashes }}|{% endfor %} |{% for jj in atable.cols %} -{% if atable[ii, jj][1] %} +{% if atable[ii, jj][1].split(",")[0] %} {{ template.format(" `{}`_".format(atable[ii, jj][0])) }}{% elif atable[ii, jj][0] %} {{ template.format(" {}".format(atable[ii, jj][0])) }}{% else %} {{ " "*coldashes }}{% endif %} @@ -83,7 +83,7 @@ Former team members {{ ("-" * coldashes).join("+" * (itable.ncols + 1)) }} {% for ii in itable.rows %} |{% for jj in itable.cols %} -{% if itable[ii, jj][1] %} +{% if itable[ii, jj][1].split(",")[0] %} {{ template.format(" |{}|_".format(itable[ii, jj][0])) }}{% elif itable[ii, jj][0] %} {{ template.format(" |{}|".format(itable[ii, jj][0])) }}{% else %} {{ " "*coldashes }}{% endif %} @@ -92,7 +92,7 @@ Former team members |{% for jj in itable.cols %}{{ " "*coldashes }}|{% endfor %} |{% for jj in itable.cols %} -{% if itable[ii, jj][1] %} +{% if itable[ii, jj][1].split(",")[0] %} {{ template.format(" `{}`_".format(itable[ii, jj][0])) }}{% elif itable[ii, jj][0] %} {{ template.format(" {}".format(itable[ii, jj][0])) }}{% else %} {{ " "*coldashes }}{% endif %} From 1253388a7b71f4fdd4151712ae2098ad1327f3d7 Mon Sep 17 00:00:00 2001 From: JDBetteridge Date: Thu, 2 Feb 2023 11:44:38 +0000 Subject: [PATCH 16/30] Update funding page --- docs/source/funding.rst | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/docs/source/funding.rst b/docs/source/funding.rst index bb3c90912f..5fb89cbd0f 100644 --- a/docs/source/funding.rst +++ b/docs/source/funding.rst @@ -34,27 +34,39 @@ and in particular by the following grants: -.. only:: latex +.. only:: latex Firedrake is supported by Imperial College London, the Grantham Institute for Climate Change, the Engineering and Physical Sciences Research Council and the Natural Environment research council. +.. + Please do not add links to grants as they rapidly become dead links + +EPSRC Grant EP/W026066/1 and EP/W026163/1 + SysGenX: Composable software generation for system-level simulation at Exascale +EPSRC Grant EP/W029731/1 + Firedrake: high performance, high productivity simulation for the continuum mechanics community. +EPSRC Grant EP/V033883/1 + [D*]stratify: harnessing energetics to control thermally stratified fluids +EPSRC Grant EP/R029423/1 + PRISM: Platform for Research In Simulation Methods + +Previous support was provided by: -EPSRC grant `EP/M011054/1 `_: +EPSRC Grant EP/V001493/1 + Gen X: ExCALIBUR working group on Exascale continuum mechanics through code generation +EPSRC grant EP/M011054/1 A new simulation and optimisation platform for marine technology. -NERC fellowship `NE/K008951/1 `_: +NERC fellowship NE/K008951/1 Abstracting the environment: automating geoscientific simulation. -NERC grant `NE/K006789/1 `_: +NERC grant NE/K006789/1 Gung Ho Phase 2 - developing a new UK weather and climate model. -EPSRC grant `EP/L000407/1 `_: +EPSRC grant EP/L000407/1 Platform: underpinning technologies for finite element simulation. -EPSRC Grant `EP/K008730/1 `_: +EPSRC Grant EP/K008730/1 PAMELA: a Panoramic Approach to the Many-CorE LAnd-sape - from end-user to end-device: a holistic game-changing approach. - -Previous support was provided by: - -EPSRC Grant `EP/I00677X/1 `_: +EPSRC Grant EP/I00677X/1 Multi-layered abstractions for PDEs. -NERC studentship `NE/G523512/1 `_: +NERC studentship NE/G523512/1 Multi-layered abstractions for PDEs. From f577d302654a91df502c2fe6641a762b8247002a Mon Sep 17 00:00:00 2001 From: JDBetteridge Date: Thu, 2 Feb 2023 15:34:03 +0000 Subject: [PATCH 17/30] Tidy front page --- docs/source/_static/sphinxpoptitle.sty | 15 ++++++++++----- docs/source/conf.py | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/source/_static/sphinxpoptitle.sty b/docs/source/_static/sphinxpoptitle.sty index a2fc59b029..7f2002db96 100644 --- a/docs/source/_static/sphinxpoptitle.sty +++ b/docs/source/_static/sphinxpoptitle.sty @@ -17,6 +17,7 @@ \RequirePackage{fmtcount} \RequirePackage{hyperref} \RequirePackage{titling} +\RequirePackage{multicol} \RequirePackage{sphinx} \newcommand{\editions}{} @@ -47,18 +48,21 @@ } \dolistloop{\editions} -\begin{textblock}{154}(17.5,74.25) - \setlength{\parskip}{2ex} - +\begin{textblock}{116}(17.5,17.5) \sphinxlogo - \vspace{7\parskip} +\end{textblock} +\begin{textblock}{154}(17.5,74.25) {\sffamily\fontsize{25}{30}\selectfont\noindent\thetitle} {\sffamily\fontsize{17}{20}\selectfont\noindent\thesubtitle \vspace{\parskip} - \noindent\Large\theauthor + {\noindent\Large + \begin{multicols}{2} + \theauthor + \end{multicols} + } \vspace{7\parskip} \noindent{\itshape\thisedition}} @@ -81,6 +85,7 @@ \doclicenseThis } \end{textblock} + \mbox{} \setcounter{page}{0} \thispagestyle{empty} diff --git a/docs/source/conf.py b/docs/source/conf.py index 7ae7618568..634bc6d5dc 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -252,7 +252,7 @@ # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('book', 'Firedrake.tex', u'User Manual', r' \and '.join(author_list), 'manual'), + ('book', 'Firedrake.tex', u'User Manual', r' \and \\'.join(author_list), 'manual'), ] # The name of an image file (relative to this directory) to place at the top of From dc164a7e10b326d2564855baa254fbe0ab6cb3d9 Mon Sep 17 00:00:00 2001 From: JDBetteridge Date: Thu, 2 Feb 2023 17:53:57 +0000 Subject: [PATCH 18/30] Fixed broken links in documentation --- docs/source/checkpointing.rst | 10 +++++----- docs/source/citing.rst | 2 +- docs/source/conf.py | 4 ++++ docs/source/extruded-meshes.rst | 4 ++-- docs/source/interpolation.rst | 21 +++++++++++---------- docs/source/matrix-free.rst | 2 +- docs/source/parallelism.rst | 8 ++++---- docs/source/point-evaluation.rst | 2 +- docs/source/r-space.rst | 4 ++-- docs/source/variational-problems.rst | 4 ++-- docs/source/visualisation.rst | 6 +++--- 11 files changed, 36 insertions(+), 31 deletions(-) diff --git a/docs/source/checkpointing.rst b/docs/source/checkpointing.rst index 63e5f89470..6cf9d9f933 100644 --- a/docs/source/checkpointing.rst +++ b/docs/source/checkpointing.rst @@ -15,7 +15,7 @@ Checkpointing with CheckpointFile ================================= :class:`~.CheckpointFile` class facilitates saving/loading meshes and -:class:`~.Function` s to/from an HDF5_ file. +:class:`~.Function` s to/from an HDF5_ file. The implementation is scalable in that :class:`~.Function` s are saved to and loaded from the file entirely in parallel without needing to pass through a single process. @@ -175,7 +175,7 @@ following. with CheckpointFile("example.h5", 'r') as afile: mesh = afile.load_mesh("meshA") f = afile.load_function(mesh, "f") - g = afile.load_function(mesh, "g") + g = afile.load_function(mesh, "g") Note that one needs to load the mesh before loading the :class:`~.Function` s that are defined on it. If the default mesh name, :data:`~.DEFAULT_MESH_NAME`, @@ -308,7 +308,7 @@ Storing data Once a checkpoint file is opened, :class:`~.Function` data can be stored in the checkpoint using :meth:`~.DumbCheckpoint.store`. A :class:`~.Function` is referenced in the checkpoint file by its -:meth:`~.Function.name`, but this may be overridden by explicitly +``Function.name``, but this may be overridden by explicitly passing an optional `name` argument. For example, to store a :class:`~.Function` using its default name use: @@ -339,7 +339,7 @@ Once a checkpoint is created, we can use it to load saved state into :class:`~.Function`\s to resume a simulation. To load data into a :class:`~.Function` from a checkpoint, we pass it to :meth:`~.DumbCheckpoint.load`. As before, the data is looked up by -its :meth:`~.Function.name`, although once again this may be +its ``Function.name``, although once again this may be overridden by optionally specifying the ``name`` as an argument. For example, assume we had previously saved a checkpoint containing @@ -510,7 +510,7 @@ correctly following the instructions for custom installation here_. .. warning:: - Calling :py:meth:`h5py:File.close` on the h5py representation will + Calling :py:meth:`h5py.File.close` on the h5py representation will likely result in errors inside PETSc (since it is not aware that the file has been closed). So don't do that! diff --git a/docs/source/citing.rst b/docs/source/citing.rst index 2747eb97b4..a98622c76d 100644 --- a/docs/source/citing.rst +++ b/docs/source/citing.rst @@ -12,7 +12,7 @@ would cite the relevant papers. The simplest way to determine what these are is by asking Firedrake itself. You can ask that a list of citations relevant to your computation be printed when exiting by calling -:meth:`.Citations.print_at_exit` after importing Firedrake:: +``.Citations.print_at_exit`` after importing Firedrake:: from firedrake import * diff --git a/docs/source/conf.py b/docs/source/conf.py index 634bc6d5dc..d6ee5cf396 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -116,6 +116,9 @@ # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] +# Warn about all references where the target cannot be found +nitpicky = True + # -- Options for HTML output --------------------------------------------- @@ -322,6 +325,7 @@ 'matplotlib': ('https://matplotlib.org/', None), 'python': ('https://docs.python.org/3/', None), 'pyadjoint': ('https://www.dolfin-adjoint.org/en/latest/', None), + 'numpy': ('https://numpy.org/doc/stable/', None), } # -- Options for sphinxcontrib.bibtex ------------------------------------ diff --git a/docs/source/extruded-meshes.rst b/docs/source/extruded-meshes.rst index b8f45238eb..8540b194b8 100644 --- a/docs/source/extruded-meshes.rst +++ b/docs/source/extruded-meshes.rst @@ -258,7 +258,7 @@ offset cells must, at least, share a vertex with some other cell. the parallel distribution). For more details on the implementation, see -:mod:`firedrake.extrusion_numbering`. +:mod:`firedrake.cython.extrusion_numbering`. Function Spaces on Extruded Meshes @@ -368,7 +368,7 @@ The ``HDivElement`` and ``HCurlElement`` operators ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ For moderately complicated vector-valued elements, -:py:class:`~ufl.finiteelement.outerproductelement.TensorProductElement` +:py:class:`~ufl.finiteelement.tensorproductelement.TensorProductElement` does not give enough information to unambiguously produce the desired space. As an example, consider the lowest-order *Raviart-Thomas* element on a quadrilateral. The degrees of freedom live on the facets, and consist of diff --git a/docs/source/interpolation.rst b/docs/source/interpolation.rst index 3ae1881e71..90d7e68b8a 100644 --- a/docs/source/interpolation.rst +++ b/docs/source/interpolation.rst @@ -41,7 +41,7 @@ including: :py:class:`~.Function`\s, and :py:class:`~.Constant`\s. * Literal numbers, basic arithmetic operations, and also mathematical functions such as ``sin``, ``cos``, ``sqrt``, ``abs``, etc. -* Conditional expressions using UFL :py:class:`~ufl.conditional`. +* Conditional expressions using UFL :py:mod:`~ufl.conditional`. * Compound expressions involving any of the above. Here is an example demonstrating some of these features: @@ -187,7 +187,7 @@ Python expression classes now been removed. Users should use UFL expressions instead. This section only remains to assist in the transition of existing code. -Since Python :py:class:`~.Expression` classes expressions are +Since Python ``Expression`` classes expressions are deprecated, below are a few examples on how to replace them with UFL expressions: @@ -208,18 +208,13 @@ expressions: f.interpolate(dot(x, x)) -.. _math.h: http://en.cppreference.com/w/c/numeric/math -.. _UFL: http://fenics-ufl.readthedocs.io/en/latest/ -.. _TSFC: https://github.com/firedrakeproject/tsfc - - Generating Functions with randomised values ------------------------------------------- -The :py:mod:`~.randomfunctiongen` module wraps the external package `randomgen `__, +The :py:mod:`~.randomfunctiongen` module wraps the external numpy package `numpy.random`_, which gives Firedrake users an easy access to many stochastically sound random number generators, -including :py:class:`~.PCG64`, :py:class:`~.Philox`, and :py:class:`~.ThreeFry`, which are parallel-safe. -All distribution methods defined in `randomgen `__ +including :py:class:`~numpy.random.PCG64`, :py:class:`~numpy.random.Philox`, and :py:class:`~numpy.random.SFC64`, which are parallel-safe. +All distribution methods defined in `numpy.random`_, are made available, and one can pass a :class:`.FunctionSpace` to most of these methods to generate a randomised :class:`.Function`. @@ -237,3 +232,9 @@ to generate a randomised :class:`.Function`. # produces: # [0.56462514 0.11585311 0.01247943 0.398984 0.19097059 0.5446709 0.1078666 0.2178807 0.64848515] + + +.. _math.h: http://en.cppreference.com/w/c/numeric/math +.. _UFL: http://fenics-ufl.readthedocs.io/en/latest/ +.. _TSFC: https://github.com/firedrakeproject/tsfc +.. _numpy.random: https://numpy.org/doc/stable/reference/random/index.html diff --git a/docs/source/matrix-free.rst b/docs/source/matrix-free.rst index 18ebee89f5..f97062872b 100644 --- a/docs/source/matrix-free.rst +++ b/docs/source/matrix-free.rst @@ -42,7 +42,7 @@ Splitting unassembled matrices For the purposes of fieldsplit preconditioners, the PETSc matrix object must be able to extract submatrices. For unassembled matrices, this is achieved through a specialized -:meth:`.ImplicitMatrixContext.getSubMatrix` method that partitions +:meth:`.ImplicitMatrixContext.createSubMatrix` method that partitions the UFL form defining the operator into pieces corresponding to the integer labels of the unknown fields. This is in contrast to the normal splitting of assembled matrices which operates diff --git a/docs/source/parallelism.rst b/docs/source/parallelism.rst index 279734a4af..70fc119e98 100644 --- a/docs/source/parallelism.rst +++ b/docs/source/parallelism.rst @@ -118,10 +118,10 @@ different simulations on the two halves we would write. ... To access the communicator a mesh was created on, we can use the -:attr:`~.mesh.comm` property, or the function :func:`~.mesh.mpi_comm`. +``mesh.comm`` property, or the function ``mesh.mpi_comm``. .. warning:: - Do not use the internal :attr:`~.mesh._comm` attribute for communication. + Do not use the internal ``mesh._comm`` attribute for communication. This communicator is for internal Firedrake MPI communication only. @@ -177,7 +177,7 @@ and functions derived from the mesh. V = FunctionSpace(mesh, "CG", 1) u = Function(V) -The ensemble sub-communicator is then available through the method :attr:`~.Ensemble.ensemble_comm`. +The ensemble sub-communicator is then available through the attribute ``Ensemble.ensemble_comm``. .. code-block:: python3 @@ -187,7 +187,7 @@ The ensemble sub-communicator is then available through the method :attr:`~.Ense MPI communications across the spatial sub-communicator (i.e., within an ensemble member) are handled automatically by Firedrake, whilst MPI communications across the ensemble sub-communicator (i.e., between ensemble -members) are handled through methods of :class:`~.Ensemble`. Currently +members) are handled through methods of :class:`~.Ensemble`. Currently send/recv, reductions and broadcasts are supported, as well as their non-blocking variants. diff --git a/docs/source/point-evaluation.rst b/docs/source/point-evaluation.rst index 5d39ac1c4d..96d0835c75 100644 --- a/docs/source/point-evaluation.rst +++ b/docs/source/point-evaluation.rst @@ -90,7 +90,7 @@ If you move the mesh, by :doc:`changing the mesh coordinates `, then the bounding box tree that Firedrake maintains to ensure fast point evaluation must be rebuilt. To do this, after moving the mesh, call -:meth:`~.MeshGeometry.clear_spatial_index` on the mesh you have just +``MeshGeometry.clear_spatial_index`` on the mesh you have just moved. Evaluation with a distributed mesh diff --git a/docs/source/r-space.rst b/docs/source/r-space.rst index 9b3fb0ed1e..f3fffa7603 100644 --- a/docs/source/r-space.rst +++ b/docs/source/r-space.rst @@ -67,8 +67,8 @@ Setting and retrieving the value of a function in `R` ----------------------------------------------------- Functions in the space `R` are equivalent to a single floating point value. The -value can be set using the :meth:`assign` method of Firedrake functions, and -the value can be accessed simply by casting it to :func:`float`: +value can be set using the :meth:`.Assigner.assign` method of Firedrake functions, and +the value can be accessed simply by casting it to :class:`float`: .. code-block:: python3 diff --git a/docs/source/variational-problems.rst b/docs/source/variational-problems.rst index 378fef8499..1976e6c83b 100644 --- a/docs/source/variational-problems.rst +++ b/docs/source/variational-problems.rst @@ -96,7 +96,7 @@ dimension. For example, for the surface of a sphere embedded in 3D we use: .. code-block:: python3 - + sphere_mesh = Mesh('sphere_mesh.node', dim=3) Firedrake provides utility meshes for the surfaces of spheres immersed @@ -129,7 +129,7 @@ is used by Firedrake to ensure that the cell normal on, say, the surface of a sphere, uniformly points outwards. To do this, after constructing an immersed mesh, we must initialise the cell orientation information. This is carried out with the function -:py:meth:`~.Mesh.init_cell_orientations`, which +``~.Mesh.init_cell_orientations``, which takes a UFL expression used to produce the reference normal direction. For example, on the sphere mesh of the earth defined above we can initialise the cell orientations diff --git a/docs/source/visualisation.rst b/docs/source/visualisation.rst index e3ab980563..6aa18fb42f 100644 --- a/docs/source/visualisation.rst +++ b/docs/source/visualisation.rst @@ -94,7 +94,7 @@ the :doc:`mesh coordinates ` associated to a field must be rep with the same basis as the field. To visualise fields in anything other than these spaces we must transform the data to this format first. One option is to do so by hand before outputting. -Either by :doc:`interpolating ` or else :func:`projecting ` +Either by :doc:`interpolating ` or else :func:`projecting ` the :doc:`mesh coordinates ` and then the field. Since this is such a common operation, the :class:`~.File` object is set up to manage these operations automatically, we just need to choose whether we want data to be @@ -154,7 +154,7 @@ This approximation can be controlled in at least two ways: on the tessellated data is compared pointwise to the original data at the midpoints of the edges of the tessellated geometry and the corresponding points on the original geometry. The Maximum Number of Subdivisions is the - maximum number of times an edge in the original geometry can be subdivided. + maximum number of times an edge in the original geometry can be subdivided. Besides the two tools listed above, Paraview provides many other tools (filters) that might be applied to the original data or composed with the tools listed above. @@ -257,7 +257,7 @@ the functions :func:`tripcolor `, :func:`tricontour `, and so forth, all behave more or less like their counterparts in matplotlib, and actually call them under the hood. The only difference is that the Firedrake functions include an extra optional argument -``axes`` to specify the matplotlib :class:`Axes ` object +``axes`` to specify the matplotlib :class:`Axes ` object to draw on. When using matplotlib by itself these methods are methods of the Axes object. Otherwise the usage is identical. For example, the following code would make a filled contour plot of the function ``u`` using the inferno From 55cf13e7a65d628f94a95d188175ed1647155d28 Mon Sep 17 00:00:00 2001 From: JDBetteridge Date: Fri, 3 Feb 2023 15:39:54 +0000 Subject: [PATCH 19/30] Fix or remove all broken cross links --- docs/Makefile | 3 ++ docs/source/citing.rst | 2 +- docs/source/conf.py | 21 +++++++++++++ firedrake/adjoint/solving.py | 2 +- firedrake/assemble.py | 2 +- firedrake/assign.py | 18 +++++------ firedrake/bcs.py | 20 ++++++------ firedrake/checkpointing.py | 10 +++--- firedrake/cython/dmcommon.pyx | 20 ++++++------ firedrake/ensemble.py | 24 +++++++-------- firedrake/extrusion_utils.py | 2 +- firedrake/function.py | 8 ++--- firedrake/functionspacedata.py | 4 +-- firedrake/functionspaceimpl.py | 42 +++++++++++++------------- firedrake/halo.py | 2 +- firedrake/interpolation.py | 4 +-- firedrake/matrix.py | 4 +-- firedrake/mesh.py | 6 ++-- firedrake/mg/kernels.py | 2 +- firedrake/mg/mesh.py | 6 ++-- firedrake/nullspace.py | 2 +- firedrake/output.py | 2 +- firedrake/parloops.py | 6 ++-- firedrake/plot.py | 4 +-- firedrake/preconditioners/base.py | 10 +++--- firedrake/preconditioners/fdm.py | 14 ++++----- firedrake/progress_bar.py | 6 ++-- firedrake/projection.py | 4 +-- firedrake/randomfunctiongen.py | 22 +++++++------- firedrake/slate/slac/compiler.py | 6 ++-- firedrake/slate/slac/kernel_builder.py | 6 ++-- firedrake/slate/slac/tsfc_driver.py | 4 +-- firedrake/slate/slac/utils.py | 4 +-- firedrake/slate/slate.py | 20 ++++++------ firedrake/solving.py | 2 +- firedrake/tsfc_interface.py | 4 +-- firedrake/vector.py | 2 +- firedrake_citations/__init__.py | 2 +- 38 files changed, 173 insertions(+), 149 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 86d8fd8515..46915f7c4d 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -78,6 +78,9 @@ source/team.rst: source/team2.py apidoc: $(GENERATED_FILES) copy_demos sphinx-apidoc -f -T -o source/ ../firedrake ../firedrake/cython/*.so + sphinx-apidoc -f -T -o source/ ../firedrake_citations + echo -e ":orphan:\n\n" | cat - source/firedrake_citations.rst > source/firedrake_citations.tmp + mv source/firedrake_citations.tmp source/firedrake_citations.rst clean: -rm -rf $(BUILDDIR)/* diff --git a/docs/source/citing.rst b/docs/source/citing.rst index a98622c76d..2747eb97b4 100644 --- a/docs/source/citing.rst +++ b/docs/source/citing.rst @@ -12,7 +12,7 @@ would cite the relevant papers. The simplest way to determine what these are is by asking Firedrake itself. You can ask that a list of citations relevant to your computation be printed when exiting by calling -``.Citations.print_at_exit`` after importing Firedrake:: +:meth:`.Citations.print_at_exit` after importing Firedrake:: from firedrake import * diff --git a/docs/source/conf.py b/docs/source/conf.py index d6ee5cf396..ac544a5e64 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -118,6 +118,26 @@ # Warn about all references where the target cannot be found nitpicky = True +nitpick_ignore_regex = [ + # Ignore missing docs from external dependencies + (r'py:.*', r'dolfin_adjoint_common\..*'), + (r'py:.*', r'pyadjoint\..*'), + (r'py:.*', r'tsfc\..*'), + (r'py:.*', r'coffee\..*'), + (r'py:.*', r'PETSc\..*'), + (r'py:.*', r'progress\..*'), + # Ignore undocumented PyOP2 + ('py:class', 'pyop2.caching.Cached'), + # Ignore mission docs from Firedrake internal "private" code + # Any "Base" class eg: + # firedrake.adjoint.checkpointing.CheckpointBase + # firedrake.slate.slate.TensorBase + # firedrake.preconditioners.patch.PatchBase + ('py:class', r'(firedrake\.)*(.*\.)+.*Base'), + # Slate Binary- and Unary- OPs + ('py:class', r'(firedrake\.)*(slate\.)+(TensorBase|.*Op)'), + ('py:class', 'firedrake.solving_utils._SNESContext'), +] # -- Options for HTML output --------------------------------------------- @@ -322,6 +342,7 @@ 'pyop2': ('https://op2.github.io/PyOP2', None), 'ufl': ('https://fenics.readthedocs.io/projects/ufl/en/latest/', None), 'h5py': ('http://docs.h5py.org/en/latest/', None), + 'h5py.h5p': ('https://api.h5py.org/', None), 'matplotlib': ('https://matplotlib.org/', None), 'python': ('https://docs.python.org/3/', None), 'pyadjoint': ('https://www.dolfin-adjoint.org/en/latest/', None), diff --git a/firedrake/adjoint/solving.py b/firedrake/adjoint/solving.py index 78b012f0af..48ba148078 100644 --- a/firedrake/adjoint/solving.py +++ b/firedrake/adjoint/solving.py @@ -10,7 +10,7 @@ def annotate_solve(solve): recording what solves occur and what forms are involved, so that the adjoint and tangent linear models may be constructed automatically by pyadjoint. - To disable the annotation, just pass :py:data:`annotate=False` to this routine, and it acts exactly like the + To disable the annotation, just pass ``annotate=False`` to this routine, and it acts exactly like the Firedrake solve call. This is useful in cases where the solve is known to be irrelevant or diagnostic for the purposes of the adjoint computation (such as projecting fields to other function spaces for the purposes of visualisation). diff --git a/firedrake/assemble.py b/firedrake/assemble.py index 9af37a0898..967debcdd7 100644 --- a/firedrake/assemble.py +++ b/firedrake/assemble.py @@ -40,7 +40,7 @@ def assemble(expr, *args, **kwargs): r"""Evaluate expr. :arg expr: a :class:`~ufl.classes.Form`, :class:`~ufl.classes.Expr` or - a :class:`~slate.TensorBase` expression. + a :class:`~.slate.TensorBase` expression. :arg tensor: Existing tensor object to place the result in. :arg bcs: Iterable of boundary conditions to apply. :kwarg diagonal: If assembling a matrix is it diagonal? diff --git a/firedrake/assign.py b/firedrake/assign.py index 4a69c6b1c5..df379ebaa9 100644 --- a/firedrake/assign.py +++ b/firedrake/assign.py @@ -109,7 +109,7 @@ def _as_scalar(self, weighted_coefficients): is going to be used as a scale factor (e.g. ``u.assign(Constant(2)*v)``), or as a constant to be added (e.g. ``u.assign(2*v + Constant(3))``). Therefore we only compress to a scalar when we know it is required (e.g. inside a product with a - :class:`firedrake.Function`). + :class:`~.firedrake.function.Function`). """ return pytools.one( functools.reduce(operator.add, (c.dat.data_ro*w for c, w in weighted_coefficients)) @@ -117,11 +117,11 @@ def _as_scalar(self, weighted_coefficients): class Assigner: - """Class performing pointwise assignment of an expression to a :class:`firedrake.Function`. + """Class performing pointwise assignment of an expression to a :class:`firedrake.function.Function`. - :param assignee: The :class:`firedrake.Function` being assigned to. - :param expression: The :class:`ufl.Expr` to evaluate. - :param subset: Optional subset (:class:`op2.Subset`) to apply the assignment over. + :param assignee: The :class:`~.firedrake.function.Function` being assigned to. + :param expression: The :class:`ufl.core.expr.Expr` to evaluate. + :param subset: Optional subset (:class:`pyop2.types.set.Subset`) to apply the assignment over. """ symbol = "=" @@ -219,7 +219,7 @@ def _weighted_coefficients(self): class IAddAssigner(Assigner): - """Assigner class for :func:`firedrake.Function.__iadd__`.""" + """Assigner class for ``firedrake.function.Function.__iadd__``.""" symbol = "+=" def _assign_single_dat(self, assignee_dat, function_dats): @@ -227,7 +227,7 @@ def _assign_single_dat(self, assignee_dat, function_dats): class ISubAssigner(Assigner): - """Assigner class for :func:`firedrake.Function.__isub__`.""" + """Assigner class for ``firedrake.function.Function.__isub__``.""" symbol = "-=" def _assign_single_dat(self, assignee_dat, function_dats): @@ -235,7 +235,7 @@ def _assign_single_dat(self, assignee_dat, function_dats): class IMulAssigner(Assigner): - """Assigner class for :func:`firedrake.Function.__imul__`.""" + """Assigner class for ``firedrake.function.Function.__imul__``.""" symbol = "*=" def _assign_single_dat(self, assignee_dat, function_dats): @@ -245,7 +245,7 @@ def _assign_single_dat(self, assignee_dat, function_dats): class IDivAssigner(Assigner): - """Assigner class for :func:`firedrake.Function.__itruediv__`.""" + """Assigner class for ``firedrake.function.Function.__itruediv__``.""" symbol = "/=" def _assign_single_dat(self, assignee_dat, function_dats): diff --git a/firedrake/bcs.py b/firedrake/bcs.py index 7dea14c765..7a16226a71 100644 --- a/firedrake/bcs.py +++ b/firedrake/bcs.py @@ -251,7 +251,7 @@ class DirichletBC(BCBase, DirichletBCMixin): should be applied. :arg g: the boundary condition values. This can be a :class:`.Function` on ``V``, or a UFL expression that can be interpolated into - ``V``, for example, a :class:`.Constant`, an iterable of + ``V``, for example, a :class:`.Constant` , an iterable of literal constants (converted to a UFL expression), or a literal constant which can be pointwise evaluated at the nodes of ``V``. @@ -389,12 +389,12 @@ def apply(self, r, u=None): ``r`` is taken to be a residual and the boundary condition nodes are set to the value ``u-bc``. Supplying ``u`` has no effect if ``r`` is a :class:`.Matrix` rather than a - :class:`.Function`. If ``u`` is absent, then the boundary + :class:`.Function` . If ``u`` is absent, then the boundary condition nodes of ``r`` are set to the boundary condition values. - If ``r`` is a :class:`.Matrix`, it will be assembled with a 1 + If ``r`` is a :class:`.Matrix` , it will be assembled with a 1 on diagonals where the boundary condition applies and 0 in the corresponding rows and columns. @@ -443,8 +443,8 @@ class EquationBC(object): :param eq: the linear/nonlinear form equation :param u: the :class:`.Function` to solve for - :arg sub_domain: see :class:`.DirichletBC`. - :arg bcs: a list of :class:`.DirichletBC`s and/or :class:`.EquationBC`s + :arg sub_domain: see :class:`.DirichletBC` . + :arg bcs: a list of :class:`.DirichletBC` s and/or :class:`.EquationBC` s to be applied to this boundary condition equation (optional) :param J: the Jacobian for this boundary equation (optional) :param Jp: a form used for preconditioning the linear system, @@ -517,7 +517,7 @@ def dirichlet_bcs(self): yield from self._F.dirichlet_bcs() def extract_form(self, form_type): - r"""Return :class:`.EquationBCSplit` associated with the given 'form_type'. + r"""Return ``EquationBCSplit`` associated with the given 'form_type'. :arg form_type: Form to extract; 'F', 'J', or 'Jp'. """ @@ -540,8 +540,8 @@ class EquationBCSplit(BCBase): :param form: the linear/nonlinear form: `F`, `J`, or `Jp`. :param u: the :class:`.Function` to solve for - :arg sub_domain: see :class:`.DirichletBC`. - :arg bcs: a list of :class:`.DirichletBC`s and/or :class:`.EquationBC`s + :arg sub_domain: see :class:`.DirichletBC` . + :arg bcs: a list of :class:`.DirichletBC` s and/or :class:`.EquationBC` s to be applied to this boundary condition equation (optional) :arg V: the :class:`.FunctionSpace` on which the equation boundary condition is applied (optional) @@ -628,9 +628,9 @@ def reconstruct(self, field=None, V=None, subu=None, u=None, row_field=None, col def homogenize(bc): r"""Create a homogeneous version of a :class:`.DirichletBC` object and return it. If ``bc`` is an iterable containing one or more :class:`.DirichletBC` objects, - then return a list of the homogeneous versions of those :class:`.DirichletBC`\s. + then return a list of the homogeneous versions of those :class:`.DirichletBC` s. - :arg bc: a :class:`.DirichletBC`, or iterable object comprising :class:`.DirichletBC`\(s). + :arg bc: a :class:`.DirichletBC` , or iterable object comprising :class:`.DirichletBC` (s). """ if isinstance(bc, (tuple, list)): lst = [] diff --git a/firedrake/checkpointing.py b/firedrake/checkpointing.py index ae16126d3b..68df3843fe 100644 --- a/firedrake/checkpointing.py +++ b/firedrake/checkpointing.py @@ -77,9 +77,9 @@ class DumbCheckpoint(object): .. note:: This object contains both a PETSc ``Viewer``, used for storing - and loading :class:`~.Function` data, and an :class:`h5py:File` + and loading :class:`~.Function` data, and an :class:`h5py.File` opened on the same file handle. *DO NOT* call - :meth:`h5py:File.close` on the latter, this will cause + :meth:`h5py.File.close` on the latter, this will cause breakages. .. warning:: @@ -297,7 +297,7 @@ def write_attribute(self, obj, name, val): :arg name: The name of the attribute. :arg val: The attribute value. - Raises :exc:`~.exceptions.AttributeError` if writing the attribute fails. + Raises :exc:`AttributeError` if writing the attribute fails. """ try: self.h5file[obj].attrs[name] = val @@ -310,7 +310,7 @@ def read_attribute(self, obj, name, default=None): :arg obj: The path to the data object. :arg name: The name of the attribute. :arg default: Optional default value to return. If not - provided an :exc:`~.exceptions.AttributeError` is raised if the + provided an :exc:`AttributeError` is raised if the attribute does not exist. """ try: @@ -354,7 +354,7 @@ class HDF5File(object): :arg filename: filename (including suffix .h5) of checkpoint file. :arg file_mode: the access mode, passed directly to h5py, see - :class:`h5py:File` for details on the meaning. + :class:`h5py.File` for details on the meaning. :arg comm: communicator the writes should be collective over. diff --git a/firedrake/cython/dmcommon.pyx b/firedrake/cython/dmcommon.pyx index 872fb2a209..ab73d510e6 100644 --- a/firedrake/cython/dmcommon.pyx +++ b/firedrake/cython/dmcommon.pyx @@ -31,7 +31,7 @@ def get_topological_dimension(PETSc.DM dm): :arg dm: A DMPlex or DMSwarm. - :returns: For a DMPlex ``dm.getDimension()`, for a DMSwarm ``0``. + :returns: For a DMPlex ``dm.getDimension()``, for a DMSwarm ``0``. """ if type(dm) is PETSc.DMPlex: return dm.getDimension() @@ -874,13 +874,13 @@ cdef inline PetscInt _compute_orientation_simplex(PetscInt *fiat_cone, coneSize = 2 UFCTriangle - + 2 | \ 4 3 | 6 \ 0--5---1 - + physical triangle mapped onto UFCTriangle 33 @@ -955,11 +955,11 @@ cdef inline PetscInt _compute_orientation_interval_tensor_product(PetscInt *fiat # UFCQuadrilateral: # # eo\io 0 1 2 3 - # + # # 1---3 0---2 3---1 2---0 # 0 | | | | | | | | # 0---2 1---3 2---0 3---1 - # + # # 2---3 3---2 0---1 1---0 # 1 | | | | | | | | # 0---1 1---0 2---3 3---2 @@ -1037,12 +1037,12 @@ cdef inline PetscInt _compute_orientation(PETSc.DM dm, elif dm.getCellType(p) == PETSc.DM.PolytopeType.QUADRILATERAL: # UFCQuadrilateral <- PETSc.DM.PolytopeType.QUADRILATERAL dim = 2 - _reorder_plex_cone(dm, p, cone, plex_cone) + _reorder_plex_cone(dm, p, cone, plex_cone) return _compute_orientation_interval_tensor_product(fiat_cone, plex_cone, plex_cone_copy, dim) elif dm.getCellType(p) == PETSc.DM.PolytopeType.HEXAHEDRON: # UFCHexahedron <- PETSc.DM.PolytopeType.HEXAHEDRON dim = 3 - _reorder_plex_cone(dm, p, cone, plex_cone) + _reorder_plex_cone(dm, p, cone, plex_cone) return _compute_orientation_interval_tensor_product(fiat_cone, plex_cone, plex_cone_copy, dim) else: raise ValueError(f"Unknown cell type: {dm.getCellType(p)}") @@ -1061,7 +1061,7 @@ def entity_orientations(mesh, :returns: A 2D array of the same shape as cell_closure, each row of which contains orientations of the entities in the closure of the associated cell - See :meth:`~.AbstractMeshTopology.entity_orientations` for details on the + See ``AbstractMeshTopology.entity_orientations`` for details on the returned array. See `get_cell_nodes` for the usage of the returned array. @@ -1554,8 +1554,8 @@ def cell_facet_labeling(PETSc.DM plex, cell_facets[c, i] - If `cell_facets[c, i, 0]` is :data:`0`, then the local facet - :data:`i` is an exterior facet, otherwise if the result is :data:`1` + If `cell_facets[c, i, 0]` is ``0``, then the local facet + ``i`` is an exterior facet, otherwise if the result is ``1`` it is interior. `cell_facets[c, i, 1]` returns the subdomain marker for the local facet. diff --git a/firedrake/ensemble.py b/firedrake/ensemble.py index 1496139715..fafcaccdb3 100644 --- a/firedrake/ensemble.py +++ b/firedrake/ensemble.py @@ -78,7 +78,7 @@ def _check_function(self, f, g=None): @PETSc.Log.EventDecorator() def allreduce(self, f, f_reduced, op=MPI.SUM): """ - Allreduce a function f into f_reduced over :attr:`ensemble_comm`. + Allreduce a function f into f_reduced over ``ensemble_comm`` . :arg f: The a :class:`.Function` to allreduce. :arg f_reduced: the result of the reduction. @@ -95,7 +95,7 @@ def allreduce(self, f, f_reduced, op=MPI.SUM): @PETSc.Log.EventDecorator() def iallreduce(self, f, f_reduced, op=MPI.SUM): """ - Allreduce (non-blocking) a function f into f_reduced over :attr:`ensemble_comm`. + Allreduce (non-blocking) a function f into f_reduced over ``ensemble_comm`` . :arg f: The a :class:`.Function` to allreduce. :arg f_reduced: the result of the reduction. @@ -112,7 +112,7 @@ def iallreduce(self, f, f_reduced, op=MPI.SUM): @PETSc.Log.EventDecorator() def reduce(self, f, f_reduced, op=MPI.SUM, root=0): """ - Reduce a function f into f_reduced over :attr:`ensemble_comm` to rank root + Reduce a function f into f_reduced over ``ensemble_comm`` to rank root :arg f: The a :class:`.Function` to reduce. :arg f_reduced: the result of the reduction on rank root. @@ -135,7 +135,7 @@ def reduce(self, f, f_reduced, op=MPI.SUM, root=0): @PETSc.Log.EventDecorator() def ireduce(self, f, f_reduced, op=MPI.SUM, root=0): """ - Reduce (non-blocking) a function f into f_reduced over :attr:`ensemble_comm` to rank root + Reduce (non-blocking) a function f into f_reduced over ``ensemble_comm`` to rank root :arg f: The a :class:`.Function` to reduce. :arg f_reduced: the result of the reduction on rank root. @@ -153,7 +153,7 @@ def ireduce(self, f, f_reduced, op=MPI.SUM, root=0): @PETSc.Log.EventDecorator() def bcast(self, f, root=0): """ - Broadcast a function f over :attr:`ensemble_comm` from rank root + Broadcast a function f over ``ensemble_comm`` from rank root :arg f: The :class:`.Function` to broadcast. :arg root: rank to broadcast from. Defaults to 0. @@ -168,7 +168,7 @@ def bcast(self, f, root=0): @PETSc.Log.EventDecorator() def ibcast(self, f, root=0): """ - Broadcast (non-blocking) a function f over :attr:`ensemble_comm` from rank root + Broadcast (non-blocking) a function f over ``ensemble_comm`` from rank root :arg f: The :class:`.Function` to broadcast. :arg root: rank to broadcast from. Defaults to 0. @@ -183,7 +183,7 @@ def ibcast(self, f, root=0): @PETSc.Log.EventDecorator() def send(self, f, dest, tag=0): """ - Send (blocking) a function f over :attr:`ensemble_comm` to another + Send (blocking) a function f over ``ensemble_comm`` to another ensemble rank. :arg f: The a :class:`.Function` to send @@ -198,7 +198,7 @@ def send(self, f, dest, tag=0): @PETSc.Log.EventDecorator() def recv(self, f, source=MPI.ANY_SOURCE, tag=MPI.ANY_TAG, statuses=None): """ - Receive (blocking) a function f over :attr:`ensemble_comm` from + Receive (blocking) a function f over ``ensemble_comm`` from another ensemble rank. :arg f: The a :class:`.Function` to receive into @@ -216,7 +216,7 @@ def recv(self, f, source=MPI.ANY_SOURCE, tag=MPI.ANY_TAG, statuses=None): @PETSc.Log.EventDecorator() def isend(self, f, dest, tag=0): """ - Send (non-blocking) a function f over :attr:`ensemble_comm` to another + Send (non-blocking) a function f over ``ensemble_comm`` to another ensemble rank. :arg f: The a :class:`.Function` to send @@ -232,7 +232,7 @@ def isend(self, f, dest, tag=0): @PETSc.Log.EventDecorator() def irecv(self, f, source=MPI.ANY_SOURCE, tag=MPI.ANY_TAG): """ - Receive (non-blocking) a function f over :attr:`ensemble_comm` from + Receive (non-blocking) a function f over ``ensemble_comm`` from another ensemble rank. :arg f: The a :class:`.Function` to receive into @@ -248,7 +248,7 @@ def irecv(self, f, source=MPI.ANY_SOURCE, tag=MPI.ANY_TAG): @PETSc.Log.EventDecorator() def sendrecv(self, fsend, dest, sendtag=0, frecv=None, source=MPI.ANY_SOURCE, recvtag=MPI.ANY_TAG, status=None): """ - Send (blocking) a function fsend and receive a function frecv over :attr:`ensemble_comm` to another + Send (blocking) a function fsend and receive a function frecv over ``ensemble_comm`` to another ensemble rank. :arg fsend: The a :class:`.Function` to send. @@ -271,7 +271,7 @@ def sendrecv(self, fsend, dest, sendtag=0, frecv=None, source=MPI.ANY_SOURCE, re @PETSc.Log.EventDecorator() def isendrecv(self, fsend, dest, sendtag=0, frecv=None, source=MPI.ANY_SOURCE, recvtag=MPI.ANY_TAG): """ - Send a function fsend and receive a function frecv over :attr:`ensemble_comm` to another + Send a function fsend and receive a function frecv over ``ensemble_comm`` to another ensemble rank. :arg fsend: The a :class:`.Function` to send. diff --git a/firedrake/extrusion_utils.py b/firedrake/extrusion_utils.py index 2abae8fd17..7e98f1c9fb 100644 --- a/firedrake/extrusion_utils.py +++ b/firedrake/extrusion_utils.py @@ -21,7 +21,7 @@ def make_extruded_coords(extruded_topology, base_coords, ext_coords, Given either a kernel or a (fixed) layer_height, compute an extruded coordinate field for an extruded mesh. - :arg extruded_topology: an :class:`~.ExtrudedMeshTopology` to extrude + :arg extruded_topology: an ``ExtrudedMeshTopology`` to extrude a coordinate field for. :arg base_coords: a :class:`~.Function` to read the base coordinates from. diff --git a/firedrake/function.py b/firedrake/function.py index dbc7b7c6ae..1827f6b359 100644 --- a/firedrake/function.py +++ b/firedrake/function.py @@ -44,7 +44,7 @@ def __init__(self, function_space, val=None, name=None, dtype=ScalarType): Alternatively, another :class:`Function` may be passed here and its function space will be used to build this :class:`Function`. - :param val: NumPy array-like (or :class:`pyop2.Dat` or + :param val: NumPy array-like (or :class:`pyop2.types.dat.Dat` or :class:`~.Vector`) providing initial values (optional). This :class:`Function` will share data with the provided value. @@ -241,7 +241,7 @@ def __init__(self, function_space, val=None, name=None, dtype=ScalarType, Alternatively, another :class:`Function` may be passed here and its function space will be used to build this :class:`Function`. In this case, the function values are copied. - :param val: NumPy array-like (or :class:`pyop2.Dat`) providing initial values (optional). + :param val: NumPy array-like (or :class:`pyop2.types.dat.Dat`) providing initial values (optional). If val is an existing :class:`Function`, then the data will be shared. :param name: user-defined name for this :class:`Function` (optional). :param dtype: optional data type for this :class:`Function` @@ -334,7 +334,7 @@ def sub(self, i): See also :attr:`subfunctions`. If the :class:`Function` is defined on a - :class:`~.VectorFunctionSpace` or :class:`~.TensorFunctiionSpace` this returns a proxy object + :func:`~.VectorFunctionSpace` or :func:`~.TensorFunctionSpace` this returns a proxy object indexing the ith component of the space, suitable for use in boundary condition application.""" if len(self.function_space()) == 1: @@ -389,7 +389,7 @@ def assign(self, expr, subset=None): will add twice `g` to `f`. - If present, subset must be an :class:`pyop2.Subset` of this + If present, subset must be an :class:`pyop2.types.set.Subset` of this :class:`Function`'s ``node_set``. The expression will then only be assigned to the nodes on that subset. diff --git a/firedrake/functionspacedata.py b/firedrake/functionspacedata.py index ea3dbef15b..fdddb10f2c 100644 --- a/firedrake/functionspacedata.py +++ b/firedrake/functionspacedata.py @@ -505,13 +505,13 @@ def get_map(self, V, entity_set, map_arity, name, offset): @PETSc.Log.EventDecorator() def get_shared_data(mesh, ufl_element): - """Return the :class:`FunctionSpaceData` for the given + """Return the ``FunctionSpaceData`` for the given element. :arg mesh: The mesh to build the function space data on. :arg ufl_element: A UFL element. :raises ValueError: if mesh or ufl_element are invalid. - :returns: a :class:`FunctionSpaceData` object with the shared + :returns: a ``FunctionSpaceData`` object with the shared data. """ if not isinstance(mesh, mesh_mod.AbstractMeshTopology): diff --git a/firedrake/functionspaceimpl.py b/firedrake/functionspaceimpl.py index 048391d555..11a8f3375d 100644 --- a/firedrake/functionspaceimpl.py +++ b/firedrake/functionspaceimpl.py @@ -30,7 +30,7 @@ class WithGeometry(ufl.FunctionSpace): explicitly except in a small number of cases. When instantiating a :class:`WithGeometry`, users should call - :func:`create` rather than :func:`__init__`. + :meth:`WithGeometry.create` rather than ``__init__``. :arg mesh: The mesh with geometric information to use. :arg element: The UFL element. @@ -382,10 +382,10 @@ def __init__(self, mesh, element, name=None): self.name = name r"""The (optional) descriptive name for this space.""" self.node_set = sdata.node_set - r"""A :class:`pyop2.Set` representing the function space nodes.""" + r"""A :class:`pyop2.types.set.Set` representing the function space nodes.""" self.dof_dset = op2.DataSet(self.node_set, self.shape or 1, name="%s_nodes_dset" % self.name) - r"""A :class:`pyop2.DataSet` representing the function space + r"""A :class:`pyop2.types.dataset.DataSet` representing the function space degrees of freedom.""" # User comm @@ -534,30 +534,30 @@ def __mul__(self, other): @utils.cached_property def node_count(self): r"""The number of nodes (includes halo nodes) of this function space on - this process. If the :class:`FunctionSpace` has :attr:`rank` 0, this - is equal to the :attr:`dof_count`, otherwise the :attr:`dof_count` is + this process. If the :class:`FunctionSpace` has :attr:`FunctionSpace.rank` 0, this + is equal to the :attr:`FunctionSpace.dof_count`, otherwise the :attr:`FunctionSpace.dof_count` is :attr:`dim` times the :attr:`node_count`.""" return self.node_set.total_size @utils.cached_property def dof_count(self): r"""The number of degrees of freedom (includes halo dofs) of this - function space on this process. Cf. :attr:`node_count`.""" + function space on this process. Cf. :attr:`FunctionSpace.node_count` .""" return self.node_count*self.value_size def dim(self): r"""The global number of degrees of freedom for this function space. - See also :attr:`dof_count` and :attr:`node_count`.""" + See also :attr:`FunctionSpace.dof_count` and :attr:`FunctionSpace.node_count` .""" return self.dof_dset.layout_vec.getSize() def make_dat(self, val=None, valuetype=None, name=None): - r"""Return a newly allocated :class:`pyop2.Dat` defined on the + r"""Return a newly allocated :class:`pyop2.types.dat.Dat` defined on the :attr:`dof_dset` of this :class:`.Function`.""" return op2.Dat(self.dof_dset, val, valuetype, name) def cell_node_map(self): - r"""Return the :class:`pyop2.Map` from cels to + r"""Return the :class:`pyop2.types.map.Map` from cels to function space nodes.""" sdata = self._shared_data return sdata.get_map(self, @@ -567,7 +567,7 @@ def cell_node_map(self): self.offset) def interior_facet_node_map(self): - r"""Return the :class:`pyop2.Map` from interior facets to + r"""Return the :class:`pyop2.types.map.Map` from interior facets to function space nodes.""" sdata = self._shared_data offset = self.cell_node_map().offset @@ -580,7 +580,7 @@ def interior_facet_node_map(self): offset) def exterior_facet_node_map(self): - r"""Return the :class:`pyop2.Map` from exterior facets to + r"""Return the :class:`pyop2.types.map.Map` from exterior facets to function space nodes.""" sdata = self._shared_data return sdata.get_map(self, @@ -778,12 +778,12 @@ def dof_count(self): def dim(self): r"""The global number of degrees of freedom for this function space. - See also :attr:`dof_count` and :attr:`node_count`.""" + See also :attr:`FunctionSpace.dof_count` and :attr:`FunctionSpace.node_count`.""" return self.dof_dset.layout_vec.getSize() @utils.cached_property def node_set(self): - r"""A :class:`pyop2.MixedSet` containing the nodes of this + r"""A :class:`pyop2.types.set.MixedSet` containing the nodes of this :class:`MixedFunctionSpace`. This is composed of the :attr:`FunctionSpace.node_set`\s of the underlying :class:`FunctionSpace`\s this :class:`MixedFunctionSpace` is @@ -793,7 +793,7 @@ def node_set(self): @utils.cached_property def dof_dset(self): - r"""A :class:`pyop2.MixedDataSet` containing the degrees of freedom of + r"""A :class:`pyop2.types.dataset.MixedDataSet` containing the degrees of freedom of this :class:`MixedFunctionSpace`. This is composed of the :attr:`FunctionSpace.dof_dset`\s of the underlying :class:`FunctionSpace`\s of which this :class:`MixedFunctionSpace` is @@ -801,7 +801,7 @@ def dof_dset(self): return op2.MixedDataSet(s.dof_dset for s in self._spaces) def cell_node_map(self): - r"""A :class:`pyop2.MixedMap` from the :attr:`Mesh.cell_set` of the + r"""A :class:`pyop2.types.map.MixedMap` from the ``Mesh.cell_set`` of the underlying mesh to the :attr:`node_set` of this :class:`MixedFunctionSpace`. This is composed of the :attr:`FunctionSpace.cell_node_map`\s of the underlying @@ -810,12 +810,12 @@ def cell_node_map(self): return op2.MixedMap(s.cell_node_map() for s in self._spaces) def interior_facet_node_map(self): - r"""Return the :class:`pyop2.MixedMap` from interior facets to + r"""Return the :class:`pyop2.types.map.MixedMap` from interior facets to function space nodes.""" return op2.MixedMap(s.interior_facet_node_map() for s in self) def exterior_facet_node_map(self): - r"""Return the :class:`pyop2.Map` from exterior facets to + r"""Return the :class:`pyop2.types.map.Map` from exterior facets to function space nodes.""" return op2.MixedMap(s.exterior_facet_node_map() for s in self) @@ -826,7 +826,7 @@ def local_to_global_map(self, bcs): raise NotImplementedError("Not for mixed maps right now sorry!") def make_dat(self, val=None, valuetype=None, name=None): - r"""Return a newly allocated :class:`pyop2.MixedDat` defined on the + r"""Return a newly allocated :class:`pyop2.types.dat.MixedDat` defined on the :attr:`dof_dset` of this :class:`MixedFunctionSpace`.""" if val is not None: assert len(val) == len(self) @@ -896,10 +896,10 @@ def __str__(self): r"""An optional identifier, for debugging purposes.""" no_dats = False - r"""Can this proxy make :class:`pyop2.Dat` objects""" + r"""Can this proxy make :class:`pyop2.types.dat.Dat` objects""" def make_dat(self, *args, **kwargs): - r"""Create a :class:`pyop2.Dat`. + r"""Create a :class:`pyop2.types.dat.Dat`. :raises ValueError: if :attr:`no_dats` is ``True``. """ @@ -999,7 +999,7 @@ def _dm(self): return dm def make_dat(self, val=None, valuetype=None, name=None): - r"""Return a newly allocated :class:`pyop2.Global` representing the + r"""Return a newly allocated :class:`pyop2.types.glob.Global` representing the data for a :class:`.Function` on this space.""" return op2.Global(self.value_size, val, valuetype, name, self.comm) diff --git a/firedrake/halo.py b/firedrake/halo.py index 907ddd93b9..1f9f05f987 100644 --- a/firedrake/halo.py +++ b/firedrake/halo.py @@ -88,7 +88,7 @@ class Halo(op2.Halo): :arg section: The data layout. The halo is implemented using a PETSc SF (star forest) object and - is usable as a PyOP2 :class:`pyop2.Halo`.""" + is usable as a PyOP2 :class:`pyop2.types.halo.Halo` .""" def __init__(self, dm, section, comm): super(Halo, self).__init__() diff --git a/firedrake/interpolation.py b/firedrake/interpolation.py index d92be6a65f..88672a49f3 100644 --- a/firedrake/interpolation.py +++ b/firedrake/interpolation.py @@ -32,7 +32,7 @@ def interpolate(expr, V, subset=None, access=op2.WRITE, ad_block_tag=None): :arg expr: a UFL expression. :arg V: the :class:`.FunctionSpace` to interpolate into (or else an existing :class:`.Function`). - :kwarg subset: An optional :class:`pyop2.Subset` to apply the + :kwarg subset: An optional :class:`pyop2.types.set.Subset` to apply the interpolation over. :kwarg access: The access descriptor for combining updates to shared dofs. :kwarg ad_block_tag: string for tagging the resulting block on the Pyadjoint tape @@ -67,7 +67,7 @@ class Interpolator(object): :arg expr: The expression to interpolate. :arg V: The :class:`.FunctionSpace` or :class:`.Function` to interpolate into. - :kwarg subset: An optional :class:`pyop2.Subset` to apply the + :kwarg subset: An optional :class:`pyop2.types.set.Subset` to apply the interpolation over. :kwarg freeze_expr: Set to True to prevent the expression being re-evaluated on each call. diff --git a/firedrake/matrix.py b/firedrake/matrix.py index e8157a8d3f..ef8e640ab3 100644 --- a/firedrake/matrix.py +++ b/firedrake/matrix.py @@ -87,8 +87,8 @@ class Matrix(MatrixBase): :arg mat_type: matrix type of assembled matrix. - A :class:`pyop2.Mat` will be built from the remaining - arguments, for valid values, see :class:`pyop2.Mat`. + A ``pyop2.types.mat.Mat`` will be built from the remaining + arguments, for valid values, see ``pyop2.types.mat.Mat`` source code. .. note:: diff --git a/firedrake/mesh.py b/firedrake/mesh.py index 4a8334865e..f9bc41d329 100644 --- a/firedrake/mesh.py +++ b/firedrake/mesh.py @@ -2035,7 +2035,7 @@ def Mesh(meshfile, **kwargs): * CGNS: with extension `.cgns` * Triangle: with extension `.node` * HDF5: with extension `.h5`, `.hdf5` - (Can only load HDF5 files created by :meth:`.MeshGeometry.save` method.) + (Can only load HDF5 files created by ``MeshGeometry.save`` method.) .. note:: @@ -2131,7 +2131,7 @@ def ExtrudedMesh(mesh, layers, layer_height=None, extrusion_type='uniform', kern :arg extrusion_type: the algorithm to employ to calculate the extruded coordinates. One of "uniform", "radial", "radial_hedgehog" or "custom". See below. - :arg kernel: a :class:`pyop2.Kernel` to produce coordinates for + :arg kernel: a ``pyop2.Kernel`` to produce coordinates for the extruded mesh. See :func:`~.make_extruded_coords` for more details. :arg gdim: number of spatial dimensions of the @@ -2158,7 +2158,7 @@ def ExtrudedMesh(mesh, layers, layer_height=None, extrusion_type='uniform', kern cell normal (this produces a P1dgxP1 coordinate field). In this case, a radially extruded coordinate field (generated with ``extrusion_type="radial"``) is - available in the :attr:`radial_coordinates` attribute. + available in the ``radial_coordinates`` attribute. ``"custom"`` use a custom kernel to generate the extruded coordinates diff --git a/firedrake/mg/kernels.py b/firedrake/mg/kernels.py index 6984f26d50..0666f30bca 100644 --- a/firedrake/mg/kernels.py +++ b/firedrake/mg/kernels.py @@ -498,7 +498,7 @@ def set_coefficients(self, coefficients): def set_coordinates(self, domain): """Prepare the coordinate field. - :arg domain: :class:`ufl.Domain` + :arg domain: :class:`ufl.AbstractDomain` """ # Create a fake coordinate coefficient for a domain. f = ufl.Coefficient(ufl.FunctionSpace(domain, domain.ufl_coordinate_element())) diff --git a/firedrake/mg/mesh.py b/firedrake/mg/mesh.py index 92130b6a20..e4eb1f67b8 100644 --- a/firedrake/mg/mesh.py +++ b/firedrake/mg/mesh.py @@ -100,7 +100,7 @@ def MeshHierarchy(mesh, refinement_levels, after refinement of the DM. The before callback receives the DM to be refined (and the current level), the after callback receives the refined DM (and the current level). - :arg mesh_builder: Function to turn a DM into a :class:`~.Mesh`. Used by pyadjoint. + :arg mesh_builder: Function to turn a DM into a ``Mesh``. Used by pyadjoint. """ cdm = mesh.topology_dm cdm.setRefinementUniform(True) @@ -194,7 +194,7 @@ def ExtrudedMeshHierarchy(base_hierarchy, height, base_layer=-1, refinement_rati in the extruded hierarchy. This option cannot be combined with base_layer and refinement_ratio. Note that the ratio of successive entries in this iterable must be an integer for the multigrid transfer operators to work. - :arg mesh_builder: function used to turn a :class:`~.Mesh` into an + :arg mesh_builder: function used to turn a ``Mesh`` into an extruded mesh. Used by pyadjoint. See :func:`~.ExtrudedMesh` for the meaning of the remaining parameters. @@ -247,7 +247,7 @@ def SemiCoarsenedExtrudedHierarchy(base_mesh, height, nref=1, base_layer=-1, ref in the extruded hierarchy. This option cannot be combined with base_layer and refinement_ratio. Note that the ratio of successive entries in this iterable must be an integer for the multigrid transfer operators to work. - :arg mesh_builder: function used to turn a :class:`~.Mesh` into an + :arg mesh_builder: function used to turn a ``Mesh`` into an extruded mesh. Used by pyadjoint. See :func:`~.ExtrudedMesh` for the meaning of the remaining parameters. diff --git a/firedrake/nullspace.py b/firedrake/nullspace.py index eb29796ef9..8d1b63193a 100644 --- a/firedrake/nullspace.py +++ b/firedrake/nullspace.py @@ -16,7 +16,7 @@ class VectorSpaceBasis(object): You can use this basis to express the null space of a singular operator. - :arg vecs: a list of :class:`.Vector`\s or :class:`.Functions` + :arg vecs: a list of :class:`.Vector`\s or :class:`.Function`\s spanning the space. :arg constant: does the null space include the constant vector? If you pass ``constant=True`` you should not also include the diff --git a/firedrake/output.py b/firedrake/output.py index 7242b6c99d..272856dbe3 100644 --- a/firedrake/output.py +++ b/firedrake/output.py @@ -370,7 +370,7 @@ def __init__(self, filename, project_output=False, comm=None, mode="w", :kwarg mode: "w" to overwrite any existing file, "a" to append to an existing file. :kwarg target_degree: override the degree of the output space. :kwarg target_continuity: override the continuity of the output space; - A UFL :class:`~.SobolevSpace` object: `H1` for a + A UFL :class:`ufl.sobolevspace.SobolevSpace` object: `H1` for a continuous output and `L2` for a discontinuous output. :kwarg adaptive: allow different meshes at different exports if `True`. diff --git a/firedrake/parloops.py b/firedrake/parloops.py index c3d4cffe74..eff31de910 100644 --- a/firedrake/parloops.py +++ b/firedrake/parloops.py @@ -193,12 +193,12 @@ def par_loop(kernel, measure, args, kernel_kwargs=None, is_loopy_kernel=False, * :class:`.Function`\s or components of mixed :class:`.Function`\s and indicates how these :class:`.Function`\s are to be accessed. :arg kernel_kwargs: keyword arguments to be passed to the - :class:`~pyop2.op2.Kernel` constructor + ``pyop2.Kernel`` constructor :arg kwargs: additional keyword arguments are passed to the underlying - :class:`~pyop2.par_loop` + ``pyop2.par_loop`` :kwarg iterate: Optionally specify which region of an - :class:`ExtrudedSet` to iterate over. + :class:`pyop2.types.set.ExtrudedSet` to iterate over. Valid values are the following objects from pyop2: - ``ON_BOTTOM``: iterate over the bottom layer of cells. diff --git a/firedrake/plot.py b/firedrake/plot.py index fa1be5ec38..40e92896c3 100644 --- a/firedrake/plot.py +++ b/firedrake/plot.py @@ -80,7 +80,7 @@ def triplot(mesh, axes=None, interior_kw={}, boundary_kw={}): interior facets that are marked will also be coloured. The interior and boundary keyword arguments can be any keyword argument for - :class:`LineCollection ` and + :class:`LineCollection ` and related types. :arg mesh: mesh to be plotted @@ -581,7 +581,7 @@ def streamplot(function, resolution=None, min_length=None, max_time=None, :arg start_width: line width at beginning of streamline :arg end_width: line width at end of streamline, to convey direction :arg tolerance: dimensionless tolerance for adaptive ODE integration - :arg loc_tolerance: point location tolerance for :meth:`~firedrake.functions.Function.at` + :arg loc_tolerance: point location tolerance for :meth:`~firedrake.function.Function.at` :kwarg complex_component: If plotting complex data, which component? (``'real'`` or ``'imag'``). Default is ``'real'``. :kwarg kwargs: same as for matplotlib :class:`~matplotlib.collections.LineCollection` diff --git a/firedrake/preconditioners/base.py b/firedrake/preconditioners/base.py index 8e9ff80b03..de5194c4b0 100644 --- a/firedrake/preconditioners/base.py +++ b/firedrake/preconditioners/base.py @@ -13,10 +13,10 @@ def __init__(self): Matrix free preconditioners should inherit from this class and implement: - - :meth:`initialize` - - :meth:`update` - - :meth:`apply` - - :meth:`applyTranspose` + - :meth:`~.PCSNESBase.initialize` + - :meth:`~.PCSNESBase.update` + - :meth:`~.PCBase.apply` + - :meth:`~.PCBase.applyTranspose` """ Citations().register("Kirby2017") @@ -37,7 +37,7 @@ def setUp(self, pc): """Setup method called by PETSc. Subclasses should probably not override this and instead - implement :meth:`update` and :meth:`initialize`.""" + implement :meth:`~.PCSNESBase.update` and :meth:`~.PCSNESBase.initialize`.""" if self.initialized: self.update(pc) diff --git a/firedrake/preconditioners/fdm.py b/firedrake/preconditioners/fdm.py index c2567de9e4..f7bcfae632 100644 --- a/firedrake/preconditioners/fdm.py +++ b/firedrake/preconditioners/fdm.py @@ -186,7 +186,7 @@ def assemble_fdm_op(self, V, J, bcs, appctx): """ Assemble the sparse preconditioner with cell-wise constant coefficients. - :arg V: the :class:`firedrake.FunctionSpace` of the form arguments + :arg V: the :class:`~.FunctionSpace` of the form arguments :arg J: the Jacobian bilinear form :arg bcs: an iterable of boundary conditions on V :arg appctx: the application context @@ -243,13 +243,13 @@ def assemble_kron(self, A, V, bcs, eta, coefficients, Afdm, Dfdm, bcflags): Assemble the stiffness matrix in the FDM basis using Kronecker products of interval matrices :arg A: the :class:`PETSc.Mat` to assemble - :arg V: the :class:`firedrake.FunctionSpace` of the form arguments - :arg bcs: an iterable of :class:`firedrake.DirichletBCs` + :arg V: the :class:`~.FunctionSpace` of the form arguments + :arg bcs: an iterable of :class:`~.DirichletBC` s :arg eta: a ``float`` penalty parameter for the symmetric interior penalty method - :arg coefficients: a ``dict`` mapping strings to :class:`firedrake.Functions` with the form coefficients + :arg coefficients: a ``dict`` mapping strings to :class:`firedrake.function.Function` s with the form coefficients :arg Afdm: the list with sparse interval matrices :arg Dfdm: the list with normal derivatives matrices - :arg bcflags: the :class:`numpy.ndarray` with BC facet flags returned by `get_weak_bc_flags` + :arg bcflags: the :class:`numpy.ndarray` with BC facet flags returned by ``get_weak_bc_flags`` """ from firedrake.preconditioners.pmg import get_axes_shift Gq = coefficients.get("Gq") @@ -452,7 +452,7 @@ def assemble_coef(self, J, quad_deg, discard_mixed=True, cell_average=True): :arg cell_average: to return the coefficients as DG_0 Functions :returns: a 2-tuple of - coefficients: a dictionary mapping strings to :class:`firedrake.Functions` with the coefficients of the form, + coefficients: a dictionary mapping strings to :class:`firedrake.function.Function` s with the coefficients of the form, assembly_callables: a list of assembly callables for each coefficient of the form """ from ufl import inner, diff @@ -676,7 +676,7 @@ def get_interior_facet_maps(V): """ Extrude V.interior_facet_node_map and V.ufl_domain().interior_facets.local_facet_dat - :arg V: a :class:`FunctionSpace` + :arg V: a :class:`~.FunctionSpace` :returns: the 3-tuple of facet_to_nodes_fun: maps interior facets to the nodes of the two cells sharing it, diff --git a/firedrake/progress_bar.py b/firedrake/progress_bar.py index 16e53b1b07..59b2451a0e 100644 --- a/firedrake/progress_bar.py +++ b/firedrake/progress_bar.py @@ -21,7 +21,7 @@ def iter(self, iterator): class ProgressBar(FillingSquaresBar): """A progress bar for simulation execution. - This is a subclass of :class:`progress.bar.FillingSquaresBar` which is + This is a subclass of ``progress.bar.FillingSquaresBar`` which is configured to be suitable for tracking progress in forward and adjoint simulations. It is also extended to only output on rank 0 in parallel. @@ -46,7 +46,7 @@ class ProgressBar(FillingSquaresBar): -------- To apply a progress bar to a loop, wrap the loop iterator in the - :meth:`iter` method of a `ProgressBar`: + ``iter`` method of a ``ProgressBar``: >>> for t in ProgressBar("Timestep").iter(np.linspace(0.0, 1.0, 10)): ... sleep(0.2) @@ -54,7 +54,7 @@ class ProgressBar(FillingSquaresBar): Timestep ▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣ 10/10 [0:00:02] To see progress bars for functional, adjoint and Hessian evaluations in an - adjoint simulation, set the :attr:`progress_bar` attribute of the tape to + adjoint simulation, set the ``progress_bar`` attribute of the tape to `ProgressBar`: >>> get_working_tape().progress_bar = ProgressBar diff --git a/firedrake/projection.py b/firedrake/projection.py index 475646a310..9fc5dd4e11 100644 --- a/firedrake/projection.py +++ b/firedrake/projection.py @@ -56,7 +56,7 @@ def project(v, V, bcs=None, It is possible to project onto the trace space 'DGT', but not onto other trace spaces e.g. into the restriction of CG onto the facets. - :arg v: the :class:`ufl.Expr` to project + :arg v: the :class:`ufl.core.expr.Expr` to project :arg V: the :class:`.FunctionSpace` or :class:`.Function` to project into :kwarg bcs: boundary conditions to apply in the projection :kwarg solver_parameters: parameters to pass to the solver used when @@ -253,7 +253,7 @@ def Projector(v, v_out, bcs=None, solver_parameters=None, It is possible to project onto the trace space 'DGT', but not onto other trace spaces e.g. into the restriction of CG onto the facets. - :arg v: the :class:`ufl.Expr` or + :arg v: the :class:`ufl.core.expr.Expr` or :class:`.Function` to project :arg V: :class:`.Function` (or :class:`~.FunctionSpace`) to put the result in. :arg bcs: an optional set of :class:`.DirichletBC` objects to apply diff --git a/firedrake/randomfunctiongen.py b/firedrake/randomfunctiongen.py index 220d7c3323..f42f1a9bab 100644 --- a/firedrake/randomfunctiongen.py +++ b/firedrake/randomfunctiongen.py @@ -31,16 +31,16 @@ BitGenerator ------------ -A :class:`.BitGenerator` is the base class for bit generators; see `numpy.random.BitGenerator `__. -A :class:`.BitGenerator` takes an additional keyword argument ``comm`` (defaulting to ``COMM_WORLD``). -If ``comm.Get_rank() > 1``, :class:`.PCG64`, :class:`.PCG64DXSM`, or :class:`.Philox` should be used, as these bit generators are known to be parallel-safe. +A ``.BitGenerator`` is the base class for bit generators; see `numpy.random.BitGenerator `__. +A ``.BitGenerator`` takes an additional keyword argument ``comm`` (defaulting to ``COMM_WORLD``). +If ``comm.Get_rank() > 1``, ``.PCG64``, ``.PCG64DXSM``, or ``.Philox`` should be used, as these bit generators are known to be parallel-safe. PCG64 ~~~~~ -:class:`.PCG64` wraps `numpy.random.PCG64 `__. +``.PCG64`` wraps `numpy.random.PCG64 `__. If ``seed`` keyword is not provided by the user, it is set using `numpy.random.SeedSequence `__. -To make :class:`.PCG64` automatically generate multiple streams in parallel, Firedrake preprocesses the ``seed`` as the following before +To make ``.PCG64`` automatically generate multiple streams in parallel, Firedrake preprocesses the ``seed`` as the following before passing it to `numpy.random.PCG64 `__: .. code-block:: python3 @@ -52,7 +52,7 @@ .. note:: - ``inc`` is no longer a valid keyword for :class:`.PCG64` constructor. However, one can reset the ``state`` after construction as: + ``inc`` is no longer a valid keyword for ``.PCG64`` constructor. However, one can reset the ``state`` after construction as: .. code-block:: python3 @@ -64,9 +64,9 @@ PCG64DXSM ~~~~~~~~~ -:class:`.PCG64DXSM` wraps `numpy.random.PCG64DXSM `__. +``.PCG64DXSM`` wraps `numpy.random.PCG64DXSM `__. If ``seed`` keyword is not provided by the user, it is set using `numpy.random.SeedSequence `__. -To make :class:`.PCG64DXSM` automatically generate multiple streams in parallel, Firedrake preprocesses the ``seed`` as the following before +To make ``.PCG64DXSM`` automatically generate multiple streams in parallel, Firedrake preprocesses the ``seed`` as the following before passing it to `numpy.random.PCG64DXSM `__: .. code-block:: python3 @@ -78,7 +78,7 @@ .. note:: - ``inc`` is no longer a valid keyword for :class:`.PCG64DXSM` constructor. However, one can reset the ``state`` after construction as: + ``inc`` is no longer a valid keyword for ``.PCG64DXSM`` constructor. However, one can reset the ``state`` after construction as: .. code-block:: python3 @@ -90,8 +90,8 @@ Philox ~~~~~~ -:class:`.Philox` wraps `numpy.random.Philox `__. -If the ``key`` keyword is not provided by the user, :class:`.Philox` computes a default key as: +``.Philox`` wraps `numpy.random.Philox `__. +If the ``key`` keyword is not provided by the user, ``.Philox`` computes a default key as: .. code-block:: python3 diff --git a/firedrake/slate/slac/compiler.py b/firedrake/slate/slac/compiler.py index a8bc2177c0..c7dd52ad26 100644 --- a/firedrake/slate/slac/compiler.py +++ b/firedrake/slate/slac/compiler.py @@ -102,13 +102,13 @@ def __init__(self, expr, compiler_parameters, coffee=False): def compile_expression(slate_expr, compiler_parameters=None, coffee=False): """Takes a Slate expression `slate_expr` and returns the appropriate - :class:`firedrake.op2.Kernel` object representing the Slate expression. + ``pyop2.op2.Kernel`` object representing the Slate expression. - :arg slate_expr: a :class:'TensorBase' expression. + :arg slate_expr: a :class:`~.Tensor` expression. :arg tsfc_parameters: an optional `dict` of form compiler parameters to be passed to TSFC during the compilation of ufl forms. - Returns: A `tuple` containing a `SplitKernel(idx, kinfo)` + Returns: A ``tuple`` containing a ``SplitKernel(idx, kinfo)`` """ if complex_mode: raise NotImplementedError("SLATE doesn't work in complex mode yet") diff --git a/firedrake/slate/slac/kernel_builder.py b/firedrake/slate/slac/kernel_builder.py index fe2f1d60aa..f78f5c6e3b 100644 --- a/firedrake/slate/slac/kernel_builder.py +++ b/firedrake/slate/slac/kernel_builder.py @@ -37,7 +37,7 @@ the vector temporary for assignment. :param shape: A singleton with an integer describing the shape of the coefficient temporary. -:param vector: The :class:`slate.AssembledVector` containing the +:param vector: The :class:`~.slate.AssembledVector` containing the relevant data to be placed into the temporary. :param local_temp: The local temporary for the coefficient vector. """ @@ -97,7 +97,7 @@ class LocalKernelBuilder(object): def __init__(self, expression, tsfc_parameters=None): """Constructor for the LocalKernelBuilder class. - :arg expression: a :class:`TensorBase` object. + :arg expression: a :class:`~.firedrake.slate.TensorBase` object. :arg tsfc_parameters: an optional `dict` of parameters to provide to TSFC when constructing subkernels associated with the expression. """ @@ -429,7 +429,7 @@ class LocalLoopyKernelBuilder(object): def __init__(self, expression, tsfc_parameters=None): """Constructor for the LocalGEMKernelBuilder class. - :arg expression: a :class:`TensorBase` object. + :arg expression: a :class:`~.firedrake.slate.TensorBase` object. :arg tsfc_parameters: an optional `dict` of parameters to provide to TSFC when constructing subkernels associated with the expression. """ diff --git a/firedrake/slate/slac/tsfc_driver.py b/firedrake/slate/slac/tsfc_driver.py index 59272bcc23..b57a27b112 100644 --- a/firedrake/slate/slac/tsfc_driver.py +++ b/firedrake/slate/slac/tsfc_driver.py @@ -29,12 +29,12 @@ def compile_terminal_form(tensor, prefix, *, tsfc_parameters=None, coffee=True): - """Compiles the TSFC form associated with a Slate :class:`Tensor` + """Compiles the TSFC form associated with a Slate :class:`~.Tensor` object. This function will return a :class:`ContextKernel` which stores information about the original tensor, integral types and the corresponding TSFC kernels. - :arg tensor: A Slate `Tensor`. + :arg tensor: A Slate `~.Tensor`. :arg prefix: An optional `string` indicating the prefix for the subkernel. :arg tsfc_parameters: An optional `dict` of parameters to provide diff --git a/firedrake/slate/slac/utils.py b/firedrake/slate/slac/utils.py index 8f309d6248..3bd1224d77 100644 --- a/firedrake/slate/slac/utils.py +++ b/firedrake/slate/slac/utils.py @@ -66,8 +66,8 @@ class Transformer(Visitor): class is primarily for COFFEE acrobatics, jumping through nodes and redefining where appropriate. - The default name of :data:`"A"` is assigned, otherwise a - specified name may be passed as the :data:`name` keyword + The default name of ``"A"`` is assigned, otherwise a + specified name may be passed as the :data:``name`` keyword argument when calling the visitor. """ diff --git a/firedrake/slate/slate.py b/firedrake/slate/slate.py index f2f2b034e7..30428470a1 100644 --- a/firedrake/slate/slate.py +++ b/firedrake/slate/slate.py @@ -413,7 +413,7 @@ def __hash__(self): class AssembledVector(TensorBase): """This class is a symbolic representation of an assembled - vector of data contained in a :class:`firedrake.Function`. + vector of data contained in a :class:`~.Function`. :arg function: A firedrake function. """ @@ -496,7 +496,7 @@ def _key(self): class BlockAssembledVector(AssembledVector): """This class is a symbolic representation of an assembled - vector of data contained in a set of :class:`firedrake.Function` s + vector of data contained in a set of :class:`~.Function` s defined on pieces of a split mixed function space. :arg functions: A tuple of firedrake functions. @@ -931,7 +931,7 @@ class TensorOp(TensorBase): """An abstract Slate class representing general operations on existing Slate tensors. - :arg operands: an iterable of operands that are :class:`TensorBase` + :arg operands: an iterable of operands that are :class:`~.firedrake.slate.TensorBase` objects. """ @@ -987,7 +987,7 @@ class UnaryOp(TensorOp): """An abstract Slate class for representing unary operations on a Tensor object. - :arg A: a :class:`TensorBase` object. This can be a terminal tensor object + :arg A: a :class:`~.firedrake.slate.TensorBase` object. This can be a terminal tensor object (:class:`Tensor`) or any derived expression resulting from any number of linear algebra operations on `Tensor` objects. For example, another instance of a `UnaryOp` object is an acceptable @@ -1132,12 +1132,12 @@ class BinaryOp(TensorOp): """An abstract Slate class representing binary operations on tensors. Such operations take two operands and returns a tensor-valued expression. - :arg A: a :class:`TensorBase` object. This can be a terminal tensor object + :arg A: a :class:`~.firedrake.slate.TensorBase` object. This can be a terminal tensor object (:class:`Tensor`) or any derived expression resulting from any number of linear algebra operations on `Tensor` objects. For example, another instance of a `BinaryOp` object is an acceptable input, or a `UnaryOp` object. - :arg B: a :class:`TensorBase` object. + :arg B: a :class:`~.firedrake.slate.TensorBase` object. """ def _output_string(self, prec=None): @@ -1166,8 +1166,8 @@ class Add(BinaryOp): """Abstract Slate class representing matrix-matrix, vector-vector or scalar-scalar addition. - :arg A: a :class:`TensorBase` object. - :arg B: another :class:`TensorBase` object. + :arg A: a :class:`~.firedrake.slate.TensorBase` object. + :arg B: another :class:`~.firedrake.slate.TensorBase` object. """ def __init__(self, A, B): @@ -1207,8 +1207,8 @@ class Mul(BinaryOp): equal or lower rank via performing a contraction on arguments. This includes Matrix-Matrix and Matrix-Vector multiplication. - :arg A: a :class:`TensorBase` object. - :arg B: another :class:`TensorBase` object. + :arg A: a :class:`~.firedrake.slate.TensorBase` object. + :arg B: another :class:`~.firedrake.slate.TensorBase` object. """ def __init__(self, A, B): diff --git a/firedrake/solving.py b/firedrake/solving.py index 5ec14cac54..c3b11bbf21 100644 --- a/firedrake/solving.py +++ b/firedrake/solving.py @@ -94,7 +94,7 @@ def solve(*args, **kwargs): The nonlinear solver uses a PETSc SNES object under the hood. To pass options to it, use the same options names as you would for - pure PETSc code. See :class:`NonlinearVariationalSolver` for more + pure PETSc code. See :class:`~.NonlinearVariationalSolver` for more details. .. code-block:: python3 diff --git a/firedrake/tsfc_interface.py b/firedrake/tsfc_interface.py index bc92def201..8b644337c8 100644 --- a/firedrake/tsfc_interface.py +++ b/firedrake/tsfc_interface.py @@ -181,7 +181,7 @@ def compile_form(form, name, parameters=None, split=True, interface=None, coffee :arg coffee: compile coffee kernel instead of loopy kernel Returns a tuple of tuples of - (index, integral type, subdomain id, coordinates, coefficients, needs_orientations, :class:`Kernels `). + (index, integral type, subdomain id, coordinates, coefficients, needs_orientations, ``pyop2.op2.Kernel``). ``needs_orientations`` indicates whether the form requires cell orientation information (for correctly pulling back to reference @@ -290,7 +290,7 @@ def gather_integer_subdomain_ids(knls): def as_pyop2_local_kernel(ast, name, nargs, access=op2.INC, **kwargs): - """Convert a loopy kernel to a PyOP2 :class:`pyop2.LocalKernel`. + """Convert a loopy kernel to a PyOP2 ``pyop2.LocalKernel``. :arg ast: The kernel code. This could be, for example, a loopy kernel. :arg name: The kernel name. diff --git a/firedrake/vector.py b/firedrake/vector.py index 894383bde7..bd4febe684 100644 --- a/firedrake/vector.py +++ b/firedrake/vector.py @@ -46,7 +46,7 @@ def as_backend_type(tensor): class Vector(object): def __init__(self, x): - """Build a `Vector` that wraps a :class:`pyop2.Dat` for Dolfin compatibilty. + """Build a `Vector` that wraps a :class:`pyop2.types.dat.Dat` for Dolfin compatibilty. :arg x: an :class:`~.Function` to wrap or a :class:`Vector` to copy. The former shares data, the latter copies data. diff --git a/firedrake_citations/__init__.py b/firedrake_citations/__init__.py index eaa65ead7c..02f60a0c98 100644 --- a/firedrake_citations/__init__.py +++ b/firedrake_citations/__init__.py @@ -47,7 +47,7 @@ def register(self, key): :arg key: The key of the relevant citation. - :raises: :exc:`~.exceptions.KeyError` if no such citation is + :raises: :exc:`KeyError` if no such citation is found in the database. Papers to be cited can be added using :meth:`add`. From 90e57ee7c0b0feb1197676ef46536491d8ae540e Mon Sep 17 00:00:00 2001 From: JDBetteridge Date: Fri, 3 Feb 2023 17:46:28 +0000 Subject: [PATCH 20/30] Fix or remove all broken external links --- .github/workflows/docs.yml | 1 + AUTHORS.rst | 2 +- demos/benney_luke/benney_luke.py.rst | 3 +- demos/demo_references.bib | 4 +- .../saddle_point_systems.py.rst | 8 ++-- docs/source/_static/bibliography.bib | 20 ++++---- docs/source/checkpointing.rst | 2 +- docs/source/citing.rst | 4 +- docs/source/conf.py | 9 ++++ docs/source/events.rst | 4 +- docs/source/fenics_15.rst | 10 ++-- docs/source/firedrake_17.rst | 8 ++-- docs/source/firedrake_19.rst | 12 ++--- docs/source/firedrake_citations.rst | 13 ++++++ docs/source/firedrake_usa_20.rst | 5 +- docs/source/petsc-interface.rst | 2 +- docs/source/solving-interface.rst | 46 +++++++++---------- docs/source/team.ini | 4 +- docs/source/variational-problems.rst | 4 +- firedrake/slate/slac/compiler.py | 2 +- 20 files changed, 91 insertions(+), 72 deletions(-) create mode 100644 docs/source/firedrake_citations.rst diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9fcd484d99..e4ae4a0876 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -48,6 +48,7 @@ jobs: run: | . /home/firedrake/firedrake/bin/activate cd docs + make linkcheck make html make latex make latexpdf diff --git a/AUTHORS.rst b/AUTHORS.rst index 7d7ae613a4..d09bcdd007 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -25,7 +25,7 @@ University of Leeds........... University of Oxford.......... -University of Washington...... +University of Washington...... diff --git a/demos/benney_luke/benney_luke.py.rst b/demos/benney_luke/benney_luke.py.rst index 2307814e2a..369a5b142f 100644 --- a/demos/benney_luke/benney_luke.py.rst +++ b/demos/benney_luke/benney_luke.py.rst @@ -10,8 +10,7 @@ Benney-Luke equations: a reduced water wave model The work is based on the article "Variational water wave modelling: from continuum to experiment" by Onno Bokhove and Anna Kalogirou :cite:`2015:lmscup`. The authors gratefully - acknowledge funding from EPSRC grant no. `EP/L025388/1 - `__ + acknowledge funding from EPSRC grant no. EP/L025388/1 with a link to the Dutch Technology Foundation STW for the project "FastFEM: behavior of fast ships in waves". diff --git a/demos/demo_references.bib b/demos/demo_references.bib index 996316341c..916fe76a2d 100644 --- a/demos/demo_references.bib +++ b/demos/demo_references.bib @@ -44,7 +44,7 @@ @InBook{2015:lmscup series = {LMS Lecture Note Series}, isbn = 9781107565562, url = - {http://www1.maths.leeds.ac.uk/~matak/documents/lms-cup2015.pdf} + {https://www.cambridge.org/core/books/lectures-on-the-theory-of-water-waves/5BA234D75E0067EDBC15B3F3839923DD} } @Article{Gidel:2017, @@ -246,7 +246,7 @@ @Article{Salwa:2016 journal = {Extended paper for Int. Conf. on Ocean, Offshore and Arctic Eng., OMAE2016, Busan, South-Korea}, month = {June}, year = 2016, - url = "http://proceedings.asmedigitalcollection.asme.org/proceeding.aspx?articleID=2570974" + url = "https://asmedigitalcollection.asme.org/OMAE/proceedings-abstract/OMAE2016/49972/281268" } @Article{Chin:1999, diff --git a/demos/saddle_point_pc/saddle_point_systems.py.rst b/demos/saddle_point_pc/saddle_point_systems.py.rst index d010e8d13c..d559a3b0b6 100644 --- a/demos/saddle_point_pc/saddle_point_systems.py.rst +++ b/demos/saddle_point_pc/saddle_point_systems.py.rst @@ -221,7 +221,7 @@ Schur complement approaches ~~~~~~~~~~~~~~~~~~~~~~~~~~~ A better approach is to use a Schur complement preconditioner, -described in :ref:`mixed_preconditioning`. The system we are trying +described in :ref:`mixed-preconditioning`. The system we are trying to solve is conceptually a :math:`2\times 2` block matrix. .. math:: @@ -622,6 +622,6 @@ A runnable python script version of this demo is available `here .. _PETSc: https://petsc.org/ .. _hypre: https://hypre.readthedocs.io/en/latest/ -.. _PyOP2: http://github.com/OP2/PyOP2/ -.. _numpy: http://www.numpy.org -.. _MUMPS: http://mumps.enseeiht.fr +.. _PyOP2: https://github.com/OP2/PyOP2/ +.. _numpy: https://www.numpy.org +.. _MUMPS: https://mumps-solver.org/index.php diff --git a/docs/source/_static/bibliography.bib b/docs/source/_static/bibliography.bib index 36613e0b83..b576c90ed9 100644 --- a/docs/source/_static/bibliography.bib +++ b/docs/source/_static/bibliography.bib @@ -20,7 +20,7 @@ @article{Bercea2016 title = {A structure-exploiting numbering algorithm for finite elements on extruded meshes, and its performance evaluation in Firedrake}, - url = {http://arxiv.org/abs/1604.05937}, + url = {https://arxiv.org/abs/1604.05937}, volume = {9}, year = {2016} } @@ -36,7 +36,7 @@ @misc{Gibson2018 pages = {735--761}, primaryclass = {cs.MS}, publisher = {Copernicus Publications}, - title = {{Slate: extending Firedrake's domain-specific abstraction to + title = {{Slate: extending Firedrake's domain-specific abstraction to hybridized solvers for geoscience and beyond.}}, url = {https://arxiv.org/abs/1802.00303}, volume = {13}, @@ -71,7 +71,7 @@ @article{Homolya2016 primaryclass = {cs.MS}, title = {A parallel edge orientation algorithm for quadrilateral meshes}, - url = {http://arxiv.org/abs/1505.03357}, + url = {https://arxiv.org/abs/1505.03357}, volume = {38}, year = {2016} } @@ -84,7 +84,7 @@ @misc{Homolya2017a primaryclass = {cs.MS}, title = {{Exposing and exploiting structure: optimal code generation for high-order finite element methods}}, - url = {http://arxiv.org/abs/1711.02473}, + url = {https://arxiv.org/abs/1711.02473}, year = {2017} } @@ -112,7 +112,7 @@ @article{Kirby2017 primaryclass = {cs.MS}, title = {{Solver composition across the PDE/linear algebra barrier}}, - url = {http://arxiv.org/abs/1706.01346}, + url = {https://arxiv.org/abs/1706.01346}, volume = {40}, year = {2018} } @@ -124,7 +124,7 @@ @misc{Kirby2018 primaryclass = {cs.MS}, title = {Code generation for generally mapped finite elements}, - url = {http://arxiv.org/abs/1808.05513}, + url = {https://arxiv.org/abs/1808.05513}, year = {2018} } @@ -140,7 +140,7 @@ @article{Lange2016 primaryclass = {cs.MS}, title = {Efficient mesh management in {Firedrake} using {PETSc-DMPlex}}, - url = {http://arxiv.org/abs/1506.07749}, + url = {https://arxiv.org/abs/1506.07749}, volume = {38}, year = {2016} } @@ -239,7 +239,7 @@ @article{McRae2016 primaryclass = {math.NA}, title = {Automated generation and symbolic manipulation of tensor product finite elements}, - url = {http://arxiv.org/abs/1411.2940}, + url = {https://arxiv.org/abs/1411.2940}, volume = {38}, year = {2016} } @@ -255,7 +255,7 @@ @article{Mitchell2016 title = {High level implementation of geometric multigrid solvers for finite element problems: applications in atmospheric modelling}, - url = {http://arxiv.org/abs/1605.00492}, + url = {https://arxiv.org/abs/1605.00492}, volume = {327}, year = {2016} } @@ -292,7 +292,7 @@ @article{Rathgeber2016 primaryclass = {cs.MS}, title = {Firedrake: Automating the Finite Element Method by Composing Abstractions}, - url = {http://arxiv.org/abs/1501.01809}, + url = {https://arxiv.org/abs/1501.01809}, volume = {43}, year = {2016} } diff --git a/docs/source/checkpointing.rst b/docs/source/checkpointing.rst index 6cf9d9f933..074769d1cc 100644 --- a/docs/source/checkpointing.rst +++ b/docs/source/checkpointing.rst @@ -526,4 +526,4 @@ correctly following the instructions for custom installation here_. .. _Viewer: http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Viewer/index.html .. _h5py: http://www.h5py.org -.. _here: http://docs.h5py.org/en/latest/build.html#custom-installation +.. _here: https://docs.h5py.org/en/latest/build.html#custom-installation diff --git a/docs/source/citing.rst b/docs/source/citing.rst index 2747eb97b4..dafc3208f7 100644 --- a/docs/source/citing.rst +++ b/docs/source/citing.rst @@ -21,7 +21,7 @@ computation be printed when exiting by calling Alternatively, you can select that this should occur by passing the command-line option ``-citations``. In both cases, you will also obtain the correct `citations for PETSc -`_. +`_. If you cannot use this approach, there are a number of papers. Those which are relevant depend a little on which functionality you used. @@ -50,7 +50,7 @@ Citing other packages Firedrake relies heavily on PETSc, which you should cite `appropriately -`_. +`_. Additionally, if you talk about UFL in your work, please cite the `UFL paper `_. diff --git a/docs/source/conf.py b/docs/source/conf.py index ac544a5e64..b07fb946f8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -139,6 +139,15 @@ ('py:class', 'firedrake.solving_utils._SNESContext'), ] +# Dodgy links +linkcheck_ignore = [ + r'https://doi\.org/.*', + r'https://epubs\.siam\.org/doi/.*', + r'https://www\.apl\.washington\.edu/', + r'https://asmedigitalcollection\.asme\.org/', +] +linkcheck_timeout = 10 + # -- Options for HTML output --------------------------------------------- diff --git a/docs/source/events.rst b/docs/source/events.rst index 000b7a5193..027833310d 100644 --- a/docs/source/events.rst +++ b/docs/source/events.rst @@ -59,7 +59,7 @@ Firedrake tutorial at RWTH Aachen University Jun 18 2019 There was a hands-on Firedrake tutorial at the Aachen Institute for Advanced Study in Computational Engineering Science (AICES) on 18 June 2019. For more details see `their website `_. - + Firedrake tutorial at CSE 19 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -107,7 +107,7 @@ Firedrake tutorial at CNRS The Firedrake team presented a Firedrake tutorial at CNRS in Paris. See `this web page -`_. The tutorial +`_. The tutorial materials are accessible as part of the :doc:`firedrake documentation `. diff --git a/docs/source/fenics_15.rst b/docs/source/fenics_15.rst index ec19f4b150..cddb3368d0 100644 --- a/docs/source/fenics_15.rst +++ b/docs/source/fenics_15.rst @@ -21,9 +21,9 @@ a high productivity computational environment for finite element problems. Programme --------- -`The schedule is now online `_. +`The schedule is now online `_. -* **Keynote lecture:** `Dr Jennifer Ryan `_, University of East Anglia. +* **Keynote lecture:** Dr Jennifer Ryan, University of East Anglia. * **Public lecture:** `Prof. Anders Logg `_, Chalmers University. * **Featured talks:** * `Dr Jack Hale `_ University of Luxembourg. @@ -78,14 +78,14 @@ Accommodation For those looking for affordable accommodation right on campus, `Imperial College's halls of residence `_ are available to summer visitors starting on 29 June. Alternatively, -you can make use of `Imperial's rates at nearby hotels `_. +you can make use of `Imperial's rates at nearby hotels `_. Scientific committee -------------------- * `David Ham `_ (Imperial College London) -* `Martin Alnæs `_ (Simula) +* Martin Alnæs (Simula) * Jan Blechta (Charles University) Local organising committee @@ -101,7 +101,7 @@ Sponsors FEniCS '15 is supported by: - |Imperial College London| |EPSRC| |NERC| + |Imperial College London| |EPSRC| |NERC| .. |NERC| image:: /images/nerc.* diff --git a/docs/source/firedrake_17.rst b/docs/source/firedrake_17.rst index 16b016bca6..940c0a3225 100644 --- a/docs/source/firedrake_17.rst +++ b/docs/source/firedrake_17.rst @@ -6,10 +6,10 @@ :width: 30% :alt: Queen's Tower, Imperial College :align: right - + Firedrake '17 ------------- - + We are very happy to announce that the first Firedrake user and developer workshop will be held on 27 and 28 March 2017. @@ -38,7 +38,7 @@ Key Dates Programme --------- -The programme is `now online `_. +The programme is `now online `_. Presenters are invited to consider how their contribution could help other users achieve more with Firedrake, and also how Firedrake could be developed to @@ -65,7 +65,7 @@ are full. There are still a few places available for the tutorial on the Monday morning. For this, please register below. .. raw:: html - + diff --git a/docs/source/firedrake_19.rst b/docs/source/firedrake_19.rst index c0203da334..c878a34e0d 100644 --- a/docs/source/firedrake_19.rst +++ b/docs/source/firedrake_19.rst @@ -7,10 +7,10 @@ :alt: Durham Cathedral :align: right :target: https://commons.wikimedia.org/wiki/File:Durham_MMB_02_Cathedral.jpg - + Firedrake '19 ------------- - + We are very happy to announce that the third Firedrake user and developer workshop will be held on 26 and 27 September 2019 at `Durham University `_. @@ -33,9 +33,8 @@ Key Dates --------- * Early registration deadline: 17 August 2019 -* Registration deadline: 6 September 2019 (`via Durham event - registration - `_). +* Registration deadline: 6 September 2019 (via Durham event + registration). * Abstract submission deadline: 17 August 2019 (`via Easychair `_). * Workshop: 26-27 September 2019 @@ -95,8 +94,7 @@ Registration ------------ Early bird registration is now closed. Registration (before 6th -September) costs £80. Please register `via Event Durham -`_. +September) costs £80. Please register via Event Durham. Registration for the tutorial only is free. diff --git a/docs/source/firedrake_citations.rst b/docs/source/firedrake_citations.rst new file mode 100644 index 0000000000..c400165b26 --- /dev/null +++ b/docs/source/firedrake_citations.rst @@ -0,0 +1,13 @@ +:orphan: + + +firedrake\_citations package +============================ + +Module contents +--------------- + +.. automodule:: firedrake_citations + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/firedrake_usa_20.rst b/docs/source/firedrake_usa_20.rst index ff8063e3e5..945d5004e3 100644 --- a/docs/source/firedrake_usa_20.rst +++ b/docs/source/firedrake_usa_20.rst @@ -7,7 +7,7 @@ :alt: Rainier Vista :align: right :target: https://uwartsci.files.wordpress.com/2011/04/rainier-vista.jpg - + Firedrake USA '20 ----------------- @@ -82,8 +82,7 @@ Early registration is now open. Registration will rise to $40 for students and $ Organising Committee -------------------- -* `Daniel Shapero - `__, +* Daniel Shapero, University of Washington. * `David Ham `_, Imperial College London. diff --git a/docs/source/petsc-interface.rst b/docs/source/petsc-interface.rst index a126989550..f3853191ec 100644 --- a/docs/source/petsc-interface.rst +++ b/docs/source/petsc-interface.rst @@ -410,4 +410,4 @@ entity ``d`` (according to the DMPlex numbering) by .. _Sherman-Morrison formula: https://en.wikipedia.org/wiki/Sherman%E2%80%93Morrison_formula .. _Firedrake DMPlex paper: https://arxiv.org/abs/1506.07749 .. _PETSc manual: https://petsc.org/release/docs/manual/dmplex/ -.. _its numbering: https://petsc.org/release/docs/manual/dmplex/#data-layout +.. _its numbering: https://petsc.org/release/docs/manual/dmplex/#data-layout-by-hand diff --git a/docs/source/solving-interface.rst b/docs/source/solving-interface.rst index 7eb0ce6144..2e227dd8d3 100644 --- a/docs/source/solving-interface.rst +++ b/docs/source/solving-interface.rst @@ -265,8 +265,8 @@ precondition the system with: .. code-block:: python3 - solve(a == L, - solver_parameters={'pc_type': 'hypre', + solve(a == L, + solver_parameters={'pc_type': 'hypre', 'pc_hypre_type': 'boomeramg'}) Although the `KSP` name suggests that only Krylov methods are @@ -277,7 +277,7 @@ do this, we set the ``pc_type`` to ``'lu'`` and tell PETSc to use a .. code-block:: python3 - solve(a == L, + solve(a == L, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) @@ -286,7 +286,7 @@ iterations with: .. code-block:: python3 - solve(a == L, + solve(a == L, solver_parameters={'ksp_type': 'richardson', 'pc_type': 'jacobi'} @@ -350,7 +350,7 @@ use: Finally, we can set the maximum allowed number of iterations for the Krylov method by using the ``'ksp_max_it'`` option. -.. _mixed_preconditioning: +.. _mixed-preconditioning: Preconditioning mixed finite element systems ++++++++++++++++++++++++++++++++++++++++++++ @@ -384,12 +384,12 @@ space. u, p = TrialFunctions(W) v, q = TestFunctions(W) f = Function(V2) - + a = (p*q - q*div(u) + lmbda*inner(v, u) + div(v)*p)*dx L = f*q*dx u = Function(W) - solve(a == L, u, + solve(a == L, u, solver_parameters={'ksp_type': 'cg', 'pc_type': 'fieldsplit', 'pc_fieldsplit_type': 'schur', @@ -653,7 +653,7 @@ to solve the linear system we would write: .. code-block:: python3 - solve(F == 0, u, + solve(F == 0, u, solver_parameters={'snes_type': 'newtonls', 'ksp_type': 'preonly', 'pc_type': 'lu'} @@ -841,7 +841,7 @@ Singular operators in mixed spaces ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If you have an operator in a mixed space, you may well precondition -the system using a `Schur complement `_. If +the system using a :ref:`Schur complement `. If the operator is singular, you will therefore have to tell the solver about the null space of each diagonal block separately. To do this in Firedrake, we build a @@ -905,7 +905,7 @@ badly conditioned. If the problem is small, we can try using a direct solve to see if the solution obtained is correct: .. code-block:: python3 - + solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'} If this approach fails with a "zero-pivot" error, it is likely that @@ -920,7 +920,7 @@ using an algebraic multigrid preconditioner. If PETSc was installed with Hypre use: .. code-block:: python3 - + solver_parameters={'pc_type': 'hypre', 'pc_hypre_type': 'boomeramg'} If you're using a symmetric method, such as conjugate gradient, check @@ -938,7 +938,7 @@ difficult problems this might be too low, in which case, you can increase the restart length with: .. code-block:: python3 - + solver_parameters={'ksp_gmres_restart': 100} @@ -1103,15 +1103,15 @@ Notice how now the differences are small (within expected error tolerances) so we are happy that the Jacobian is correct. -.. _Hypre: http://computation.llnl.gov/projects/hypre-scalable-linear-solvers-multigrid-methods/software -.. _PETSc: http://www.mcs.anl.gov/petsc/ -.. _PETSc manual: http://www.mcs.anl.gov/petsc/petsc-current/docs/manual.pdf -.. _KSP: http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/KSP/ -.. _SNES: http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/SNES/ -.. _fieldsplit: http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCFIELDSPLIT.html -.. _PETSc FAQ: http://www.mcs.anl.gov/petsc/documentation/faq.html -.. _SNES nonconvergence: http://www.mcs.anl.gov/petsc/documentation/faq.html#newton -.. _KSP nonconvergence: http://www.mcs.anl.gov/petsc/documentation/faq.html#kspdiverged -.. _LSC: http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCLSC.html -.. _UFL: http://fenics-ufl.readthedocs.io/en/latest/ +.. _Hypre: https://computing.llnl.gov/projects/hypre-scalable-linear-solvers-multigrid-methods +.. _PETSc: https://petsc.org/release/ +.. _PETSc manual: https://petsc.org/release/docs/manual/manual.pdf +.. _KSP: https://petsc.org/release/docs/manualpages/KSP/ +.. _SNES: https://petsc.org/release/docs/manualpages/SNES/ +.. _fieldsplit: https://petsc.org/release/docs/manualpages/PC/PCFIELDSPLIT/ +.. _PETSc FAQ: https://petsc.org/release/faq +.. _SNES nonconvergence: https://petsc.org/release/faq/#why-is-newton-s-method-snes-not-converging-or-converges-slowly +.. _KSP nonconvergence: https://petsc.org/release/faq/#why-is-the-linear-solver-ksp-not-converging-or-converges-slowly +.. _LSC: https://petsc.org/release/docs/manualpages/PC/PCLSC/ +.. _UFL: https://fenics-ufl.readthedocs.io/en/latest/ .. _firedrake_bugs: mailto:firedrake@imperial.ac.uk diff --git a/docs/source/team.ini b/docs/source/team.ini index b21f28f081..377a11865a 100644 --- a/docs/source/team.ini +++ b/docs/source/team.ini @@ -14,7 +14,7 @@ gh: https://github.com Imperial College London: http://www.imperial.ac.uk University of Oxford: https://www.ox.ac.uk Baylor University: https://www.baylor.edu -University of Washington: http://www.washington.edu +University of Washington: https://www.washington.edu [Imperial College London] Department of Mathematics: ${a:icl}/mathematics @@ -28,7 +28,7 @@ Mathematical Institute: https://www.maths.ox.ac.uk Department of Mathematics: ${dev-institution:Baylor University}/math [University of Washington] -Applied Physics Laboratory: http://www.apl.washington.edu/ +Applied Physics Laboratory: https://www.apl.washington.edu/ [active-team] # Use format diff --git a/docs/source/variational-problems.rst b/docs/source/variational-problems.rst index 1976e6c83b..b4ba2685dc 100644 --- a/docs/source/variational-problems.rst +++ b/docs/source/variational-problems.rst @@ -650,8 +650,8 @@ problems. .. _triangle: http://www.cs.cmu.edu/~quake/triangle.html .. _Gmsh: http://gmsh.info/ .. _CGNS: http://cgns.github.io/ -.. _Exodus: https://gsjaardema.github.io/seacas/exodusII-new.pdf -.. _UFL: http://arxiv.org/abs/1211.4047 +.. _Exodus: https://sandialabs.github.io/seacas-docs/sphinx/html/ +.. _UFL: https://arxiv.org/abs/1211.4047 .. _UFL_package: http://fenics-ufl.readthedocs.io/en/latest/ .. _FIAT: https://github.com/firedrakeproject/fiat .. _submanifold: https://en.wikipedia.org/wiki/Submanifold diff --git a/firedrake/slate/slac/compiler.py b/firedrake/slate/slac/compiler.py index c7dd52ad26..cd9b5ac0c0 100644 --- a/firedrake/slate/slac/compiler.py +++ b/firedrake/slate/slac/compiler.py @@ -10,7 +10,7 @@ COFFEE's AST base helps with the construction of code blocks throughout the kernel returned by: `compile_expression`. -The Eigen C++ library (http://eigen.tuxfamily.org/) is required, as +The Eigen C++ library (https://eigen.tuxfamily.org/) is required, as all low-level numerical linear algebra operations are performed using this templated function library. """ From 7ff671be33ea2d3431851a18108a39497bfe2c0c Mon Sep 17 00:00:00 2001 From: JDBetteridge Date: Fri, 3 Feb 2023 18:14:21 +0000 Subject: [PATCH 21/30] Remove redundant regex --- docs/source/conf.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index b07fb946f8..334378c4cc 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -135,7 +135,7 @@ # firedrake.preconditioners.patch.PatchBase ('py:class', r'(firedrake\.)*(.*\.)+.*Base'), # Slate Binary- and Unary- OPs - ('py:class', r'(firedrake\.)*(slate\.)+(TensorBase|.*Op)'), + ('py:class', r'(firedrake\.)*(slate\.)+(.*Op)'), ('py:class', 'firedrake.solving_utils._SNESContext'), ] @@ -148,7 +148,6 @@ ] linkcheck_timeout = 10 - # -- Options for HTML output --------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for From 21cdd8139f31b42f7d9fef759184963bf1b0fb76 Mon Sep 17 00:00:00 2001 From: JDBetteridge Date: Fri, 3 Feb 2023 18:14:46 +0000 Subject: [PATCH 22/30] Try to fix firedrake_citations.rst --- docs/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 46915f7c4d..68ced9bd0b 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -43,7 +43,7 @@ help: TARGETS = html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext -GENERATED_FILES = source/team.rst source/demos source/element_list.csv +GENERATED_FILES = source/team.rst source/demos source/element_list.csv source/firedrake_citations.rst publish: html # The raw IP address is used to circumvent some dns fiddling which @@ -76,12 +76,14 @@ source/element_list.csv: source/element_list.py source/team.rst: source/team2.py cd source; python team2.py; mv AUTHORS.rst ../.. -apidoc: $(GENERATED_FILES) copy_demos - sphinx-apidoc -f -T -o source/ ../firedrake ../firedrake/cython/*.so +source/firedrake_citations.rst: sphinx-apidoc -f -T -o source/ ../firedrake_citations echo -e ":orphan:\n\n" | cat - source/firedrake_citations.rst > source/firedrake_citations.tmp mv source/firedrake_citations.tmp source/firedrake_citations.rst +apidoc: $(GENERATED_FILES) copy_demos + sphinx-apidoc -f -T -o source/ ../firedrake ../firedrake/cython/*.so + clean: -rm -rf $(BUILDDIR)/* -rm -rf $(GENERATED_FILES) From 5c9f0840559a6e227a36aa5272060fa35a85b56a Mon Sep 17 00:00:00 2001 From: JDBetteridge Date: Tue, 7 Feb 2023 10:21:17 +0000 Subject: [PATCH 23/30] Do as the error message commands --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e4ae4a0876..b0f5bbe93d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -24,7 +24,7 @@ jobs: - uses: actions/checkout@v2 - name: System dependencies run: | - apt-get update + apt-get update --fix-missing apt-get -y dist-upgrade apt-get -y install inkscape texlive-full - name: Install From 3f1b08070a11b17711bb8e899ee7f5ad01fd2bc8 Mon Sep 17 00:00:00 2001 From: Connor Ward Date: Wed, 1 Feb 2023 17:39:50 +0000 Subject: [PATCH 24/30] Fix demo links in PDF manual --- demos/DG_advection/DG_advection.py.rst | 2 +- demos/benney_luke/benney_luke.py.rst | 2 +- demos/burgers/burgers.py.rst | 2 +- demos/camassa-holm/camassaholm.py.rst | 2 +- demos/eigenvalues_QG_basinmodes/qgbasinmodes.py.rst | 2 +- demos/extruded_continuity/extruded_continuity.py.rst | 2 +- demos/helmholtz/helmholtz.py.rst | 2 +- demos/immersed_fem/immersed_fem.py.rst | 4 ++-- demos/linear-wave-equation/linear_wave_equation.py.rst | 2 +- .../linear_fluid_structure_interaction.py.rst | 4 ++-- demos/ma-demo/ma-demo.py.rst | 4 ++-- demos/matrix_free/navier_stokes.py.rst | 2 +- demos/matrix_free/poisson.py.rst | 4 ++-- demos/matrix_free/rayleigh-benard.py.rst | 2 +- demos/matrix_free/stokes.py.rst | 2 +- demos/multigrid/geometric_multigrid.py.rst | 4 ++-- demos/nonlinear_QG_winddrivengyre/qg_winddrivengyre.py.rst | 2 +- demos/poisson/poisson_mixed.py.rst | 2 +- demos/quasigeostrophy_1layer/qg_1layer_wave.py.rst | 2 +- demos/saddle_point_pc/saddle_point_systems.py.rst | 4 ++-- docs/source/conf.py | 6 ++++++ 21 files changed, 32 insertions(+), 26 deletions(-) diff --git a/demos/DG_advection/DG_advection.py.rst b/demos/DG_advection/DG_advection.py.rst index 826704e0ec..427d3e7226 100644 --- a/demos/DG_advection/DG_advection.py.rst +++ b/demos/DG_advection/DG_advection.py.rst @@ -307,7 +307,7 @@ The last step is to make the animation and save it to a file. :: print("Failed to write movie! Try installing `ffmpeg`.") This demo can be found as a script in -`DG_advection.py `__. +:demo:`DG_advection.py `. .. rubric:: References diff --git a/demos/benney_luke/benney_luke.py.rst b/demos/benney_luke/benney_luke.py.rst index 369a5b142f..2c77f48501 100644 --- a/demos/benney_luke/benney_luke.py.rst +++ b/demos/benney_luke/benney_luke.py.rst @@ -221,7 +221,7 @@ We are now ready to enter the main time iteration loop:: The output can be visualised using `paraview `__. -A python script version of this demo can be found `here `__. +A python script version of this demo can be found :demo:`here `. The Benney-Luke system and weak formulations presented in this demo have also been used to model extreme waves that occur due to Mach reflection through the intersection of two obliquely incident solitary waves. More information can be found in :cite:`Gidel:2017`. diff --git a/demos/burgers/burgers.py.rst b/demos/burgers/burgers.py.rst index ee2da19263..800c9b8a2b 100644 --- a/demos/burgers/burgers.py.rst +++ b/demos/burgers/burgers.py.rst @@ -113,4 +113,4 @@ which amount to applying a full LU decomposition as a preconditioner. :: t += timestep outfile.write(project(u, V_out, name="Velocity")) -A python script version of this demo can be found `here `__. +A python script version of this demo can be found :demo:`here `. diff --git a/demos/camassa-holm/camassaholm.py.rst b/demos/camassa-holm/camassaholm.py.rst index 740ef24c5e..161ff3ed80 100644 --- a/demos/camassa-holm/camassaholm.py.rst +++ b/demos/camassa-holm/camassaholm.py.rst @@ -247,7 +247,7 @@ Images of the solution at shown below. Solution at :math:`t = 5.3.` -A python script version of this demo can be found `here `__. +A python script version of this demo can be found :demo:`here `. .. rubric:: References diff --git a/demos/eigenvalues_QG_basinmodes/qgbasinmodes.py.rst b/demos/eigenvalues_QG_basinmodes/qgbasinmodes.py.rst index 1e21917932..1f4bf8f6c2 100644 --- a/demos/eigenvalues_QG_basinmodes/qgbasinmodes.py.rst +++ b/demos/eigenvalues_QG_basinmodes/qgbasinmodes.py.rst @@ -243,7 +243,7 @@ Below is a plot of the spatial structure of the imaginary part of one of the eig .. figure:: eigenmode_imag.png :align: center -This demo can be found as a Python script in `qgbasinmodes.py `__. +This demo can be found as a Python script in :demo:`qgbasinmodes.py `. .. rubric:: References diff --git a/demos/extruded_continuity/extruded_continuity.py.rst b/demos/extruded_continuity/extruded_continuity.py.rst index ea965bbf96..342ace29cd 100644 --- a/demos/extruded_continuity/extruded_continuity.py.rst +++ b/demos/extruded_continuity/extruded_continuity.py.rst @@ -147,4 +147,4 @@ We finally compare our solution to the expected solution: :: assert max(abs(out.dat.data - exact.dat.data)) < 1e-10 This demo can be found as a script in -`extruded_continuity.py `__. +:demo:`extruded_continuity.py `. diff --git a/demos/helmholtz/helmholtz.py.rst b/demos/helmholtz/helmholtz.py.rst index f6e4013feb..f0ae02772a 100644 --- a/demos/helmholtz/helmholtz.py.rst +++ b/demos/helmholtz/helmholtz.py.rst @@ -137,4 +137,4 @@ Alternatively, since we have an analytic solution, we can check the f.interpolate(cos(x*pi*2)*cos(y*pi*2)) print(sqrt(assemble(dot(u - f, u - f) * dx))) -A python script version of this demo can be found `here `__. +A python script version of this demo can be found :demo:`here `. diff --git a/demos/immersed_fem/immersed_fem.py.rst b/demos/immersed_fem/immersed_fem.py.rst index 39b0b185d4..42db8688d0 100644 --- a/demos/immersed_fem/immersed_fem.py.rst +++ b/demos/immersed_fem/immersed_fem.py.rst @@ -81,7 +81,7 @@ between parts of the mesh (see the concrete example at the end of this page). Physical Surface("Disc", 4) = {2}; For simplicity, we have gathered all this commands in the file -`immersed_domain.geo `__. To generate a mesh using this file, +:demo:`immersed_domain.geo `. To generate a mesh using this file, you can type the following command in the terminal .. code-block:: none @@ -160,4 +160,4 @@ using linear Lagrangian finite elements. :: # solve the variational problem solve(a == L, u, bcs=DirBC, solver_parameters={'ksp_type': 'cg'}) -A python script version of this demo can be found `here `__. +A python script version of this demo can be found :demo:`here `. diff --git a/demos/linear-wave-equation/linear_wave_equation.py.rst b/demos/linear-wave-equation/linear_wave_equation.py.rst index 55260b47c4..67de97f7d0 100644 --- a/demos/linear-wave-equation/linear_wave_equation.py.rst +++ b/demos/linear-wave-equation/linear_wave_equation.py.rst @@ -149,4 +149,4 @@ visualising the results Paraview will use it:: An animation, produced in Paraview, illustrating the output of this simulation can be found `on youtube `_. -A python script version of this demo can be found `here `__. The gmsh input file is `here `__. +A python script version of this demo can be found :demo:`here `. The gmsh input file is :demo:`here `. diff --git a/demos/linear_fluid_structure_interaction/linear_fluid_structure_interaction.py.rst b/demos/linear_fluid_structure_interaction/linear_fluid_structure_interaction.py.rst index 0c2711f08e..5d5d1597b7 100644 --- a/demos/linear_fluid_structure_interaction/linear_fluid_structure_interaction.py.rst +++ b/demos/linear_fluid_structure_interaction/linear_fluid_structure_interaction.py.rst @@ -330,9 +330,9 @@ The result of the computation, visualised with `paraview `__. +A python script version of this demo can be found :demo:`here `. -The mesh file is `here `__. It can be generated with `gmsh `__ from `this file `__ with a command: gmsh -2 L_domain.geo. +The mesh file is :demo:`here `. It can be generated with `gmsh `__ from :demo:`this file ` with a command: gmsh -2 L_domain.geo. An extended 3D version of this code is published `here `__. diff --git a/demos/ma-demo/ma-demo.py.rst b/demos/ma-demo/ma-demo.py.rst index f4b093d5b3..1a06e06179 100644 --- a/demos/ma-demo/ma-demo.py.rst +++ b/demos/ma-demo/ma-demo.py.rst @@ -195,8 +195,8 @@ An image of the solution is shown below. .. figure:: ma.png :align: center -A python script version of this demo can be found `here -`__. +A python script version of this demo can be found :demo:`here +`. .. rubric:: References diff --git a/demos/matrix_free/navier_stokes.py.rst b/demos/matrix_free/navier_stokes.py.rst index c74afe3d32..b0f80f5e1d 100644 --- a/demos/matrix_free/navier_stokes.py.rst +++ b/demos/matrix_free/navier_stokes.py.rst @@ -137,4 +137,4 @@ And finally we write the results to a file for visualisation. :: File("cavity.pvd").write(u, p) A runnable python script implementing this demo file is available -`here `__. +:demo:`here `. diff --git a/demos/matrix_free/poisson.py.rst b/demos/matrix_free/poisson.py.rst index 4f91ded63c..7912930f36 100644 --- a/demos/matrix_free/poisson.py.rst +++ b/demos/matrix_free/poisson.py.rst @@ -70,5 +70,5 @@ Finally, we set the preconditioner type for the assembled operator:: "assembled_pc_type": "ilu"}) -This demo is available as a runnable python file `here -`__. +This demo is available as a runnable python file :demo:`here +`. diff --git a/demos/matrix_free/rayleigh-benard.py.rst b/demos/matrix_free/rayleigh-benard.py.rst index 572b5f861d..1b47d1b333 100644 --- a/demos/matrix_free/rayleigh-benard.py.rst +++ b/demos/matrix_free/rayleigh-benard.py.rst @@ -244,4 +244,4 @@ Finally, we'll output the results for visualisation. :: File("benard.pvd").write(u, p, T) A runnable python script implementing this demo file is available -`here `__. +:demo:`here `. diff --git a/demos/matrix_free/stokes.py.rst b/demos/matrix_free/stokes.py.rst index 5817ddca6b..f587571fe0 100644 --- a/demos/matrix_free/stokes.py.rst +++ b/demos/matrix_free/stokes.py.rst @@ -151,4 +151,4 @@ matrix using unpreconditioned conjugate gradients. :: solve(a == L, up, bcs=bcs, nullspace=nullspace, solver_parameters=parameters) A runnable python script implementing this demo file is available -`here `__. +:demo:`here `. diff --git a/demos/multigrid/geometric_multigrid.py.rst b/demos/multigrid/geometric_multigrid.py.rst index 95759c3184..709a9e1336 100644 --- a/demos/multigrid/geometric_multigrid.py.rst +++ b/demos/multigrid/geometric_multigrid.py.rst @@ -261,5 +261,5 @@ Finally, we'll write the solution for visualisation with Paraview. :: File("stokes.pvd").write(u, p) -A runnable python version of this demo can be found `here -`__. +A runnable python version of this demo can be found :demo:`here +`. diff --git a/demos/nonlinear_QG_winddrivengyre/qg_winddrivengyre.py.rst b/demos/nonlinear_QG_winddrivengyre/qg_winddrivengyre.py.rst index e70f2b786e..e2f65d8f6e 100644 --- a/demos/nonlinear_QG_winddrivengyre/qg_winddrivengyre.py.rst +++ b/demos/nonlinear_QG_winddrivengyre/qg_winddrivengyre.py.rst @@ -273,7 +273,7 @@ Below is a plot of the difference between the linear and nonlinear solutions to .. figure:: fig_diff.png :align: center -This demo can be found as a Python script in `qg_winddrivengyre.py `__. +This demo can be found as a Python script in :demo:`qg_winddrivengyre.py `. .. rubric:: References diff --git a/demos/poisson/poisson_mixed.py.rst b/demos/poisson/poisson_mixed.py.rst index 1fafb62d4c..e267ead98c 100644 --- a/demos/poisson/poisson_mixed.py.rst +++ b/demos/poisson/poisson_mixed.py.rst @@ -171,4 +171,4 @@ Don't forget to show the image:: This demo is based on the corresponding `DOLFIN mixed Poisson demo `__ -and can be found as a script in `poisson_mixed.py `__. +and can be found as a script in :demo:`poisson_mixed.py `. diff --git a/demos/quasigeostrophy_1layer/qg_1layer_wave.py.rst b/demos/quasigeostrophy_1layer/qg_1layer_wave.py.rst index 6a52fa564d..edf02de5ca 100644 --- a/demos/quasigeostrophy_1layer/qg_1layer_wave.py.rst +++ b/demos/quasigeostrophy_1layer/qg_1layer_wave.py.rst @@ -245,7 +245,7 @@ execute the time loop. :: v.project(gradperp(psi0)) output.write(q0, psi0, v, time=t) -A python script version of this demo can be found `here `__. +A python script version of this demo can be found :demo:`here `. .. rubric:: References diff --git a/demos/saddle_point_pc/saddle_point_systems.py.rst b/demos/saddle_point_pc/saddle_point_systems.py.rst index d559a3b0b6..c2824bcc25 100644 --- a/demos/saddle_point_pc/saddle_point_systems.py.rst +++ b/demos/saddle_point_pc/saddle_point_systems.py.rst @@ -612,8 +612,8 @@ geometric multigrid method with overlapping Schwarz smoothers (using preconditioners ``AMS`` and ``ADS``. See the separate manual page on :doc:`../preconditioning`. -A runnable python script version of this demo is available `here -`__. +A runnable python script version of this demo is available :demo:`here +`. .. rubric:: References diff --git a/docs/source/conf.py b/docs/source/conf.py index 334378c4cc..92f174921a 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -25,6 +25,7 @@ # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ 'sphinx.ext.autodoc', + 'sphinx.ext.extlinks', 'sphinx.ext.mathjax', 'sphinx.ext.intersphinx', 'sphinx.ext.viewcode', @@ -361,3 +362,8 @@ bibtex_bibfiles = ['demos/demo_references.bib', '_static/bibliography.bib', '_static/firedrake-apps.bib', '_static/references.bib'] numpydoc_show_class_members = False + +# -- Options for sphinx.ext.extlinks ------------------------------------ +extlinks = { + 'demo': ('https://firedrakeproject.org/demos/%s', None) +} From ec1f076682c9bce06f9ef37b44b98c1aa9ad7345 Mon Sep 17 00:00:00 2001 From: Reuben Nixon-Hill Date: Wed, 8 Feb 2023 13:43:39 +0000 Subject: [PATCH 25/30] update Reuben Nixon-Hill website and name --- docs/source/team.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/team.ini b/docs/source/team.ini index 377a11865a..a0a44e3789 100644 --- a/docs/source/team.ini +++ b/docs/source/team.ini @@ -44,7 +44,7 @@ Sophia Vorderwuelbecke: https://www.imperial.ac.uk/people/s.vorderwuelbecke18 Tom Gregory: https://www.imperial.ac.uk/people/t.gregory18 Jack Betteridge: https://www.imperial.ac.uk/people/j.betteridge, https://upload.wikimedia.org/wikipedia/commons/thumb/a/a1/Mallard2.jpg/632px-Mallard2.jpg Daniel Shapero: http://psc.apl.uw.edu/people/investigators/daniel-shapero/ -Reuben Nixon-Hill: https://www.imperial.ac.uk/people/reuben.hill10 +Reuben W. Nixon-Hill: https://www.imperial.ac.uk/people/reuben.nixon-hill10 Connor Ward: https://www.imperial.ac.uk/people/c.ward20 Patrick E. Farrell: https://pefarrell.org, https://pefarrell.org/images/profile.jpg Pablo Brubeck: , https://pefarrell.org/images/brubeck.jpg @@ -113,7 +113,7 @@ Andrew McRae: Oliver Meister: https://www5.in.tum.de/wiki/index.php/Dipl.-Inf._Oliver_Meister Lawrence Mitchell: Eike Mueller: -Reuben Nixon-Hill: +Reuben W. Nixon-Hill: Alberto Paganini: https://www2.le.ac.uk/departments/mathematics/extranet/staff-material/staff-profiles/alberto-paganini Francis Poulin: Florian Rathgeber: From bc72d58eb066bb5a9bfefa7641bc6f4db14b70bf Mon Sep 17 00:00:00 2001 From: Jack Betteridge <43041811+JDBetteridge@users.noreply.github.com> Date: Thu, 9 Feb 2023 10:13:43 +0000 Subject: [PATCH 26/30] Update team.ini from code review Co-authored-by: Lawrence Mitchell Co-authored-by: Graham Markall <535640+gmarkall@users.noreply.github.com> --- docs/source/team.ini | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/source/team.ini b/docs/source/team.ini index a0a44e3789..d58f4d5565 100644 --- a/docs/source/team.ini +++ b/docs/source/team.ini @@ -1,6 +1,6 @@ [a] # A section for short links -icl: http://www.imperial.ac.uk +icl: https://www.imperial.ac.uk gh: https://github.com [dev-institution] @@ -35,7 +35,7 @@ Applied Physics Laboratory: https://www.apl.washington.edu/ # name : personal-webpage, image-link David Ham: http://www.imperial.ac.uk/people/david.ham Paul Kelly: http://www.imperial.ac.uk/people/p.kelly -Lawrence Mitchell: +Lawrence Mitchell: https://www.wence.uk/ Colin Cotter: http://www.imperial.ac.uk/people/colin.cotter Rob Kirby: http://www.baylor.edu/math/index.php?id=90540 Koki Sagiyama: http://www.imperial.ac.uk/people/k.sagiyama @@ -47,7 +47,7 @@ Daniel Shapero: http://psc.apl.uw.edu/people/investigators/daniel-shapero/ Reuben W. Nixon-Hill: https://www.imperial.ac.uk/people/reuben.nixon-hill10 Connor Ward: https://www.imperial.ac.uk/people/c.ward20 Patrick E. Farrell: https://pefarrell.org, https://pefarrell.org/images/profile.jpg -Pablo Brubeck: , https://pefarrell.org/images/brubeck.jpg +Pablo Brubeck: https://www.maths.ox.ac.uk/people/pablo.brubeckmartinez, https://avatars.githubusercontent.com/u/6486130 India Marsden: https://www.maths.ox.ac.uk/people/india.marsden, https://pefarrell.org/images/marsden.jpg [inactive-team] @@ -61,7 +61,7 @@ Michael Lange: https://www.linkedin.com/in/michael-lange-56675994/ Simon Funke: http://www.simonfunke.com Florian Rathgeber: https://kynan.github.io Doru Bercea: -Graham Markall: https://gmarkall.wordpress.com +Graham Markall: https://big-grey.co.uk/ [contributing-institution] Imperial College London: http://www.imperial.ac.uk @@ -106,7 +106,7 @@ Michael Lange: Nicolas Loriant: Fabio Luporini: Scott MacLachlan: https://www.math.mun.ca/~smaclachlan/ -Graham Markall: +Graham Markall: https://big-grey.co.uk/ India Marsden: Geordie McBain: Andrew McRae: From 3e837a40609c690aefb1523ae1b8a29059269d23 Mon Sep 17 00:00:00 2001 From: Jack Betteridge Date: Thu, 9 Feb 2023 11:27:03 +0000 Subject: [PATCH 27/30] Update team script and author list --- AUTHORS.rst | 8 ++++---- docs/source/team2.py | 9 +++++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index d09bcdd007..5b60612336 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -50,7 +50,7 @@ Nacime Bouziani............... Romain Brault -Pablo Brubeck +Pablo Brubeck................. Ed Bueler @@ -110,7 +110,7 @@ Fabio Luporini................ Scott MacLachlan.............. -Graham Markall................ +Graham Markall................ India Marsden................. @@ -120,11 +120,11 @@ Andrew McRae.................. -Lawrence Mitchell +Lawrence Mitchell............. Eike Mueller -Reuben Nixon-Hill............. +Reuben W. Nixon-Hill.......... Alberto Paganini.............. diff --git a/docs/source/team2.py b/docs/source/team2.py index 41f315b0fc..7d728bd16a 100644 --- a/docs/source/team2.py +++ b/docs/source/team2.py @@ -40,8 +40,13 @@ def rows(self): def cache_web_image(name, url): img_name = name.split()[0].lower().encode("punycode").decode() img_name = img_name[:-1] if img_name[-1] == "-" else img_name - with urlopen(url) as response, open("images/" + img_name + "." + url[-3:], "wb") as fh: - fh.write(response.read()) + with urlopen(url) as response: + filetype = response.getheader("Content-Type") + ext = filetype.split("/")[1] + if ext == "jpeg": + ext = "jpg" + with open("images/" + img_name + "." + ext, "wb") as fh: + fh.write(response.read()) # From 183ff2415adfe5b9c4693e24ea5f4a3bc71593c8 Mon Sep 17 00:00:00 2001 From: Jack Betteridge Date: Thu, 9 Feb 2023 11:27:29 +0000 Subject: [PATCH 28/30] Add demo link to optimising --- docs/source/optimising.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/source/optimising.rst b/docs/source/optimising.rst index 31bd1da4e6..12497405b2 100644 --- a/docs/source/optimising.rst +++ b/docs/source/optimising.rst @@ -38,8 +38,8 @@ informative flame graphs giving a lot of insight into the internals of Firedrake and PETSc. As an example, here is a flame graph showing the performance of the -`scalar wave equation with higher-order mass lumping demo -`_. +:demo:`scalar wave equation with higher-order mass lumping demo +`. It is interactive and you can zoom in on functions by clicking. .. raw:: html @@ -70,7 +70,7 @@ To generate a flame graph from your Firedrake script you need to: called ``foo.txt`` containing the profiling information. 2. Visualise the results. This can be done in one of two ways: - + * Generate an SVG file using the ``flamegraph.pl`` script from `this repository `_ with the command: @@ -92,7 +92,7 @@ are a few different ways of doing it. The simplest methods are: * With a context manager: .. code-block:: python - + from firedrake.petsc import PETSc with PETSc.Log.Event("foo"): @@ -135,10 +135,10 @@ Caveats This issue can be avoided with the simple guard: .. code-block:: python - + from firedrake.petsc import OptionsManager - # If the -log_view flag is passed you don't need to call + # If the -log_view flag is passed you don't need to call # PETSc.Log.begin because it is done automatically. if "log_view" not in OptionsManager.commandline_options: PETSc.Log.begin() From e61b07625fcc736d285f8e327f0afc2a19e0a388 Mon Sep 17 00:00:00 2001 From: Jack Betteridge Date: Thu, 9 Feb 2023 11:33:36 +0000 Subject: [PATCH 29/30] Update team websites to use https --- AUTHORS.rst | 18 +++++++++--------- docs/source/team.ini | 20 ++++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index 5b60612336..6f2f238573 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -17,9 +17,9 @@ Baylor University............. Durham University............. -Imperial College London....... +Imperial College London....... -University of Bath............ +University of Bath............ University of Leeds........... @@ -62,7 +62,7 @@ Cyrus Cheng Teodoro Fields Collin -Colin Cotter.................. +Colin Cotter.................. Joshua Coutinho @@ -80,7 +80,7 @@ Alastair Gregory Tom Gregory................... -David Ham..................... +David Ham..................... Christopher Hawkes @@ -94,9 +94,9 @@ Nick Johnson Anna Kalogirou -Paul Kelly.................... +Paul Kelly.................... -Rob Kirby..................... +Rob Kirby..................... Stephan Kramer................ @@ -106,7 +106,7 @@ Michael Lange................. +Fabio Luporini................ Scott MacLachlan.............. @@ -140,7 +140,7 @@ Thomas Roy Francis P. Russell -Koki Sagiyama................. +Koki Sagiyama................. Tomasz Salwa @@ -148,7 +148,7 @@ Kaho Sato Ben Sepanski.................. -Daniel Shapero................ +Daniel Shapero................ Jemma Shipton diff --git a/docs/source/team.ini b/docs/source/team.ini index d58f4d5565..15b1e4fc25 100644 --- a/docs/source/team.ini +++ b/docs/source/team.ini @@ -11,7 +11,7 @@ gh: https://github.com # # [institution] # department: website -Imperial College London: http://www.imperial.ac.uk +Imperial College London: https://www.imperial.ac.uk University of Oxford: https://www.ox.ac.uk Baylor University: https://www.baylor.edu University of Washington: https://www.washington.edu @@ -33,17 +33,17 @@ Applied Physics Laboratory: https://www.apl.washington.edu/ [active-team] # Use format # name : personal-webpage, image-link -David Ham: http://www.imperial.ac.uk/people/david.ham -Paul Kelly: http://www.imperial.ac.uk/people/p.kelly +David Ham: https://www.imperial.ac.uk/people/david.ham +Paul Kelly: https://www.imperial.ac.uk/people/p.kelly Lawrence Mitchell: https://www.wence.uk/ -Colin Cotter: http://www.imperial.ac.uk/people/colin.cotter -Rob Kirby: http://www.baylor.edu/math/index.php?id=90540 -Koki Sagiyama: http://www.imperial.ac.uk/people/k.sagiyama +Colin Cotter: https://www.imperial.ac.uk/people/colin.cotter +Rob Kirby: https://www.baylor.edu/math/index.php?id=90540 +Koki Sagiyama: https://www.imperial.ac.uk/people/k.sagiyama Nacime Bouziani: https://www.imperial.ac.uk/people/n.bouziani18 Sophia Vorderwuelbecke: https://www.imperial.ac.uk/people/s.vorderwuelbecke18 Tom Gregory: https://www.imperial.ac.uk/people/t.gregory18 Jack Betteridge: https://www.imperial.ac.uk/people/j.betteridge, https://upload.wikimedia.org/wikipedia/commons/thumb/a/a1/Mallard2.jpg/632px-Mallard2.jpg -Daniel Shapero: http://psc.apl.uw.edu/people/investigators/daniel-shapero/ +Daniel Shapero: https://psc.apl.uw.edu/people/investigators/daniel-shapero/ Reuben W. Nixon-Hill: https://www.imperial.ac.uk/people/reuben.nixon-hill10 Connor Ward: https://www.imperial.ac.uk/people/c.ward20 Patrick E. Farrell: https://pefarrell.org, https://pefarrell.org/images/profile.jpg @@ -55,7 +55,7 @@ Thomas Gibson: Miklós Homolya: Tianjiao (TJ) Sun: https://www.doc.ic.ac.uk/~ts2914/ Andrew McRae: https://www2.physics.ox.ac.uk/contacts/people/mcraea -Fabio Luporini: http://www.imperial.ac.uk/people/f.luporini12 +Fabio Luporini: https://www.imperial.ac.uk/people/f.luporini12 Alastair Gregory: Michael Lange: https://www.linkedin.com/in/michael-lange-56675994/ Simon Funke: http://www.simonfunke.com @@ -64,8 +64,8 @@ Doru Bercea: Graham Markall: https://big-grey.co.uk/ [contributing-institution] -Imperial College London: http://www.imperial.ac.uk -University of Bath: http://www.bath.ac.uk +Imperial College London: https://www.imperial.ac.uk +University of Bath: https://www.bath.ac.uk University of Leeds: https://www.leeds.ac.uk University of Oxford: https://www.ox.ac.uk Durham University: https://www.durham.ac.uk From 6fbe5fad643f0c67cbba3ae551068fa6949db1e8 Mon Sep 17 00:00:00 2001 From: Jack Betteridge Date: Thu, 9 Feb 2023 11:42:03 +0000 Subject: [PATCH 30/30] Nobody spotted that I was a duck... --- docs/source/team.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/team.ini b/docs/source/team.ini index 15b1e4fc25..bbdbef6a45 100644 --- a/docs/source/team.ini +++ b/docs/source/team.ini @@ -42,7 +42,7 @@ Koki Sagiyama: https://www.imperial.ac.uk/people/k.sagiyama Nacime Bouziani: https://www.imperial.ac.uk/people/n.bouziani18 Sophia Vorderwuelbecke: https://www.imperial.ac.uk/people/s.vorderwuelbecke18 Tom Gregory: https://www.imperial.ac.uk/people/t.gregory18 -Jack Betteridge: https://www.imperial.ac.uk/people/j.betteridge, https://upload.wikimedia.org/wikipedia/commons/thumb/a/a1/Mallard2.jpg/632px-Mallard2.jpg +Jack Betteridge: https://www.imperial.ac.uk/people/j.betteridge, https://avatars.githubusercontent.com/u/43041811 Daniel Shapero: https://psc.apl.uw.edu/people/investigators/daniel-shapero/ Reuben W. Nixon-Hill: https://www.imperial.ac.uk/people/reuben.nixon-hill10 Connor Ward: https://www.imperial.ac.uk/people/c.ward20