A first-order computational algorithm for reaction-diffusion type equations via primal-dual hybrid gradient method
Abstract
We propose an easy-to-implement iterative method for resolving the implicit (or semi-implicit) schemes arising in solving reaction-diffusion (RD) type equations. We formulate the nonlinear time implicit scheme as a min-max saddle point problem and then apply the primal-dual hybrid gradient (PDHG) method. Suitable precondition matrices are applied to the PDHG method to accelerate the convergence of algorithms under different circumstances. Furthermore, our method is applicable to various discrete numerical schemes with high flexibility. From various numerical examples tested in this paper, the proposed method converges properly and can efficiently produce numerical solutions with sufficient accuracy.
Keywords— Primal-dual hybrid gradient algorithm; Reaction-diffusion equations; First order optimization algorithm; Implicit finite difference schemes; Preconditioners.
1 Introduction
Reaction-diffusion (RD) equations (systems) have broad applications in many scientific and engineering areas. In material science, the phase-field model is described by typical RD-type equations known as Allen-Cahn [1] or Cahn-Hilliard equations [4]. They are used to model the development of microstructures in a mixture of two or more materials or phases over time; In chemistry, RD systems are used to depict the reaction and diffusion phenomena of chemical species in which a variety of patterns are produced [37, 39]; RD systems are also ubiquitous tools in biology: They are widely used for modeling morphogenesis [11], as well as the evolution of species distribution in ecology system [34]. In recent years, researchers also found that RD equations are useful in modeling and predicting crimes [44].
Reaction-diffusion (RD) equations are nonlinear parabolic partial differential equations possessing the following general form
(1) | |||
where is a certain non-positive definite differential operator associated with the diffusion process. For example, can be taken as the Laplace operator or negative biharmonic operator , or more general operators with variable coefficients; is a nonlinear operator depicting the reaction process. The RD equation is usually equipped with either the Neumann boundary condition if is an ordinary region in , or the periodic boundary condition if is a periodic region . We can also extend the RD equation (1) from the 1D function to multiple dimensional vector function :
(2) | |||
Equation (2) can also be equipped with either Neumann or periodic boundary conditions. We also call the equation (2) reaction-diffusion system.
In recent decades, numerical methods, including finite difference methods [32, 17, 24, 27, 7, 12, 42, 40, 41, 28, 29, 30] and finite element methods [24, 49, 19], have been developed for computing the reaction-diffusion type equations (systems). Several benchmark problems [26, 13] have also been introduced to verify the proposed methods’ effectiveness.
In order to get rid of the restriction of the Courant–Friedrichs–Lewy (CFL) condition [15] on small time steps, most of the popular numerical schemes designed for solving reaction-diffusion equations (systems) in the aforementioned works of literature are implicit or semi-implicit. As one uses implicit or semi-implicit schemes for solving RD equations (systems) with nonlinear terms, Newton’s method [2] is usually needed for solving the series of nonlinear equations arising from time discretization. However, Newton’s method encounters several drawbacks that may affect the performance of the proposed numerical scheme, namely,
-
•
Newton’s method requires the initial guess position to be close enough to the exact solution of the nonlinear equation. Otherwise, Newton’s method may diverge.
-
•
When solving RD equations on mesh grids by Newton’s method, in each iteration, one has to solve a large-scale linear equation involving the Jacobian matrix of a certain nonlinear function. Solving this large-scale linear equation for multiple Newton iterations could be challenging and time-costing.
In this paper, we introduce a method based on the Primal-Dual Hybrid Gradient method (PDHG) [50, 8, 47, 14, 25] for solving the nonlinear updates arising in the time discretization schemes of RD equations (systems) with satisfying speed and accuracy.
We sketch the proposed method as follows. We briefly illustrate the main idea by considering the following fully implicit, semi-discrete scheme of the RD equation at the -th time step:
(3) |
In this case, is given, and is a stepsize. We need to solve for . Consider the following function
(4) |
The goal is to solve . If we consider the indicator function defined as
Then the nonlinear functional equation is equivalent to the minimization problem
where is a certain linear functional space for . Now since can be treated as the Legendre transform of the constant function , i.e., (here denotes the dual space of ), we can recast the above minimization problem as a min-max saddle point problem as follows
(5) |
We denote . To deal with the saddle problem (5), by leveraging the ideas proposed in the PDHG method, we evolve via the following proximal algorithms with extrapolation on the dual variable .
(6) | ||||
(7) | ||||
(8) |
Here the extrapolation coefficient , are time steps used to evolve . We should remind the reader to distinguish the PDHG time steps from the time step of the reaction-diffusion equation. Recall as the solution to , if we further assume that , as a linear map from to , is injective. Then it is not hard to verify that is the equilibrium of the above dynamic (6) - (8). Thus, we may anticipate that, by evolving (6), (7), (8), could converge to the desired equilibrium point .
Furthermore, since is usually nonlinear, the inversion in (8) cannot be directly evaluated. To mitigate this, we replace by its linearization at . Thus the update of will have an explicit form
(9) |
As a result, we can evolve the discrete-time dynamic (6), (7), (9) for approximating the solution of the nonlinear equation , and the explicit updating rules will enable us to deal with large-scale computational problems conveniently and efficiently. This work will mainly focus on applying such a PDHG algorithm to solve various types of reaction-diffusion equations (systems) up to satisfying accuracy and efficiency. Based on the discussion and presentation in this paper, our method may serve as a potential alternative to the widely used Newton-type algorithms for time-implicit updates of reaction-diffusion equations for time-implicit schemes.
It is worth mentioning that instead of designing and analyzing new discretization schemes for RD equations, our paper is mainly devoted to a strategy that can efficiently resolve the ready-made scheme. Thus, in our paper, we will omit most of the discussions on the properties of the numerical scheme but focus more on the implementing details and the effectiveness of the proposed PDHG method.
We clarify that the method is inspired by [31], in which the authors design a similar algorithm for solving multiple types of PDEs accompanied by 1-D examples. This paper will be more specific and focus on computing various 2-D RD equations (systems) with different boundary conditions.
It is also worth mentioning that introducing damping terms into wave equations to achieve faster stabilization [18] shares great similarity with the limiting stepsize version of applying the PDHG method to PDE-solving algorithms. On the other hand, PDHG methods are also utilized in [47] to solve nonlinear equations with theoretical convergence guarantee under different circumstances.
Furthermore, people have applied PDHG or first-order methods to compute time-implicit updates of Wasserstein gradient flows [5] and reaction-diffusions [6, 19]. Compared to them, the proposed approach work for general non-gradient flow reaction-diffusion equations. In recent research [10], the authors deal with the nonlinear saddle point problems via the transformed PDHG method, with the follow-up research [9] aiming at solving the nonlinear equations associated with a class of monotone operators. In recent works [48, 3], the authors utilize the weak forms of PDEs and deep learning techniques to compute high-dimensional PDEs. The algorithm in [48] can be formulated as a min-max saddle point problem and is directly solved by alternative stochastic gradient descent and ascent method. Although the proposed method shares similarities with the aforementioned research. It differs from them in the saddle point problem formulation and the computational scheme.
This paper is organized as follows. In section 2, we provide a brief introduction to the Primal-Dual Hybrid Gradients method; then we present the details of how we implement the PDHG method to update the finite difference schemes for RD equations (systems). We then provide some existing theoretical results on the convergence of the PDHG method. We demonstrate our numerical examples in section 3. Our numerical experiments cover well-known Allen-Cahn and Cahn-Hilliard equations; higher-order gradient flow that emerges from functionalized polymer research; RD system known as the Schnakenberg model, which originates from the study of steady chemical patterns; and RD systems involving nonlocal terms depicting the species evolution of wolves and deer. We conclude the work in section 4. Some of the future research directions will also be discussed in section 4.
2 PDHG method for reaction-diffusion equation
In recent years, The Primal-Dual Hybrid Gradient (PDHG) method [50, 49, 8] proves to be an efficient algorithm for solving saddle point problems emerging from imaging. This method is iterative and each of its iterations consists of alternative proximal steps together with a suitable extrapolation. We refer the readers to [8] for further details (both theoretical and experimental) of the method.
2.1 PDHG method for updating implicit finite difference schemes
To clearly convey our proposed idea, let us first consider the following reaction-diffusion equation as an illustrative example on 2D periodic region . We assume is square shaped and denote its side length as .
(10) |
Here we assume is a positive constant coefficient; is the nonlinear function depicting the reaction term. Since we assume to be the periodic region, we use periodic boundary conditions (BC) for equation (10).
Although there are numerous pieces of research on designing numerical schemes for RD equations, to demonstrate how our method works, let us narrow down and focus on the implicit one-step finite difference (FD) scheme. Once we have demonstrated how to implement the method to this implicit scheme, such a method can be easily extended to general numerical schemes.
We discretize the time interval into equal subintervals with length . Suppose we discretize each side of the region into subintervals with space stepsize , we choose the central difference scheme to discretize the Laplace operator . We denote the discrete Laplace operator with the periodic boundary condition as which is an block-circulant matrix possessing the following form
Here is the by identity matrix. We denote as the numerical solution of (10) at the th time step. We vectorize the square array along the column to form the 1D vector . That is, for with and , is the numerical approximation of .
Now the implicit one-step FD scheme for (10) is cast as
(11) |
Here denotes the initial condition on mesh grid points. When solving for the numerical solution of (10), one has to sequentially solve a series of nonlinear equations as shown in (11). This is the place in which we should apply the PDHG method. Let us denote the function as
(12) |
We want to solve . As discussed in the introduction, this is equivalent to minimizing , which can further be cast as the following min-max saddle point problem
(13) |
where is defined as . As a result, solving the equation finally boils down to the min-max problem (13).
Now the PDHG method suggests the following gradient ascent-descent dynamic for solving (13).
(14) | ||||
(15) | ||||
(16) |
Similar to our discussion in the introduction, the third line above involves a nonlinear equation that cannot be directly solved. We thus can replace the term in (16) by the linearization , then (16) can be explicitly computed as
(17) |
Let us denote as the solution to . It is not hard to tell that is a critical point of the functional . Furthermore, is the equilibrium point of the time-discrete dynamic (14), (15), (17).
To analyze the convergence speed to the equilibrium state , we first consider the affine case in which with as an symmetric matrix. We have the following result, similar to the analysis carried out in [31].
Theorem 1 (Convergence speed in Linear, symmetric case).
We fix the extrapolation coefficient . Suppose we obtain the sequence by evolving the PDHG dynamic (14), (15), (17) with initial condition . Suppose with symmetric and non-singular. Denote as the maximum eigenvalue (in absolute value) of , and denote as the condition number of . Then will converge to linearly if . Then the maximum convergence speed is achieved when , with the optimal convergence rate , i.e., we have for any , Here is a function of . The range of belongs to .
The proof of the theorem is provided in Appendix A. The explicit form of and are given in remark 2 of Appendix A.
The optimal convergence rate will be very close to if the condition number is large. Furthermore, one will require iterations for to converge. This can be very expensive when is a large-scale matrix with a large condition number. For example, we consider the heat equation
with periodic boundary conditions. We apply the one-step implicit scheme to this equation, i.e., we consider solving at each time step . Thus . One can tell that the eigenvalues of equal for When is even, the condition number of equals . Since we can get rid of the CFL condition by using the implicit scheme, we can pick , which leads to . The convergence of the primitive PDHG method could be very slow, even for the heat equation.
As discussed in remark 2, approaches if the condition number drops to . Hence, we need to control the condition number of the matrix to achieve faster convergence speed. This motivates us to introduce the preconditioning technique to the PDHG method. As suggested in both [25] and [31], we replace the norm used in either or by the norm which is defined as
with as a symmetric, positive definite matrix. In this work, we mainly focus on substituting the norm with . The PDHG method involving norm in its proximal step is sometimes named prox PDHG [25]. The dynamic obtained via such prox PDHG is shown below.
(18) | ||||
(19) | ||||
(20) |
We should pause here to emphasize to the reader that the above three-line dynamic (18), (19), (20) will be the core gadget for our RD equation solver throughout the remaining part of the paper. Before we move on to further details on solving the RD equation (10) via prox PDHG dynamic, let us provide a little more explanation on how (18) - (20) improve the convergence speed . Analogous to Theorem 1, we have the following corollary for affine function .
Corollary 1.1 (Convergence for prox dynamic).
It is now clear that if we can find a matrix that approximates well, then will be reasonably close to the identity matrix . Thus the condition number of will hopefully remain close to . In such cases, by properly choosing the step size such that is close to , we can obtain a rather fast convergence rate .
Up to this stage, although most of our intuition and analysis on prox PDHG dynamic comes from the case when is affine, it is natural to extend our treatment to the nonlinear defined in (12). We may still anticipate the effectiveness of our method since (12) can be recast as
which can be treated as an affine function with a nonlinear perturbation carrying the small coefficient. We now discuss several details in applying the prox PDHG dynamic (18)-(20) to the above . We aim at evolving the following dynamic in order to update the implicit one-step scheme (11).
(21) | ||||
(22) | ||||
(23) |
Initial guess It is natural to choose the initial value of the dynamic (21) - (23) as the computed result from the last time step , i.e., we set ; And we will simply set . A more sophisticated choice for could be the numerical solution at time obtained by a forward Euler scheme or an IMEX scheme [36, 24].
Choosing the matrix The function defined in (12) is dominated by the affine term . It is then natural to choose as the preconditioner matrix. If the nonlinear term is a highly stiff term, we may also consider absorbing its Jacobian into . So, can also be chosen as in such case. However, there might be a trade-off in doing so: if does not have equal diagonal entries, cannot be efficiently inverted by Fast Fourier Transform (FFT) or Discrete Cosine Transform (DCT) method. Nevertheless, in most of our experiments, we discover that choosing is adequate for achieving satisfying convergence speed. For more general reaction-diffusion equations, we discover that the nonlinear function is usually decomposed as the sum of the linear term and the nonlinear term . The linear term can be treated as the dominating term of . It is then reasonable to choose or at least close to as a decent preconditioner of our method. This strategy works properly on general RD equations such as the Cahn-Hilliard equation or higher-order equations arising in polymer science. We refer the reader to examples in section 3 for details.
Application of FFT for fast computation Making use of the Fast Fourier Transform (FFT) method, or more precisely, 2-dimensional FFT [22] to accelerate our computation is crucial in our method. There are two places where we should apply FFT. The first is where we compute ; the second is where we compute . We refer the readers to chapter 4.8 of [22] and the references therein for details on implementing FFT. We also refer the reader to the examples in section 3 for applying FFT to general RD equations.
Choose suitable stepsize For the affine case discussed in Corollary 1.1, if is close to , then should be a close to , then indicates that we could choose stepsizes rather large. In our practice, starting at should be a reasonable choice. One can increase or decrease the stepsize based on the actual performance of the method.
Stopping criterion During our computation, we will set up a threshold for our method. After each iteration of the PDHG dynamic, we evaluate the norm of the residual , we terminate the PDHG iteration iff .
Remark 1 (Neumann boundary condition and DCT).
It is worth providing some further discussions on our treatment of the Neumann boundary condition (BC), i.e., for a particular rectangular region , on . We discretize both sides of into subintervals. Thus the space stepsize . Such discretization will lead to mesh grid points. For point on the vertical boundary of , we apply the central difference scheme to the Neumann boundary condition at the midpoint , which leads to , thus . Similar treatments are applied to the other boundaries of . Suppose we consider using the central difference scheme to discretize the Laplacian , let us denote the discretized Laplacian w.r.t. Neumann boundary condition as , then takes the following form.
(24) |
Here the block matrices are
Similar to using FFT for the computation involving , we can use the Discrete Cosine Transform (DCT) [46] [22] to efficiently evaluate matrix-vector multiplication or solve linear equations involving the matrix . To be more specific, we use the DCT-2 transform introduced in [46] in the 2-dimensional scenario which enjoys the computational complexity.
We summarize our method in the following algorithm. It is not hard to tell that the total complexity of each inner PDHG method is .
In this section, we mainly focus on the one-step implicit finite difference (FD) scheme to illustrate how we apply the PDHG iterations to update the given FD scheme. But we should emphasize that our method is not restricted to such a scheme. One can extend the PDHG method to various types of numerical schemes by formulating the scheme at a certain time step as a nonlinear equation , and construct the functional . Then one can apply the dynamic (18) - (20) to update the numerical solution from to . In addition, our method is applicable to more general reaction-diffusion equations (systems). Further discussions and details are supplied in section 3.
2.2 Discussion on convergence criteria and adaptive method
Theorem 1 suggests that under the linear case, the convergence of PDHG method relies on condition number , which is directly related to of our discrete scheme. In practice, we fix and in the algorithm. At every time step we discover that when time stepsize gets larger than a certain threshold value which depends on and , PDHG method will hardly converge. The method works well when is slightly smaller than the threshold. The theoretical study on how guarantees the convergence of our method will be an important future research direction.
Adaptive time stepsize As discussed above, we cannot guarantee the convergence of the PDHG iteration (21) - (23) for any time stepsize . Since the aforementioned threshold may vary at different time stages, and how varies depends on the nature of the equation as well as the discretization scheme. Given the potential difficulty of choosing the suitable that guarantees both the numerical accuracy as well as the convergence of the PDHG iterations, we come up with the strategy of using adaptive stepsize throughout the computation. We choose a time stepsize that guarantees the numerical accuracy and will serve as the upper bound of all throughout our method, we also set up two integers as the thresholding integers for enlarging or shrinking the time stepsize . We also pick a rescaling coefficient . During each time step of the algorithm, we record the total number of PDHG iterations , and reset the stepsize for the next time step based on the following rules:
-
•
If , we shrink by rate , ;
-
•
If , we remain unchanged;
-
•
If , we enlarge by rate , , if ; we remain unchanged if .
It is also reasonable to fix but to only shrink the PDHG stepsizes when we encounter difficulties in converging. However, according to our experience, shrinking usually requires much more PDHG iterations for convergence, which may cause the algorithm less efficient compared with the aforementioned adaptive strategy.
3 Numerical examples
In this section, we demonstrate some numerical results computed by the proposed method. Throughout our experiments, we always use the extrapolation coefficient , and set the initial condition as the numerical solution computed from the last time step . One can also try other values of or a more sophisticated initial guess of . Our experiences show that confining around will probably provide the best performance of the PDHG method. Choosing as obtained by a specific explicit or IMEX scheme may slightly shorten the convergence time of the PDHG iteration. However, it is worth mentioning that when we are dealing with stiff equations, such treatment may introduce instability to the PDHG dynamic which may lead to the blow-up of the method.
Furthermore, as we have emphasized before, the mission of this paper is to verify the correctness and effectiveness of the proposed PDHG method in resolving the equation at each time step. Thus, in this work, we will mainly focus on the straightforward one-step implicit scheme (11) in all numerical examples by omitting further discussions and experiments on more sophisticated numerical schemes.
We use fixed time stepsize in our numerical examples unless we emphasize that the adaptive method is applied in the experiments.
Our numerical examples are computed in MATLAB on a laptop with 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz 2.42 GHz CPU.
3.1 Allen-Cahn equations
The Allen-Cahn equation [1] is a typical reaction-diffusion equation taking the following form
(25) |
Here are positive coefficients,
(26) |
is a double-well potential function with its derivative . We will always assume periodic boundary conditions in our discussion.
The Allen-Cahn equation can be treated as the gradient flow of the following functional .
(27) |
3.1.1 Examples with shrinking level set curve
In the first example, we consider with . We consider taking , with . Let use consider . Here denotes the indicator function of measurable set , i.e., if , and otherwise. We denote as the disk centered at with a radius equal to . Suppose we use periodic boundary conditions for (25). It is well-known that the zero-level-set curve of the solution to Allen-Cahn equation behaves similarly to the mean curvature flow as time increases [38, 33, 32]. In this case, we can treat the initial level set curve as the circle centered at the origin with radius . As increases, the circle radius will shrink at the rate of times circle curvature, i.e., . Solving this equation leads to . Thus the level set circle will vanish at finite time .
As suggested in section 4.4 of [33], it is important to choose the spatial stepsize small enough so that no larger than to capture the shrinkage of level set curve, otherwise, the numerical solution may get stuck at some intermediate stage. In this example, we solve the equation on time interval . We choose , thus ; with . Recall . We choose as the stepsize for the PDHG iteration. Some computed results are shown in Figure 1. Plots of the radial position as well as the moving speed of the front (zero level set circle) of the numerical solution are presented in Figure 2.
We apply the PDHG method described in Algorithm 1 to this problem. Although equation (1) contains a nonlinear term with a significant coefficient , our proposed PDHG method still solves the nonlinear efficiently. To be more specific, we set the PDHG-threshold . Most PDHG iterations will terminate in less than steps for each discrete time step. The right plot of Figure 2 indicates the linear convergence of the proposed method.









We also solve equation (1) on within the time interval . We still set with . We pick , , thus , . We consider the initial condition with the region , where are disks centered at , with radius both equal to . We apply the PDHG method with and obtain the numerical results in Figure 3. In this example, the PDHG method takes no more than iterations for each time step update.






3.2 Cahn-Hilliard equations
We now switch to another well-known reaction-diffusion equation known as the Cahn-Hilliard equation [4], which takes the following form.
(28) |
Here we assume , and defined the same as in the Allen-Cahn equation. In this section, we will restrict our discussion to periodic boundary conditions. Similar to the Allen-Cahn equation, the Cahn-Hilliard equation can be treated as the gradient flow of the functional defined in (27). Due to this reason, compared with the Allen-Cahn equation, the Cahn-Hilliard equation involves one extra operator on the right-hand side of the equation. This difference leads to several slight modifications to our original algorithm.
The functional introduced in (12) is now
(29) |
Thus It is then natural to choose precondition matrix as . The three-step PDHG update for Cahn-Hilliard equation can thus be formulated as
(30) | ||||
(31) | ||||
(32) |
By carefully investigating the steps among (30) - (32), one can tell that both the linear equation involving and the matrix-vector multiplication involving can be computed via FFT, which indicates the effectiveness of the computational scheme when applied to Cahn-Hilliard equations.
We demonstrate several numerical examples below.
3.2.1 Example with seven circles
Inspired by the second example introduced in [13], we consider Cahn-Hilliard equation (28) on periodic domain with and . We set the initial condition as
where the mollifier function is defined as
One can think of as an indicator function whose value equals if falls into any of the seven circles; and equals otherwise. Furthermore, we set the centers and radii of the seven circles as in Table 1.
We will solve equation (28) on the time interval . In our numerical implementation, we set , ; , . For the PDHG iteration, we set . The numerical solution to this equation is demonstrated in Figure 4. The plots of residuals at different time stages are also presented in Figure 4, which exhibit the linear convergence of the PDHG algorithm. The small circles will gradually fade out, leaving the largest circle in the center of the domain till the end. By analyzing our numerical solution, the time at which the value of our numerical solution is evaluated at passes is located in the interval ; while the time at which our numerical value evaluated at passes is located in the interval . Both times meet the accuracy proposed in [13].












3.2.2 Example with sinusoidal initial condition
In this section, we follow example 4 proposed in [13] to compute (28) on . We set , . The initial condition is set as
We solve the equation on the time interval . We set , ; , . For the PDHG part, we choose . The PDHG iteration is working efficiently at every time stepsize. Some numerical plots are shown in Figure 5.




3.2.3 Example with random initial condition
One can also consider the Cahn-Hilliard equation (28) with random initial condition. This may impose more challenges to our computation since the randomness will remove the regularity of and make the numerical computation unstable. We will solve the equation (28) on in this example. We let the periodic domain . Then we choose , ; with . We choose a rather small time step size in this example in order to guarantee the accuracy of our numerical solution. For the initial condition, we choose as a random scalar field that takes i.i.d. values uniformly distributed on We evolve the PDHG dynamic with stepsize . We plot the numerical solutions at certain time stages in Figure 6. The reaction-diffusion system reaches the equilibrium state at . The residual plots of at time and are provided in Figure 7.







3.3 Higher-order Reaction-Diffusion Equations
In addition to the Allen-Cahn and Cahn-Hilliard equations, we test the method on the following 6th-order Cahn-Hilliard-type equation.
(33) |
The above equation was first proposed in [21] which depicts the pore formation in functionalized polymers. This equation was later studied in the numerical examples of [12]. In this example, we set . We choose parameter . The potential function is the same as defined in (26). Thus . Similar to Allen-Cahn or Cahn-Hilliard equations, equation (33) can also be treated as a flow that dissipates the energy with .
In our numerical implementation of the PDHG method, the functional is now
Similar to Allen-Cahn and Cahn-Hilliard equations, we pick the preconditioner as the square of the matrix in the dominating linear part of . However, if we directly keep the diagonal matrix , we will not be able to invert efficiently by using FFT. Since the value of close to the equilibrium states is approximately , we follow a similar idea in [12] to replace such matrix with . Thus, in this problem, we set which can be inverted via FFT algorithm. Now the 3-line PDHG update is formulated as
Here we denote . If the size of is , one can verify that all calculations among the PDHG iteration can be computed with complexity via the FFT method.
Similar to [12], we choose initial condition
(34) |
In the numerical implementation, we solve the equation (33) from to . We choose , ; , . We choose the PDHG stepsizes . We choose the threshold for terminating the iteration as . We present some of the results in Figure 8 and Figure 9.










3.4 Reaction-diffusion systems
We have already shown some reaction-diffusion equation examples in the previous sections. We now apply the method to compute reaction-diffusion systems.
3.4.1 Schnakenberg Model
The Schnakenberg model is first considered in [39] to model the limit-cycle behavior in a two-component chemical reaction system. In the discussion, we consider the following reaction-diffusion PDE system defined on unit square where , represent the density concentration of two chemicals. Such a PDE system is also investigated in references [24, 49].
(35) | ||||
(36) |
The initial condition of the system is
(37) |
Here we set . One can understand the initial data as exerting a tiny perturbation to the equilibrium solution of the Schnakenberg system (35), (36). Such equilibrium state is unstable, the small perturbation will lead to the formation of certain dotted patterns in both components and .
We assume the Neumann boundary condition on where denotes the directional derivative w.r.t. the outer pointing normal direction .
Suppose we apply the one-step implicit scheme to solve this problem, recall the discrete Laplacian with Neumann BC introduced in (24), at the th time step, we consider
At each time step, our purpose is to solve for updating . By treating as an entity; and by denoting , the problem of solving reduces to the scenario of solving single discussed before. Hence, it is natural to introduce the dual variable ; The stiff Laplacian terms can be treated as dominating linear terms of both functions , thus we set our preconditioner matrix with and . The corresponding PDHG iteration for solving is formulated as follows.
We recall that the Discrete Cosine Transform mentioned in Remark 1 can be used to compute matrix-vector multiplication involving as well as inverting the preconditioners within complexity. Thus every step of the above PDHG iterations can be computed efficiently.
In our numerical implementation, we solve this PDE system, on time interval . We choose , ; and , . We then choose . We terminate the PDHG iteration when , where we pick threshold . Our numerical solutions are presented in the following Figure 10.












In this example, the performance of the PDHG method is stable and the method terminates in around iterations for all time steps. We plot the loss as well as the residual term at different time stages in Figure 11.








We compare the computational speed of our PHDG method with the commonly used Newton-SOR method [43, 32]. We fix all the parameters the same for both methods, typically, we set the termination threshold for both methods to be . We solve the PDE system on with and . The time cost for the Newton-SOR method is 8122.81s, while the time cost for the PDHG method is 1121.81s.
3.4.2 Wolf-deer model
At last, let us consider an equation system describing the evolution of predator (wolves) and prey (deer) distributions in an ecology system [34, 20]. The PDE system is defined on the region and takes the following form,
(38) | ||||
(39) |
Here we set , , , . We also define the interacting potentials as
Here the convolution is defined as with potential
We choose Neumann boundary condition for both and , and set the initial condition
(40) |
where and .
In system (38), (39), represents the distribution of deer, and stands for the distribution of wolf. In addition to the diffusion and reaction terms affecting , the PDE system (38), (39) contain non-local drift terms that depict the interactions among the individuals of wolves and deer: The deer are attracting each other to dodge wolves’ predation, while the wolves are gathering together to chase the flock of deer.
Suppose we discretize each side of into equal subintervals, we denote the numerical solutions at the th time step as . We consider the following implicit, central-difference scheme,
Here is an matrix which can be treated as the discrete gradient with respect to , i.e., for any , equals for , ; for we define and can also be defined in a similar way.
The notation denotes the average value of at midpoints, i.e., for ; for , we define and can be defined in the similar way.
is an matrix used for approximating the convolution , to precisely, for any defined on the mesh grid of , is defined as
The above discrete convolution can be reduced to Toeplitz matrix-vector multiplication computation, which can be efficiently computed by FFT algorithm [45].
Furthermore, for the reaction terms are defined as ; .
Given the above discrete scheme of the PDE system, similar to the discussion made in the Schnakenberg model, our purpose is to solve two nonlinear equations at each time step . We apply two dual variables , and compose the corresponding PDHG dynamic for solving the two equations. According to the previous discussion, one can verify that each PDHG step can be computed within complexity. This guarantees the efficiency of the computation. To keep the discussion concise, we omit the exact formulas for the PDHG dynamic here.
In our implementation, we set . We solve the equation system (38), (39) on time interval . We set , . We practice the method of adaptive time stepsize in this example. We set both our initial time stepsize and maximum stepsize equal to with shrinkage/enlarge coefficient as . The thresholding iteration numbers of shrinking and enlarging are set to be , and . For the PDHG iteration, we set stepsize , and pick the threshold . We present the numerical results in Figure 12.












The linear convergence of the residual term is reflected from the residual decay plots in Figure 13.





The changes in PDHG iterations at each time stepsize as well as the changes in time step size are demonstrated via Figure 14. As reflected from the plots, in this example, we are gradually shrinking the time stepsize as the accumulated time increases to guarantee the computational efficiency of the PDHG method. Our method takes a total of time to complete the computation. the algorithm experiences stepsize shrinkage among our computation. The initial is set as while when we finish the computation,


4 Conclusion and Future Study
This research proposes an iterative method as a convenient but efficient gadget for solving the implicit (or semi-implicit) numerical schemes arising in time-evolution PDEs, especially the reaction-diffusion type equations. Our method recasts the nonlinear equation from the discrete numerical scheme at each time step as a min-max saddle point problem and applies the Primal-Dual Hybrid Gradient method. The algorithm can flexibly fit into various numerical schemes, such as semi-implicit and fully implicit schemes, etc. Furthermore, the method is easy to implement since it gets rid of the computation of large-scale linear systems involving Jacobian matrices, which are usually required by Newton’s methods. The performance of our method on accuracy and efficiency is satisfying and is comparable to the commonly used Newton-type methods. This has been verified by the numerical examples presented in this paper.
There are three main future research directions of our work. We summarize them below:
-
•
Conduct theoretical analysis on the convergence of the PDHG method for nonlinear RD equations. We are interested in the necessary condition on that can guarantee the convergence of our method for certain types of RD equations.
- •
-
•
Apply the method to high-dimensional time-evolution PDEs by leveraging deep learning techniques and PDHG algorithms.
Acknowledgement: S. Liu and S. Osher’s work was partly supported by AFOSR MURI FP 9550-18-1-502 and ONR grants: N00014-20-1-2093 and N00014-20-1-2787. W. Li’s work was supported by AFOSR MURI FP 9550-18-1-502, AFOSR YIP award No. FA9550-23-1-0087, and NSF RTG: 2038080.
Appendix A Proof of Theorem 1
Proof.
It is not hard to verify that the dynamic (14), (15) and (17) can be formulated as
(41) |
This equation admits a unique fixed point . We denote and the above recurrence equation as (or equivalently, ) for shorthand. Suppose has spectral decomposition , then is decomposed as
We denote as the size of . The middle matrix is composed of four diagonal matrices, by rearranging the rows and columns of it, one can show that it is orthogonally equivalent to the block diagonal matrix where each We now analyze the spectral radius of , which equals . We can calculate
We denote with . One can directly compute Thus we have Then is decreasing on and increasing on with . We know that the convergence of (41) is guaranteed if and only if . This is equivalent to , which yields .
Furthermore, is the convergence rate of the dynamic, i.e.,
To evaluate the optimal convergence rate, we compute the minimum value of w.r.t. stepsizes . Suppose we require to guarantee convergence, if we denote , then for The minimum value of will be attained at a unique such that . I.e., is the solution of
(42) |
Thus, the optimal convergence rate and it is achieved when satisfy .
∎
Remark 2.
The equation (42) can be reduced to a quadratic equation. And it admits a unique solution on , takes the following form
The optimal convergence rate takes the explicit form
Notice that when the conditional number is very large; and will approach as condition number approaches . This motivates the preconditioning technique of our method.
References
- [1] Samuel M Allen and John W Cahn. A microscopic theory for antiphase boundary motion and its application to antiphase domain coarsening. Acta metallurgica, 27(6):1085–1095, 1979.
- [2] Kendall Atkinson. An introduction to numerical analysis. John wiley & sons, 1991.
- [3] Gang Bao, Xiaojing Ye, Yaohua Zang, and Haomin Zhou. Numerical solution of inverse problems by weak adversarial networks. Inverse Problems, 36(11):115003, 2020.
- [4] John W Cahn. On spinodal decomposition. Acta metallurgica, 9(9):795–801, 1961.
- [5] José A. Carrillo, Katy Craig, Li Wang, and Chaozhen Wei. Primal Dual Methods for Wasserstein Gradient Flows. Foundations of Computational Mathematics, 22(2):389–443, 2022.
- [6] Jose A. Carrillo, Li Wang, and Chaozhen Wei. Structure preserving primal dual methods for gradient flows with nonlinear mobility transport distances, 2023.
- [7] Hector D Ceniceros and Carlos J García-Cervera. A new approach for the numerical solution of diffusion equations with variable and degenerate mobility. Journal of Computational Physics, 246:1–10, 2013.
- [8] Antonin Chambolle and Thomas Pock. A first-order primal-dual algorithm for convex problems with applications to imaging. Journal of mathematical imaging and vision, 40:120–145, 2011.
- [9] Long Chen and Jingrong Wei. Accelerated gradient and skew-symmetric splitting methods for a class of monotone operator equations. arXiv preprint arXiv:2303.09009, 2023.
- [10] Long Chen and Jingrong Wei. Transformed primal-dual methods for nonlinear saddle point systems. Journal of Numerical Mathematics, 2023.
- [11] Ching-Shan Chou, Yong-Tao Zhang, Rui Zhao, and Qing Nie. Numerical methods for stiff reaction-diffusion systems. Discrete and continuous dynamical systems, series B, 7(3):515, 2007.
- [12] Andrew Christlieb, Jaylan Jones, Keith Promislow, Brian Wetton, and Mark Willoughby. High accuracy solutions to energy gradient flows from material science models. Journal of computational physics, 257:193–215, 2014.
- [13] Jon M Church, Zhenlin Guo, Peter K Jimack, Anotida Madzvamuse, Keith Promislow, Brian Wetton, Steven M Wise, and Fengwei Yang. High accuracy benchmark problems for Allen-Cahn and Cahn-Hilliard dynamics. Communications in computational physics, 26(4), 2019.
- [14] Christian Clason and Tuomo Valkonen. Primal-dual extragradient methods for nonlinear nonsmooth PDE-constrained optimization. SIAM Journal on Optimization, 27(3):1314–1339, 2017.
- [15] Richard Courant, Kurt Friedrichs, and Hans Lewy. Über die partiellen differenzengleichungen der mathematischen physik. Mathematische annalen, 100(1):32–74, 1928.
- [16] Manh Hong Duong and Michela Ottobre. Non-reversible processes: GENERIC, hypocoercivity and fluctuations. Nonlinearity, 36(3):1617, 2023.
- [17] David J Eyre. An unconditionally stable one-step scheme for gradient systems. Unpublished article, 6, 1998.
- [18] Fariba Fahroo and Kazufumi Ito. Optimum damping design for an abstract wave equation. Kybernetika, 32(6):557–574, 1996.
- [19] Guosheng Fu, Stanley Osher, and Wuchen Li. High order spatial discretization for variational time implicit schemes: Wasserstein gradient flows and reaction-diffusion systems. arXiv preprint arXiv:2303.08950, 2023.
- [20] Thomas Gallouët, Maxime Laborde, and Leonard Monsaingeon. An unbalanced optimal transport splitting scheme for general advection-reaction-diffusion problems. ESAIM: Control, Optimisation and Calculus of Variations, 25:8, 2019.
- [21] Nir Gavish, Jaylan Jones, Zhengfu Xu, Andrew Christlieb, and Keith Promislow. Variational models of network formation and ion transport: Applications to perfluorosulfonate ionomer membranes. Polymers, 4(1):630–655, 2012.
- [22] Gene H Golub and Charles F Van Loan. Matrix computations. JHU press, 2013.
- [23] Miroslav Grmela and Hans Christian Öttinger. Dynamics and thermodynamics of complex fluids. i. development of a general formalism. Physical Review E, 56(6):6620, 1997.
- [24] Willem H Hundsdorfer, Jan G Verwer, and WH Hundsdorfer. Numerical solution of time-dependent advection-diffusion-reaction equations, volume 33. Springer, 2003.
- [25] Matt Jacobs, Flavien Léger, Wuchen Li, and Stanley Osher. Solving large-scale optimization problems with a convergence rate independent of grid size. SIAM Journal on Numerical Analysis, 57(3):1100–1123, 2019.
- [26] Andrea M Jokisaari, PW Voorhees, Jonathan E Guyer, James Warren, and OG Heinonen. Benchmark problems for numerical implementations of phase field models. Computational Materials Science, 126:139–151, 2017.
- [27] Yibao Li, Hyun Geun Lee, Darae Jeong, and Junseok Kim. An unconditionally stable hybrid numerical method for solving the Allen-Cahn equation. Computers & Mathematics with Applications, 60(6):1591–1606, 2010.
- [28] Chun Liu, Cheng Wang, and Yiwei Wang. A structure-preserving, operator splitting scheme for reaction-diffusion equations with detailed balance. Journal of Computational Physics, 436:110253, 2021.
- [29] Chun Liu, Cheng Wang, and Yiwei Wang. A second-order accurate, operator splitting scheme for reaction-diffusion systems in an energetic variational formulation. SIAM Journal on Scientific Computing, 44(4):A2276–A2301, 2022.
- [30] Chun Liu, Cheng Wang, Yiwei Wang, and Steven M Wise. Convergence analysis of the variational operator splitting scheme for a reaction-diffusion system with detailed balance. SIAM Journal on Numerical Analysis, 60(2):781–803, 2022.
- [31] Siting Liu, Stanley Osher, Wuchen Li, and Chi-Wang Shu. A primal-dual approach for solving conservation laws with implicit in time approximations. Journal of Computational Physics, 472, 2023.
- [32] Barry Merriman, James K Bence, and Stanley J Osher. Motion of multiple junctions: A level set approach. Journal of computational physics, 112(2):334–363, 1994.
- [33] Barry Merriman, James Kenyard Bence, and Stanley Osher. Diffusion generated motion by mean curvature. Department of Mathematics, University of California, Los Angeles, 1992.
- [34] James D Murray. Mathematical biology II: Spatial models and biomedical applications, volume 3. Springer New York, 2001.
- [35] Hans Christian Öttinger and Miroslav Grmela. Dynamics and thermodynamics of complex fluids. ii. illustrations of a general formalism. Physical Review E, 56(6):6633, 1997.
- [36] Lorenzo Pareschi and Giovanni Russo. Implicit-explicit runge-kutta schemes for stiff systems. Recent trends in numerical analysis, 3:269, 2000.
- [37] John E Pearson. Complex patterns in a simple system. Science, 261(5118):189–192, 1993.
- [38] Jacob Rubinstein, Peter Sternberg, and Joseph B. Keller. Fast Reaction, Slow Diffusion, and Curve Shortening. SIAM Journal on Applied Mathematics, 49(1):116–133, 1989.
- [39] J Schnakenberg. Simple chemical reaction systems with limit cycle behaviour. Journal of theoretical biology, 81(3):389–400, 1979.
- [40] Jie Shen, Jie Xu, and Jiang Yang. The scalar auxiliary variable (SAV) approach for gradient flows. Journal of Computational Physics, 353:407–416, 2018.
- [41] Jie Shen, Jie Xu, and Jiang Yang. A new class of efficient and robust energy stable schemes for gradient flows. SIAM Review, 61(3):474–506, 2019.
- [42] Jie Shen and Xiaofeng Yang. Numerical approximations of Allen-Cahn and Cahn-Hilliard Equations. Discrete Contin. Dyn. Syst, 28(4):1669–1691, 2010.
- [43] Andrew H Sherman. On newton-iterative methods for the solution of systems of nonlinear equations. SIAM Journal on Numerical Analysis, 15(4):755–771, 1978.
- [44] Martin B. Short, P. Jeffrey Brantingham, Andrea L. Bertozzi, and George E. Tita. Dissipation and displacement of hotspots in reaction-diffusion models of crime. Proceedings of the National Academy of Sciences, 107(9):3961–3965, 2010.
- [45] Gilbert Strang. A proposal for Toeplitz matrix calculations. Studies in Applied Mathematics, 74(2):171–176, 1986.
- [46] Gilbert Strang. The Discrete Cosine Transform. SIAM Review, 41(1):135–147, 1999.
- [47] Tuomo Valkonen. A primal-dual hybrid gradient method for nonlinear operators with applications to MRI. Inverse Problems, 30(5):055012, 2014.
- [48] Yaohua Zang, Gang Bao, Xiaojing Ye, and Haomin Zhou. Weak adversarial networks for high-dimensional partial differential equations. Journal of Computational Physics, 411:109409, 2020.
- [49] Jianfeng Zhu, Yong-Tao Zhang, Stuart A Newman, and Mark Alber. Application of discontinuous Galerkin methods for reaction-diffusion systems in developmental biology. Journal of Scientific Computing, 40:391–418, 2009.
- [50] Mingqiang Zhu and Tony Chan. An efficient primal-dual hybrid gradient algorithm for total variation image restoration. UCLA CAM Report, 34:8–34, 2008.