A compact finite difference method for reaction–diffusion problems using compact integration factor methods in high spatial dimensions
 279 Downloads
Abstract
This paper proposes and analyzes an efficient compact finite difference scheme for reaction–diffusion equation in high spatial dimensions. The scheme is based on a compact finite difference method (cFDM) for the spatial discretization. We prove that the proposed method is asymptotically stable for the linear case. By introducing the differentiation matrices, the semidiscrete reaction–diffusion equation can be rewritten as a system of nonlinear ordinary differential equations (ODEs) in matrices formulations. For the time discretization, we apply the compact implicit integration factor (cIIF) method which demands much less computational effort. This method combines the advantages of cFDM and cIIF methods to improve the accuracy without increasing the computational cost and reducing the stability range. Numerical examples are shown to demonstrate the accuracy, efficiency, and robustness of the method.
Keywords
Compact implicit integration factor methods Compact finite difference method Stiff reaction–diffusion equations High spatial dimensions1 Introduction
Wellknown examples of reaction–diffusion systems include the Schnakenberg model [14], the chlorideiodidemalonic acid (CIMA) reactive model [8], the Gray–Scott model [4], the Gierer–Meinhardt model [3]. Efficient and accurate simulation of such systems (1), however, is difficult. This is because they couple a stiff diffusion term with a (typically) strongly nonlinear reaction term. When discretized, this leads to large systems of strongly nonlinear, stiff ODEs. A class of efficient implicit integration factor (IIF) methods [12] was developed for implicit treatment of the stiff reactions. In the IIF approach, the diffusion term is solved exactly while the nonlinear equations resulting from the implicit treatment of reactions are decoupled from the diffusion term to avoid solving large nonlinear systems. As a result, the size of the nonlinear system arising from the implicit treatment is independent of the number of spatial grid points, and the small nonlinear algebraic system can be solved element by element by Picard iteration or Newton iteration.
For a system in high (two or three) spatial dimensions, the dominant computational cost of IIF method arises from the storage and calculation of exponentials of resulting matrices. To deal with this difficulty, two types of approaches were introduced in the context of IIF method. The first one is the Krylov subspace method which approximates the multiplication between the exponential of matrix and vector [15, 19, 20]. The Krylov implicit integration factor method is robust in its implementation with various spatial discretization methods such as FDM, FVM, and DG methods. It also adapts to different mesh generation including triangular and quadrilateral mesh. However, at each time step the Krylov subspace method needs to be carried out at each time step, leading to a significant increase in CPU time.
The other type of approach to avoid storage of the exponentials of matrices is a compact implicit integration factor (cIIF) method [11]. By introducing the compact representation for the matrix approximating the differential operator, the compact IIF methods apply matrix exponential operations sequentially in every spatial direction. As a result, exponential matrices which are calculated and stored have small sizes, as those in the 1D problem. For two or three dimensions, the cIIF method is significantly more efficient in both storage and CPU cost. Recently, based on the idea of cIIF method, an arrayrepresentation compact implicit integration (AcIIF) method [16] was proposed for efficient handling of a general linear differential operator that includes crossderivatives and nonconstant diffusion coefficients. Despite the various advantages and tremendous success, the cIIF method has its own shortcomings. A serious drawback of this class of methods is that it is limited to secondorder accuracy in space.
In the context of highorder finite differences, compact finite difference methods feature highorder accuracy and smaller stencils [1, 6, 10, 13, 17]. Recently, there has been a renewed interest in the development and application of compact finite difference methods for the numerical solution of the nonlinear Schrodinger equation [2, 18], advectiondiffusion equation [7], and generalized RLW equation [9]. It is evident that they are not only accurate and cost effective but also provide easier treatment of boundary conditions. The implicit and AFI methods were usually applied for the stiff ODE system resulting from the cFDM spatial discretization method. However, large global nonlinear systems need to be solved at each time step. Therefore,the number of operations for the nonlinear scheme may be large. Besides that, these time integration methods are limited to secondorder accuracy.
In this paper, we combine the cFDM in space discretization and the cIIF method in time discretization to solve reaction–diffusion systems (1). Because there are two “compact” schemes in this method, we will call it double compact (DC) method in this paper for simplification. To build the cFDM, we adopt a compact scheme which equals a combination of nodal derivatives to a combination of nodal values of the function. By introducing a compact representation of the discretized differential operator, the nodal derivatives are implicitly evaluated by the nodal values of the function. The DC method not only yields fourthorder accuracy in space but also keeps the same stencil as the finite difference scheme. Moreover, the time accuracy, storage, and CPU cost are the same as with the cIIF method.
This paper is organized as follows. In Sect. 2, we explicitly present this double compact method for both two and three dimensions. In Sect. 3, we present some numerical examples to test the accuracy and efficiency of the new method. Conclusions and discussions are given in Sect. 4.
2 Double compact method
2.1 Two dimensions
Remark
The novel property of the DC method is that the exact evaluation of the diffusion terms is decoupled from the implicit treatment of the nonlinear terms. As a result, only a local nonlinear system needs to be solved at each spatial grid point. The numerical tests show that the method is advantageous in both CPU time and memory savings.
We also consider the fourthorder case such that the order of accuracy in the spatial direction is consistent with the temporal accuracy. The values of \(\alpha_{j}\), \(j=1,0,1,2\), for the fourthorder double compact (DC4) scheme are defined as \(\alpha_{1}=\frac{9}{24}\), \(\alpha _{0}=\frac{19}{24}\), \(\alpha_{1}=\frac{5}{24}\), and \(\alpha _{2}=\frac{1}{24}\).
Remark
The scheme DC4 is multistep methods. To start the computations at the first few time steps, we use the Runge–Kutta methods. Specifically, the fourthorder Runge–Kutta method is used for the first \(U^{1}\) and the second time steps \(U^{2}\) in DC4. Coupled with initial value \(U^{0}\), the scheme DC4 evolves with time.
2.2 Stability analysis
We study the linear stability of secondorder DC methods and discuss the computational costs of the methods in this subsection. And first we give some definitions and lemmas for the stability analysis.

If a circulant matrix C is invertible, then its inverse matrix \(\mathbf{C}^{1}\) is circulant.

Circulant matrices satisfy the operator commuting since, for any two given circulant matrices C and D, the product CD is circulant, and \(\mathbf{C}\mathbf {D}=\mathbf{D}\mathbf{C}\).

For a real circulant matrix C in (15), all eigenvalues of C are given by \(\lambda=a_{0}+a_{1}\omega _{k}+a_{2}\omega_{k}^{2}+\cdots+a_{N1}\omega_{k}^{N1}\) with \(\omega_{k}=\exp (\frac{i2\pi k}{N} )\), \(k=0,1,2,\ldots,N1\).
In comparison with the noncompact FDM spatial discretization coupled with the compact IIF method, extra work for the DC method is the computation of the inverse of matrix \(\mathbf {B}^{1}\). Since matrix B has small order of magnitude only with \(N\times N\), the computation of inverse matrix is not CPUintensive. In our numerical tests, the size of matrix B is 128 or 256. The computation for the inverse of this matrix could be easily implemented by \(\operatorname{inv}(\mathrm{B})\) in Matlab. In addition, the exponential matrices such as \(e^{\mathbf {B}^{1}\mathbf{A}_{x}\Delta t}\) are precomputed and stored for later use at every time step. Therefore the new method is advantageous in accuracy without increasing both CPU time and memory savings.
2.3 Three dimensions
3 Numerical experiments
In this section, we demonstrate the performance of the proposed double compact scheme on a number of test problems. Firstly, we test our scheme for a linear reaction–diffusion equation with exact solution. In this test, we investigate the accuracy and efficiency of our new scheme by comparison with other methods such as the secondorder Runge–Kutta method and the original cIIF method. Then we apply the scheme to the chlorideiodidemalonic acid (CIMA) model which was derived by Lengyel and Epstein [8]. It can be found that different choice of dimensionless parameters will lead to a different pattern [19].
Compared with the cIIF method, extra computation is the inverse of matrices \(\mathbf{B}_{x}\) and \(\mathbf{B}_{y}\). Because these matrices depend only on the spatial grid size in every spatial direction, these matrices have small sizes as those in 1D problem and the inverse of matrices can be easily computed. As the cIIF method, for a given spatial and temporal numerical resolution, the exponential matrices are precomputed and stored for later use at every time step.
3.1 The accuracy test
Example 1
Error, order of accuracy, and CPU time with DC2, cIIF2, and RK2 schemes for Example 1
\(N_{x}\times N_{y}\)  DC2, \(\Delta t=1/N_{x}=h_{x}/2\pi\)  cIIF2, \(\Delta t=1/N_{x}=h_{x}/2\pi\)  RK2, \(\Delta t=h_{x}^{2}\)  

\(L^{\infty}\) error  Order  CPU (s)  \(L^{\infty}\) error  Order  CPU (s)  \(L^{\infty}\) error  Order  CPU (s)  
32 × 32  2.39 × 10^{−6}  –  0.00  1.16 × 10^{−3}  –  0.00  1.16 × 10^{−3}  –  0.00 
64 × 64  1.77 × 10^{−7}  3.76  0.03  2.91 × 10^{−4}  2.00  0.03  2.91 × 10^{−4}  2.00  0.07 
128 × 128  1.80 × 10^{−8}  3.30  0.37  7.27 × 10^{−5}  2.00  0.37  7.27 × 10^{−5}  2.00  2.20 
256 × 256  2.85 × 10^{−9}  2.66  5.71  1.82 × 10^{−5}  2.00  5.68  1.82 × 10^{−5}  2.00  70.5 
Error, order of accuracy, and CPU time with DC4 scheme for Example 1
\(N_{x}\times N_{y}\)  Δt  \(L^{\infty}\) error  Order  CPU (s) 

32 × 32  1/32  2.2449 × 10^{−6}  –  0.0058 
64 × 64  1/64  1.4015 × 10^{−7}  4.0016  0.0658 
128 × 128  1/128  8.7572 × 10^{−9}  4.0004  1.0121 
256 × 256  1/256  5.4901 × 10^{−10}  3.9956  16.578 
Example 2
Error, order of accuracy, and CPU time with DC2, cIIF2, and RK2 schemes for Example 2
\(N_{x}\times N_{y}\times N_{z}\)  DC2, \(\Delta t=1/N_{x}=h_{x}/2\pi\)  cIIF2, \(\Delta t=1/N_{x}=h_{x}/2\pi\)  RK2, \(\Delta t=h_{x}^{2}/3\)  

\(L^{\infty}\) error  Order  CPU (s)  \(L^{\infty}\) error  Order  CPU (s)  \(L^{\infty}\) error  Order  CPU (s)  
16 × 16 × 16  5.50 × 10^{−5}  –  0.05  6.95 × 10^{−3}  –  0.04  6.95 × 10^{−3}  –  0.09 
32 × 32 × 32  3.59 × 10^{−6}  3.94  0.43  1.74 × 10^{−3}  2.00  0.43  1.74 × 10^{−3}  2.00  2.06 
64 × 64 × 64  2.65 × 10^{−7}  3.76  5.93  4.36 × 10^{−4}  2.00  5.95  4.36 × 10^{−4}  2.00  61.9 
128 × 128 × 128  2.69 × 10^{−8}  3.30  127  1.09 × 10^{−4}  2.00  124  1.09 × 10^{−4}  2.00  2448 
Error, order of accuracy, and CPU time with DC4 scheme for Example 2
\(N_{x}\times N_{y}\)  Δt  \(L^{\infty}\) error  Order  CPU (s) 

16 × 16 × 16  1/16  5.4123 × 10^{−5}  –  0.1725 
32 × 32 × 32  1/32  3.3674 × 10^{−6}  4.0065  1.9944 
64 × 64 × 64  1/64  2.1022 × 10^{−7}  4.0017  29.632 
128 × 128 × 128  1/128  1.3136 × 10^{−8}  4.0003  640.60 
3.2 CIMA model
Example 3
4 Concluding remarks
In this paper, we combined the compact FDM in space and the compact IIF method in time to propose a highorder accurate method for solving reaction–diffusion equation. The global accuracy order of this method is \(\mathcal{O}(h^{4}+\Delta t^{r})\) (\(r=2,3,4,\ldots\)) and it allows a considerable saving in the computation time as the cIIF method. The numerical experiments are conducted to show its superiority over the classical RK method and cIIF method. In the future work we plan to apply the DC scheme for solving the variable coefficients reaction–diffusion problem.
Notes
Acknowledgements
The authors would like to thank the referees for their valuable comments and suggestions.
Availability of data and materials
Not applicable.
Authors’ contributions
The authors declare that the study was realized in collaboration with the same responsibility. All authors read and approved the final manuscript.
Funding
This work was supported by the National Natural Science Foundation of China (No. 61573008, 61703290), Science Technology on Reliability Environmental Engineering Laboratory (No. 6142A0502020717) and SDUST Research Fund (No. 2014TDJH102).
Competing interests
The authors declare that they have no competing interests.
References
 1.Dlamini, P.G., Motsa, S.S., Khumalo, M.: On the comparison between compact finite difference and pseudospectral approaches for solving similarity boundary layer problems. Math. Probl. Eng. 2013, Article ID 746489 (2013) MathSciNetCrossRefGoogle Scholar
 2.Gao, Z., Xie, S.: Fourthorder alternating direction implicit compact finite difference schemes for twodimensional Schrödinger equations. Appl. Numer. Math. 61, 593–614 (2011) MathSciNetCrossRefGoogle Scholar
 3.Gierer, A., Meinhardt, H.: A theory of biological pattern formation. Kybernetik 12, 30–39 (1972) CrossRefGoogle Scholar
 4.Gray, P., Scott, S.K.: Autocatalytic reactions in the isothermal, continuous stirred tank reactor: isolas and other forms of multistability. Chem. Eng. Sci. 38(1), 29–43 (1983) CrossRefGoogle Scholar
 5.Gray, R.M.: Toeplitz and circulant matrices. ISL, Tech. Rep., Stanford Univ., Stanford, CA. http://eewww.stanford.edu/gray/toeplitz.html (2002)
 6.Gu, Y., Liao, W., Zhu, J.: An efficient highorder algorithm for solving systems of 3D reaction–diffusion equations. J. Comput. Appl. Math. 155(1), 1–17 (2003) MathSciNetCrossRefGoogle Scholar
 7.Gurarslan, G., Karahan, H., Alkaya, D., Sari, M., Yasar, M.: Numerical solution of advection–diffusion equation using a sixthorder compact finite difference method. Math. Probl. Eng. 2013, Article ID 672936 (2013) MathSciNetCrossRefGoogle Scholar
 8.Lengyel, I., Epstein, I.R.: Modeling of Turing structures in the chloriteiodidemalonic acidstarch reaction system. Science 251, 650–652 (1991) CrossRefGoogle Scholar
 9.Li, S., Wang, J., Luo, Y.: A fourthorder conservative compact finite difference scheme for the generalized RLW equation. Math. Probl. Eng. 2015, Article ID 960602 (2015) MathSciNetzbMATHGoogle Scholar
 10.Liao, W.: A highorder ADI finite difference scheme for a 3D reaction–diffusion equation with Neumann boundary condition. Numer. Methods Partial Differ. Equ. 29(3), 778–798 (2013) MathSciNetCrossRefGoogle Scholar
 11.Nie, Q., Wan, F., Zhang, Y.T., Liu, X.F.: Compact integration factor methods in high spatial dimensions. J. Comput. Phys. 227, 5238–5255 (2008) MathSciNetCrossRefGoogle Scholar
 12.Nie, Q., Zhang, Y.T., Zhao, R.: Efficient semiimplicit schemes for stiff systems. J. Comput. Phys. 214, 521–537 (2006) MathSciNetCrossRefGoogle Scholar
 13.Sambit, D., Liao, W., Gupta, A.: An efficient fourth order low dispersive finite difference scheme for a 2D acoustic wave equation. J. Comput. Appl. Math. 258, 151–167 (2014) MathSciNetCrossRefGoogle Scholar
 14.Schnakenberg, J.: Simple chemical reaction systems with limit cycle behavior. J. Theor. Biol. 81, 389–400 (1979) MathSciNetCrossRefGoogle Scholar
 15.Sidje, R.B.: Expokit: software package for computing matrix exponentials. ACM Trans. Math. Softw. 24, 130–156 (1998) CrossRefGoogle Scholar
 16.Wang, D., Zhang, L., Nie, Q.: Arrayrepresentation integration factor method for highdimensional systems. J. Comput. Phys. 258, 585–600 (2014) MathSciNetCrossRefGoogle Scholar
 17.Wang, Y., Zhang, H.: Higherorder compact finite difference method for systems of reaction–diffusion equations. J. Comput. Appl. Math. 233(2), 502–518 (2009) MathSciNetCrossRefGoogle Scholar
 18.Zhang, R., Liu, J., Zhao, G.: An efficient compact finite difference method for the solution of the Gross–Pitaevskii equation. Adv. Condens. Matter Phys. 2015, Article ID 127580 (2015) Google Scholar
 19.Zhang, R., Yu, X., Zhu, J., Loula, A.F.D.: Direct discontinuous Galerkin method for nonlinear reaction–diffusion systems in pattern formation. Appl. Math. Model. 38, 1612–1621 (2014) MathSciNetCrossRefGoogle Scholar
 20.Zhang, R., Yu, X., Zhu, J., Loula, A.F.D., Cui, X.: Weighted interior penalty method with semiimplicit integration factor method for nonequilibrium radiation diffusion equation. Commun. Comput. Phys. 14, 1287–1303 (2013) MathSciNetCrossRefGoogle Scholar
Copyright information
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.