Skip to main content

Fast collocation method for a two-dimensional variable-coefficient linear nonlocal diffusion model

Abstract

In this paper, a fast collocation method is developed for a two-dimensional variable-coefficient linear nonlocal diffusion model. By carefully dealing with the variable coefficient in the integral operator and then analyzing the structure of the coefficient matrix, we can reduce the computational operations in each Krylov subspace iteration from \(O(N^{2})\) to \(O(N\log N)\) and the memory requirement for the coefficient matrix from \(O(N^{2})\) to \(O(N)\). Numerical experiments are carried out to show the utility of the fast collocation method.

Introduction

Recently, nonlocal models such as fractional partial differential equations (FPDEs) and nonlocal diffusion and peridynamic models have been applied in many research fields. These models can be regarded as a generalization of classical PDEs [14] and have shown the utility in modeling some challenging phenomena including anomalous diffusion and long-range spatial interactions [513]. These phenomena cannot be modeled properly by classical integer-order PDEs. Especially speaking, nonlocal diffusion and peridynamic models provide a more natural method to describe physical problems especially near singularities and discontinuities [14]. However, because of the nonlocality, the numerical algorithms usually yield dense or full coefficient matrices, which can cause significantly increased computational complexity and memory storage. For example, widely used direct solvers need \(O(N^{3})\) operations to solve the linear system and \(O(N^{2})\) computer memory space to store the coefficient matrix in which N is the number of unknowns.

To date, there have been many papers aimed to develop fast numerical schemes for nonlocal models to reduce the computational complexity and the memory requirement [13, 1521]. Among these papers, in [18], the authors developed a fast collocation method for a two-dimensional linear nonlocal diffusion model. We developed a fast-method in [19] and a preconditioned fast collocation method in [20] for two-dimensional linear bond-based peridynamic model, respectively. All these papers are based on the Toeplitz-like structure of the coefficient matrix. This structure can help us to reduce the computational work from \(O(N^{2})\) to \(O(N\log N)\) in each Krylov subspace iteration and the memory storage from \(O(N^{2})\) to \(O(N)\). Numerical examples in these papers show the utility of the fast methods.

In [22], a variable-coefficient peridynamic model was developed to account for the heterogeneity of the elastic material. However, because the variable coefficient occurs inside the integral operator, the coefficient matrix resulting from the numerical discretization does not maintain the Toeplitz-like structure as in [18, 19]. Therefore the fast methods developed before do not apply to the variable-coefficient peridynamic model. To overcome this difficulty, [23] developed a fast collocation method to a one-dimensional variable-coefficient nonlocal diffusion model based on a piecewise-constant approximation to the variable coefficient.

In this paper, a fast collocation method is developed for the two-dimensional variable-coefficient linear nonlocal diffusion model based on Taylor expansion of the variable coefficient. The rest of the paper is organized as follows:. In Sect. 2, we present the bilinear collocation scheme for the two-dimensional variable-coefficient linear nonlocal diffusion model. In Sect. 3, we study the structure of the coefficient matrix and prove that the coefficient matrix can be approximated by a sum of the products of diagonal matrix and Toeplitz matrix. Then fast matrix-vector multiplication and the reduced memory requirement can be proved, which can be used in the Krylov subspace iteration method. In Sect. 4, we do numerical experiments to investigate the computational benefits of the fast collocation method. In Sect. 5, we make the concluding remarks.

The bilinear collocation approximation for variable-coefficient linear nonlocal diffusion model

To begin with, we consider the following two-dimensional variable-coefficient static linear nonlocal diffusion model[22]:

$$ \textstyle\begin{cases} \int _{B_{\delta }(x,y)} (\alpha (x',y')+ \alpha (x,y)) \sigma (x-x^{\prime },y-y^{\prime }) (u(x,y)-u(x^{\prime },y^{\prime })) \,dx^{ \prime } \,dy^{\prime } \\ \quad = f(x,y), \quad (x,y) \in \varOmega, \\ u(x,y) = g(x,y), \quad (x,y) \in \varOmega _{c}. \end{cases} $$
(1)

Here \(\varOmega = (0,x_{R})\times (0,y_{R}) \); δ represents a parameter of the model which determines the range of interactions; \(\varOmega _{c}\) denotes a boundary zone surrounding Ω with width δ; \(B_{\delta } (x,y)\) is an open disk in which the center is located at \((x,y)\) and the radius is δ. \(\sigma (x,y)\) denotes the integral kernel; \(f(x,y)\) and \(g(x,y)\) represent the source term and prescribed nonlocal boundary data, respectively; \(\alpha (x,y)\) is the elasticity coefficient with lower and upper bounds.

Let \(N_{x}\) and \(N_{y}\) represent the number of mesh grids in the x and y directions, respectively. Let \(h_{x}:= x_{R}/N_{x}\) be the mesh size in the x direction. Let \(h_{y}:=y_{R}/N_{y}\) be the mesh size in the y direction. We define a spatial partition on Ω̄ by \(x_{i}:= i h_{x}\) for \(i=0,1,\ldots, N_{x}\) and \(y_{j}:=j h_{y}\) for \(j=0,1,\ldots, N_{y}\). To account for the nodes on \(\varOmega _{c}\), we need to extend the partition to \((x_{i},y_{j})\) for \(i=-K+1,\ldots,-1,0,1,\ldots,N_{x},N_{x}+1,\ldots, N_{x}+K-1\) and \(j=-L+1,\ldots,-1,0,1,\ldots,N_{y},N_{y}+1,\ldots, N_{y}+L-1\). Here,

$$ K =\biggl\lceil \frac{\delta }{h_{x}} \biggr\rceil , \qquad L =\biggl\lceil \frac{\delta }{h_{y}} \biggr\rceil . $$
(2)

Let \(\psi (\xi )\) be equal to \(1-|\xi |\) when \(\xi \in [-1,1]\) and equal to zero otherwise. Then the pyramid function \(\phi _{ij}(x,y)\) centered at \((x_{i},y_{j})\) can be expressed as

$$ \phi _{ij}(x,y) =\psi \biggl(\frac{x-x_{i}}{h_{x}} \biggr) \psi \biggl(\frac{y-y_{j}}{h_{y}} \biggr),\quad -K \leqslant i \leqslant N_{x}+K, -L \leqslant j \leqslant N_{y}+L. $$
(3)

Then the trial function u is

$$ u(x,y) =\sum_{i'=-K}^{N_{x}+K} \sum_{j'=-L}^{N_{y}+L} u_{{i',j'}} \phi _{i',j'}(x,y). $$
(4)

Because for the spatial nodes \((x_{i},y_{j})\in \varOmega _{c}\), \(u(x_{i},y_{j})={g}(x_{i},y_{j})\) are known, we choose the spatial nodes \((x_{i},y_{j}) \in \varOmega \) as the collocation points. Then we obtain a collocation scheme as follows:

$$\begin{aligned} &\int _{B_{\delta }(x_{i},y_{j})} \bigl(\alpha \bigl(x',y' \bigr)+\alpha (x_{i},y_{j})\bigr) \sigma \bigl(x_{i}-x^{\prime },y_{j}-y^{\prime }\bigr) \bigl(u(x_{i},y_{j})-u\bigl(x',y' \bigr)\bigr)\,dx'\,dy' \\ &\quad = {f}(x_{i},y_{j}),\quad 1 \le i \le N_{x}-1, 1 \le j \le N_{y}-1. \end{aligned}$$
(5)

We substitute (4) into (5) and rewrite (5) as follows:

$$\begin{aligned} &\alpha (x_{i},y_{j}) \int _{B_{\delta }(x_{i},y_{j})} \sigma \bigl(x_{i}-x^{ \prime },y_{j}-y^{\prime } \bigr) \Biggl(u_{i,j}-\sum_{i'=-K+1}^{N_{x}+K-1} \sum_{j'=-L+1}^{N_{y}+L-1}u_{{i',j'}}\phi _{i',j'}\bigl(x',y'\bigr)\Biggr) \,dx^{\prime }\,dy^{ \prime } \\ &\qquad{}+\int _{B_{\delta }(x_{i},y_{j})} \alpha \bigl(x',y'\bigr) \sigma \bigl(x_{i}-x^{ \prime },y_{j}-y^{\prime } \bigr) \Biggl(u_{i,j}-\sum_{i'=-K+1}^{N_{x}+K-1} \sum_{j'=-L+1}^{N_{y}+L-1}u_{{i',j'}}\phi _{i',j'}\bigl(x',y'\bigr)\Biggr) \,dx^{\prime }\,dy^{ \prime } \\ &\quad =f_{i,j},\quad 1 \le i \le N_{x}-1, 1 \le j \le N_{y}-1, \end{aligned}$$
(6)

where \({f}_{i,j}={f}(x_{i},y_{j})\) and \(u_{ij}\) is the collocation approximation to the true solution \(u(x_{i},y_{j})\).

Let \(N:=(N_{x}-1)\times (N_{y}-1)\) be the number of collocation points. Let u and f be N-dimensional vectors defined by

$$ \mathbf{u}:= [u_{{1,1}},\ldots,u_{{N_{x}-1,1}},u_{{1,2}}, \ldots,u_{{N_{x}-1,2}},u_{{1,N_{y}-1}}, \ldots,u_{{N_{x}-1,N_{y}-1}} ]^{T} $$
(7)

and

$$ \mathbf{f}:= [{f}_{{1,1}},\ldots,{f}_{{N_{x}-1,1}},{f}_{{1,2}}, \ldots,{f}_{{N_{x}-1,2}},{f}_{{1,N_{y}-1}},\ldots,{f}_{{N_{x}-1,N_{y}-1}} ]^{T}, $$
(8)

respectively.

Then the collocation approximation (6) can be expressed in the following matrix form:

$$ (\mathbf{A}_{1} + \mathbf{A}_{2})\mathbf{u} = \mathbf{f}. $$
(9)

Here, \(\mathbf{A}_{1} \in \mathbb{R}^{N \times N}\) and \(\mathbf{A}_{2} \in \mathbb{R}^{N \times N}\) are associated with the first term and the second term on the left-hand side of (6), respectively.

For the matrix \(\mathbf{A}_{1}\), each entry \(A_{1}^{{m,n}}\) for \(m=1,\ldots,N\) and \(n=1,\ldots,N\) is defined as

$$ A_{1}^{m,n} = \alpha (x_{i},y_{j}) \int _{B_{\delta }(x_{i},y_{j})} \sigma \bigl(x_{i}-x^{\prime },y_{j}-y^{\prime } \bigr) \bigl(\delta _{m,n}-\phi _{i',j'}\bigl(x',y' \bigr)\bigr)\,dx^{ \prime }\,dy^{\prime }. $$
(10)

For the matrix \(\mathbf{A}_{2}\), each entry \(A_{2}^{{m,n}}\) for \(m=1,\ldots,N\) and \(n=1,\ldots,N\) is given by

$$ A_{2}^{m,n} =\int _{B_{\delta }(x_{i},y_{j})} \alpha \bigl(x',y'\bigr) \sigma \bigl(x_{i}-x^{\prime },y_{j}-y^{\prime } \bigr) \bigl(\delta _{m,n}-\phi _{i',j'}\bigl(x',y' \bigr)\bigr)\,dx^{ \prime }\,dy^{\prime }. $$
(11)

In (10) and (11), \(\delta _{m,n}\) is equal to 1 for \(m = n\) and equal to zero otherwise. The elements \(\{f_{m},m=1,\ldots,N\}\) of f on the right hand side in (9) are given by

$$\begin{aligned} f_{m} ={}&{f}_{i,j} + \sum _{ \substack{-K+1 \leq i'' \leq 0\\ N_{x} \leq i'' \leq N_{x}+K-1}}\sum_{ \substack{-L+1 \leq j'' \leq 0\\ N_{y} \leq j'' \leq N_{y}+L-1}} \alpha (x_{i},y_{j}) \int _{B_{\delta }(x_{i},y_{j})} \\ &{}\times\sigma \bigl(x_{i}-x^{\prime },y_{j}-y^{\prime } \bigr) {g}(x_{i''},y_{j''})\phi _{i'',j''} \bigl(x',y'\bigr)\,dx^{ \prime }\,dy^{\prime } \\ &{}+\sum_{ \substack{-K+1 \leq i'' \leq 0\\ N_{x} \leq i'' \leq N_{x}+K-1}}\sum _{ \substack{-L+1 \leq j'' \leq 0\\ N_{y} \leq j'' \leq N_{y}+L-1}} \int _{B_{\delta }(x_{i},y_{j})} \alpha \bigl(x',y'\bigr) \\ &{}\times\sigma \bigl(x_{i}-x^{\prime },y_{j}-y^{\prime } \bigr) {g}(x_{i''},y_{j''})\phi _{i'',j''} \bigl(x',y'\bigr)\,dx^{ \prime }\,dy^{\prime }. \end{aligned}$$
(12)

In (10), (11), and (12), the global indices \((m,n)\) and the local indices \((i,j)\), \((i',j')\) have the following relationship:

$$\begin{aligned} \begin{aligned}& m = (j-1) (N_{x}-1) + i,\quad 1 \le i \le N_{x}-1, 1\le j \le N_{y}-1, \\ &n = \bigl(j'-1\bigr) (N_{x}-1) + i',\quad 1 \le i' \le N_{x}-1, 1\le j' \le N_{y}-1. \end{aligned} \end{aligned}$$
(13)

Structure of the coefficient matrices \(\mathbf{A}_{1}\) and \(\mathbf{A}_{2}\) in (9)

To construct a fast collocation method, we are now in a position to analyse the structure of the coefficient matrices \(\mathbf{A}_{1}\) and \(\mathbf{A}_{2}\) in (9).

Theorem 1

The matrix \(\mathbf{A}_{1}\)can be expressed as

$$ \mathbf{A}_{1} = \mathbf{D}_{1} \mathbf{B}_{1}. $$
(14)

Here \(\mathbf{D}_{1}\)is a diagonal matrix and the entries on the main diagonal are given by

$$ {D}_{1}^{m,m} = \alpha (x_{i},y_{j}),\quad 1\leq i \leq N_{x}-1,1 \leq j \leq N_{y}-1. $$
(15)

\(\mathbf{B}_{1}\)is a block-Toeplitz–Toeplitz-block (BTTB) matrix. More precisely, \(\mathbf{B}_{1}\)is a \((N_{y}-1)\)-by-\((N_{y}-1)\)banded block-Toeplitz matrix with bandwidth \((2L+1)\)

$$ \mathbf{B}_{1} = \begin{pmatrix} \mathbf{B}_{1}^{0} & \cdots & \mathbf{B}_{1}^{L} & \mathbf{0} &\cdots & \mathbf{0} & \mathbf{0} & \cdots & \mathbf{0} \\ \vdots & \ddots & \ddots & \ddots & \ddots &\ddots &\ddots & \ddots & \vdots \\ \mathbf{B}_{1}^{-L} & \ddots & \mathbf{B}_{1}^{0} & \ddots & \ddots &\mathbf{0}&\ddots &\ddots & \mathbf{0} \\ \mathbf{0} & \ddots & \ddots & \mathbf{B}_{1}^{0} & \ddots &\ddots &\mathbf{0} & \ddots & \mathbf{0} \\ \vdots & \ddots & \ddots & \ddots & \ddots &\ddots &\ddots & \ddots & \vdots \\ \mathbf{0} & \ddots & \mathbf{0} & \ddots & \ddots &\mathbf{B}_{1}^{0} &\ddots & \ddots & \mathbf{0} \\ \mathbf{0} & \ddots & \ddots & \mathbf{0} & \ddots &\ddots &\mathbf{B}_{1}^{0} & \ddots & \mathbf{B}_{1}^{L} \\ \vdots & \ddots & \ddots & \ddots & \ddots &\ddots &\ddots & \ddots & \vdots \\ \mathbf{0} & \cdots & \mathbf{0} & \mathbf{0}&\cdots &\mathbf{0}& \mathbf{B}_{1}^{-L} & \cdots & \mathbf{B}_{1}^{0} \end{pmatrix}.$$
(16)

In (16), each block matrix \(\mathbf{B}_{1}^{j}, -L \le j \le L\)is a \((N_{x}-1)\)-by-\((N_{x}-1)\)banded Toeplitz matrix with bandwidth \(2K+1\)

$$ \mathbf{B}_{1}^{j} = \begin{pmatrix} {b}_{1}^{0,j} & \cdots & {b}_{1}^{K,j} & {0} &\cdots & {0} & {0} & \cdots & {0} \\ \vdots & \ddots & \ddots & \ddots & \ddots &\ddots &\ddots & \ddots & \vdots \\ {b}_{1}^{-K,j} & \ddots & {b}_{1}^{0,j} & \ddots & \ddots &{0}&\ddots &\ddots & {0} \\ {0} & \ddots & \ddots & {b}_{1}^{0,j} & \ddots &\ddots &{0} & \ddots & {0} \\ \vdots & \ddots & \ddots & \ddots & \ddots &\ddots &\ddots & \ddots & \vdots \\ {0} & \ddots & {0} & \ddots & \ddots &{b}_{1}^{0,j} &\ddots & \ddots & {0} \\ {0} & \ddots & \ddots & {0} & \ddots &\ddots &{t}_{1}^{0,j} & \ddots & {b}_{1}^{K,j} \\ \vdots & \ddots & \ddots & \ddots & \ddots &\ddots &\ddots & \ddots & \vdots \\ {0} & \cdots & {0} & {0}&\cdots &{0}& {b}_{1}^{-K,j} & \cdots & {b}_{1}^{0,j} \end{pmatrix}.$$
(17)

Proof

By a straightforward calculation and analysis of \(\mathbf{A}_{1}\), we can find that

$$ \mathbf{A}_{1} = \mathbf{D}_{1} \mathbf{B}. $$
(18)

The entries in B are given by

$$ \mathbf{B}^{m,n} = \int _{B_{\delta }(x_{i},y_{j})} \sigma \bigl(x_{i}-x^{ \prime },y_{j}-y^{\prime } \bigr) \bigl(\delta _{m,n}-\phi _{i',j'}\bigl(x',y' \bigr)\bigr)\,dx^{ \prime }\,dy^{\prime }, $$
(19)

where the local indices \((i,j)\), \((i',j')\) and the global indices m, n are related by (13). Following the proof of Theorem 1 in [24], we see that B is a BTTB matrix and can be expressed as \(\mathbf{B}_{1}\). □

Now we consider the structure of matrix \(\mathbf{A}_{2}\). From (11), we observe that the variable coefficient occurs inside the integral, which brings a global impact to the numerical discretization. If we calculate the matrix \(\mathbf{A}_{2}\) straightforwardly, we find \(\mathbf{A}_{2}\) is also a \(2K+1\) block-banded \(2L+1\) banded-block matrix but destroys the BTTB structure. Therefore if we use this structure to solve the linear system, the computational complexity and memory requirement will not decrease.

In this paper, we consider the following approximate way. That is, although the original matrix \(\mathbf{A}_{2}\) does not have the BTTB structure, it can be approximated by a sum of products of diagonal matrix and BTTB matrix if the variable coefficient \(\alpha (x,y)\) is approximated by Taylor expansion. We denote the sum by \({\mathbf{A}_{2}^{a}}\).

Theorem 2

The matrix \(\mathbf{A}_{2}\)can be approximately decomposed as

$$ {\mathbf{A}_{2}^{a}} = \mathbf{D}_{1} \mathbf{B}_{1} + \mathbf{D}_{2} \mathbf{B}_{2} + \mathbf{D}_{3}\mathbf{B}_{3}. $$
(20)

Here \(\mathbf{D}_{1}\)and \(\mathbf{B}_{1}\)are given in the Theorem 1. \(\mathbf{D}_{2}\)and \(\mathbf{D}_{3}\)are diagonal matrices where the main diagonal entries are defined as

$$ {D}_{2}^{m,m} = \frac{\partial \alpha (x_{i},y_{j})}{\partial x},\quad 1 \leq i \leq N_{x}-1,1\leq j \leq N_{y}-1, $$
(21)

and

$$ {D}_{3}^{m,m} = \frac{\partial \alpha (x_{i},y_{j})}{\partial y},\quad 1 \leq i \leq N_{x}-1,1\leq j \leq N_{y}-1, $$
(22)

respectively. \(\mathbf{B}_{2}\)and \(\mathbf{B}_{3}\)have the same structure as \(\mathbf{B}_{1}\). The definition of \(\mathbf{B}_{2}\)and \(\mathbf{B}_{3}\)can be easily obtained by replacing the subscript 1 by 2 and 3 in (16) and (17), respectively.

Proof

Using Taylor expansion, the variable coefficient \(\alpha (x',y')\) can be expanded to the following form at the point \((x_{i},y_{j})\):

$$ \alpha \bigl(x',y'\bigr)\approx \alpha (x_{i},y_{j}) + \frac{\partial \alpha (x_{i},y_{j})}{\partial x} \bigl(x'-x_{i}\bigr) + \frac{\partial \alpha (x_{i},y_{j})}{\partial y} \bigl(y'-y_{j}\bigr). $$
(23)

Substituting (23) into (11), each entry of \(\mathbf{A}_{1}\) can be rewritten as

$$\begin{aligned} A_{2}^{m,n} ={}& \int _{B_{\delta }(x_{i},y_{j})} \alpha \bigl(x',y'\bigr) \sigma \bigl(x_{i}-x^{\prime },y_{j}-y^{\prime } \bigr) \bigl(\delta _{m,n}-\phi _{i',j'}\bigl(x',y' \bigr)\bigr)\,dx^{ \prime }\,dy^{\prime } \\ \approx{}& \alpha (x_{i},y_{j}) \int _{B_{\delta }(x_{i},y_{j})} \sigma \bigl(x_{i}-x^{\prime },y_{j}-y^{\prime } \bigr) \bigl(\delta _{m,n}-\phi _{i',j'}\bigl(x',y' \bigr)\bigr)\,dx^{ \prime }\,dy^{\prime } \\ &{}+ \frac{\partial \alpha (x_{i},y_{j})}{\partial x} \int _{B_{ \delta }(x_{i},y_{j})} \bigl(x'-x_{i}\bigr) \sigma \bigl(x_{i}-x^{\prime },y_{j}-y^{ \prime }\bigr) \bigl(\delta _{m,n}-\phi _{i',j'}\bigl(x',y' \bigr)\bigr)\,dx^{\prime }\,dy^{\prime } \\ &{}+ \frac{\partial \alpha (x_{i},y_{j})}{\partial y} \int _{B_{ \delta }(x_{i},y_{j})} \bigl(y'-y_{j}\bigr) \sigma \bigl(x_{i}-x^{\prime },y_{j}-y^{ \prime }\bigr) \bigl(\delta _{m,n}-\phi _{i',j'}\bigl(x',y' \bigr)\bigr)\,dx^{\prime }\,dy^{\prime } \\ ={}&I_{1}^{m,n} + I_{2}^{m,n} + I_{3}^{m,n}, \end{aligned}$$
(24)

where

$$\begin{aligned} \begin{aligned} &I_{1}^{m,n} = \alpha (x_{i},y_{j}) \int _{B_{\delta }(x_{i},y_{j})} \sigma \bigl(x_{i}-x^{\prime },y_{j}-y^{\prime } \bigr) \bigl(\delta _{m,n}-\phi _{i',j'}\bigl(x',y' \bigr)\bigr)\,dx^{ \prime }\,dy^{\prime }, \\ &I_{2}^{m,n} = \frac{\partial \alpha (x_{i},y_{j})}{\partial x} \int _{B_{\delta }(x_{i},y_{j})} \bigl(x'-x_{i}\bigr) \sigma \bigl(x_{i}-x^{\prime },y_{j}-y^{\prime }\bigr) \bigl(\delta _{m,n}- \phi _{i',j'}\bigl(x',y' \bigr)\bigr)\,dx^{\prime }\,dy^{\prime }, \\ &I_{3}^{m,n} = \frac{\partial \alpha (x_{i},y_{j})}{\partial y} \int _{B_{\delta }(x_{i},y_{j})} \bigl(y'-y_{j}\bigr) \sigma \bigl(x_{i}-x^{\prime },y_{j}-y^{\prime }\bigr) \bigl(\delta _{m,n}- \phi _{i',j'}\bigl(x',y' \bigr)\bigr)\,dx^{\prime }\,dy^{\prime }. \end{aligned} \end{aligned}$$
(25)

We first consider the term \(I_{1}^{m,n}\). Because \(I_{1}^{m,n}\) is the same as \(A_{1}^{m,n}\), the matrix form of \(I_{1}^{m,n}\) for \(1 \leq i \leq N_{x}-1, 1\leq j \leq N_{y}-1\) is equal to \(\mathbf{D}_{1}\mathbf{B}_{1}\) given in Theorem 1. Here the global indices \((m,n)\) and the local indices \((i,j)\), \((i',j')\) are related by (13).

Next, we only prove the structure of matrix generated by \(I_{2}^{m,n}\). The structure of matrix generated by \(I_{3}^{m,n}\) is similar. Let the matrix form of \(I_{2}^{m,n}\), with \(1 \leq i \leq N_{x}-1, 1\leq j \leq N_{y}-1\), be denoted by A. By a direct analysis, we have

$$ \mathbf{A} = \mathbf{D}_{2}\mathbf{M}, $$
(26)

where \(\mathbf{D}_{2}\) is defined in (21) and each entry of M is defined as

$$ {M}^{m,n} = \int _{B_{\delta }(x_{i},y_{j})} \bigl(x'-x_{i}\bigr) \sigma \bigl(x_{i}-x^{\prime },y_{j}-y^{\prime }\bigr) \bigl(\delta _{m,n}-\phi _{i',j'}\bigl(x',y' \bigr)\bigr)\,dx^{ \prime }\,dy^{\prime }. $$
(27)

Furthermore, M is of the form

$$ \mathbf{M} = \begin{pmatrix} \mathbf{M}^{1,1} & \mathbf{M}^{1,2} & \cdots & \mathbf{M}^{1,N_{y}-1} \\ \mathbf{M}^{2,1} & \mathbf{M}^{2,2} & \ddots & \mathbf{M}^{2,N_{y}-1} \\ \vdots & \ddots & \ddots & \vdots \\ \mathbf{M}^{N_{y}-1,1} & \mathbf{M}^{N_{y}-1,2} & \cdots & \mathbf{M}^{N_{y}-1,N_{y}-1} \end{pmatrix}.$$
(28)

Here each matrix block \(\mathbf{M}^{j,j'}, 1 \leq j \leq N_{y}-1, 1\leq j' \leq N_{y}-1\) is of order \(N_{x}-1\) and can be expressed as

$$ \mathbf{M}^{j,j'} = \begin{pmatrix} {M}^{j,j'}_{1,1} & {M}^{j,j'}_{1,2} & \cdots & {M}^{j,j'}_{1,N_{x}-1} \\ {M}^{j,j'}_{2,1} & {M}^{j,j'}_{2,2} & \ddots & {M}^{j,j'}_{2,N_{x}-1} \\ \vdots & \ddots & \ddots & \vdots \\ {M}^{j,j'}_{N_{x},1}& {M}^{j,j'}_{N_{x}-1,2} & \cdots & {M}^{j,j'}_{N_{x}-1,N_{x}-1} \end{pmatrix}.$$
(29)

We now analyze the structure of M. From (13) and the second equation in (25), we have \(I_{2}^{m,n}\neq 0\) if and only if

$$ B_{\delta }(x_{i},y_{j}) \cap \operatorname{supp}( \phi _{i',j'}))\neq \emptyset. $$
(30)

From (28) and (30), each matrix block \(\mathbf{M}^{j,j'}\) satisfying \(|j-j'|>L\) becomes zero matrix. Thus M has a block-banded structure given by

$$ \mathbf{M} = \begin{pmatrix} \mathbf{M}^{1,1} & \cdots & \mathbf{M}^{1,L+1} & \mathbf{0} &\cdots & \mathbf{0} & \mathbf{0} & \cdots & \mathbf{0} \\ \vdots & \ddots & \ddots & \ddots & \ddots &\ddots &\ddots & \ddots & \vdots \\ \mathbf{M}^{L+1,1} & \ddots & \ddots & \ddots & \ddots &\mathbf{0}&\ddots &\ddots & \mathbf{0} \\ \mathbf{0} & \ddots & \ddots & \ddots & \ddots &\ddots &\mathbf{0} & \ddots & \mathbf{0} \\ \vdots & \ddots & \ddots & \ddots & \ddots &\ddots &\ddots & \ddots & \vdots \\ \mathbf{0} & \ddots & \mathbf{0} & \ddots & \ddots &\ddots &\ddots & \ddots & \mathbf{0} \\ \mathbf{0} & \ddots & \ddots & \mathbf{0} & \ddots &\ddots &\ddots & \ddots & \mathbf{M}^{N_{y}-L-1,N_{y}-1} \\ \vdots & \ddots & \ddots & \ddots & \ddots &\ddots &\ddots & \ddots & \vdots \\ \mathbf{0} & \cdots & \mathbf{0} & \mathbf{0}&\cdots &\mathbf{0}& \mathbf{M}^{N_{y}-1,N_{y}-L-1} & \cdots & \mathbf{M}^{N_{y}-1,N_{y}-1} \end{pmatrix}.$$
(31)

From (29) and (30), we also observe that all the entries \(M_{i,i'}^{j,j'}\) with \(|i-i'|>K\) in \(\mathbf{M}^{j,j'}\) vanish. That is, \(\mathbf{M}^{j,j'}\) satisfying \(|j-j'|\leq L\) has a banded structure expressed as

$$ \mathbf{M}^{j,j'} = \begin{pmatrix} m_{1,1}^{j,j'} & \cdots & m_{1,K+1}^{j,j'} & {0} &\cdots & {0} & {0} & \cdots & {0} \\ \vdots & \ddots & \ddots & \ddots & \ddots &\ddots &\ddots & \ddots & \vdots \\ m_{K+1,1}^{j,j'} & \ddots & \ddots & \ddots & \ddots &{0}&\ddots &\ddots & {0} \\ {0} & \ddots & \ddots & \ddots & \ddots &\ddots &{0} & \ddots & {0} \\ \vdots & \ddots & \ddots & \ddots & \ddots &\ddots &\ddots & \ddots & \vdots \\ {0} & \ddots & {0} & \ddots & \ddots &\ddots & \ddots & \ddots & {0} \\ {0} & \ddots & \ddots & {0} & \ddots &\ddots &\ddots & \ddots & m_{N_{x}-K-1,N_{x}-1}^{j,j'} \\ \vdots & \ddots & \ddots & \ddots & \ddots &\ddots &\ddots & \ddots & \vdots \\ {0} & \cdots & {0} & {0}&\cdots &{0}& m_{N_{x}-1,N_{x}-K-1}^{j,j'} & \cdots & m_{N_{x}-1,N_{x}-1}^{j,j'} \end{pmatrix}.$$
(32)

By the transformations

$$ \xi _{1} = x'-x_{i},\qquad \xi _{2} = y'-y_{j}, $$

the pyramid function given in (2) can be written as

$$\begin{aligned} \phi _{i',j'}\bigl(x',y'\bigr) &= \psi \biggl(\frac{\xi _{1}-x_{i'-i}}{h_{x}}\biggr)\psi \biggl( \frac{\xi _{2}-y_{j'-j}}{h_{y}}\biggr) \\ &=\phi _{i'-i,j'-j}(\xi _{1},\xi _{2}). \end{aligned}$$

Then from Eq. (27) can be deduced

$$ {M}^{m,n} = \int _{B_{\delta }(0,0)} \xi _{1} \sigma (-\xi _{1},- \xi _{2}) \bigl(\delta _{m,n}-\phi _{i'-i,j'-j}(\xi _{1},\xi _{2})\bigr)\,d\xi _{1}\,d \xi _{2}. $$
(33)

Let \(j_{1}'-j_{1} =j_{2}'-j_{2} = l, -L \leq l \leq L\). That is, the matrix blocks \(\mathbf{M}^{j_{1},j_{1}'}\) and \(\mathbf{M}^{j_{2},j_{2}'}\) are on the same diagonal. Let

$$ \begin{aligned} &m_{1} = (j_{1} - 1) (N_{x} - 1) + i,\quad 1 \leq i \leq N_{x} - 1, 1 \leq j_{1} \leq N_{y} - 1, \\ &n_{1} = \bigl(j'_{1}- 1\bigr) (N_{x} - 1) + i',\quad 1 \leq i' \leq N_{x} - 1, 1 \leq j'_{1} \leq N_{y} - 1, \\ &m_{2} = (j_{2} - 1) (N_{x} - 1) + i, \quad 1 \leq i \leq N_{x} - 1, 1 \leq j_{2} \leq N_{y} - 1, \\ &n_{2} = \bigl(j'_{2} - 1\bigr) (N_{x} - 1) + i', \quad 1 \leq i' \leq N_{x} - 1, 1 \leq j'_{2} \leq N_{y} - 1. \end{aligned} $$
(34)

Then we have

$$\begin{aligned} m^{j_{1},j'_{1}}_{i,i'}& = M^{m_{1},n_{1}} \\ &=\int _{B_{\delta }(0,0)} \xi _{1} \sigma (-\xi _{1},- \xi _{2}) \bigl( \delta _{m_{1},n_{1}}-\phi _{i'-i,j_{1}'-j_{1}}(\xi _{1},\xi _{2})\bigr)\,d \xi _{1}\,d\xi _{2} \\ &=\int _{B_{\delta }(0,0)} \xi _{1} \sigma (-\xi _{1},- \xi _{2}) \bigl( \delta _{m_{2},n_{2}}-\phi _{i'-i,j_{2}'-j_{2}}(\xi _{1},\xi _{2})\bigr)\,d \xi _{1}\,d\xi _{2} \\ &=M^{m_{2},n_{2}} = m^{j_{2},j'_{2}}_{i,i'},\quad 1 \leq i, i' \leq N_{x}-1. \end{aligned}$$
(35)

According to (35), we have proved \(\mathbf{M}^{j_{1},j'_{1}}=\mathbf{M}^{j_{2},j'_{2}}\).

Let \(i_{3}'-i_{3} =i_{4}'-i_{4} = k, -K \leq k \leq K\). That is, the entries \(m_{i_{3},i_{3}'}^{j,j'}\) and \(m_{i_{4},i_{4}'}^{j,j'}\) in each matrix block \(\mathbf{M}^{j,j'}\) are on the same diagonal. Let

$$\begin{aligned} \begin{aligned} &m_{3} = (j - 1) (N_{x} - 1) + i_{3},\quad 1 \leq i_{3} \leq N_{x} - 1, 1 \leq j \leq N_{y} - 1, \\ &n_{3} = \bigl(j'- 1\bigr) (N_{x} - 1) + i'_{3},\quad 1 \leq i'_{3} \leq N_{x} - 1, 1 \leq j' \leq N_{y} - 1, \\ &m_{4} = (j - 1) (N_{x} - 1) + i_{4},\quad 1 \leq i_{4} \leq N_{x} - 1, 1 \leq j \leq N_{y} - 1, \\ &n_{4} = \bigl(j' - 1\bigr) (N_{x} - 1) + i'_{4},\quad 1 \leq i'_{4} \leq N_{x} - 1, 1 \leq j' \leq N_{y} - 1. \end{aligned} \end{aligned}$$
(36)

Then we observe that

$$\begin{aligned} m^{j,j'}_{i_{3},i'_{3}} &= M^{m_{3},n_{3}} \\ &=\int _{B_{\delta }(0,0)} \xi _{1} \sigma (-\xi _{1},- \xi _{2}) \bigl( \delta _{m_{3},n_{3}}-\phi _{i_{3}'-i_{3},j'-j}(\xi _{1},\xi _{2})\bigr)\,d \xi _{1}\,d\xi _{2} \\ &=\int _{B_{\delta }(0,0)} \xi _{1} \sigma (-\xi _{1},- \xi _{2}) \bigl( \delta _{m_{4},n_{4}}-\phi _{i_{4}'-i_{4},j'-j}(\xi _{1},\xi _{2})\bigr)\,d \xi _{1}\,d\xi _{2} \\ &=M^{m_{4},n_{4}} = m^{j,j'}_{i_{4},i'_{4}}. \end{aligned}$$
(37)

Combining (35) and (37), we conclude that the matrix defined in (26) is a BTTB matrix. □

Using the Taylor expansion (23), the collocation scheme (6) can be changed to an approximate form,

$$\begin{aligned} &2\alpha (x_{i},y_{j}) \int _{B_{\delta }(x_{i},y_{j})} \sigma \bigl(x_{i}-x^{ \prime },y_{j}-y^{\prime } \bigr) \Biggl(\hat{u}_{i,j}-\sum_{i'=-K}^{N_{x}+K} \sum_{j'=-L}^{N_{y}+L}\hat{u}_{{i',j'}}\phi _{i',j'}\bigl(x',y'\bigr)\Biggr) \,dx^{ \prime }\,dy^{\prime } \\ &\qquad{}+\frac{\partial \alpha (x_{i},y_{j})}{\partial x} \int _{B_{ \delta }(x_{i},y_{j})} \sigma \bigl(x_{i}-x^{\prime },y_{j}-y^{\prime } \bigr) \Biggl( \hat{u}_{i,j}-\sum_{i'=-K}^{N_{x}+K} \sum_{j'=-L}^{N_{y}+L} \hat{u}_{{i',j'}}\phi _{i',j'}\bigl(x',y'\bigr)\Biggr) \,dx^{\prime }\,dy^{\prime } \\ &\qquad{}+\frac{\partial \alpha (x_{i},y_{j})}{\partial y} \int _{B_{ \delta }(x_{i},y_{j})} \sigma \bigl(x_{i}-x^{\prime },y_{j}-y^{\prime } \bigr) \Biggl( \hat{u}_{i,j}-\sum_{i'=-K}^{N_{x}+K} \sum_{j'=-L}^{N_{y}+L} \hat{u}_{{i',j'}}\phi _{i',j'}\bigl(x',y'\bigr)\Biggr) \,dx^{\prime }\,dy^{\prime } \\ &\quad =f_{i,j},\quad 1 \le i \le N_{x}-1, 1 \le j \le N_{y}-1, \end{aligned}$$
(38)

where \(\hat{u}_{i,j}\) is the alternative collocation approximation to the true solution \(u(x_{i},y_{j})\). The matrix form of (38) can be written as

$$ \hat{\mathbf{A}}\hat{\mathbf{u}}=(2\mathbf{D}_{1} \mathbf{B}_{1} + \mathbf{D}_{2}\mathbf{B}_{2} + \mathbf{D}_{3}\mathbf{B}_{3}) \hat{\mathbf{u}}=\hat{ \mathbf{f}},$$
(39)

where

$$ \hat{\mathbf{u}}:= [\hat{u}_{{1,1}},\ldots, \hat{u}_{{N_{x}-1,1}}, \hat{u}_{{1,2}},\ldots,\hat{u}_{{N_{x}-1,2}}, \hat{u}_{{1,N_{y}-1}}, \ldots,\hat{u}_{{N_{x}-1,N_{y}-1}} ]^{T} $$
(40)

and

$$ \hat{\mathbf{f}}:= [\hat{f}_{{1,1}},\ldots, \hat{f}_{{N_{x}-1,1}}, \hat{f}_{{1,2}},\ldots,\hat{f}_{{N_{x}-1,2}}, \hat{f}_{{1,N_{y}-1}}, \ldots,\hat{f}_{{N_{x}-1,N_{y}-1}} ]^{T}. $$
(41)

The elements in \(\hat{\mathbf{f}}\) are given by

$$\begin{aligned} \hat{f}_{i,j} ={}&{f}_{i,j} + \sum_{ \substack{-K+1 \leq i'' \leq 0\\ N_{x} \leq i'' \leq N_{x}+K-1}}\sum_{ \substack{-L+1 \leq j'' \leq 0\\ N_{y} \leq j'' \leq N_{y}+L-1}} \alpha (x_{i},y_{j}) \int _{B_{\delta }(x_{i},y_{j})} \\ &{}\times\sigma \bigl(x_{i}-x^{\prime },y_{j}-y^{\prime } \bigr) {g}(x_{i''},y_{j''})\phi _{i'',j''} \bigl(x',y'\bigr)\,dx^{ \prime }\,dy^{\prime } \\ &{}+\frac{\partial \alpha (x_{i},y_{j})}{\partial x} \sum_{ \substack{-K+1 \leq i'' \leq 0\\ N_{x} \leq i'' \leq N_{x}+K-1}}\sum _{ \substack{-L+1 \leq j'' \leq 0\\ N_{y} \leq j'' \leq N_{y}+L-1}} \int _{B_{\delta }(x_{i},y_{j})} \\ &{}\times\sigma \bigl(x_{i}-x^{\prime },y_{j}-y^{\prime } \bigr) {g}(x_{i''},y_{j''})\phi _{i'',j''} \bigl(x',y'\bigr)\,dx^{ \prime }\,dy^{\prime } \\ &{}+\frac{\partial \alpha (x_{i},y_{j})}{\partial y} \sum_{ \substack{-K+1 \leq i'' \leq 0\\ N_{x} \leq i'' \leq N_{x}+K-1}}\sum _{ \substack{-L+1 \leq j'' \leq 0\\ N_{y} \leq j'' \leq N_{y}+L-1}} \int _{B_{\delta }(x_{i},y_{j})} \\ &{}\times\sigma \bigl(x_{i}-x^{\prime },y_{j}-y^{\prime } \bigr) {g}(x_{i''},y_{j''})\phi _{i'',j''} \bigl(x',y'\bigr)\,dx^{ \prime }\,dy^{\prime }, \\ &\quad 1 \leq i \leq N_{X}-1, 1 \leq j \leq N_{y}-1. \end{aligned}$$
(42)

Corollary 1

The coefficient matrices \(\hat{\mathbf{A}}\)can be stored in \(O(N)\)memories.

Proof

From (39), to store the matrices \(\hat{\mathbf{A}}\), we need to store \(\mathbf{D}_{1}\), \(\mathbf{D}_{2}\), \(\mathbf{D}_{3}\), \(\mathbf{B}_{1}\), \(\mathbf{B}_{2}\), and \(\mathbf{B}_{3}\). Because \(\mathbf{D}_{1}\), \(\mathbf{D}_{2}\), and \(\mathbf{D}_{3}\) are all diagonal matrices, the storage of these three matrices requires \(O(N)\) memories.

According to the fact that matrices \(\mathbf{B}_{1}\), \(\mathbf{B}_{2}\), and \(\mathbf{B}_{3}\) have the same structure, we only need to analyse the storage requirement of \(\mathbf{B}_{1}\). Because of the BTTB structure of \(\mathbf{B}_{1}\), to store \(\mathbf{B}_{1}\), we need to store only \((2K+1)\)-by-\((2L+1)\) entries which can be arranged as follows:

$$ \mathbf{G} = \begin{pmatrix} b^{-K,-L}_{1} & \cdots & b^{-K,0}_{1} & \cdots & b^{-K,L}_{1} \\ \vdots & \ddots & \vdots & \ddots & \vdots \\ b^{0,-L}_{1} & \cdots & b^{0,0}_{1} & \cdots & b^{0,L}_{1} \\ \vdots & \ddots & \vdots & \ddots & \vdots \\ b^{K,-L}_{1} & \cdots & b^{K,0}_{1} & \cdots & b^{K,j}_{1} \end{pmatrix} ,$$
(43)

Hence, the memory requirement of \(\mathbf{B}_{1}\) is \(O(N)\). □

Corollary 2

The matrix-vector multiplication \(\hat{\mathbf{A}}\mathbf{u}\)can be calculated in \(O(N\log N)\)operations for any vector \(\mathbf{u} \in \mathbb{R}^{N}\).

Proof

From (39), we have

$$ \hat{\mathbf{A}}\mathbf{u} = 2(\mathbf{D}_{1} \mathbf{B}_{1}\mathbf{u}) + \mathbf{D}_{2} \mathbf{B}_{2}\mathbf{u} + \mathbf{D}_{3}\mathbf{B}_{3} \mathbf{u}.$$
(44)

We only consider the first term on the right-hand side in (44). The other two terms are calculated similarly. Because the matrix \(\mathbf{B}_{1}\) is a BTTB matrix, the matrix-vector multiplication \(\mathbf{G}_{1}=\mathbf{B}_{1}\mathbf{u}\) can be finished in \(O(N\log N)\) operations[25]. Subsequently, \(\mathbf{D}_{1}\mathbf{G}_{1}\) can be calculated in \(O(N)\) operations due to the fact that \(\mathbf{D}_{1}\) is a diagonal matrix. In summary, \(\mathbf{D}_{1}\mathbf{B}_{1}\mathbf{u}\) can be calculated in \(O(N\log N)\) operations. □

In the well-known Krylov subspace iteration method, such as conjugate gradient method (CG) and conjugate gradient squared method (CGS), each iteration contains several matrix-vector multiplications and vector operations. Because of the nonlocal property of the nonlocal diffusion model, the coefficient matrices \(\mathbf{A}_{1}\) and \(\mathbf{A}_{2}\) are usually dense. Hence, the matrix-vector multiplications in each iteration need \(O(N^{2})\) computational operations. All other computations in each iteration still need \(O(N)\) computational operations. Thus, a fast Krylov subspace iteration method can be developed by calculating the matrix-vector multiplications in each iteration using Corollary 2. Moreover, the computer memory storage can be reduced for the coefficient matrix \(\hat{\mathbf{A}}\) using Corollary 1.

Numerical experiments

In this section, several numerical experiments are done to investigate the performance of the fast collocation method for the two-dimensional variable-coefficient nonlocal diffusion model. In the numerical runs as follows:, the variable-coefficient nonlocal diffusion model (1) with kernel function [26]

$$ \sigma (x,y)= \frac{1}{(x^{2} + y^{2})^{1+s}},\quad s< \frac{1}{2} $$
(45)

is considered.

In the following numerical experiments, the domain Ω in (1) is chosen to be \(\varOmega =(0,1)\times (0,1)\). We divide Ω by uniform square meshes, i.e., \(N_{x}=N_{y}\). The horizon parameter is fixed to \(\delta =1/8\). The true solution is chosen to be \(x(1-x)y(1-y)\). \(g(x,y)=u(x,y)\) on the boundary zone \(\varOmega _{c}\). The variable coefficient \(\alpha (x,y)=1+x^{2}+y^{2}\). We use MATLAB to run the following numerical examples on a 8G-memory laptop.

Example 1

We investigate the credibility of the collocation method (38) in this numerical example. The value of s in (45) is fixed to be zero. The right-hand term can be analytically computed by polar coordinate transformation and Maple

$$\begin{aligned} f(x,y)={}& -\frac{\pi }{64}x^{4} - \frac{\pi }{64}y^{4} + \frac{\pi }{64}x^{3} + \frac{\pi }{64}y^{3} - \frac{517\pi }{32\text{,}768}x^{2} - \frac{517\pi }{32\text{,}768}y^{2} + \frac{515\pi }{32\text{,}768}x \\ &{}+ \frac{515\pi }{32\text{,}768}y-\frac{3\pi }{32}x^{2}y^{2} + \frac{\pi }{16}x^{2}y + \frac{\pi }{16}xy^{2} - \frac{\pi }{32}xy - \frac{193\pi }{6\text{,}291\text{,}456}. \end{aligned}$$
(46)

We run this numerical experiment with the original collocation method (6) and the approximate collocation method (38), respectively. In (6), there are not any approximations to the variable coefficient. However, in (38), a Taylor expansion is used to approximate the variable coefficient. We solve (6) and (38) by CGS and present the \(L^{2}\) errors and the number of iterations of these two collocation methods in Table 1.

Table 1 The \(L^{2}\) errors of the collocation schemes (6) and (38)

From Table 2, we can observe that the \(L^{2}\) errors of the approximate collocation method are comparable to that of the original collocation method. Furthermore, the \(L^{2}\) errors of the approximate collocation method are slightly better than that of the original collocation method. This is because the formation of matrix \(\mathbf{A_{2}}\) requires lots of numerical integrations (precisely speaking, we need \(4(2K+1)^{2}\) numerical integrations to calculate each non-zero entry), but the formation of matrix \(\hat{\mathbf{A}}\) needs only a total of \(3(2K+1)^{2}\) numerical integrations. The accumulation of truncation errors of the latter is better than that of the former. When \(N_{x}=N_{y}=2^{6}\), because of the massive numerical integrations, the formation of matrix \(\mathbf{A_{2}}\) is very time-consuming(precisely speaking, it took us more than 2  days). Hence, when \(N_{x}=N_{y}\) is larger than 26, we terminated the numerical experiment.

Table 2 Performance of FCG, CG, and Gauss while \(s=3/8\)
Table 3 Performance of FCG, CG, and Gauss while \(s=0\)

Example 2

In this numerical example, we investigate the convergence behavior of the fast approximate collocation method by choosing different kernel functions. The value of s in (45) is chosen to be \(3/8\), 0 and \(-1/2\), respectively. When s is equal to \(3/8\), \(-1/2\), the corresponding right-hand terms are given by

$$\begin{aligned} f(x,y)={}& -\frac{2^{1/4}\pi }{10}x^{4} - \frac{2^{1/4}\pi }{10}y^{4} + \frac{2^{1/4}\pi }{10}x^{3} + \frac{2^{1/4}\pi }{10}y^{3} - \frac{2^{1/4}3353\pi }{33\text{,}280}x^{2} \\ &{}- \frac{2^{1/4}3353\pi }{33\text{,}280}y^{2} + \frac{2^{1/4}3343\pi }{33\text{,}280}x + \frac{2^{1/4}3343\pi }{33\text{,}280}y-\frac{2^{1/4}3\pi }{5}x^{2}y^{2} \\ &{} + \frac{2^{1/4}2\pi }{5}x^{2}y + \frac{2^{1/4}2\pi }{5}xy^{2} - \frac{2^{1/4}\pi }{5}xy -\frac{2^{1/4}2701\pi }{17\text{,}891\text{,}328} \end{aligned}$$
(47)

and

$$\begin{aligned} f(x,y)={}& -\frac{\pi }{768}x^{4} - \frac{\pi }{768}y^{4} + \frac{\pi }{768}x^{3} + \frac{\pi }{768}y^{3} - \frac{259\pi }{196\text{,}608}x^{2} \\ &{}- \frac{259\pi }{196\text{,}608}y^{2} + \frac{1289\pi }{983\text{,}040}x + \frac{1289\pi }{983\text{,}040}y-\frac{\pi }{128}x^{2}y^{2} \\ &{} + \frac{\pi }{192}x^{2}y + \frac{\pi }{192}xy^{2} - \frac{\pi }{384}xy -\frac{901\pi }{293\text{,}601\text{,}280}, \end{aligned}$$
(48)

respectively.

In this numerical experiment, we solve the resulting approximate collocation method (38) by Gauss elimination method (Gauss), CGS, and the fast CGS (FCGS), respectively. We present the \(L^{2}\) errors of the numerical solutions, the number of iterations in the corresponding iteration methods, and the CPU time spent in the above solvers in Tables 24. Furthermore, we use least squares method to estimate the constant \(C_{\alpha }\) and the convergence rate α in the error estimate

$$ \Vert u-u_{h} \Vert _{L^{2}}\leq C_{\alpha }h^{\alpha }. $$
(49)
Table 4 Performance of FCG, CG, and Gauss while \(s=-1/2\)

From Tables 24, The following results can be observed: (i) The \(L^{2}\) errors of the numerical solutions of (1) become small while s decreases. (ii) The number of iterations in CGS and FCGS falls while s decreases. (iii) FCGS requires less memory than the traditional solvers like Gauss and CGS. Specifically, we can observe from Tables 24 that when N is equal to 28, the memory required in Gauss and CGS is not enough. However, FCGS does not have this problem because of less memory requirement. (iv) From Tables 24, we can observe that FCGS needs less CPU time than Gauss and CGS especially when N is chosen to be bigger. For example, when \(s=-1/2\) and \(N=2^{7}\), the CPU time required by CGS exceeds 5 hours, but FCGS needs only about 19 seconds.

Conclusions

In this paper, a fast and faithful collocation method is developed for a two-dimensional variable-coefficient linear nonlocal diffusion model. Using Taylor expansion to the variable coefficient \(\alpha (x,y)\), we see that the coefficient matrix resulting from the bilinear collocation method can be approximated by a sum of the products of diagonal matrix and BTTB matrix, which result in an approximate collocation method to the original physical problem. This fast method can reduce the computational operations in each Krylov subspace iteration from \(O(N^{2})\) to \(O(N\log N)\) and the memory requirement of the coefficient matrix from \(O(N^{2})\) to \(O(N)\). The numerical experiments show the credibility and utility of this fast collocation method.

References

  1. 1.

    Stavroulakis, I.P., Tersian, S.A.: Partial Differential Equations, 2th edn. World Scientific, Singapore (2004)

    Google Scholar 

  2. 2.

    Li, T., Pintus, N., Viglialoro, G.: Properties of solutions to porous medium problems with different sources and boundary conditions. Z. Angew. Math. Phys. 70, 1–18 (2019)

    MathSciNet  MATH  Article  Google Scholar 

  3. 3.

    Shah, R., Li, T.: The thermal and laminar boundary layer flow over prolate and oblate spheroids. Int. J. Heat Mass Transf. 121, 607–619 (2018)

    Article  Google Scholar 

  4. 4.

    Viglialoro, G., Woolley, T.E.: Boundedness in a parabolic-elliptic chemotaxis system with nonlinear diffusion and sensitivity and logistic source. Math. Methods Appl. Sci. 41, 1809–1824 (2018)

    MathSciNet  MATH  Article  Google Scholar 

  5. 5.

    Benson, D., Schumer, R., Meerschaert, M.M., Wheatcraft, S.W.: Fractional dispersion, Levy motions, and the made tracer tests. Transp. Porous Media 42, 211–240 (2001)

    MathSciNet  Article  Google Scholar 

  6. 6.

    Benson, D., Wheatcraft, S.W., Meerschaert, M.M.: The fractional-order governing equation of Levy motion. Water Resour. Res. 36, 1413–1423 (2000)

    Article  Google Scholar 

  7. 7.

    Hilfer, R.: Applications of Fractional Calculus in Physics. World Scientific, Singapore (2000)

    Google Scholar 

  8. 8.

    Silling, S.A.: Reformulation of elasticity theory for discontinuities and long-range forces. J. Mech. Phys. Solids 48, 175–209 (2000)

    MathSciNet  MATH  Article  Google Scholar 

  9. 9.

    Askari, E., Bobaru, F., Lehoucq, R.B., Parks, M.L., Silling, S.A., Weckner, O.: Peridynamics for multiscale materials modeling. J. Phys. Conf. Ser. 125, 012078 (2008)

    Article  Google Scholar 

  10. 10.

    Du, Q., Lehoucq, R.B., Tartakovsky, A.M.: Integral approximations to classical diffusion and smoothed particle hydrodynamics. Comput. Methods Appl. Mech. Eng. 286, 216–229 (2015)

    MathSciNet  MATH  Article  Google Scholar 

  11. 11.

    Kao, C.Y., Lou, Y., Shen, W.: Random dispersal vs. non-local dispersal. Discrete Contin. Dyn. Syst. 26, 551–596 (2010)

    MathSciNet  MATH  Article  Google Scholar 

  12. 12.

    Li, T., Viglialoro, G.: Boundedness for a nonlocal reaction chemotaxis model even in the attraction-dominated regime (2020) https://arxiv.org/abs/2004.10991

  13. 13.

    Liu, Z., Li, X.: Two fast and efficient semi-implicit approaches with unconditional energy stability for nonlocal phase field crystal equation. Appl. Numer. Math. 150, 491–506 (2020)

    MathSciNet  MATH  Article  Google Scholar 

  14. 14.

    Madenci, E., Oterkus, E.: Peridynamic Theory and Its Applications. Springer, Berlin (2014)

    Google Scholar 

  15. 15.

    Wang, K., Wang, H.: A fast characteristic finite difference method for fractional advection-diffusion equations. Adv. Water Resour. 34, 810–816 (2011)

    Article  Google Scholar 

  16. 16.

    Wang, H., Du, N.: A fast finite difference method for three-dimensional time-dependent space-fractional diffusion equations and its efficient implementation. J. Comput. Phys. 253, 50–63 (2013)

    MathSciNet  MATH  Article  Google Scholar 

  17. 17.

    Wang, H., Du, N.: Fast alternating-direction finite difference methods for three-dimensional space-fractional diffusion equations. J. Comput. Phys. 258, 305–318 (2013)

    MathSciNet  MATH  Article  Google Scholar 

  18. 18.

    Wang, H., Tian, H.: A fast and faithful collocation method with efficient matrix assembly for a two dimensional nonlocal diffusion model. Comput. Methods Appl. Mech. Eng. 273, 19–36 (2014)

    MathSciNet  MATH  Article  Google Scholar 

  19. 19.

    Zhang, X., Wang, H.: A fast collocation method for a static bond-based linear peridynamic model. Comput. Methods Appl. Mech. Eng. 311, 280–303 (2016)

    MathSciNet  MATH  Article  Google Scholar 

  20. 20.

    Zhang, X., Li, X., Cheng, A., Wang, H.: A preconditioned fast collocation method for a linear bond-based peridynamic model. Adv. Differ. Equ. 2020, 244 (2020)

    MathSciNet  Article  Google Scholar 

  21. 21.

    Liu, Z., Li, X., Zhang, X.: A fast high-order compact difference method for the fractal mobile/immobile transport equation. Int. J. Comput. Math. 97, 1860–1883 (2020)

    MathSciNet  Article  Google Scholar 

  22. 22.

    Mengesha, T., Du, Q.: Nonlocal constrained value problems for a linear peridynamic Navier equation. J. Elast. 116, 27–51 (2014)

    MathSciNet  MATH  Article  Google Scholar 

  23. 23.

    Wang, C., Wang, H.: A fast collocation method for a variable-coefficient nonlocal diffusion model. J. Comput. Phys. 330, 114–126 (2017)

    MathSciNet  MATH  Article  Google Scholar 

  24. 24.

    Wang, H., Tian, H.: A fast and faithful collocation method with efficient matrix assembly for a two-dimensional nonlocal diffusion model. Comput. Methods Appl. Mech. Eng. 273, 19–36 (2014)

    MathSciNet  MATH  Article  Google Scholar 

  25. 25.

    Jin, X.Q.: Preconditioning Techniques for Toeplitz Systems, 1th edn. Higher Education Press, China (2010)

    Google Scholar 

  26. 26.

    Zhou, K., Du, Q.: Mathematical and numerical analysis of linear peridynamic models with nonlocal boundary condition. SIAM J. Numer. Anal. 48, 1759–1780 (2010)

    MathSciNet  MATH  Article  Google Scholar 

Download references

Acknowledgements

The authors are grateful to the editor and the anonymous referees for their valuable comments and suggestions on the paper.

Availability of data and materials

All of the authors declare that all the data can be accessed in our manuscript in the numerical simulation section.

Funding

This work was partially supported by the National Natural Science Foundation of China under Grants 91630207.

Author information

Affiliations

Authors

Contributions

All authors read and approved the final manuscript.

Corresponding author

Correspondence to Xuhao Zhang.

Ethics declarations

Competing interests

The authors declare that there is no conflict of interests.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Zhang, X., Cheng, A. Fast collocation method for a two-dimensional variable-coefficient linear nonlocal diffusion model. Adv Differ Equ 2020, 479 (2020). https://doi.org/10.1186/s13662-020-02931-3

Download citation

Keywords

  • Nonlocal diffusion model
  • Variable coefficient
  • Fast collocation method