1 Introduction

With the development of large-scale scientific and engineering computations, the parallel difference method for parabolic equations has been studied rapidly. In 1983, Evans and Abdullah [1] proposed the Group Explicit (GE) scheme for solving the parabolic equations by Saul’yev asymmetric schemes [2]. Evans [3] first constructed the Alternating Group Explicit (AGE) scheme for the diffusion equation two years later. The Alternating Segment Explicit–Implicit (ASE-I) scheme and the Alternating Segment Crank–Nicolson (ASC-N) scheme were designed in [46]. Afterwards, the alternating segment algorithms (AGE scheme, ASE-I scheme, and ASC-N scheme) above became very effective methods for some parabolic equations, such as heat equation [7], convection–diffusion equation [810], dispersive equation [1116], forth-order parabolic equation [1719]. Meanwhile, domain decomposition methods (DDMs) for the partial differential equations have been studied extensively [2029]. The concept called “intrinsic parallelism” was presented in [3032]. In 1999, the alternating difference schemes were presented, the unconditional stability analysis was given in [33]. The unconditionally stable domain decomposition method was obtained by the alternating technique in [3436]. In fact, an alternating segment algorithm is also a form of the domain decomposition method, which is not only suitable for parallel computation but also unconditionally stable. However, the accuracy of alternating segment algorithm is unsatisfactory.

Inspired by the alternating segment algorithm, we present a new parallel algorithm for parabolic equations in this paper. The new parallel algorithm consists of two DDMs. Each one is applied to compute the values at \((n+1)\)st time level by use of known numerical solutions at nth time level, respectively. Then the average of two above values is chosen to be the numerical solutions at (\(n+1\))st time level. The new algorithm can be stated as follows:

  1. 1.

    DDM I is applied to compute the values at \((n+1)\)st time level noted as \(V^{n+1}\) by use of known value \(U^{n}\) at nth time level.

  2. 2.

    DDM II is also applied to compute the values at \((n+1)\)st time level noted as \(W^{n+1}\) by use of known value \(U^{n}\) at nth time level.

  3. 3.

    In order to improve accuracy, let \(U^{n+1}=(V^{n+1}+W^{n+1})/2\) be the numerical solutions at \((n+1)\)st time level.

This paper is organized as follows: In Sect. 2, we introduce a Crank–Nicolson scheme and four corresponding Saul’yev asymmetric difference schemes to construct the parallel algorithm for parabolic equations. For simplicity of presentation, we focus on a model problem, namely one-dimensional parabolic equations. The new parallel algorithm and detailed presentations are given. The accuracy of the new algorithm is given in Sect. 3. The existence and uniqueness of solution by the new algorithm are discussed in Sect. 4, while the stability of the new algorithm is given in Sect. 5. In Sect. 6, we extend the new parallel algorithm to solve two-dimensional parabolic equations by ADI technique. Finally, we give some numerical experiments, which illustrate the accuracy and efficiency of the new algorithm proposed in this paper.

2 Algorithm presentation

Considering the model problem of one-dimensional parabolic equations

$$ \frac{\partial u}{\partial t}-a \frac{\partial^{2} u}{\partial x^{2}}=f(x,t), \quad x\in(0,l), t \in(0,T], $$
(1)

with the initial and boundary conditions

$$\begin{aligned}& u(x,0)= u_{0}(x), \quad x\in[0,l], \end{aligned}$$
(2)
$$\begin{aligned}& u(0,t)=g_{0}(t), \qquad u(l,t)=g_{l}(t), \quad t \in(0,T], \end{aligned}$$
(3)

where \(a>0\) is a constant.

Let h and τ be the spatial and temporal step sizes, respectively. Denote \(x_{j}=jh\), \(j=0, 1, \ldots, m\), \(t_{n}=n\tau\), \(n=0, 1, \ldots, N \). Let \(u_{j}^{n}\) be the approximate solution at \((x_{j}, t_{n})\). \(u(x,t)\) represents the exact solution of (1).

The Crank–Nicolson scheme and Saul’yev asymmetric difference schemes will be used in our new algorithm. The Crank–Nicolson scheme can be written as

$$ -\frac{ar}{2}u_{j-1}^{n+1}+(1+ar)u_{j}^{n+1}- \frac {ar}{2}u_{j+1}^{n+1}=\frac{ar}{2}u_{j-1}^{n}+(1-ar)u_{j}^{n}+ \frac {ar}{2}u_{j+1}^{n}+\tau f_{j}^{n}, $$
(4)

where \(r=\tau/h^{2}\).

Corresponding Saul’yev asymmetric difference schemes have four forms as follows:

$$\begin{aligned}& -\frac{ar}{2}u_{j-1}^{n+1}+ \biggl(1+\frac{3ar}{2} \biggr)u_{j}^{n+1}-ar u_{j+1}^{n+1} = \frac{ar}{2}u_{j-1}^{n}+ \biggl(1-\frac{ar}{2} \biggr)u_{j}^{n}+\tau f_{j}^{n}, \end{aligned}$$
(5)
$$\begin{aligned}& -ar u_{j-1}^{n+1}+ \biggl(1+\frac{3ar}{2} \biggr)u_{j}^{n+1}-\frac {ar}{2}u_{j+1}^{n+1} = \biggl(1-\frac{ar}{2} \biggr)u_{j}^{n}+ \frac{ar}{2}u_{j+1}^{n}+\tau f_{j}^{n}, \end{aligned}$$
(6)
$$\begin{aligned}& \biggl(1+\frac{ar}{2} \biggr)u_{j}^{n+1}- \frac{ar}{2}u_{j+1}^{n+1} =ar u_{j-1}^{n}+ \biggl(1-\frac{3ar}{2} \biggr)u_{j}^{n}+ \frac {ar}{2}u_{j+1}^{n}+\tau f_{j}^{n}, \end{aligned}$$
(7)
$$\begin{aligned}& -\frac{ar}{2}u_{j-1}^{n+1}+ \biggl(1+\frac{ar}{2} \biggr)u_{j}^{n+1} =\frac{ar}{2}u_{j-1}^{n}+ \biggl(1-\frac{3ar}{2} \biggr)u_{j}^{n}+ar u_{j+1}^{n}+\tau f_{j}^{n}. \end{aligned}$$
(8)

Assume \(m-1=6K\), where K is a positive integer. We consider two domain decomposition methods, DDM I and DDM II, at \((n + 1)\)st time level.

DDM I:

For the values \(u_{1}^{n+1}\), \(u_{2}^{n+1}\), \(u_{3}^{n+1}\) by using the formulas as follows:

$$ \textstyle\begin{cases} -\frac{ar}{2}u_{0}^{n+1}+(1+ar)u_{1}^{n+1}-\frac{ar}{2}u_{2}^{n+1}=\frac {ar}{2}u_{0}^{n}+(1-ar)u_{1}^{n}+\frac{ar}{2}u_{2}^{n}+\tau f_{1}^{n}, \\ -\frac{ar}{2}u_{1}^{n+1}+(1+ar)u_{2}^{n+1}-\frac{ar}{2}u_{3}^{n+1}=\frac {ar}{2}u_{1}^{n}+(1-ar)u_{2}^{n}+\frac{ar}{2}u_{3}^{n}+\tau f_{2}^{n}, \\ -\frac{ar}{2}u_{2}^{n+1}+ (1+\frac{ar}{2} )u_{3}^{n+1} =\frac{ar}{2}u_{2}^{n}+ (1-\frac{3ar}{2} )u_{3}^{n}+ar u_{4}^{n}+\tau f_{3}^{n}. \end{cases} $$
(9)

Finding the values \([u_{6k-2}^{n+1}, u_{6k-1}^{n+1}, u_{6k}^{n+1}, u_{6k+1}^{n+1}, u_{6k+2}^{n+1}, u_{6k+3}^{n+1}]\) by using the following formulas (\(k=1, 2, \ldots, K-1\)):

$$ \textstyle\begin{cases} (1+\frac{ar}{2} )u_{6k-2}^{n+1}-\frac{ar}{2}u_{6k-1}^{n+1} =ar u_{6k-3}^{n}+ (1-\frac{3ar}{2} )u_{6k-2}^{n}+\frac {ar}{2}u_{6k-1}^{n}+\tau f_{6k-2}^{n}, \\ -\frac{ar}{2}u_{6k-2}^{n+1}+(1+ar)u_{6k-1}^{n+1}-\frac{ar}{2}u_{6k}^{n+1} =\frac{ar}{2}u_{6k-2}^{n}+(1-ar)u_{6k-1}^{n}+\frac{ar}{2}u_{6k}^{n}+\tau f_{6k-1}^{n}, \\ -\frac{ar}{2}u_{6k-1}^{n+1}+ (1+\frac{3ar}{2} )u_{6k}^{n+1}-ar u_{6k+1}^{n+1} =\frac{ar}{2}u_{6k-1}^{n}+ (1-\frac{ar}{2} )u_{6k}^{n}+\tau f_{6k}^{n}, \\ -ar u_{6k}^{n+1}+ (1+\frac{3ar}{2} )u_{6k+1}^{n+1}-\frac {ar}{2}u_{6k+2}^{n+1} = (1-\frac{ar}{2} )u_{6k+1}^{n}+\frac{ar}{2}u_{6k+2}^{n}+\tau f_{6k+1}^{n}, \\ -\frac{ar}{2}u_{6k+1}^{n+1}+(1+ar)u_{6k+2}^{n+1}-\frac{ar}{2}u_{6k+3}^{n+1} =\frac{ar}{2}u_{6k+1}^{n}+(1-ar)u_{6k+2}^{n}+\frac{ar}{2}u_{6k+3}^{n}+\tau f_{6k+2}^{n}, \\ -\frac{ar}{2}u_{6k+2}^{n+1}+ (1+\frac{ar}{2} )u_{6k+3}^{n+1} =\frac{ar}{2}u_{6k+2}^{n}+ (1-\frac{3ar}{2} )u_{6k+3}^{n}+ar u_{6k+4}^{n}+\tau f_{6k+3}^{n}. \end{cases} $$
(10)

Obviously, each subdomain contains six nodes which can be computed by (10) independently.

For the values \(u_{m-3}^{n+1}\), \(u_{m-2}^{n+1}\), \(u_{m-1}^{n+1}\) by using the formulas as follows:

$$ \textstyle\begin{cases} (1+\frac{ar}{2} )u_{m-3}^{n+1}-\frac{ar}{2}u_{m-2}^{n+1} =ar u_{m-4}^{n}+ (1-\frac{3ar}{2} )u_{m-3}^{n}+\frac {ar}{2}u_{m-2}^{n}+\tau f_{m-3}^{n}, \\ -\frac{ar}{2}u_{m-3}^{n+1}+(1+ar)u_{m-2}^{n+1}-\frac{ar}{2}u_{m-1}^{n+1} =\frac{ar}{2}u_{m-3}^{n}+(1-ar)u_{m-2}^{n}+\frac{ar}{2}u_{m-1}^{n}+\tau f_{m-2}^{n}, \\ -\frac{ar}{2}u_{m-2}^{n+1}+(1+ar)u_{m-1}^{n+1}-\frac{ar}{2}u_{m}^{n+1} =\frac{ar}{2}u_{m-2}^{n}+(1-ar)u_{m-1}^{n}+\frac{ar}{2}u_{m}^{n}+\tau f_{m-1}^{n}. \end{cases} $$
(11)

Let \(\gamma=ar=a\tau/h^{2}\), the DDM I can be written as the matrix form:

$$ (I+\gamma G_{1})U^{n+1}=(I-\gamma G_{2})U^{n}+F_{1}^{n}, $$
(12)

where \(U^{n}=(u_{1}^{n}, u_{2}^{n}, \ldots, u_{m-1}^{n})^{T}\), \(F_{1}^{n}=(\frac{\gamma }{2} (u_{0}^{n}+u_{0}^{n+1} )+\tau f_{1}^{n}, \tau f_{2}^{n}, \ldots , \tau f_{m-2}^{n}, \frac{\gamma}{2} (u_{m}^{n}+u_{m}^{n+1} )+\tau f_{m-1}^{n})^{T}\).

The matrices \(G_{1}\) and \(G_{2}\) are block diagonal matrices as follows:

$$ G_{1}= \begin{bmatrix} P_{1} & & & & \\ & Q & & & \\ & & \ddots& & \\ & & & Q & \\ & & & & P_{2} \end{bmatrix} , \qquad G_{2}= \begin{bmatrix} Q_{1} & & & & \\ & Q & & & \\ & & \ddots& & \\ & & & Q & \\ & & & & Q_{2} \end{bmatrix} , $$

where

$$\begin{aligned}& P_{1}= \begin{bmatrix} 1 & -\frac{1}{2} & 0 \\ -\frac{1}{2} & 1 & -\frac{1}{2}\\ 0 & -\frac{1}{2} & \frac{1}{2} \end{bmatrix} , \qquad P_{2}= \begin{bmatrix} \frac{1}{2} & -\frac{1}{2}& 0\\ -\frac{1}{2} & 1 & -\frac{1}{2} \\ 0 & -\frac{1}{2} & 1 \end{bmatrix} , \\& {Q}= \begin{bmatrix} \frac{1}{2} & -\frac{1}{2}& & &\\ -\frac{1}{2} & 1 & -\frac{1}{2} & &\\ & -\frac{1}{2} & \frac{3}{2} & -1\\ && -1 & \frac{3}{2} & -\frac{1}{2} \\ &&& -\frac{1}{2} & 1 & -\frac{1}{2}\\ &&&& -\frac{1}{2} & \frac{1}{2} \end{bmatrix} , \\& Q_{1}= \begin{bmatrix} 1 & -\frac{1}{2}& & &\\ -\frac{1}{2} & 1 & -\frac{1}{2} & &\\ & -\frac{1}{2} & \frac{3}{2} & -1\\ && -1 & \frac{3}{2} & -\frac{1}{2} \\ &&& -\frac{1}{2} & 1 & -\frac{1}{2}\\ &&&& -\frac{1}{2} & \frac{1}{2} \end{bmatrix} , \qquad Q_{2}= \begin{bmatrix} \frac{1}{2} & -\frac{1}{2}& & &\\ -\frac{1}{2} & 1 & -\frac{1}{2} & &\\ & -\frac{1}{2} & \frac{3}{2} & -1\\ && -1 & \frac{3}{2} & -\frac{1}{2} \\ &&& -\frac{1}{2} & 1 & -\frac{1}{2}\\ &&&& -\frac{1}{2} & 1 \end{bmatrix} . \end{aligned}$$

Each block matrix systems (i.e., each subdomain) can be solved independently. It is evident that DDM I (12) has intrinsic parallelism.

DDM II:

For the values \(u_{1}^{n+1}, u_{2}^{n+1}, \ldots, u_{6}^{n+1}\) by using the following formulas:

$$ \textstyle\begin{cases} -\frac{ar}{2}u_{0}^{n+1}+(1+ar)u_{1}^{n+1}-\frac{ar}{2}u_{2}^{n+1}=\frac {ar}{2}u_{0}^{n}+(1-ar)u_{1}^{n}+\frac{ar}{2}u_{2}^{n}+\tau f_{1}^{n}, \\ -\frac{ar}{2}u_{1}^{n+1}+(1+ar)u_{2}^{n+1}-\frac{ar}{2}u_{3}^{n+1}=\frac {ar}{2}u_{1}^{n}+(1-ar)u_{2}^{n}+\frac{ar}{2}u_{3}^{n}+\tau f_{2}^{n}, \\ -\frac{ar}{2}u_{2}^{n+1}+ (1+\frac{3ar}{2} )u_{3}^{n+1}-ar u_{4}^{n+1} =\frac{ar}{2}u_{2}^{n}+ (1-\frac{ar}{2} )u_{3}^{n}+\tau f_{3}^{n}, \\ -ar u_{3}^{n+1}+ (1+\frac{3ar}{2} )u_{4}^{n+1}-\frac{ar}{2}u_{5}^{n+1} = (1-\frac{ar}{2} )u_{4}^{n}+\frac{ar}{2}u_{5}^{n}+\tau f_{4}^{n}, \\ -\frac{ar}{2}u_{4}^{n+1}+(1+ar)u_{5}^{n+1}-\frac{ar}{2}u_{6}^{n+1}=\frac {ar}{2}u_{4}^{n}+(1-ar)u_{5}^{n}+\frac{ar}{2}u_{6}^{n}+\tau f_{5}^{n}, \\ -\frac{ar}{2}u_{5}^{n+1}+ (1+\frac{ar}{2} )u_{6}^{n+1} =\frac{ar}{2}u_{5}^{n}+ (1-\frac{3ar}{2} )u_{6}^{n}+ar u_{7}^{n}+\tau f_{6}^{n}. \end{cases} $$
(13)

Finding the values \([u_{6k+1}^{n+1}, u_{6k+2}^{n+1}, u_{6k+3}^{n+1}, u_{6k+4}^{n+1}, u_{6k+5}^{n+1}, u_{6k+6}^{n+1}]\) by using the formulas as follows (\(k=1, 2, \ldots, K-2\)):

$$ \textstyle\begin{cases} (1+\frac{ar}{2} )u_{6k+1}^{n+1}-\frac{ar}{2}u_{6k+2}^{n+1} =ar u_{6k}^{n}+ (1-\frac{3ar}{2} )u_{6k+1}^{n}+\frac {ar}{2}u_{6k+2}^{n}+\tau f_{6k+1}^{n}, \\ -\frac{ar}{2}u_{6k+1}^{n+1}+(1+ar)u_{6k+2}^{n+1}-\frac{ar}{2}u_{6k+3}^{n+1} =\frac{ar}{2}u_{6k+1}^{n}+(1-ar)u_{6k+2}^{n}+\frac{ar}{2}u_{6k+3}^{n}+\tau f_{6k+2}^{n}, \\ -\frac{ar}{2}u_{6k+2}^{n+1}+ (1+\frac{3ar}{2} )u_{6k+3}^{n+1}-ar u_{6k+4}^{n+1} =\frac{ar}{2}u_{6k+2}^{n}+ (1-\frac{ar}{2} )u_{6k+3}^{n}+\tau f_{6k+3}^{n}, \\ -ar u_{6k+3}^{n+1}+ (1+\frac{3ar}{2} )u_{6k+4}^{n+1}-\frac {ar}{2}u_{6k+5}^{n+1} = (1-\frac{ar}{2} )u_{6k+4}^{n}+\frac{ar}{2}u_{6k+5}^{n}+\tau f_{6k+4}^{n}, \\ -\frac{ar}{2}u_{6k+4}^{n+1}+(1+ar)u_{6k+5}^{n+1}-\frac{ar}{2}u_{6k+6}^{n+1} =\frac{ar}{2}u_{6k+4}^{n}+(1-ar)u_{6k+5}^{n}+\frac{ar}{2}u_{6k+6}^{n}+\tau f_{6k+5}^{n}, \\ -\frac{ar}{2}u_{6k+5}^{n+1}+ (1+\frac{ar}{2} )u_{6k+6}^{n+1} =\frac{ar}{2}u_{6k+5}^{n}+ (1-\frac{3ar}{2} )u_{6k+6}^{n}+ar u_{6k+7}^{n}+\tau f_{6k+6}^{n}. \end{cases} $$
(14)

Obviously, each subdomain contains six nodes which can be computed by (14) independently.

Finding the values \(u_{m-6}^{n+1}, u_{m-5}^{n+1}, \ldots, u_{m-1}^{n+1}\) by using the formulas as follows:

$$ \textstyle\begin{cases} (1+\frac{ar}{2} )u_{m-6}^{n+1}-\frac{ar}{2}u_{m-5}^{n+1} =ar u_{m-7}^{n}+ (1-\frac{3ar}{2} )u_{m-6}^{n}+\frac {ar}{2}u_{m-5}^{n}+\tau f_{m-6}^{n}, \\ -\frac{ar}{2}u_{m-6}^{n+1}+(1+ar)u_{m-5}^{n+1}-\frac{ar}{2}u_{m-4}^{n+1} =\frac{ar}{2}u_{m-6}^{n}+(1-ar)u_{m-5}^{n}+\frac{ar}{2}u_{m-4}^{n}+\tau f_{m-5}^{n}, \\ -\frac{ar}{2}u_{m-5}^{n+1}+ (1+\frac{3ar}{2} )u_{m-4}^{n+1}-ar u_{m-3}^{n+1} =\frac{ar}{2}u_{m-5}^{n}+ (1-\frac{ar}{2} )u_{m-4}^{n}+\tau f_{m-4}^{n}, \\ -ar u_{m-4}^{n+1}+ (1+\frac{3ar}{2} )u_{m-3}^{n+1}-\frac {ar}{2}u_{m-2}^{n+1} = (1-\frac{ar}{2} )u_{m-3}^{n}+\frac{ar}{2}u_{m-2}^{n}+\tau f_{m-3}^{n}, \\ -\frac{ar}{2}u_{m-3}^{n+1}+(1+ar)u_{m-2}^{n+1}-\frac{ar}{2}u_{m-1}^{n+1} =\frac{ar}{2}u_{m-3}^{n}+(1-ar)u_{m-2}^{n}+\frac{ar}{2}u_{m-1}^{n}+\tau f_{m-2}^{n}, \\ -\frac{ar}{2}u_{m-2}^{n+1}+(1+ar)u_{m-1}^{n+1}-\frac{ar}{2}u_{m}^{n+1} =\frac{ar}{2}u_{m-2}^{n}+(1-ar)u_{m-1}^{n}+\frac{ar}{2}u_{m}^{n}+\tau f_{m-1}^{n}. \end{cases} $$
(15)

The DDM II can be written as the matrix form:

$$ (I+\gamma G_{2})U^{n+1}=(I-\gamma G_{1})U^{n}+F_{1}^{n}, $$
(16)

where \(U^{n}=(u_{1}^{n}, u_{2}^{n}, \ldots, u_{m-1}^{n})^{T}\), \(F_{1}^{n}=(\frac {\gamma}{2} (u_{0}^{n}+u_{0}^{n+1} )+\tau f_{1}^{n}, \tau f_{2}^{n}, \ldots, \tau f_{m-2}^{n}, \frac{\gamma}{2} (u_{m}^{n}+u_{m}^{n+1} )+\tau f_{m-1}^{n})^{T}\).

The matrices \(G_{1}\) and \(G_{2}\) are block diagonal matrices as follows:

$$ G_{1}= \begin{bmatrix} P_{1} & & & & \\ & Q & & & \\ & & \ddots& & \\ & & & Q & \\ & & & & P_{2} \end{bmatrix} , \qquad G_{2}= \begin{bmatrix} Q_{1} & & & & \\ & Q & & & \\ & & \ddots& & \\ & & & Q & \\ & & & & Q_{2} \end{bmatrix} . $$

Each block matrix system (i.e., each subdomain) can be solved independently. It is evident that DDM II (16) has intrinsic parallelism.

Schemes (9)–(11) and schemes (13)–(15) construct two domain decomposition methods (12) and (16), respectively. The corresponding algorithm can be described as follows in Algorithm 1.

Algorithm 1
figure a

The new parallel algorithm for one-dimensional parabolic equations

The matrix form of Algorithm 1 can be written as follows:

$$ \textstyle\begin{cases} (I+\gamma{G_{1}})V^{n+1}=(I-\gamma{G_{2}})U^{n}+F_{1}^{n}, \\ (I+\gamma{G_{2}})W^{n+1}=(I-\gamma{G_{1}})U^{n}+F_{1}^{n}, \\ U^{n+1}=\frac{1}{2} (V^{n+1}+W^{n+1} ), \end{cases}\displaystyle \quad n=0, 1, 2, \ldots, $$
(17)

where \(U^{n}=(u_{1}^{n}, u_{2}^{n}, \ldots, u_{m-1}^{n})^{T}\), \(V^{n}=(v_{1}^{n}, v_{2}^{n}, \ldots, v_{m-1}^{n})^{T}\), \(W^{n}=(w_{1}^{n}, w_{2}^{n}, \ldots, w_{m-1}^{n})^{T}\).

3 The accuracy of Algorithm 1

In this section, we illustrate the accuracy of Algorithm 1. From the Taylor expansion at \((x_{j},t_{n+1})\), we have the following truncation errors for the Crank–Nicolson scheme (4) and Saul’yev asymmetric schemes (5)–(8), respectively.

$$\begin{aligned}& \begin{aligned}[b] T_{4}&= \biggl(\frac{\partial u}{\partial t} \biggr)_{j}^{n+1}-a \biggl(\frac {\partial^{2}u}{\partial t^{2}} \biggr)_{j}^{n+1} -\frac{\tau}{2} \biggl[ \biggl( \frac{\partial^{2}u}{\partial t^{2}} \biggr)_{j}^{n+1}-a \biggl( \frac{\partial^{3}u}{\partial x^{2}\partial t} \biggr)_{j}^{n+1} \biggr]+O \bigl( \tau^{2} +h^{2} \bigr) \\ &=O \bigl(\tau^{2} +h^{2} \bigr). \end{aligned} \end{aligned}$$
(18)
$$\begin{aligned}& \begin{aligned}[b] T_{5}&=-a \biggl[\frac{\tau}{h} \biggl( \frac{\partial^{2}u}{\partial x\partial t} \biggr)_{j}^{n+1} +\frac{\tau}{2} \biggl(\frac{\partial^{3}u}{\partial x^{2}\partial t} \biggr)_{j}^{n+1} + \frac{\tau h}{6} \biggl(\frac{\partial^{4}u}{\partial x^{3}\partial t} \biggr)_{j}^{n+1} +\frac{\tau^{3}}{6h} \biggl(\frac{\partial^{4}u}{\partial x\partial t^{3}} \biggr)_{j}^{n+1} \biggr] \\ &\quad {}+O \bigl(\tau^{2} +h^{2} \bigr). \end{aligned} \end{aligned}$$
(19)
$$\begin{aligned}& \begin{aligned}[b] T_{6}&=-a \biggl[-\frac{\tau}{h} \biggl( \frac{\partial^{2}u}{\partial x\partial t} \biggr)_{j}^{n+1} +\frac{\tau}{2} \biggl(\frac{\partial^{3}u}{\partial x^{2}\partial t} \biggr)_{j}^{n+1} - \frac{\tau h}{6} \biggl(\frac{\partial^{4}u}{\partial x^{3}\partial t} \biggr)_{j}^{n+1} -\frac{\tau^{3}}{6h} \biggl(\frac{\partial^{4}u}{\partial x\partial t^{3}} \biggr)_{j}^{n+1} \biggr] \\ &\quad {}+O \bigl(\tau^{2} +h^{2} \bigr). \end{aligned} \end{aligned}$$
(20)
$$\begin{aligned}& \begin{aligned}[b] T_{7}&=-a \biggl[\frac{\tau}{h} \biggl( \frac{\partial^{2}u}{\partial x\partial t} \biggr)_{j}^{n+1} -\frac{\tau}{2} \biggl(\frac{\partial^{3}u}{\partial x^{2}\partial t} \biggr)_{j}^{n+1} + \frac{\tau h}{6} \biggl(\frac{\partial^{4}u}{\partial x^{3}\partial t} \biggr)_{j}^{n+1} +\frac{\tau^{3}}{6h} \biggl(\frac{\partial^{4}u}{\partial x\partial t^{3}} \biggr)_{j}^{n+1} \biggr] \\ &\quad {}+O \bigl(\tau^{2} +h^{2} \bigr). \end{aligned} \end{aligned}$$
(21)
$$\begin{aligned}& \begin{aligned}[b] T_{8}&=-a \biggl[-\frac{\tau}{h} \biggl( \frac{\partial^{2}u}{\partial x\partial t} \biggr)_{j}^{n+1} -\frac{\tau}{2} \biggl(\frac{\partial^{3}u}{\partial x^{2}\partial t} \biggr)_{j}^{n+1} - \frac{\tau h}{6} \biggl(\frac{\partial^{4}u}{\partial x^{3}\partial t} \biggr)_{j}^{n+1} -\frac{\tau^{3}}{6h} \biggl(\frac{\partial^{4}u}{\partial x\partial t^{3}} \biggr)_{j}^{n+1} \biggr] \\ &\quad {}+O \bigl(\tau^{2} +h^{2} \bigr). \end{aligned} \end{aligned}$$
(22)

It is obvious that the truncation error of the Crank–Nicolson scheme (4) is \(O(\tau^{2}+h^{2})\). Compared with the truncation error \(T_{5}\) of scheme (5) and the truncation error \(T_{8}\) of scheme (8), the signs of leading terms of \(T_{5}\) and \(T_{8}\) are opposite. Similarly, compared with the truncation error \(T_{6}\) of scheme (6) and the truncation error \(T_{7}\) of scheme (7), the signs of leading terms of \(T_{6}\) and \(T_{7}\) are opposite.

It is easy to see that:

  1. 1.

    When DDM I use (5) to compute solution at \((x_{j},t_{n+1})\), DDM II will use (8).

  2. 2.

    When DDM I use (6) to compute solution at \((x_{j},t_{n+1})\), DDM II will use (7).

  3. 3.

    When DDM I use (7) to compute solution at \((x_{j},t_{n+1})\), DDM II will use (6).

  4. 4.

    When DDM I use (8) to compute solution at \((x_{j},t_{n+1})\), DDM II will use (5).

Therefore the leading terms of truncation error can be eliminated, we can get the following theorem.

Theorem 1

The truncation error of Algorithm 1 is approximately \(O(\tau^{2}+h^{2})\).

Proof

Since \((\frac{1}{2} )\times [\mbox{(5)}+\mbox{(8)} ]\) is obtained as follows:

$$ -\frac{ar}{2}u_{j-1}^{n+1}+(1+ar)u_{j}^{n+1}- \frac {ar}{2}u_{j+1}^{n+1}=\frac{ar}{2}u_{j-1}^{n}+(1-ar)u_{j}^{n}+ \frac {ar}{2}u_{j+1}^{n}+\tau f_{j}^{n}. $$
(23)

Similarly, \((\frac{1}{2} )\times [\mbox{(6)}+\mbox{(7)} ]\) is

$$ -\frac{ar}{2}u_{j-1}^{n+1}+(1+ar)u_{j}^{n+1}- \frac {ar}{2}u_{j+1}^{n+1}=\frac{ar}{2}u_{j-1}^{n}+(1-ar)u_{j}^{n}+ \frac {ar}{2}u_{j+1}^{n}+\tau f_{j}^{n}. $$
(24)

From algorithm (17) and the above-mentioned results, the truncation error of Algorithm 1 is approximately equal to the truncation error of the Crank–Nicolson scheme \(T_{4}\). □

4 Existence and uniqueness

In order to discuss the existence and uniqueness of the solution by Algorithm 1, the following lemmas of Kellogg [37] are required.

Lemma 1

If \(\theta>0\) and \(C+C^{T}\) is nonnegative definite, then \((\theta I+C)^{-1}\) exists and

$$ \bigl\Vert (\theta I+C)^{-1} \bigr\Vert _{2}\leq\theta^{-1}. $$
(25)

Lemma 2

Under the conditions of Lemma 1, there is

$$ \bigl\Vert (I+\theta C)^{-1} \bigr\Vert \leq1. $$
(26)

Theorem 2

The solution of Algorithm 1 exists and is unique.

Proof

Assuming the solution \(U^{n}\) at nth time level is known, the solution \(U^{n+1}\) at at \((n+1)\)st time level is solved by (17).

For DDM I

$$(I+\gamma{G_{1}})V^{n+1}=(I-\gamma{G_{2}})U^{n}+F_{1}^{n}, $$

\((I+\gamma{G_{1}})^{-1}\) exists by Lemma 2. It is proved that DDM I has a unique solution \(V^{n+1}\).

In the same way, for DDM II

$$(I+\gamma{G_{2}})W^{n+1}=(I-\gamma{G_{1}})U^{n}+F_{1}^{n}, $$

it is also proved that DDM II has a unique solution \(W^{n+1}\). Then \(U^{n+1}=\frac{1}{2} (V^{n+1}+W^{n+1} )\) exists and is unique. □

5 Unconditional stability

In this section, we discuss unconditional stability of Algorithm 1.

Theorem 3

Algorithm 1 is unconditionally stable.

Proof

Algorithm (17) can be rewritten as

$$ U^{n+1}=TU^{n}, $$
(27)

where T is the growth matrix,

$$T=\frac{1}{2} \bigl[(I+\gamma G_{1})^{-1}(I-\gamma G_{2})+(I+rG_{2})^{-1}(I-\gamma G_{1}) \bigr]. $$

For \(G_{1}+G_{1}^{T}\), \(G_{2}+G_{2}^{T}\) are nonnegative definite matrices, by Kellogg’s Lemma 1, we have

$$\bigl\Vert (I+\gamma G_{i})^{-1} \bigr\Vert _{2}\leq1,\quad i=1,2, $$

then

$$\begin{aligned} \|T\|_{2} \leq\frac{1}{2} \bigl( \bigl\Vert (I+\gamma G_{1})^{-1} \bigr\Vert _{2} \bigl\Vert (I- \gamma G_{2}) \bigr\Vert _{2} + \bigl\Vert (I+\gamma G_{2})^{-1} \bigr\Vert _{2} \bigl\Vert (I- \gamma G_{1}) \bigr\Vert _{2} \bigr) \\ \leq \frac{1}{2}\bigl( \bigl\Vert (I-\gamma G_{1}) \bigr\Vert _{2}+ \bigl\Vert (I-\gamma G_{2}) \bigr\Vert _{2}\bigr). \end{aligned}$$

It is obvious that \((I-\gamma G_{1})\) and \((I-\gamma G_{2})\) are not only normal matrices, but also strictly diagonally dominant matrices. By properties on the strictly diagonally dominant matrix and the normal matrix, we obtain

$$ \rho(T)\leq\|T\|_{2}\leq \frac{1}{2} \bigl[ \rho(I-\gamma G_{1})+\rho (I-\gamma G_{2}) \bigr]< 1, $$
(28)

where \(\rho(T)\), \(\rho(I-\gamma G_{1})\) and \(\rho(I-\gamma G_{2})\) are the spectral radii of the matrices T, \((I-\gamma G_{1})\) and \((I-\gamma G_{2})\).

Therefore, Algorithm 1 given by (17) is unconditionally stable. □

6 Extension to two-dimensional parabolic equations

In this section, we extend Algorithm 1 to solve two-dimensional parabolic equations

$$\begin{aligned}& \frac{\partial u}{\partial t}-\frac{\partial}{\partial x} \biggl(a \frac{\partial u}{\partial x} \biggr) - \frac{\partial}{\partial y} \biggl(b \frac{\partial u}{\partial y} \biggr)=f(x,y,t),\quad (x,y)\in \Omega, t\in(0,T], \end{aligned}$$
(29)
$$\begin{aligned}& u(x,y,0)= u_{0}(x,y), \quad (x,y)\in\Omega, \end{aligned}$$
(30)
$$\begin{aligned}& u(x,y,t)=0, \quad (x,y)\in\partial\Omega, t\in(0,T], \end{aligned}$$
(31)

where the domain \(\Omega\in(0,L_{x})\times(0,L_{y})\); \(a>0\) and \(b>0\) are diffusion coefficients.

Let \(u_{i,j}^{n}\) be the approximate solution at \((x_{i}, y_{j}, t_{n})\), \(u(x,y,t)\) represents the exact solution of (27). With the same time and space discretization of algorithm (17), we obtain its extended algorithm by alternating direction implicit (ADI) technique [38] for Eqs. (27)–(29).

x-direction:

Let \(r_{1}=a\tau/(2h^{2})\), \(r_{2}=b\tau/(2h^{2})\), the matrix form of the new parallel algorithm in x-direction can be written as follows:

$$ \textstyle\begin{cases} (I+r_{1}{G_{1}})V_{1}^{n+\frac{1}{2}}=(I-r_{1}{G_{2}})U^{n}+b_{1}^{n}, \\ (I+r_{1}{G_{2}})W_{1}^{n+\frac{1}{2}}=(I-r_{1}{G_{1}})U^{n}+b_{1}^{n}, \\ U^{n+\frac{1}{2}}=\frac{1}{2} (V_{1}^{n+\frac{1}{2}}+W_{1}^{n+\frac {1}{2}} ), \end{cases} $$
(32)

where

$$\begin{aligned}& b_{1}^{n}= \begin{bmatrix} [ (r_{2}u_{0,j}^{n}+r_{1}u_{0,j}^{n+\frac{1}{2}} )/2 ]+r_{2}(u_{1,j-1}^{n}-2u_{1,j}^{n}+u_{1,j+1}^{n})+\tau f_{1,j}^{n}/2\\ r_{2}(u_{2,j-1}^{n}-2u_{2,j}^{n}+u_{2,j+1}^{n})+\tau f_{2,j}^{n}/2\\ \vdots\\ r_{2}(u_{m-2,j-1}^{n}-2u_{m-2,j}^{n}+u_{m-2,j+1}^{n})+\tau f_{m-2,j}^{n}/2\\ [ (r_{2}u_{m,j}^{n}+r_{1}u_{m,j}^{n+\frac{1}{2}} )/2 ]+r_{2}(u_{m-1,j-1}^{n}-2u_{m-1,j}^{n}+u_{m-1,j+1}^{n})+\tau f_{m-1,j}^{n}/2 \end{bmatrix} , \\& \textstyle\begin{cases} U^{n+\frac{1}{2}}=(u_{1,j}^{n+\frac{1}{2}}, u_{2,j}^{n+\frac{1}{2}}, \ldots, u_{m-1,j}^{n+\frac{1}{2}})^{T},\\ V_{1}^{n+\frac{1}{2}}=(v_{1,j}^{n+\frac{1}{2}}, v_{2,j}^{n+\frac {1}{2}}, \ldots, v_{m-1,j}^{n+\frac{1}{2}})^{T},\\ W_{1}^{n+\frac{1}{2}}=(w_{1,j}^{n+\frac{1}{2}}, w_{2,j}^{n+\frac {1}{2}}, \ldots, w_{m-1,j}^{n+\frac{1}{2}})^{T}, \end{cases}\displaystyle \quad j=1, 2, \ldots, m-1. \end{aligned}$$

y-direction:

The matrix form of the new parallel algorithm in y-direction can be written as follows:

$$ \textstyle\begin{cases} (I+r_{2}{G_{1}})V_{2}^{n+1}=(I-r_{2}{G_{2}})U^{n+\frac{1}{2}}+b_{2}^{n+\frac {1}{2}}, \\ (I+r_{2}{G_{2}})W_{2}^{n+1}=(I-r_{2}{G_{1}})U^{n+\frac{1}{2}}+b_{2}^{n+\frac {1}{2}}, \\ U^{n+1}=\frac{1}{2} (V_{2}^{n+1}+W_{2}^{n+1} ), \end{cases} $$
(33)

where

$$\begin{aligned}& b_{2}^{n+\frac{1}{2}}= \begin{bmatrix} [ (r_{2}u_{i,0}^{n+\frac{1}{2}}+r_{1}u_{i,0}^{n+1} )/2 ]+r_{1}(u_{i-1,1}^{n+1}-2u_{i,1}^{n+1}+u_{i+1,1}^{n+1})+\tau f_{i,1}^{n+\frac{1}{2}}/2\\ r_{1}(u_{i-1,2}^{n+1}-2u_{i,2}^{n+1}+u_{i+1,2}^{n+1})+\tau f_{i,2}^{n+\frac{1}{2}}/2\\ \vdots\\ r_{1}(u_{i-1,m-2}^{n+1}-2u_{i,m-2}^{n+1}+u_{i+1,m-2}^{n+1})+\tau f_{i,m-2}^{n+\frac{1}{2}}/2\\ [ (r_{2}u_{i,m}^{n+\frac{1}{2}}+r_{1}u_{i,m}^{n+1} )/2 ]+r_{1}(u_{i-1,m-1}^{n+1}-2u_{i,m-1}^{n+1}+u_{i+1,m-1}^{n+1})+\tau f_{i,m-1}^{n+\frac{1}{2}}/2 \end{bmatrix} , \\& \textstyle\begin{cases} U^{n+1}=(u_{i,1}^{n+1}, u_{i,2}^{n+1}, \ldots, u_{i,m-1}^{n+1})^{T},\\ V_{2}^{n+1}=(v_{i,1}^{n+1}, v_{i,2}^{n+1}, \ldots, v_{i,m-1}^{n+1})^{T},\\ W_{2}^{n+1}=(w_{i,1}^{n+1}, w_{i,2}^{n+1}, \ldots, w_{i,m-1}^{n+1})^{T}, \end{cases}\displaystyle \quad i=1, 2, \ldots, m-1. \end{aligned}$$

The corresponding algorithm can be described as follows in Algorithm 2.

Algorithm 2
figure b

The new parallel algorithm for two-dimensional parabolic equations

Similar to Algorithm 1, it is obvious that Algorithm 2 has unconditional stability and parallelism.

Remark 1

In Algorithm 2, the domain is divided into many subdomains by using two DDMs. In each time interval, we first solve the values along x-direction by (32) at half-time step and then solve the values along y-direction by (33) at next half-time step. Schemes (32) and (33) lead to block diagonal algebraic systems that can be solved independently. So Algorithm 2 not only suits for parallel computation, but also improves the accuracy. Keeping the advantage of ADI technique, Algorithm 2 reduces computational complexities. Though it is developed for two-dimensional problems, Algorithm 2 can be easily extended to solve high-dimensional parabolic equations.

7 Numerical experiments

To illustrate the accuracy and stability of the new parallel Algorithm 1 and Algorithm 2 for parabolic equations, we present two numerical experiments to verify the accuracy, convergence order in space, stability, and parallel efficiency. In addition, we will compare the accuracy of the new algorithm with the existing method.

Example 1

$$ \textstyle\begin{cases} \frac{\partial u}{\partial t}-\frac{{\partial}^{2} u}{\partial x^{2}}=(1+\pi^{2})e^{t}\sin(\pi x),\quad x\in(0,1), t\in(0,1], \\ u(x,0)=\sin(\pi x), \quad x\in[0,1], \\ u(0,t)=u(1,t)=0,\quad t\in(0,1]. \end{cases} $$
(34)

The exact solution of Example 1 is

$$ u(x,t)=e^{t}\sin(\pi x). $$
(35)

Firstly, we examine the convergence rate of Algorithm 1. We divide the mesh point into many segments such as \(K=3\), \(K=4\), \(K=5\), and \(K=6\). Let \(U_{j}^{n}\) be the exact solution of Example 1, we calculate errors \(L^{\infty}=\|U-u\|\) in maximum-norm taking \(\tau =0.001\). The rate of convergence in space is as follows:

$$\mathrm{Rate} \approx \frac{\log(L^{\infty}_{h1}/L^{\infty}_{h2})}{\log(h1/h2)}. $$

Clearly the errors appear to be of order \(O(h^{2})\) in Table 1.

Table 1 Convergence rate of Algorithm 1 for h at \(t=0.4\)

Next, we present the error results of Algorithm 1 in terms of the absolute errors and the relative errors, where the absolute error (A. E.) is defined by

$$e_{j}^{n}= \bigl\vert u_{j}^{n}-u(x_{j},t_{n}) \bigr\vert , $$

and the relative error (R. E.) is defined by

$$E_{j}^{n}=\frac{e_{j}^{n}}{|u(x_{j},t_{n})|}\times100\%. $$

Tables 2 and 3 display the absolute errors and the relative errors obtained by the presented Algorithm 1 for \(h=1/19\) (i.e., \(m-1=18=6K\), \(K=3\)), \(h=1/25\) (i.e., \(m-1=24=6K\), \(K=4\)) at \(t=0.2\), \(t=0.4\), and \(t=0.8\), when taking \(r=1.5\) (\(r=\tau /h^{2}\)). From Tables 2 and 3, it is obvious that our algorithm has high accuracy.

Table 2 The absolute errors and relative errors of numerical solutions to Example 1 for \(h=1/19\) (i.e., \(m-1=18=6K\), \(K=3\))
Table 3 The absolute errors and relative errors of numerical solutions to Example 1 for \(h=1/25\) (i.e., \(m-1=24=6K\), \(K=4\))

Now, we compare Algorithm 1 with the ASC-N scheme in [6] by the maximum errors for \(h=1/19\) (i.e., \(m-1=18=6K\), \(K=3\)), \(h=1/25\) (i.e., \(m-1=24=6K\), \(K=4\)), and \(h=1/31\) (i.e., \(m-1=30=6K\), \(K=5\)) at different time \(t=0.2\), \(t=0.4\), \(t=0.6\), \(t=0.7\), and \(t=0.8\). With the increase in computation time, the errors of the ASC-N scheme in [6] increase more than those of Algorithm 1 for different r (\(r=\tau/h^{2}\)) in Tables 4 and 5. We can see that Algorithm 1 has higher accuracy. We consider an example for \(h=1/121\) (\(m-1=120=6K\), \(K=20\)) with large grid ratio \(r = 15\) (\(r=\tau/h^{2}\)). Table 6 shows that Algorithm 1 has better accuracy than two others. It is indicated that Algorithm 1 is stable, which is consistent with the theoretical results obtained in Sect. 5.

Table 4 Comparisons by the maximum errors to Example 1 for \(h=1/19\) (i.e., \(m-1=18=6K\), \(K=3\))
Table 5 Comparisons by the maximum errors to Example 1 for \(h=1/25\) (i.e., \(m-1=24=6K\), \(K=4\))
Table 6 Maximum error comparison for \(r=15\), \(h=1/121\) (\(m-1=120=6K\), \(K=20\))

Example 2

$$ \textstyle\begin{cases} \frac{\partial u}{\partial t}-\frac{{\partial}^{2} u}{\partial x^{2}}-\frac{{\partial}^{2} u}{\partial y^{2}}=f(x,y,t), \quad (x,y)\in\Omega, t\in(0,1], \\ u(x,y,0)=\sin(\pi x)\sin(\pi y), \quad (x,y)\in\Omega, \\ u(0,y,t)=u(1,y,t)=0, \quad y\in[0,1], t\in(0,1], \\ u(x,0,t)=u(x,1,t)=0, \quad x\in[0,1], t\in(0,1], \end{cases} $$
(36)

where the domain is \(\Omega=(0,1)\times(0,1)\) and the right-hand side function is

$$ f(x,y,t)=\bigl(1+2\pi^{2}\bigr)e^{t}\sin(\pi x)\sin(\pi y). $$
(37)

The corresponding exact solution is

$$ u(x,y,t)=e^{t}\sin(\pi x)\sin(\pi y). $$
(38)

We take \(h=1/19\) (i.e., \(m-1=18=6K\), \(K=3\)), \(h=1/25\) (i.e., \(m-1=24=6K\), \(K=4\)), \(h=1/31\) (i.e., \(m-1=30=6K\), \(K=5\)), and \(h=1/37\) (i.e., \(m-1=36=6K\), \(K=6\)), respectively. Table 7 displays the maximum errors of Algorithm 2 for \(\tau=0.0004\) at different time. It is obvious that the accuracy of Algorithm 2 is good. The comparison among Algorithm 2, classical C-N scheme, and ASC-N scheme is shown CPU calculation time for \(r = 1.2\) at \(t = 0.5\) in Table 8. Obviously, Algorithm 2 not only has high accuracy, but also has good parallel efficiency. Take all the programs of Algorithm 2 running on the uniform mesh, three different grids are given in

Figure 1
figure 1

The exact solutions at \(t=0.4\)

Fig. 2, Fig. 3, and Fig. 4 that are defined by \(h=1/19\), \(h=1/25\), and \(h=1/37\). Figure 1 shows the exact solutions at \(t=0.4\). Comparison of the exact solutions and the numerical solutions are shown in Figs. 14.

Figure 2
figure 2

The numerical solutions for \(r=1.0\), \(h=1/19\) at \(t=0.4\)

Figure 3
figure 3

The numerical solutions for \(r=1.0\), \(h=1/25\) at \(t=0.4\)

Figure 4
figure 4

The numerical solutions for \(r=1.0\), \(h=1/37\) at \(t=0.4\)

Table 7 The maximum errors of Algorithm 2 to Example 2 for \(\tau=0.0004\)
Table 8 Comparison of three schemes calculation time for \(r=1.2\) at \(t=0.5\)

Based on the experiments above, Algorithm 1 and Algorithm 2 presented in this paper are suitable and efficient for solving parabolic equations.

8 Conclusion

We have proposed and analyzed a new parallel algorithm for parabolic equations. This algorithm consists of two DDMs, each one is used to solve the values in the same time level, respectively. Then the average of two values is calculated. Stability and error analysis show that the new algorithm is unconditionally stable and has the truncation error of order two in both space and time. The new algorithm allows possibly efficient and accurate computation on massive parallel computers in general. Then we extend the new algorithm to two-dimensional parabolic equations by the ADI technique, which means that high-dimensional parabolic equations can be solved by the proposed algorithm in this paper. Numerical experiments illustrate the good performance of the new algorithm.