-
PDF
- Split View
-
Views
-
Cite
Cite
Stefan Güttel, John W Pearson, A spectral-in-time Newton–Krylov method for nonlinear PDE-constrained optimization, IMA Journal of Numerical Analysis, Volume 42, Issue 2, April 2022, Pages 1478–1499, https://doi.org/10.1093/imanum/drab011
- Share Icon Share
Abstract
We devise a method for nonlinear time-dependent partial-differential-equation-constrained optimization problems that uses a spectral-in-time representation of the residual, combined with a Newton–Krylov method to drive the residual to zero. We also propose a preconditioner to accelerate this scheme. Numerical results indicate that this method can achieve fast and accurate solution of nonlinear problems for a range of mesh sizes and problem parameters. The numbers of outer Newton and inner Krylov iterations required to reach the attainable accuracy of a spatial discretization are robust with respect to the number of collocation points in time and also do not change substantially when other problem parameters are varied.
1. Introduction
Partial-differential-equation (PDE)-constrained optimization is an important class of mathematical problems (Lions, 1971; Ito & Kunisch, 2008; Tröltzsch, 2010), with a wide range of applications across science and engineering (see Arridge, 1999; Cheney et al., 1999; Griesse & Volkwein, 2005; Gunzberger, 2010, for instance). The fast and accurate solution of the first-order optimality conditions resulting from such problems is a significant challenge for researchers in these communities. For example, when an ‘all-at-once’ approach is applied to solve such conditions, one is faced with coupled linear systems of huge scale, particularly when standard finite difference or finite element schemes are used for the discretization procedure in the spatial coordinates. For time-dependent problems there is an additional challenge of how to appropriately discretize in the time variable. When fast solvers for the resulting linear system are required, in particular preconditioned iterative methods, it has been popular to utilize a backward Euler scheme for this purpose (see for example Pearson & Stoll, 2013; Pearson et al., 2012; Stoll & Breiten, 2015); however, this requires a very small step size in order to obtain an accurate numerical solution, and thus very large linear systems to solve.
Motivated by this, in Güttel & Pearson (2018) the authors devised deferred correction methods for linear PDE-constrained optimization problems, where equations for the errors and residuals at each deferred correction step were constructed in order to successively increase the order of the time-stepping scheme. As a result one is required to solve a sequence of much smaller linear systems in order to achieve the same accuracy of the numerical solution, compared to a method without a deferred correction acceleration. This approach was found to be highly effective for linear PDE-constrained optimization problems; however, a significant question remained about how to devise a related strategy for nonlinear PDE-constrained optimization. These problems possess a vastly increased level of difficulty, compared to linear problems, as the matrices describing the spatial behavior of the physical system are different at every time step.
In this paper we devise a residual-based approach for nonlinear PDE-constrained optimization problems; in particular this is based on using a spectral-in-time representation of the residual that is then linearized and solved by a Newton method. The use of a spectral method in the time variable means that high accuracy solutions can be obtained with only a small number of time steps, keeping the linearized Newton system of relatively small dimension. We implement our approach using a Newton–Krylov method, of the form described in Kelley (2003, Chapter 3) and Knoll & Keyes (2004). To make such a method numerically viable we suggest a general preconditioning strategy, which is found to substantially accelerate the Newton–Krylov scheme for the problems examined. Care has to be taken with the implementation of the preconditioner as the spectral time integration matrix is dense. We hence transform the Jacobian arising in the Newton system into a form that can be easily approximated by a Kronecker product, allowing for the application of a preconditioner whose cost is approximately proportional to the number of spatial degrees of freedom. Our approach mitigates a key difficulty encountered with alternative discretization techniques for nonlinear PDE-constrained optimization problems, specifically being required to solve linear systems arising from very large numbers of grid points in time to obtain even modest discretization error properties, and our new method is found to be an effective strategy for a number of examples, mesh sizes and problem parameters.
We highlight that there has been a substantial amount of research undertaken with the goal of achieving numerical solutions to time-dependent PDE-constrained optimization problems, with low discretization error and within reasonable computation time. Among many valuable references, we refer to Dolgov & Stoll (2017); Stoll & Breiten (2015) for low-rank solution methods, to Pearson & Stoll (2013), Pearson et al. (2012) for preconditioned iterative solvers, to Borzì & Schulz (2009), Hinze et al. (2012) for a discussion of multigrid approaches, to Heinkenschloss (2005) for a multiple shooting strategy, to Maday & Turinici (2002), Mathew et al. (2010) for parareal approaches and to Götschel & Minion (2019) for a recently developed time-parallel method with the computation of the adjoint gradient information performed using the PFASST framework. We also point to the body of work on Krylov deferred correction methods for initial value problems developed in Huang et al. (2007), Jia & Huang (2008). Indeed, for linear initial value problems, deferred correction can be interpreted as a preconditioned Newton-like method for solving the time collocation system (Huang et al., 2006; Weiser, 2015).
While the use of a spectral-in-time residual function in this work is inspired by the spectral deferred correction approach in Dutt et al. (2000), we found in extensive numerical tests that the direct Newton-based minimization of this function without the outer deferred correction loop is both conceptually simpler and indeed more efficient for nonlinear problems. This is the approach we would like to explore in this paper. Compared to our previous work (Güttel & Pearson, 2018) on linear PDE-constrained optimization, the method described here is not a deferred correction scheme. Our aim is to provide a general approach for nonlinear time-dependent problems, which, as we will demonstrate, can lead to very accurate solutions while being applicable with any discretization in the spatial variables of the user’s choice and which has the potential to be combined with a number of the approaches listed above. Our focus is on problems with a squared |$L^2$|-norm regularization term applied to the control variable in the objective function, along with first-order derivatives in time and a linear term involving the control within the PDE constraint, as such a formulation allows us to eliminate the control variable a priori and solve a coupled state–adjoint system. We believe that, with suitable modifications that we will describe, our method is more generalizable still.
This paper is structured as follows. In Section 2 we present the residual-based method for nonlinear PDE-constrained optimization. Specifically, in Section 2.1 we state the coupled systems of PDEs arising from the PDE-constrained optimization problems considered in this paper, in Section 2.2 we derive the residual-in-time representation and introduce the Newton–Krylov method we apply, then in Section 2.3 we present the preconditioner that is embedded within the Newton–Krylov scheme. Sections 2.4 and 2.5 further discuss the implementation and the stopping condition used. Section 3 presents the results of a range of numerical experiments, using test problems for which analytic solutions are given in Appendix A. In Section 4 we provide our concluding remarks.
2. Residual-based Newton–Krylov method
2.1 Derivation of coupled systems of PDEs
In order to apply our residual-based approach, the first step is to describe the solution of our time-dependent PDE-constrained optimization problems using a coupled system of PDEs, which define the first-order optimality conditions. A general approach, an outline of which is provided in Tröltzsch (2010, Chapter 3) for time-dependent (parabolic) PDE-constrained optimization problems, is to apply an optimize-then-discretize strategy. In that strategy one seeks the stationary points of a continuous Lagrangian involving the cost functional being minimized, as well as the PDE constraints and boundary conditions enforced by an adjoint variable (or Lagrange multiplier). One may then take Fréchet derivatives in the direction of the adjoint, control and state variables, and test the conditions that the derivatives must be equal to zero using functions with appropriate continuity and differentiability properties and which satisfy suitable boundary conditions. Taking the derivatives in this order gives rise to state equations, gradient equations and adjoint equations, respectively.
Note how in both cases the first-order optimality conditions take the form of coupled time-dependent PDEs, with the state equations equipped with initial conditions, and the adjoint equations possessing final-time conditions.
2.2 Derivation of the Newton system
Pseudocode for the resulting residual-based Newton method is given in Fig. 1. Note that the matrix computations in steps 6–7 can be performed cheaply: |$B$| is a very sparse matrix of size |$2N$|-by-|$2Nn$| whose only nonzeros correspond to an |$N$|-by-|$N$| identity matrix in its bottom right, while |$K$| can be applied efficiently using its Kronecker representation. The main computational cost of this Newton method is concentrated in step 5, the solution of the Schur complement system. In what follows we will introduce a preconditioner for that problem, allowing the development of an efficient Newton–Krylov solver.

Pseudocode for the residual-based Newton solver. The notation follows that of Section 2.2.
2.3 Preconditioner
2.4 Newton–Krylov implementation
We do not wish to form the Schur complement |$S = D - CB$| explicitly, but we will instead approximate its action within a Krylov method using finite differencing. The resulting Newton–Krylov method is standard and described in detail, e.g., in Kelley (2003, Chapter 3). We will therefore only outline the key parts required for its implementation.
The left-preconditioned system |$P^{-1} S x = P^{-1} b$| is solved using GMRES (Saad & Schultz, 1986). For these inner solves the standard Eisenstat–Walker residual stopping criterion based on the norm of the residual, |$\|\textbf{R}(\textbf{w}^{(k)})\|$|, is used (Eisenstat & Walker, 1996); see also Kelley (2003, Section 3.2.3).
2.5 Stopping criterion
There are several options to stop our method, with the most obvious one being a norm criterion for the residual evaluated in step 3 of the algorithm in Fig. 1: stop at Newton iteration |$k$| if |$\|\textbf{R}(\textbf{w}^{(k)}) \| \leq {\texttt{tol}}\,{\|\textbf{R}(\textbf{w}^{(0)}) \|}$| for some user-specified tolerance |${\texttt{tol}}$|.
3. Numerical experiments
Our numerical experiments are guided by two nonlinear model problems, the two-dimensional Schlögl problem and a two-dimensional reaction–diffusion problem, both posed on the spatial domain |$\varOmega =(-1,1)^2$| and with analytic solutions given in Appendix A (with |$\alpha =0.1$| for the Schlögl problem). The experiments have been performed in Matlab 2019a on a Windows 10 laptop with 8 GB RAM and an Intel(R) Core(TM) i7-8650U CPU running at 2 GHz. A Matlab implementation of our method, including the preconditioner proposed in Section 2.3, as well as scripts reproducing these experiments, can be downloaded from https://github.com/nla-group/pdeoptim. We use Chebfun (Driscoll et al., 2014) to generate the spectral collocation matrices in space and time.
![Eigenvalues of the Schur complement $S$ and its preconditioned counterpart $P^{-1}S$ for the two-dimensional Schlögl problem with finite difference discretization. Only the first three Newton iterations are shown since the subsequent ones look qualitatively similar. The condition numbers of the Schur complement $S$ in the first seven iterations (until stagnation of the Newton method as determined in Section 3.2) are $[2.5, 2.3, 2.4, 2.7, 3.0, 3.0, 3.0]\times 10^3$, and those of the preconditioned Schur complement $P^{-1}S$ are $[1.8,5.3,14.2,24.3,27.0,27.4,27.4]$.](https://oup.silverchair-cdn.com/oup/backfile/Content_public/Journal/imajna/42/2/10.1093_imanum_drab011/1/m_drab011f2.jpeg?Expires=1747901758&Signature=JvTQaxWRKzpFCicW2QdRTcdZmVvM5Pi2v0BKhCA~DcnpSZjvF0PWk-muI1fx8mCoWNt~0SQ8495uFzZZIiC45vRdF8IAzPjNhWSN~lStu3~mH3a6X53oos0okLqeKHwpL4MzwOhnHp4Ouvl3d724axd4LioUtp6xngGw1vhOOrTCYuvnz-vQ-GjGQB56sfrZlySOa94r8lSo-gjdXxtCavNayPLV1ohAI-6c6VpDbUFrhbrUhbgNDRdmar4V9wuqsCfGs3UyMQR30gEMuQ1VsisGZHuYj1T52T7c79E6NZ2rrunm45MnAznmXL-xVlIG4u6cY-y79OCxIDBQwMlkmA__&Key-Pair-Id=APKAIE5G5CRDK6RD3PGA)
Eigenvalues of the Schur complement |$S$| and its preconditioned counterpart |$P^{-1}S$| for the two-dimensional Schlögl problem with finite difference discretization. Only the first three Newton iterations are shown since the subsequent ones look qualitatively similar. The condition numbers of the Schur complement |$S$| in the first seven iterations (until stagnation of the Newton method as determined in Section 3.2) are |$[2.5, 2.3, 2.4, 2.7, 3.0, 3.0, 3.0]\times 10^3$|, and those of the preconditioned Schur complement |$P^{-1}S$| are |$[1.8,5.3,14.2,24.3,27.0,27.4,27.4]$|.

Error in the computed state (left) and adjoint (right) variables for the Schlögl problem using a spectral space discretization, for varying regularization parameter |$\beta $|.
3.1 Visual inspection of the preconditioner
3.2 Schlögl problem, spectral in space
Outer Newton and inner GMRES iterations required to solve the Schlögl problem using a spectral space discretization, to an accuracy below |$10^{-10}$|
|$\beta $| . | Outer iterations . | Inner iterations . | Total inner . | Final accuracy . | Total time (s) . |
---|---|---|---|---|---|
|$1e\!-\!1$| | 4 | 4, 14, 18, 30 | 66 | |$6.92e\!-\!12$| | 0.405 |
|$1e\!-\!2$| | 7 | 1, 4, 6, 8, 12, 16, 25 | 72 | |$6.27e\!-\!12$| | 0.398 |
|$1e\!-\!3$| | 8 | 1, 2, 4, 6, 9, 12, 20, 35 | 89 | |$3.35e\!-\!13$| | 0.480 |
|$1e\!-\!4$| | 8 | 1, 2, 4, 6, 9, 7, 12, 30 | 71 | |$8.49e\!-\!13$| | 0.441 |
|$1e\!-\!5$| | 8 | 1, 2, 4, 6, 9, 9, 10, 25 | 66 | |$1.51e\!-\!12$| | 0.409 |
|$\beta $| . | Outer iterations . | Inner iterations . | Total inner . | Final accuracy . | Total time (s) . |
---|---|---|---|---|---|
|$1e\!-\!1$| | 4 | 4, 14, 18, 30 | 66 | |$6.92e\!-\!12$| | 0.405 |
|$1e\!-\!2$| | 7 | 1, 4, 6, 8, 12, 16, 25 | 72 | |$6.27e\!-\!12$| | 0.398 |
|$1e\!-\!3$| | 8 | 1, 2, 4, 6, 9, 12, 20, 35 | 89 | |$3.35e\!-\!13$| | 0.480 |
|$1e\!-\!4$| | 8 | 1, 2, 4, 6, 9, 7, 12, 30 | 71 | |$8.49e\!-\!13$| | 0.441 |
|$1e\!-\!5$| | 8 | 1, 2, 4, 6, 9, 9, 10, 25 | 66 | |$1.51e\!-\!12$| | 0.409 |
Outer Newton and inner GMRES iterations required to solve the Schlögl problem using a spectral space discretization, to an accuracy below |$10^{-10}$|
|$\beta $| . | Outer iterations . | Inner iterations . | Total inner . | Final accuracy . | Total time (s) . |
---|---|---|---|---|---|
|$1e\!-\!1$| | 4 | 4, 14, 18, 30 | 66 | |$6.92e\!-\!12$| | 0.405 |
|$1e\!-\!2$| | 7 | 1, 4, 6, 8, 12, 16, 25 | 72 | |$6.27e\!-\!12$| | 0.398 |
|$1e\!-\!3$| | 8 | 1, 2, 4, 6, 9, 12, 20, 35 | 89 | |$3.35e\!-\!13$| | 0.480 |
|$1e\!-\!4$| | 8 | 1, 2, 4, 6, 9, 7, 12, 30 | 71 | |$8.49e\!-\!13$| | 0.441 |
|$1e\!-\!5$| | 8 | 1, 2, 4, 6, 9, 9, 10, 25 | 66 | |$1.51e\!-\!12$| | 0.409 |
|$\beta $| . | Outer iterations . | Inner iterations . | Total inner . | Final accuracy . | Total time (s) . |
---|---|---|---|---|---|
|$1e\!-\!1$| | 4 | 4, 14, 18, 30 | 66 | |$6.92e\!-\!12$| | 0.405 |
|$1e\!-\!2$| | 7 | 1, 4, 6, 8, 12, 16, 25 | 72 | |$6.27e\!-\!12$| | 0.398 |
|$1e\!-\!3$| | 8 | 1, 2, 4, 6, 9, 12, 20, 35 | 89 | |$3.35e\!-\!13$| | 0.480 |
|$1e\!-\!4$| | 8 | 1, 2, 4, 6, 9, 7, 12, 30 | 71 | |$8.49e\!-\!13$| | 0.441 |
|$1e\!-\!5$| | 8 | 1, 2, 4, 6, 9, 9, 10, 25 | 66 | |$1.51e\!-\!12$| | 0.409 |
As expected the total computation time is roughly proportional to the number of inner GMRES iterations performed, and this number increases steadily as the Newton iterates approach the sought minimum of the residual norm. Overall, the number of inner iterations and total time does not seem to depend much on the value of the regularization parameter |$\beta $|, and we can solve complex optimal control problems in a fraction of a second using GMRES, up to spectral accuracy, for every |$\beta $| tested.
3.3 Schlögl problem, finite differences in space
We now consider the Schlögl example with a finite difference discretization in space, while still using a spectral method in time. This example intends to demonstrate that mixing these two discretizations is a viable option, as the spectral time discretization helps to keep the number of solution vectors |$\widetilde{\textbf{u}}_j,\widetilde{\textbf{v}}_j\in \mathbb{R}^N$||$(j=0,1,\ldots ,n)$| small, thereby reducing the overall memory consumption and arithmetic cost. This is in contrast to previous approaches that have used a backward Euler approximation in time and hence required a much larger number of time steps, at the cost of increased linear algebra complexity.
In this test we use degree |$n=5$| Chebyshev collocation in time and vary the number of equidistant spatial interior grid points |$n_x=4,8,16,32,64,128$| in both coordinate directions. The time interval is again |$[0,T=2]$|, and the errors of the computed state and adjoint solutions are obtained as before.
The results are presented in Fig. 4 and Table 2. We first observe that as the number of spatial grid points is doubled the finally attained accuracy improves by a factor of about |$4$|. This is consistent with the second-order centred finite difference scheme and also indicates that the time discretization is sufficiently fine. We further observe that, independently of |$n_x$|, the error of the space discretization is reached after about six Newton iterations. By inspecting the number of inner GMRES iterations in Table 2 we find that the method is robust with respect to refinements in space, testament to an effective preconditioner. As a consequence the total computation time scales close to linearly in the number of overall spatial grid points, |$n_x^2$|. We highlight that if |$n_x$| becomes very large the factorization of the matrix |$G$| in (2.18) at each Newton iteration could become a computational bottleneck, although our results demonstrate that high accuracy can be achieved for moderate |$n_x$|, thus mitigating this issue.

Error in the computed state (left) and adjoint (right) variables for the Schlögl problem using a finite difference space discretization, with a varying number of grid points |$n_x$|.
Outer Newton and inner GMRES iterations required to solve the Schlögl problem using a finite difference space discretization
|$n_x$| . | Outer iterations . | Inner iterations . | Total inner . | Final accuracy . | Total time (s) . |
---|---|---|---|---|---|
4 | 6 | 1, 3, 4, 6, 9, 10 | 33 | |$4.13e\!-\!03$| | 0.0298 |
8 | 6 | 1, 3, 4, 6, 9, 9 | 32 | |$1.22e\!-\!03$| | 0.0466 |
16 | 6 | 1, 3, 4, 6, 9, 9 | 32 | |$3.37e\!-\!04$| | 0.0923 |
32 | 6 | 1, 3, 4, 6, 9, 9 | 32 | |$8.92e\!-\!05$| | 0.388 |
64 | 6 | 1, 3, 4, 6, 9, 9 | 32 | |$2.35e\!-\!05$| | 1.43 |
128 | 6 | 1, 3, 4, 6, 9, 9 | 32 | |$7.67e\!-\!06$| | 6.71 |
|$n_x$| . | Outer iterations . | Inner iterations . | Total inner . | Final accuracy . | Total time (s) . |
---|---|---|---|---|---|
4 | 6 | 1, 3, 4, 6, 9, 10 | 33 | |$4.13e\!-\!03$| | 0.0298 |
8 | 6 | 1, 3, 4, 6, 9, 9 | 32 | |$1.22e\!-\!03$| | 0.0466 |
16 | 6 | 1, 3, 4, 6, 9, 9 | 32 | |$3.37e\!-\!04$| | 0.0923 |
32 | 6 | 1, 3, 4, 6, 9, 9 | 32 | |$8.92e\!-\!05$| | 0.388 |
64 | 6 | 1, 3, 4, 6, 9, 9 | 32 | |$2.35e\!-\!05$| | 1.43 |
128 | 6 | 1, 3, 4, 6, 9, 9 | 32 | |$7.67e\!-\!06$| | 6.71 |
Outer Newton and inner GMRES iterations required to solve the Schlögl problem using a finite difference space discretization
|$n_x$| . | Outer iterations . | Inner iterations . | Total inner . | Final accuracy . | Total time (s) . |
---|---|---|---|---|---|
4 | 6 | 1, 3, 4, 6, 9, 10 | 33 | |$4.13e\!-\!03$| | 0.0298 |
8 | 6 | 1, 3, 4, 6, 9, 9 | 32 | |$1.22e\!-\!03$| | 0.0466 |
16 | 6 | 1, 3, 4, 6, 9, 9 | 32 | |$3.37e\!-\!04$| | 0.0923 |
32 | 6 | 1, 3, 4, 6, 9, 9 | 32 | |$8.92e\!-\!05$| | 0.388 |
64 | 6 | 1, 3, 4, 6, 9, 9 | 32 | |$2.35e\!-\!05$| | 1.43 |
128 | 6 | 1, 3, 4, 6, 9, 9 | 32 | |$7.67e\!-\!06$| | 6.71 |
|$n_x$| . | Outer iterations . | Inner iterations . | Total inner . | Final accuracy . | Total time (s) . |
---|---|---|---|---|---|
4 | 6 | 1, 3, 4, 6, 9, 10 | 33 | |$4.13e\!-\!03$| | 0.0298 |
8 | 6 | 1, 3, 4, 6, 9, 9 | 32 | |$1.22e\!-\!03$| | 0.0466 |
16 | 6 | 1, 3, 4, 6, 9, 9 | 32 | |$3.37e\!-\!04$| | 0.0923 |
32 | 6 | 1, 3, 4, 6, 9, 9 | 32 | |$8.92e\!-\!05$| | 0.388 |
64 | 6 | 1, 3, 4, 6, 9, 9 | 32 | |$2.35e\!-\!05$| | 1.43 |
128 | 6 | 1, 3, 4, 6, 9, 9 | 32 | |$7.67e\!-\!06$| | 6.71 |
We also show in Fig. 5 the error at each Newton iteration when |$n_x=32$| interior grid points are used in space, as well as the error estimate discussed in Section 2.5, using the lag parameter |$s=1,2,3$|. Note how the error estimates follow the actual error very closely until the method stagnates on the level of the spatial/temporal discretization error. Together with estimates for the expected discretization error this error estimate is a useful stopping criterion for our algorithm, and the user can specify a desired tolerance based on a reasonable expected discretization error given the |$n$| and |$n_x$| chosen.

Error and error estimates for the computed state (left) and adjoint (right) for the Schlögl problem using a finite difference space discretization, with |$n_x = 32$| interior grid points. The lag parameter for the error estimation is varied between |$s=1,2,3$|.

Error in the computed state (left) and adjoint (right) variables for the reaction–diffusion problem using a finite difference space discretization, with a varying number of grid points |$n_x$|.
3.4 Reaction–diffusion problem, finite differences in space
We now turn our attention to a nonlinear reaction–diffusion problem discretized using finite differences in space. We use degree |$n=10$| Chebyshev collocation on the time interval |$[0,T=1]$| and parameters |$\beta _y = 1$|, |$\beta _z = 1$|, |$\beta _c = 0.01$|, |$D_1 = 0.5$|, |$D_2 = 1$|, |$k_1 = 1$|, |$k_2 = 1$|, |$\gamma _1 = 0.4$|, |$\gamma _2 = 0.6$|, noting that the method demonstrates robustness with respect to reasonable modifications of these parameters.
The results of the Newton–Krylov method are shown in Fig. 6 and Table 3. We can see that the error of the space discretization is reached after about five Newton iterations and that a slightly larger |$n_x$| is required to obtain a satisfactory numerical solution than for the Schögl problem. As shown in Fig. 6 the very low value of |$n_x=4$| (with |$n_x$| including boundary points for this problem, due to the imposition of Neumann boundary conditions) leads to worse error properties in the computed adjoint than an arbitrary initial guess; however, increasing the number of spatial grid points gives very high accuracy once again. We may see from Table 3 that, for sufficiently large |$n_x$|, doubling this value leads to an improved accuracy by a factor of roughly |$4$| once more, as is expected. We also observe that the computation time scales close to linearly with respect to number of spatial grid points, with the only nonlinearity arising from the factorization of the matrix |$G$|: this nonlinear scaling becomes visible for a smaller |$n_x$| than for the Schlögl problem, as |$G$| is a larger matrix for the reaction–diffusion problem; however, all computation times are low considering the high complexity of the problem being solved.
Outer Newton and inner GMRES iterations required to solve the reaction–diffusion problem using a finite difference space discretization
|$n_x$| . | Outer iterations . | Inner iterations . | Total inner . | Final accuracy . | Total time (s) . |
---|---|---|---|---|---|
4 | 4 | 12, 23, 33, 60 | 128 | |$3.73e\!+\!00$| | 0.556 |
8 | 4 | 18, 28, 39, 68 | 153 | |$1.83e\!-\!01$| | 0.915 |
16 | 4 | 18, 30, 38, 60 | 146 | |$1.84e\!-\!02$| | 2.62 |
32 | 4 | 18, 31, 37, 55 | 141 | |$3.23e\!-\!03$| | 7.90 |
64 | 4 | 18, 31, 36, 50 | 135 | |$6.63e\!-\!04$| | 38.4 |
128 | 4 | 18, 32, 36, 51 | 137 | |$1.61e\!-\!04$| | 221 |
|$n_x$| . | Outer iterations . | Inner iterations . | Total inner . | Final accuracy . | Total time (s) . |
---|---|---|---|---|---|
4 | 4 | 12, 23, 33, 60 | 128 | |$3.73e\!+\!00$| | 0.556 |
8 | 4 | 18, 28, 39, 68 | 153 | |$1.83e\!-\!01$| | 0.915 |
16 | 4 | 18, 30, 38, 60 | 146 | |$1.84e\!-\!02$| | 2.62 |
32 | 4 | 18, 31, 37, 55 | 141 | |$3.23e\!-\!03$| | 7.90 |
64 | 4 | 18, 31, 36, 50 | 135 | |$6.63e\!-\!04$| | 38.4 |
128 | 4 | 18, 32, 36, 51 | 137 | |$1.61e\!-\!04$| | 221 |
Outer Newton and inner GMRES iterations required to solve the reaction–diffusion problem using a finite difference space discretization
|$n_x$| . | Outer iterations . | Inner iterations . | Total inner . | Final accuracy . | Total time (s) . |
---|---|---|---|---|---|
4 | 4 | 12, 23, 33, 60 | 128 | |$3.73e\!+\!00$| | 0.556 |
8 | 4 | 18, 28, 39, 68 | 153 | |$1.83e\!-\!01$| | 0.915 |
16 | 4 | 18, 30, 38, 60 | 146 | |$1.84e\!-\!02$| | 2.62 |
32 | 4 | 18, 31, 37, 55 | 141 | |$3.23e\!-\!03$| | 7.90 |
64 | 4 | 18, 31, 36, 50 | 135 | |$6.63e\!-\!04$| | 38.4 |
128 | 4 | 18, 32, 36, 51 | 137 | |$1.61e\!-\!04$| | 221 |
|$n_x$| . | Outer iterations . | Inner iterations . | Total inner . | Final accuracy . | Total time (s) . |
---|---|---|---|---|---|
4 | 4 | 12, 23, 33, 60 | 128 | |$3.73e\!+\!00$| | 0.556 |
8 | 4 | 18, 28, 39, 68 | 153 | |$1.83e\!-\!01$| | 0.915 |
16 | 4 | 18, 30, 38, 60 | 146 | |$1.84e\!-\!02$| | 2.62 |
32 | 4 | 18, 31, 37, 55 | 141 | |$3.23e\!-\!03$| | 7.90 |
64 | 4 | 18, 31, 36, 50 | 135 | |$6.63e\!-\!04$| | 38.4 |
128 | 4 | 18, 32, 36, 51 | 137 | |$1.61e\!-\!04$| | 221 |
A visualization of the computed solution components |$y$| and |$q$| at time |$t=0.5$| using a finite difference space discretization with |$n_x=128$| spatial grid points is shown in Fig. 7. We conclude this section by highlighting that we can also solve this reaction–diffusion control example using a spectral method in space, and indeed our approach can in principle be applied to any space discretization, with all that is required being the matrices arising from the discretization of the linearized PDE operators at a given time step. For instance, one may apply a finite element discretization in space, and take advantage of the finite element method’s greater flexibility when it comes to grid and mesh structure.

Computed solution of the reaction–diffusion problem at time |$t=0.5$|, using a finite difference space discretization with |$n_x=128$| spatial grid points.
4. Concluding remarks
In this paper we have derived a Newton–Krylov method to allow the spectral-in-time solution of nonlinear time-dependent PDE-constrained optimization problems, suggested a preconditioner to be applied within this method and validated our approach numerically on test problems relating to the optimal control of the Schlögl equation as well as a reaction–diffusion system. Thanks to the spectral time discretization, as opposed to more commonly used low-order time discretizations (such as backward Euler in Pearson & Stoll, 2013; Pearson et al., 2012; Stoll & Breiten, 2015), our method allows for a fast and accurate solution of such problems with relatively low memory requirements (as the solution is only collocated at a small number of time nodes). The method is also amenable to a range of strategies for the space discretization, and to apply the method the user only needs to provide matrices arising from their preferred discretization of the linearized PDE operators at a given time step. Possible extensions of this approach include the solution of more sophisticated systems of PDEs or integro-PDEs, problems with additional algebraic constraints on the state and control variables, and connecting with time-parallel methods for parabolic control problems, for instance the work presented in Götschel & Minion (2019). The derivation of more sophisticated preconditioning strategies and stopping criteria for the Newton–Krylov solver, taking account of the specific structures of the PDE operators involved, would also be of interest.
Acknowledgements
We are grateful to two anonymous referees for many insightful comments and suggestions that have improved this work.
Funding
Engineering and Physical Sciences Research Council (EP/S027785/1 to J.W.P.); Fellowships from the Alan Turing Institute (EP/N510129/1 to S.G. and J.W.P.).
References
A. Test problems with analytic solutions
