1 Introduction

Time fractional diffusion equations are obtained from the standard diffusion equations by replacing the first-order time derivative with a fractional derivative of order \(\alpha \in (0, 2)\). In this paper, we consider the following time-fractional diffusion equation:

$$\begin{aligned} \left\{ \begin{array}{lll} {\text{D}}^{\alpha }_{t}u({\mathrm{x}}, t)-\Delta u(\mathrm{x}, t)=f({\mathrm{x}}, t),&{} {\mathrm{x}} =(x, y)\in \Omega , &{} t\in (0,T],\\ u|_{t=0}=\Phi (x, y),&{} (x, y)\in \Omega , &{} \\ u(x, y, t)=\Psi (x, y, t), &{} (x, y)\in \partial \Omega , &{} t\in (0,T], \end{array} \right. \end{aligned}$$
(1)

where \(\Phi \), \(\Psi \), and f are given functions, \(\Omega \subset {\mathbb {R}}^2\) is a bounded rectangular domain with boundary \(\partial \Omega \), and \({\text{D}}^{\alpha }_{t}\) is the Caputo fractional derivative defined as

$$\begin{aligned} \displaystyle {\text{D}}^{\alpha }_{t}u({\mathrm{x}}, t)=\frac{1}{{\varvec{\Gamma }}(1-\alpha )} \int _0^t\frac{\partial u({\mathrm{x}}, s)}{\partial s}\frac{{\text{d}}s}{(t- s)^\alpha }, \quad 0<\alpha <1, \end{aligned}$$
(2)

in which \({\varvec{\Gamma }}\) is the Gamma function. For \(\alpha =1\), we have \({\text{D}}^{\alpha }_{t}u=u_t\).

Diffusion equations of fractional order are used to describe anomalous diffusion in transport processes, see, e.g., [30], and monographs [31, 33]. Recently, some handbooks related to fractional calculus and its applications in physics, engineering, and life science as well as social science have been published. Interested readers find some basic theories in volume 1 [22] of the handbooks and some other materials can be found in other volumes. Analytic solutions for most fractional partial differential equations (FPDEs) are complicated to obtain or cannot be expressed explicitly. Hence, methods for finding numerical solutions for such problems are required. Numerical methods proposed for solving the FPDEs include finite difference methods [1, 6, 9, 11, 15, 25, 28, 29, 45], finite element methods [12, 14, 19, 20, 36, 44], the finite volume method [21], spectral methods [2, 24, 26], discontinuous Galerkin methods [7, 8, 13, 39, 41, 42], and homotopy and variational methods [17, 34, 40, 43].

The first local discontinuous Galerkin (LDG) method was introduced by Cockburn and Shu in [5] for time-dependent convection–diffusion systems. The LDG method is applied increasingly from the end of the twentieth century, see, e.g., [3, 4, 7, 8, 10, 13, 18, 27, 35, 37,38,39, 41, 42] and their bibliographies. In [10], an LDG method with both rectangular and triangular meshes for linear time-dependent fourth-order problems has been applied successfully. Recently, Huang et al. [18] applied an LDG method to solve a one-dimensional (1D) time-fractional diffusion–wave equation or super-diffusion equation, i.e., a fractional diffusion equation with \(1<\alpha <2\). More recently, Eshaghi et al. [13] exploited piecewise tensor product polynomials of degree k on Cartesian meshes and constructed an LDG method for two-dimensional (2D) semi-linear time-fractional diffusion equations. Their method is not applicable to non-rectangular domains. While it is unconditionally stable and has order of convergence \(O((\Delta t)^2+h^{k+1/2})\), it is not optimal.

In this paper, we consider 2D time-fractional sub-diffusion equations, i.e., fractional diffusion equations with \(0<\alpha <1\). Using the well-known L1 formula, we construct an unconditionally stable LDG method. Our method can be applied to non-rectangular domains as well. This paper is organized as follows. We provide some preliminaries in the next section. In Sect. 3, we construct an LDG method for the time fractional diffusion problem (1). The stability and convergence of the method are analyzed in Sect. 4. In Sect. 5, numerical experiments are carried out to confirm the theoretical results.

2 Notations and Some Preliminaries

We consider problems posed on the physical domain \(\Omega \) with boundary \(\partial \Omega \), a union of K non-overlapping local elements \(D^\kappa \), \(\kappa =1, \cdots , K\) such that

$$\begin{aligned} \displaystyle \Omega \cong \Omega _h=\mathop{\bigcup}\limits _{\kappa =1}^K D^{\kappa }. \end{aligned}$$

Here, \(D^{\kappa }\) is a shape-regular triangle for triangular meshes, or a shape-regular rectangle for Cartesian meshes. We set \(h_\kappa :=\mathrm{{diam}}(D^\kappa )\), \(h:=\mathop{\max}\limits _{1\leq \kappa \leq K}h_\kappa \), and \(\xi _h\) the set of all faces. Let \(\Gamma \) denote the union of the boundary faces of elements \(D^\kappa \in \Omega _h\), in other words \(\Gamma =\mathop{\bigcup}\limits_{D^\kappa \in \Omega _h} {\partial D^\kappa }\). \(\Gamma \) is composed of two parts: the set of unique internal edges \(\Gamma _i\) and the set of external edges \(\Gamma _b=\partial \Omega \) at the domain boundaries, and \(\Gamma =\Gamma _i\cup \Gamma _b\). We define the following function spaces:

$$\begin{aligned} \begin{array}{l} V_{h}^{k}:=\left\{ v\in L^2(\Omega _h)\big |~v| _{D^\kappa }\in {\mathcal {R}}^k(D^\kappa ), \forall D^\kappa \in \Omega _h \right\} ,\\ {\varvec{V}}_{h}^{k}:=\left\{ {\varvec{v}}\in {\varvec{L}}^2(\Omega _h)\big |~{\varvec{v}}| _{D^\kappa }\in \varvec{{\mathcal {R}}}^k(D^\kappa ), \forall D^\kappa \in \Omega _h \right\} , \end{array} \end{aligned}$$

where corresponding to the triangular meshes, \({\mathcal {R}}^k(D^\kappa )\) is \({\mathcal {P}}^k(D^\kappa )\) the space of polynomials of degree at most \(k\geq 0\) defined on \(D^\kappa \) and corresponding to the Cartesian meshes, \({\mathcal {R}}^k(D^\kappa )\) is \({\mathcal {Q}}^k(D^\kappa )\) the space of tensor product of polynomials of degrees at most k in each variable. Here, \(\varvec{{\mathcal {R}}}^k(D^\kappa )=\big ({\mathcal {R}}^k(D^\kappa )\big )^2\) and \({\varvec{L}}^2(\Omega _h)=\big (L^2(\Omega _h)\big )^2\). For \(v,w\in V_{h}^{k}\) and \(\varvec{v,w}\in {\varvec{V}}_{h}^{k}\), we define the following notations:

$$\begin{aligned} \begin{array}{c} \displaystyle (v, w):=(v, w)_{\Omega _h}=\sum _{D^\kappa \in \Omega _h}(v, w)_{D^\kappa },\quad \displaystyle (v, w)_{D^\kappa }:=\int _{D^\kappa } v({\mathrm{x}})\,w({\mathrm{x}})\mathrm{d}{{{\text{x}}}},\\ \displaystyle ({\varvec{v}}, {\varvec{w}}):=({\varvec{v}}, {\varvec{w}})_{\Omega _h}=\sum _{D^\kappa \in \Omega _h}({\varvec{v}}, {\varvec{w}})_{D^\kappa },\quad \displaystyle ({\varvec{v}}, {\varvec{w}})_{D^\kappa }:=\int _{D^\kappa } {\varvec{v}}(\mathrm{x})\cdot {\varvec{w}}({\mathrm{x}})\mathrm{d}{{{\text{x}}}},\\ \displaystyle \langle v, {\varvec{v}}\cdot {\varvec{n}}\rangle :=\langle v, {\varvec{v}}\cdot {\varvec{n}}\rangle _{\partial \Omega _h}= \sum _{D^\kappa \in \Omega _h}\langle v, {\varvec{v}}\cdot {\varvec{n}}\rangle _{\partial D^\kappa },\quad \displaystyle \langle v, {\varvec{v}}\cdot {\varvec{n}}\rangle _{\partial {D^\kappa }}:=\int _{\partial {D^\kappa }} v(s) {\varvec{v}}(s)\cdot {\varvec{n}} \mathrm{d}s, \end{array} \end{aligned}$$

where \({\varvec{n}}\) is the outward normal unit vector to \(\partial D^\kappa \). Let \(H^l(\Omega _h)\) be the space of functions on \(\Omega _h\) whose restriction to each element \(D^\kappa \) belongs to the Sobolev space \(H^l(D^\kappa )\) and set \({\varvec{H}}^l(\Omega _h)=\big (H^l(\Omega _h)\big )^2\). For any real-valued function \(v\in H^l(\Omega _h)\) and any vector-valued function \({\varvec{v}}=(v_1,v_2)\in {\varvec{H}}^l(\Omega _h)\), we set

$$\begin{aligned} \displaystyle \Vert v\Vert _{H^l(\Omega _h)}:=\left( \sum _{D^\kappa \in \Omega _h} \Vert v\Vert _{H^l(D^\kappa )}^2 \right) ^{\frac{1}{2} },\qquad \displaystyle \Vert {\varvec{v}}\Vert _{{\varvec{H}}^l(\Omega _h)}:=\left( \sum _{i=1}^2 \Vert v_i\Vert _{H^l(\Omega _h)}^2 \right) ^{\frac{1}{2} }. \end{aligned}$$

To demonstrate the flux functions, we select a fixed vector r which is not parallel to any normal at the element boundaries. This is possible because there is only a finite number of element boundary normals for any given mesh. For each face e, we apply the vector r to uniquely determine the “left” and “right” elements \(E_\mathrm{L}\) and \(E_\mathrm{R}\) which share the same face e. To fix the notation, for \(e\in \Gamma \), we refer to the interior information of the element by a superscript “−” and to the exterior information by a superscript “\(+\)”. Using this notation, we define the average

$$\begin{aligned} \{u\}= & {} \frac{u^++u^-}{2} \quad \mathrm{{on}} \quad e\in \Gamma _i, \\ \{u\}= & {} u \quad \mathrm{{on}}\quad e\in \Gamma _b, \end{aligned}$$

where u can be a scalar or a vector. We also define the jumps along a unit normal, \({\varvec{n}}\), as

$$\begin{aligned} {[}u]= & {} {\varvec{n}}^-u^-+{\varvec{n}}^+u^+,\quad {[}{\varvec{u}}]={\varvec{n}}^-\cdot {\varvec{u}}^- +{\varvec{n}}^+\cdot {\varvec{u}}^+,\quad \quad \forall e\in \Gamma _i,\\ {[}u]= & {} {\varvec{n}}u,\quad {[}{\varvec{u}}]={\varvec{n}}\cdot {\varvec{u}}, \quad \quad \forall e\in \Gamma _b. \end{aligned}$$

For Cartesian meshes in a multidimensional space, \({\varvec{P}}^-\) is the tensor product of the well-known 1D projections, see, e.g., [4, 10]. In this case, the projection \({\varvec{P}}^-\) has the following superconvergence property, see Lemma 3.7 in [10].

Lemma 1

If \((\eta , \varvec{\rho })\in H^{k+2}(\Omega _h) \times {\varvec{V}}_h^k\), we have

$$\begin{aligned} \mid (\eta -{\varvec{P}}^-\eta , \nabla \cdot \varvec{\rho })-\langle \eta -\widehat{P^-\eta },\varvec{\rho }\cdot {\varvec{n}}\rangle _{\partial \Omega _h}\mid \leq Ch^{k+1} \Vert \eta \Vert _{H^{k+2}(\Omega _h)} \Vert \varvec{\rho }\Vert _{L^2(\Omega _h)}, \end{aligned}$$

where C depends only on k and the shape regular constant.

For triangular meshes, following [3, 10], we define the \(L^2\)-projection \({\varvec{P}}\) for scalar-valued functions and the projection \({\varvec{P}}^-\) is defined for vector-valued functions. More precisely, for a given function \(\eta \in L^2(\Omega _h)\) and an arbitrary element \(D^\kappa \in \Omega _h\), the restriction of \({\varvec{P}}\eta \) to \(D^\kappa \) is defined as the element of \({\mathcal {P}}^{k}(D^\kappa )\) that satisfies

$$\begin{aligned} ( {\varvec{P}}\eta -\eta , w)_{D^\kappa }=0, \qquad \forall w\in {\mathcal {P}}^{k} (D^\kappa ). \end{aligned}$$
(3)

For a given function \(\varvec{\rho }\in {\varvec{H}}^1(\Omega _h)\), an arbitrary simplex \(D^\kappa \in \Omega _h\), and an arbitrary edge \({\tilde{e}}\in \partial D^\kappa \) that satisfies \([1\ 1]\cdot {\varvec{n}}|_{{\tilde{e}}}>0\), the restriction of \({\varvec{P}}^-\varvec{\rho }\) to \(D^\kappa \) is defined as the element of \(\varvec{{\mathcal {P}}}^{k}(D^\kappa)\) that satisfies

$$\begin{aligned} \left\{\begin{array}{llll} ( {\varvec{P}}^-\varvec{\rho }-\varvec{\rho }, {\varvec{\upsilon }})_{D^\kappa }=0, \quad \forall {\varvec{\upsilon }}\in \varvec{{\mathcal {P}}}^{k-1}(D^\kappa),\quad k\geq 1,\\ ( ({\varvec{P}}^-\varvec{\rho }-\varvec{\rho }) \cdot {\varvec{n}}, w)_{e}=0, \quad \forall w\in \varvec{{\mathcal {P}}}^{k}(e),\quad \forall e\in \partial D^\kappa , \quad e\ne {\tilde{e}}. \end{array}\right. \end{aligned}$$
(4)

In this case, we represent the following lemmas, see [3].

Lemma 2

Let \({\varvec{P}}\)be the projection defined by (3). Then, for any \(\eta \in H^{k+1}(\Omega )\),

$$\begin{aligned} \Vert {\varvec{P}}\eta -\eta \Vert _{L^2(\Omega _h)}+h^{1/2}\Vert {\varvec{P}}\eta -\eta \Vert _{L^2(\xi _h)}\leq Ch^{k+1}\Vert \eta \Vert _{H^{k+1}(\Omega _h)}, \end{aligned}$$

where C is independent of h. Let \({\varvec{P}}^-\)be the projection defined by (4). Then, for any \(\varvec{\rho }\in [H^{k+1}(\Omega )]^d\),

$$\begin{aligned} \Vert {\varvec{P}}^-\varvec{\rho }-\varvec{\rho }\Vert _{L^2(\Omega _h)}+h^{1/2}\Vert {\varvec{P}}^-\varvec{\rho }-\varvec{\rho }\Vert _{L^2(\xi _h)}\leq Ch^{k+1}\Vert \varvec{\rho }\Vert _{H^{k+1}(\Omega _h)}, \end{aligned}$$

where C is independent of h.

In the sequel, we need the following inverse and trace inequalities.

Lemma 3

For any \({\varvec{\upsilon }}\in \varvec{ {\mathcal {P}}}^k(D^\kappa )\)and \(w\in {\mathcal {P}}^k(D^\kappa )\), there exist positive constants C such that

$$\begin{aligned} \Vert {\varvec{\upsilon }}\cdot{\varvec{n}}\Vert ^2_{L^2(e)}\leq Ch^{-1}_{D^\kappa }\Vert {\varvec{\upsilon }}\Vert ^2_{{\varvec{L}}^2(D^\kappa )},\\\Vert w\Vert ^2_{L^2(e)}\leq Ch^{-1}_{D^\kappa }\Vert w\Vert ^2_{L^2(D^\kappa )},\\ \Vert \nabla w\Vert ^2_{L^2(e)}\leq Ch^{-2}_{D^\kappa }\Vert w\Vert ^2_{L^2(D^\kappa )}, \end{aligned}$$

where e is a face of \(D^\kappa \)and C is independent of the mesh size h.

Lemma 4

For any \(\varvec{\rho }\in {\varvec{H}}^1(D^\kappa )\)and \(\eta \in H^1(D^\kappa )\), there exist positive constants C such that

$$\begin{aligned} \Vert \varvec{\rho }\cdot{\varvec{n}}\Vert ^2_{L^2(e)}\leq C\Vert \varvec{\rho }\Vert _{{\varvec{L}}^2(D^\kappa )}\Vert \varvec{\rho } \Vert _{{\varvec{H}}^1(D^\kappa )},\\\Vert \eta \Vert ^2_{L^2(e)}\leq C\Vert \eta \Vert ^2_{L^2(D^\kappa )}\Vert \eta \Vert ^2_{H^1(D^\kappa )}, \end{aligned}$$

where e is a face of \(D^\kappa \)and C is a constant independent of the mesh size h.

3 Construction of the LDG Scheme

In this section, we construct a numerical scheme for solving problem (1). Let M be a positive integer, \(\Delta t=T/M\) be the time step size, and \(t_{m}=m\Delta t,\)\(m=0, 1,\cdots ,M\) denote the time mesh points. An approximation to a time-fractional derivative (2), called the L1 formula, can be obtained by a simple quadrature formula as [19, 23, 26]

$$\begin{aligned} {\text{D}}^{\alpha }_{t}u(\cdot ,t_n)=\frac{(\Delta t)^{1-\alpha }}{{\varvec{\Gamma }} (2-\alpha )}\sum _{i=0}^{n-1}b_i\frac{u(\cdot ,t_{n-i})-u(\cdot ,t_{n-i-1})}{\Delta t} +\gamma ^n(\cdot ), \end{aligned}$$

where \(b_i=(i+1)^{1-\alpha }-i^{1-\alpha }\) and \(\gamma ^n\) is the truncation error with the bound

$$\begin{aligned} \Vert \gamma ^n\Vert_\infty \leq C (\Delta t)^{2-\alpha }. \end{aligned}$$

Here C is a constant which depends on u, \(\alpha \), and T. It is easy to check that \(b_i > 0\) for each i, \(1=b_0>b_1>\cdots \), and \(b_n\rightarrow 0\) as \(n\rightarrow \infty \).

We rewrite (1) as a first-order system

$$\begin{aligned} \left\{ \begin{array}{lll} {\text{D}}^{\alpha }_{t} u-\nabla \cdot {\varvec{q}}=f({\mathrm{x}}, t),\\ {\varvec{q}}=\nabla u. \end{array} \right. \end{aligned}$$

Let \(u_{h}\in V_{h}^{k}\) and \({\varvec{q}}_h=(p_{h},q_{h})\in {\varvec{V}}_{h}^{k}\) be the approximations of \(u(\cdot , t)\) and \({\varvec{q}}(\cdot , t)\), respectively. We define a fully discrete LDG scheme as follows: find \((u_{h}, {\varvec{q}}_{h})\), such that for all test functions \((v, {\varvec{v}})\) in the finite element space \( V_{h}^{k}\times {\varvec{V}}_{h}^{k}\),

$$\begin{aligned} \left\{ \begin{array}{lll} (u^m_h, v)_{D^\kappa }+\beta \left( ({\varvec{q}}^m_h, \nabla v)_{D^\kappa }-\langle {\varvec{n}}\cdot \hat{{\varvec{q}}}^m_h, v\rangle _{\partial {D^\kappa }}\right)\\ =\beta (f^m, v)_{D^\kappa }\\ \displaystyle +\sum _{i=1}^{m-1}(b_{i-1}-b_i)(u_h^{m-i}, v)_{D^\kappa }+b_{m-1}(u_h^0, v)_{D^\kappa },\\ ({\varvec{q}}^m_h, {\varvec{v}})_{D^\kappa }+(u^m_h, \nabla \cdot {\varvec{v}})_{D^\kappa }-\langle {\hat{u}}^m_h,{\varvec{n}}\cdot {\varvec{v}}\rangle _{\partial {D^\kappa }}=0, \end{array}\right. \end{aligned}$$
(5)

where \(\beta =(\Delta t)^\alpha {\varvec{\Gamma }}(2-\alpha )\). Equation (5) is obtained after integration by parts once. Here \({\hat{u}}_h\,{\text{and}}\,\hat{{\varvec{q}}}_h\) in (5) are the “numerical fluxes”. To guarantee consistency, stability and optimal order of convergence, we must define these numerical fluxes carefully. The choice of the numerical fluxes is not unique and among several choices, for the Dirichlet boundary condition we adopt the central flux, defined as

$$\begin{aligned} {\hat{u}}^m_h=\frac{(u^m_h)^++(u^m_h)^-}{2},\quad \hat{{\varvec{q}}}^m_h=\frac{({\varvec{q}}^m_h)^++({\varvec{q}}^m_h)^-}{2} \end{aligned}$$

at all internal edges, and at the external edges we use

$$\begin{aligned} {\hat{u}}_h^m=(u^m_h)^+=(u^m_h)^-,\quad \hat{{\varvec{q}}}_h^m=({\varvec{q}}^m_h)^+=({\varvec{q}}^m_h)^-. \end{aligned}$$

We recover the global fully discrete scheme (5) as

$$\begin{aligned} \left\{ \begin{array}{lll} \displaystyle (u^m_h, v)+\beta \left( ({\varvec{q}}^m_h, \nabla v)-\sum _{\kappa =1}^{K} \langle {\varvec{n}}\cdot \hat{{\varvec{q}}}^m_h, v\rangle _{\partial {D^\kappa }}\right)\\ =\beta (f^m, v) \displaystyle +\sum _{i=1}^{m-1}(b_{i-1}-b_i)(u_h^{m-i}, v)+b_{m-1}(u_h^0, v),\\ \displaystyle ({\varvec{q}}^m_h, {\varvec{v}})+(u^m_h, \nabla \cdot {\varvec{v}})-\sum _{\kappa =1}^{K}\langle {\hat{u}}^m_h,{\varvec{n}}\cdot {\varvec{v}}\rangle _{\partial {D^\kappa }}=0. \end{array}\right. \end{aligned}$$
(6)

4 Stability Analysis and Error Estimates

To simplify the notations and without loss of generality, we consider the case \(f\equiv 0\) in our analysis. We proceed to the numerical stability for the scheme (6). Before initiating the theoretical analysis, we need the following result [35].

Lemma 5

If a mesh, consisting of K convex polygons \(D^\kappa ,\ \kappa =1,\cdots ,M\), is considered for \(\Omega \), then

$$\begin{aligned} \sum _{\kappa =1}^K({\varvec{n}}\cdot {\varvec{u}},\nu )_{\partial {D^\kappa }}=\oint _\Gamma \{{\varvec{u}}\}\cdot \left[ \nu \right] \mathrm{d}s +\oint _{\Gamma _i}\{\nu \}\cdot \left[ {\varvec{u}}\right] \mathrm{d}s. \end{aligned}$$

Theorem 1

(\(L^2\)-stability) For homogeneous Dirichlet boundary conditions, the fully discrete LDG scheme (6) is unconditionally stable, and the numerical solution \(u_h^m\)satisfies

$$\begin{aligned} \displaystyle \Vert u_h^m\Vert \leq \Vert u_h^0 \Vert , \quad m=1,\cdots , M. \end{aligned}$$

Proof

Taking test functions \(v=u^m_h, {\varvec{v}}=\beta {\varvec{q}}^m_h\) and summing all terms of (6), we have

$$\begin{aligned} \begin{array}{lll} \displaystyle (u^m_h, u^m_h)+\beta ({\varvec{q}}^m_h, {\varvec{q}}^m_h)-\beta \left( \oint _\Gamma \hat{{\varvec{q}}}_h \cdot \left[ u_h\right] \mathrm{d}s+\oint _{\Gamma _i}\hat{u_h} \left[ {\varvec{q}}_h\right] \mathrm{d}s\right) \\\displaystyle + \beta \int _\Omega \nabla \cdot ({\varvec{q}}^m_h u^m_h)\mathrm{d}{\mathrm{x}} =\sum _{i=1}^{m-1}(b_{i-1}-b_i)(u_h^{m-i}, u^m_h)+b_{m-1}(u_h^0, u^m_h). \end{array} \end{aligned}$$
(7)

Using integration by parts and Lemma 5, we get

$$\begin{aligned} \begin{array}{lll} \displaystyle \int _\Omega \nabla \cdot ({\varvec{q}}_h u_h)\, {\text{dx}} =\sum _{\kappa =1}^K\int _{D^\kappa }\nabla \cdot ({\varvec{q}}_h u_h){\text{d}}{\mathrm{x}} =\sum _{\kappa =1}^K\oint _{\partial D^\kappa }{\varvec{n}} \cdot ({\varvec{q}}_h)u_h\mathrm{d}s\\ ~~~~~~~~~~~~~~~~~~~~~~~~~\displaystyle =\oint _\Gamma \{{\varvec{q}}_h\} \cdot \left[ u_h\right] \mathrm{d}s +\oint _{\Gamma _i}\{u_h\}\left[ {\varvec{q}}_h\right] \mathrm{d}s\\ ~~~~~~~~~~~~~~~~~~~~~~~~~\displaystyle = \oint _{\Gamma _i} (u^+_h{\varvec{q}}^+_h\cdot {\varvec{n}}^+ +u^-_h{\varvec{q}}^-_h\cdot {\varvec{n}}^-)\mathrm{d}s +\oint _{\Gamma _b}( u_h{\varvec{q}}_h\cdot {\varvec{n}})\mathrm{d}s. \end{array} \end{aligned}$$
(8)

With the central flux, we recover

$$\begin{aligned} \begin{array}{lll} \displaystyle \oint _\Gamma \hat{{\varvec{q}}}_h\cdot \left[ u_h\right] \mathrm{d}s +\oint _{\Gamma _i}\hat{u_h}\left[ {\varvec{q}}_h\right] {\rm d}s= \oint _{\Gamma _i} (u^+_h{\varvec{q}}^+_h\cdot {\varvec{n}}^+ +u^-_h{\varvec{q}}^-_h\cdot {\varvec{n}}^-)\mathrm{d}s+\oint _{\Gamma _b} (u_h{\varvec{q}}_h\cdot {\varvec{n}})\mathrm{d}s. \end{array} \end{aligned}$$
(9)

Using relations (8) and (9), (7) can be written as

$$\begin{aligned} \displaystyle (u^m_h, u^m_h)+\beta ({\varvec{q}}^m_h, {\varvec{q}}^m_h) =\sum _{i=1}^{m-1}(b_{i-1}-b_i)(u_h^{m-i}, u^m_h)+b_{m-1}(u_h^0, u^m_h). \end{aligned}$$
(10)

For \(m=1\), we can get

$$\begin{aligned} \displaystyle \Vert u^1_h\Vert ^2+\beta \Vert {\varvec{q}}^1_h\Vert ^2=(u_h^0, u^1_h)\leq \frac{1}{2} \Vert u^0_h\Vert ^2 +\frac{1}{2} \Vert u^1_h\Vert ^2, \end{aligned}$$

and immediately

$$\begin{aligned} \displaystyle \Vert u^1_h\Vert \leq \Vert u^0_h\Vert . \end{aligned}$$

Next, we suppose the following inequalities hold:

$$\begin{aligned} \displaystyle \Vert u_h^m \Vert \leq \Vert u_h^0 \Vert , ~~~~~~~~ m=1,\cdots ,l. \end{aligned}$$

With \(m=l+1\) in (10) and

$$\begin{aligned} \sum _{i=1}^{l}(b_{i-1}-b_i )+b_l=1, \end{aligned}$$

we have

$$\begin{aligned} \begin{array}{ll} \displaystyle \Vert u^{l+1}_h\Vert ^2+\beta \Vert {\varvec{q}}^{l+1}_h\Vert ^2&{}=\displaystyle \sum _{i=1}^{l}(b_{i-1}-b_i)(u_h^{l+1-i}, u^{l+1}_h)+b_{l}(u_h^0, u^{l+1}_h)\\ &{}\leq \displaystyle \sum _{i=1}^{l}(b_{i-1}-b_i) \Vert u_h^{l+1-i}\Vert \Vert u^{l+1}_h\Vert +b_{l}\Vert u_h^0\Vert \Vert u^{l+1}_h\Vert \\ &{}\leq \displaystyle \sum _{i=1}^{l}(b_{i-1}-b_i) \Vert u_h^{0}\Vert \Vert u^{l+1}_h\Vert +b_{l}\Vert u_h^0\Vert \Vert u^{l+1}_h\Vert \\ &{}=\Vert u_h^{0}\Vert \Vert u^{l+1}_h\Vert \leq \frac{1}{2} \Vert u^0_h\Vert ^2+\frac{1}{2} \Vert u^{l+1}_h\Vert ^2, \end{array} \end{aligned}$$

then

$$\begin{aligned} \begin{array}{lll} \displaystyle \Vert u_h^{l+1} \Vert \leq \Vert u_h^0 \Vert . \end{array} \end{aligned}$$

To examine the convergence of the scheme (6), we express the following result:

Theorem 2

Let \(u(\cdot ,t_n)\)be the exact solution of problem (1) with homogeneous Dirichlet boundary conditions, which is sufficiently smooth with bounded derivatives, and \(u_h^n\)be the numerical solution of the fully discrete LDG scheme (6). There holds the following error estimate on Cartesian meshes:

$$\begin{aligned} \Vert u(\cdot ,t_n)-u_h^n\Vert \leq C(h^{k+1}+(\Delta t)^2+(\Delta t)^{\frac{\alpha }{2}} h^{k+\frac{1}{2}}+(\Delta t)^\frac{\alpha }{2}h^{k+1}), \end{aligned}$$

and on triangular meshes

$$\begin{aligned} \Vert u(\cdot ,t_n)-u_h^n\Vert \leq C( h^{k+1}+(\Delta t)^2+(\Delta t)^{\frac{\alpha }{2}} h^{k+\frac{1}{2}}+(\Delta t)^\frac{\alpha }{2}(h^{k}+ h^{k+1})), \end{aligned}$$

where C is a constant depending on \(T, \alpha, \)and u.

Proof

It is easy to verify that the exact solution to (6) satisfies

$$\begin{aligned} \begin{array}{lll} \displaystyle (u({\mathrm{x}},t_m), v)+\beta \left( ({\varvec{q}}(\mathrm{x},t_m), \nabla v)-\langle {\varvec{n}}\cdot {\varvec{q}}(\mathrm{x},t_m), v\rangle \right) +({\varvec{q}}({\mathrm{x}},t_m), {\varvec{v}})\\ \displaystyle +\,(u({\mathrm{x}},t_m), \nabla \cdot {\varvec{v}})-\langle u({\mathrm{x}},t_m),{\varvec{n}}\cdot {\varvec{v}}\rangle -\sum _{i=1}^{m-1}(b_{i-1}-b_i)(u(\mathrm{x},t_{m-i}), v)\\ -\,b_{m-1}(u({\mathrm{x}},t_0), v)+\beta (\gamma ^m({\mathrm{x}}), v)=0. \end{array} \end{aligned}$$
(11)

Subtracting (6) from (11), we obtain the error equation

$$\begin{aligned} \begin{array}{lll} \displaystyle (e^m_u, v)+\beta \left( (e^m_{{\varvec{q}}}, \nabla v)-\langle {\varvec{n}}\cdot \widehat{e^m_{{\varvec{q}}}}, v\rangle \right) +(e^m_{{\varvec{q}}}, {\varvec{v}})+(e^m_u, \nabla \cdot {\varvec{v}})-\langle \widehat{e^m_u},{\varvec{n}}\cdot {\varvec{v}}\rangle \\ \displaystyle -\sum _{i=1}^{m-1}(b_{i-1}-b_i)(e^{m-i}_u, v)-b_{m-1}(e^0_u, v)+\beta (\gamma ^m({\mathrm{x}}), v)=0, \end{array} \end{aligned}$$
(12)

where

$$\begin{aligned} e_u^m=u({\mathrm{x}}, t_m)-u_h^m, \qquad e_{{\varvec{q}}}^m={\varvec{q}}({\mathrm{x}}, t_m)-{\varvec{q}}_h^m. \end{aligned}$$

We will use two projections \(\Pi , {\varvec{P}}\):

$$\begin{aligned} \left\{\begin{array}{l} e_u^m=u({\mathrm{x}}, t_m)-u_h^m={\varvec{P}}e_u^m- ({\varvec{P}}u({\mathrm{x}}, t_m)-u({\mathrm{x}}, t_m)),\\ e_{{\varvec{q}}}^m={\varvec{q}}({\mathrm{x}}, t_m)-{{\varvec{q}}}_h^m=\Pi e_{{\varvec{q}}}^m- (\Pi {\varvec{q}}({\mathrm{x}}, t_m)-{\varvec{q}}({\mathrm{x}}, t_m)). \end{array}\right. \end{aligned}$$
(13)

Using (13), the error equation (12) can be written

$$\begin{aligned} \begin{array}{lll} \displaystyle ({\varvec{P}}e_u^m, v)+\beta \left( (\Pi e_{{\varvec{q}}}^m,\nabla v) -\langle {\varvec{n}}\cdot \widehat{\Pi e^m_{{\varvec{q}}}}, v\rangle \right) +(\Pi e_{{\varvec{q}}}^m, {\varvec{v}})+({\varvec{P}} e_u^m, \nabla \cdot {\varvec{v}}) \displaystyle -\,\langle \widehat{{\varvec{P}}e^m_u},{\varvec{n}}\cdot {\varvec{v}}\rangle \displaystyle \\=b_{m-1}({\varvec{P}}e_u^0, v)+\sum _{i=1}^{m-1}(b_{i-1}-b_i) ({\varvec{P}}e_u^{m-i}, v)\\ \displaystyle~~ -\,\beta (\gamma ^m({\mathrm{x}}), v) +( {\varvec{P}}u(\mathrm{x}, t_m)-u({\mathrm{x}}, t_m), v) + (\Pi {\varvec{q}}({\mathrm{x}}, t_m)-{\varvec{q}}({\mathrm{x}}, t_m), {\varvec{v}})\\ \displaystyle~~ +\,\beta \left( (\Pi {\varvec{q}}({\mathrm{x}}, t_m)-{\varvec{q}}({\mathrm{x}}, t_m),\nabla v) -\langle {\varvec{n}}\cdot (\widehat{\Pi {\varvec{q}}}(\mathrm{x},t_m)-{\varvec{q}}({\mathrm{x}}, t_m)),v\rangle \right) \\ \displaystyle~~ +\, ({\varvec{P}}u({\mathrm{x}}, t_m)-u({\mathrm{x}}, t_m), \nabla \cdot {\varvec{v}})-\langle \widehat{{\varvec{P}}u}({\mathrm{x}}, t_m)-u({\mathrm{x}}, t_m),{\varvec{n}}\cdot {\varvec{v}}\rangle \\ \displaystyle~~ -\,b_{m-1} ({\varvec{P}}u({\mathrm{x}},t_0)-u({\mathrm{x}}, t_0), v)\\ \displaystyle~~ -\,\sum _{i=1}^{m-1}(b_{i-1}-b_i) ({\varvec{P}}u({\mathrm{x}}, t_{m-i})-u({\mathrm{x}}, t_{m-i}),v). \end{array} \end{aligned}$$
(14)

In the following, we consider two cases.

4.1 Rectangular Mesh

Taking test functions \(v= {\varvec{P}}e_u^m\) and \({\varvec{v}}=\beta \Pi e_{{\varvec{q}}}^m\), for the homogeneous Dirichlet boundary condition, we obtain

$$\begin{aligned} \begin{array}{lll} \displaystyle \Vert {\varvec{P}}e_u^m\Vert ^2+ \beta \Vert \Pi e_{{\varvec{q}}}^m\Vert ^2=b_{m-1}({\varvec{P}}e_u^0, {\varvec{P}}e_u^m)+\sum _{i=1}^{m-1}(b_{i-1}-b_i) ({\varvec{P}}e_u^{m-i}, {\varvec{P}}e_u^m) \\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad\displaystyle-\beta (\gamma ^m({\mathrm{x}}), {\varvec{P}}e_u^m) +( {\varvec{P}} u({\mathrm{x}}, t_m)-u({\mathrm{x}}, t_m), {\varvec{P}} e_u^m) \\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad\displaystyle + \beta (\Pi {\varvec{q}}({\mathrm{x}}, t_m)-{\varvec{q}}({\mathrm{x}}, t_m), \Pi e_{{\varvec{q}}}^m) -\beta \langle \widehat{{\varvec{P}}u}({\mathrm{x}}, t_m)-u({\mathrm{x}}, t_m),{\varvec{n}}\cdot \Pi e_{{\varvec{q}}}^m\rangle \\ \displaystyle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad+\beta ({\varvec{P}}u({\mathrm{x}}, t_m)-u(\mathrm{x}, t_m), \nabla \cdot \Pi e_{{\varvec{q}}}^m)- b_{m-1}({\varvec{P}}u({\mathrm{x}},t_0)-u({\mathrm{x}}, t_0), {\varvec{P}}e_u^m) \\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad\displaystyle -\sum _{i=1}^{m-1}(b_{i-1}-b_i) ({\varvec{P}}u({\mathrm{x}}, t_{m-i})-u({\mathrm{x}}, t_{m-i}), {\varvec{P}}e_u^m). \end{array} \end{aligned}$$

Using Lemma 1, we can write

$$\begin{aligned} \begin{array}{lll} \displaystyle \mid -\langle \widehat{{\varvec{P}}u}({\mathrm{x}}, t_m)-u({\mathrm{x}}, t_m),{\varvec{n}}\cdot \Pi e_{{\varvec{q}}}^m\rangle + ({\varvec{P}}u({\mathrm{x}}, t_m)-u({\mathrm{x}}, t_m), \nabla \cdot \Pi e_{{\varvec{q}}}^m)\mid \\ \leq C_1 h^{k+1}\Vert \Pi e_{{\varvec{q}}}^m\Vert , \end{array} \end{aligned}$$
(15)

and then

$$\begin{aligned} \begin{array}{lll} \displaystyle \Vert {\varvec{P}}e_u^m\Vert ^2+ \beta \Vert \Pi e_{{\varvec{q}}}^m\Vert ^2\leq b_{m-1}({\varvec{P}}e_u^0, {\varvec{P}}e_u^m)+\sum _{i=1}^{m-1}(b_{i-1}-b_i) ({\varvec{P}}e_u^{m-i}, {\varvec{P}}e_u^m)\\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad\displaystyle -\beta (\gamma ^m({\mathrm{x}}), {\varvec{P}}e_u^m) +( {\varvec{P}} u({\mathrm{x}}, t_m)-u({\mathrm{x}}, t_m), {\varvec{P}} e_u^m) \\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad\displaystyle + \beta (\Pi {\varvec{q}}(\mathrm{x}, t_m)-{\varvec{q}}({\mathrm{x}}, t_m), \Pi e_{{\varvec{q}}}^m)\\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad\displaystyle +\beta C_1h^{k+1}\Vert \Pi e_{{\varvec{q}}}^m\Vert - b_{m-1}({\varvec{P}}u(\mathrm{x},t_0)-u({\mathrm{x}}, t_0), {\varvec{P}}e_u^m) \\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad\displaystyle -\sum _{i=1}^{m-1}(b_{i-1}-b_i) ({\varvec{P}}u({\mathrm{x}}, t_{m-i})-u({\mathrm{x}}, t_{m-i}), {\varvec{P}}e_u^m). \end{array} \end{aligned}$$
(16)

For \(m=1\), we have

$$\begin{aligned} \begin{array}{lll} \displaystyle \Vert {\varvec{P}}e_u^1\Vert ^2+ \beta \Vert \Pi e_{{\varvec{q}}}^1\Vert ^2\leq ({\varvec{P}}e_u^0, {\varvec{P}}e_u^1) -\beta (\gamma ^1({\mathrm{x}}), {\varvec{P}}e_u^1) \\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad\displaystyle +( {\varvec{P}}u({\mathrm{x}}, t_1)-u(\mathrm{x}, t_1), {\varvec{P}}e_u^1)+\beta (\Pi {\varvec{q}}({\mathrm{x}}, t_1)-{\varvec{q}}({\mathrm{x}}, t_1), \Pi e_{{\varvec{q}}}^1) \\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad\displaystyle +\beta C_1h^{k+1}\Vert \Pi e_{{\varvec{q}}}^1\Vert - ({\varvec{P}}u({\mathrm{x}},t_0)-u({\mathrm{x}}, t_0), {\varvec{P}}e_u^1), \end{array} \end{aligned}$$

and hence

$$\begin{aligned} \begin{array}{lll} \displaystyle \Vert {\varvec{P}}e_u^1\Vert ^2+ \beta \Vert \Pi e_{{\varvec{q}}}^1\Vert ^2\leq \left( \Vert {\varvec{P}}e_u^0\Vert +\beta \Vert \gamma ^1({\mathrm{x}})\Vert \right. \\~~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad\displaystyle \left. + \Vert {\varvec{P}}u({\mathrm{x}},t_0)-u({\mathrm{x}}, t_0)\Vert +\Vert {\varvec{P}}u({\mathrm{x}}, t_1)-u({\mathrm{x}}, t_1)\Vert \right) \times \Vert {\varvec{P}}e_u^1\Vert \\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad\displaystyle +\beta C_1h^{k+1}\Vert \Pi e_{{\varvec{q}}}^1\Vert\displaystyle +\beta \Vert \Pi {\varvec{q}}({\mathrm{x}}, t_1)-{\varvec{q}}({\mathrm{x}}, t_1)\Vert \Vert \Pi e_{{\varvec{q}}}^1\Vert .\\ \end{array} \end{aligned}$$

Then using the following facts:

$$\begin{aligned}&\Vert P^-e_u^0 \Vert \leq C h^{k+1},~~~ ab\leq \varepsilon a^2+\frac{1}{4 \varepsilon } b^2, \end{aligned}$$
(17)
$$\begin{aligned}&\begin{array}{ll} \displaystyle \beta C_1h^{k+1}\Vert \Pi e_{{\varvec{q}}}^1\Vert \displaystyle +\beta \Vert \Pi {\varvec{q}}({\mathrm{x}}, t_1)-{\varvec{q}}({\mathrm{x}}, t_1)\Vert \Vert \Pi e_{{\varvec{q}}}^1\Vert \leq C_1\beta h^{2k+2} +\beta \Vert \Pi e_{{\varvec{q}}}^1\Vert ^2,\\ \end{array} \end{aligned}$$
(18)

and similar to the 1D cases [41, 42], we can write

$$\begin{aligned} \begin{array}{lll} \displaystyle \Vert {\varvec{P}}e_u^1\Vert ^2+ \beta \Vert \Pi e_{{\varvec{q}}}^1\Vert ^2 \leq C_2( h^{k+1}+(\Delta t)^2+(\Delta t)^{\frac{\alpha }{2}} h^{k+\frac{1}{2}})^2\\ ~~~ ~~~ ~~~~~ ~~~~~~~~~~ ~~~~~~\quad\displaystyle +\frac{1}{2} \Vert {\varvec{P}}e_u^1\Vert ^2+C_3\beta h^{2k+2} +\beta \Vert \Pi e_{{\varvec{q}}}^1\Vert ^2. \end{array} \end{aligned}$$
(19)

Consequently,

$$\begin{aligned} \displaystyle \Vert {\varvec{P}}e_u^1\Vert ^2\leq C(( h^{k+1}+(\Delta t)^2+(\Delta t)^{\frac{\alpha }{2}} h^{k+\frac{1}{2}})^2+(\Delta t)^\alpha h^{2(k+1)}). \end{aligned}$$

Next we suppose the following inequalities hold:

$$\begin{aligned} \displaystyle \Vert {\varvec{P}}e_u^m\Vert \leq C(h^{k+1}+(\Delta t)^2+(\Delta t)^{\frac{\alpha }{2}} h^{k+\frac{1}{2}}+(\Delta t)^\frac{\alpha }{2}h^{k+1}),\quad m=1,2,\cdots , l. \end{aligned}$$

For \(m= l+ 1\), from (16), we can obtain

$$\begin{aligned} \begin{array}{lll} \displaystyle \Vert {\varvec{P}}e_u^{l+1}\Vert ^2+ \beta \Vert \Pi e_{{\varvec{q}}}^{l+1}\Vert ^2\leq b_{l}({\varvec{P}}e_u^0, {\varvec{P}}e_u^{l+1})+\sum _{i=1}^{l}(b_{i-1}-b_i) ({\varvec{P}}e_u^{l+1-i}, {\varvec{P}}e_u^{l+1})\\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad\displaystyle -\beta (\gamma ^{l+1}({\mathrm{x}}), {\varvec{P}}e_u^{l+1}) +( {\varvec{P}} u({\mathrm{x}}, t_{l+1})-u({\mathrm{x}}, t_{l+1}), {\varvec{P}} e_u^{l+1}) \\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad\displaystyle + \beta (\Pi {\varvec{q}}(\mathrm{x}, t_{l+1})-{\varvec{q}}({\mathrm{x}}, t_{l+1}), \Pi e_{{\varvec{q}}}^{l+1})\\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad\displaystyle +\beta C_1h^{k+1}\Vert \Pi e_{{\varvec{q}}}^{l+1}\Vert - b_{l}({\varvec{P}}u(\mathrm{x},t_0)-u({\mathrm{x}}, t_0), {\varvec{P}}e_u^{l+1}) \\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad\displaystyle -\sum _{i=1}^{l}(b_{i-1}-b_i) ({\varvec{P}}u({\mathrm{x}}, t_{l+1-i})-u({\mathrm{x}}, t_{l+1-i}), {\varvec{P}}e_u^{l+1}) \end{array} \end{aligned}$$

and hence

$$\begin{aligned} \displaystyle \Vert {\varvec{P}}e_u^{l+1}\Vert ^2+ \beta \Vert \Pi e_{{\varvec{q}}}^{l+1}\Vert ^2&\leq \left( b_{l}\Vert {\varvec{P}}e_u^0\Vert +\sum _{i=1}^{l}(b_{i-1}-b_i) \Vert {\varvec{P}}e_u^{l+1-i}\Vert + \beta \Vert \gamma ^m({\mathrm{x}})\Vert \right. \\ &\quad +b_{l} \Vert {\varvec{P}}u(\mathrm{x},t_0)-u({\mathrm{x}}, t_0)\Vert +\Vert {\varvec{P}}u({\mathrm{x}}, t_{l+1})-u({\mathrm{x}}, t_{l+1})\Vert \\&\quad \left. +\sum _{i=1}^{l}(b_{i-1}-b_i) \Vert {\varvec{P}}u({\mathrm{x}}, t_{l+1-i})-u({\mathrm{x}}, t_{l+1-i})\Vert \right) \times \Vert {\varvec{P}}e_u^{l+1}\Vert \\ &\quad +\beta C_1h^{k+1}\Vert \Pi e_{{\varvec{q}}}^{l+1}\Vert \displaystyle +\beta \Vert \Pi {\varvec{q}}({\mathrm{x}}, t_{l+1})-{\varvec{q}}({\mathrm{x}}, t_{l+1})\Vert \Vert \Pi e_{{\varvec{q}}}^{l+1}\Vert .\\ \end{aligned}$$

Then using facts (17), (18), and \(\displaystyle \sum _{i=1}^{l}(b_{i-1}-b_i)+b_l=1\), we can write

$$\begin{aligned} \displaystyle \Vert {\varvec{P}}e_u^{l+1}\Vert ^2+ \beta \Vert \Pi e_{{\varvec{q}}}^{l+1}\Vert ^2 &\leq C_2( h^{k+1}+(\Delta t)^2+(\Delta t)^{\frac{\alpha }{2}} h^{k+\frac{1}{2}})^2\\ & \quad +\frac{1}{2} \Vert {\varvec{P}}e_u^{l+1}\Vert ^2+C_3\beta h^{2k+2} +\beta \Vert \Pi e_{{\varvec{q}}}^{l+1}\Vert ^2. \end{aligned}$$

Consequently,

$$\begin{aligned} \displaystyle \Vert {\varvec{P}}e_u^{l+1}\Vert ^2\leq C(( h^{k+1}+(\Delta t)^2+(\Delta t)^{\frac{\alpha }{2}} h^{k+\frac{1}{2}})^2+(\Delta t)^\alpha h^{2(k+1)}). \end{aligned}$$

4.2 Triangular Mesh

Taking test functions \(v= {\varvec{P}}e_u^m\) and \({\varvec{v}}=\beta \Pi e_{{\varvec{q}}}^m\), for the Dirichlet boundary condition, we obtain

$$\begin{aligned} \begin{array}{lll} \displaystyle \Vert {\varvec{P}}e_u^m\Vert ^2+ \beta \Vert \Pi e_{{\varvec{q}}}^m\Vert ^2=b_{m-1}({\varvec{P}}e_u^0, {\varvec{P}}e_u^m)+\sum _{i=1}^{m-1}(b_{i-1}-b_i) ({\varvec{P}}e_u^{m-i}, {\varvec{P}}e_u^m) \\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad\displaystyle -\beta (\gamma ^m({\mathrm{x}}), {\varvec{P}}e_u^m) +( {\varvec{P}} u({\mathrm{x}}, t_m)-u({\mathrm{x}}, t_m), {\varvec{P}} e_u^m) \\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad\displaystyle + \beta (\Pi {\varvec{q}}({\mathrm{x}}, t_m)-{\varvec{q}}({\mathrm{x}}, t_m), \Pi e_{{\varvec{q}}}^m) -\beta \langle \widehat{{\varvec{P}}u}({\mathrm{x}}, t_m)-u({\mathrm{x}}, t_m),{\varvec{n}}\cdot \Pi e_{{\varvec{q}}}^m\rangle \\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad\displaystyle - b_{m-1}({\varvec{P}}u(\mathrm{x},t_0)-u({\mathrm{x}}, t_0), {\varvec{P}}e_u^m)\\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad\displaystyle -\sum _{i=1}^{m-1}(b_{i-1}-b_i) ({\varvec{P}}u({\mathrm{x}}, t_{m-i})-u({\mathrm{x}}, t_{m-i}), {\varvec{P}}e_u^m). \end{array} \end{aligned}$$
(20)

When \(m=1\), (20) is

$$\begin{aligned} \begin{array}{lll} \displaystyle \Vert {\varvec{P}}e_u^1\Vert ^2+ \beta \Vert \Pi e_{{\varvec{q}}}^1\Vert ^2=({\varvec{P}}e_u^0, {\varvec{P}}e_u^1) -\beta (\gamma ^1({\mathrm{x}}), {\varvec{P}}e_u^1) \\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad\displaystyle +( {\varvec{P}}u({\mathrm{x}}, t_1)-u(\mathrm{x}, t_1), {\varvec{P}}e_u^1)+\beta (\Pi {\varvec{q}}({\mathrm{x}}, t_1)-{\varvec{q}}({\mathrm{x}}, t_1), \Pi e_{{\varvec{q}}}^1) \\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad\displaystyle -\beta \langle \widehat{{\varvec{P}}u}(\mathrm{x}, t_1)-u({\mathrm{x}}, t_1),{\varvec{n}}\cdot \Pi e_{{\varvec{q}}}^1\rangle - ({\varvec{P}}u(\mathrm{x},t_0)-u({\mathrm{x}}, t_0), {\varvec{P}}e_u^1). \end{array} \end{aligned}$$
(21)

Using the inverse and trace inequalities and Lemmas 3 and 4, we get

$$\begin{aligned} \begin{array}{lll} \displaystyle -\beta \langle \widehat{{\varvec{P}}u}({\mathrm{x}}, t_1) -u({\mathrm{x}}, t_1),{\varvec{n}}\cdot \Pi e_{{\varvec{q}}}^1\rangle \\ \displaystyle \leq C_1 \beta \Vert \widehat{{\varvec{P}}u}({\mathrm{x}}, t_1)-u({\mathrm{x}}, t_1)\Vert _{L^2(\partial \Omega _h)} \Vert {\varvec{n}}\cdot \Pi e_{{\varvec{q}}}^1\Vert _{L^2(\partial \Omega _h)}\\ \displaystyle \leq C_2 \beta h^k\Vert \Pi e_{{\varvec{q}}}^1\Vert \displaystyle \leq C_3 \beta h^{2k}+\frac{1}{2}\beta \Vert \Pi e_{{\varvec{q}}}^1\Vert ^2. \end{array} \end{aligned}$$
(22)

Using (22), (21) can be written as

$$\begin{aligned} \begin{array}{lll} \displaystyle \Vert {\varvec{P}}e_u^1\Vert ^2+ \beta \Vert \Pi e_{{\varvec{q}}}^1\Vert ^2\leq \Vert \left( {\varvec{P}}e_u^0\Vert +\beta \Vert \gamma ^1({\mathrm{x}})\Vert + \Vert {\varvec{P}}u({\mathrm{x}},t_0)-u({\mathrm{x}}, t_0)\Vert \right. \\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad\left. +\Vert {\varvec{P}}u({\mathrm{x}}, t_1)-u(\mathrm{x}, t_1)\Vert \right) \times \Vert {\varvec{P}}e_u^1\Vert \\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad\displaystyle + C_3 \beta h^{2k}+\frac{1}{2}\beta \Vert \Pi e_{{\varvec{q}}}^1\Vert ^2 +\beta \Vert \Pi {\varvec{q}}({\mathrm{x}}, t_1)-{\varvec{q}}({\mathrm{x}}, t_1)\Vert \Vert \Pi e_{{\varvec{q}}}^1\Vert . \end{array} \end{aligned}$$

Then using (17)–(19), we obtain

$$\begin{aligned} \begin{array}{lll} \displaystyle \Vert {\varvec{P}}e_u^1\Vert ^2+ \beta \Vert \Pi e_{{\varvec{q}}}^1\Vert ^2 \leq C_4( h^{k+1}+(\Delta t)^2+(\Delta t)^{\frac{\alpha }{2}} h^{k+\frac{1}{2}})^2+\frac{1}{2} \Vert {\varvec{P}}e_u^1\Vert ^2\\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~\quad\displaystyle +C_5\beta h^{2k+2} +C_3\beta h^{2k}+\beta \Vert \Pi e_{{\varvec{q}}}^1\Vert ^2. \end{array} \end{aligned}$$

Consequently, since \(\beta =(\Delta t)^\alpha {\varvec{\Gamma }}(2-\alpha )\), using a big enough C, we have

$$\begin{aligned} \displaystyle \Vert {\varvec{P}}e_u^1\Vert ^2\leq C(( h^{k+1}+(\Delta t)^2+(\Delta t)^{\frac{\alpha }{2}} h^{k+\frac{1}{2}})^2+ (\Delta t)^\alpha h^{2k}+ (\Delta t)^\alpha h^{2(k+1)}). \end{aligned}$$

Next, we suppose the following inequalities hold:

$$\begin{aligned} \displaystyle \Vert {\varvec{P}}e_u^m\Vert \leq C(h^{k+1}+(\Delta t)^2+(\Delta t)^{\frac{\alpha }{2}} h^{k+\frac{1}{2}} + (\Delta t)^\frac{\alpha }{2}(h^{k}+h^{k+1})),\quad m=1,2,\cdots , l. \end{aligned}$$

It can be derived similar relation for \(m= l+ 1\).

More precisely, there holds the following error estimate on Cartesian meshes:

$$\begin{aligned} \Vert u(\cdot ,t_n)-u_h^n\Vert \leq C(h^{k+1}+(\Delta t)^2+(\Delta t)^{\frac{\alpha }{2}} h^{k+\frac{1}{2}}), \end{aligned}$$

and on triangular meshes

$$\begin{aligned} \Vert u(\cdot ,t_n)-u_h^n\Vert \leq C( h^{k+1}+(\Delta t)^2+(\Delta t)^\frac{\alpha }{2}h^{k}). \end{aligned}$$

For small time step sizes, we can get optimal order of convergence.

5 Numerical Examples

In this section, we perform numerical experiments of the LDG method applied to the time fractional diffusion equation. We check the spatial accuracy by fixing the time step sufficiently small to avoid the contamination of the temporal error. We have verified that the results shown are numerically convergent in all cases with the aid of successive mesh refinements.

Example 1

We consider (1) with the exact solution \(u({\mathrm{x}}, t)=t^2 \sin (x_1)\sin (x_2)\) on \(\Omega =(0, \pi )\times (0, \pi )\). Obviously, we encounter with the homogeneous Dirichlet boundary conditions, and

$$\begin{aligned} f({\mathrm{x}}, t)=\left( 2t^2+\frac{2t^{2-\alpha }}{\Gamma (3-\alpha )} \right) \sin (x_1)\sin (x_2). \end{aligned}$$

We take piecewise \(P^2\) polynomials as the basis functions and investigate the accuracy of the proposed method. Setting \(T=1\) and \(\Delta t\) very small and using the usual \(L^2\) and \(L^\infty \) error norms, we prepare results of Table 1 for Cartesian meshes and results of Table 2 for triangular meshes for several values of \(\alpha \). The order of convergence (OC) of the method is evidently about 3. The errors in \(L^2\)-norm and \(L^\infty\)-norm for piecewise \(P^k, k=1,2,3\) polynomials for \(\alpha =0.1, 0.9\) are presented in Fig. 1 for triangular meshes and in Fig. 2 for Cartesian meshes. Now, we consider \(\Omega =(0, 2\pi )\times (0, 2\pi )\) and, therefore, we face periodic boundary conditions. We repeat the previous tests and report results in Table 3 for Cartesian meshes and in Table 4 for triangular meshes. The OC of the method is evidently about 3. The errors in \(L^2\)-norm and \(L^\infty\)-norm for piecewise \(P^k, k=1,2,3\) polynomials for \(\alpha =0.1, 0.9\) are presented in Fig. 3 for triangular meshes and in Fig. 4 for Cartesian meshes. To interpret better, we report data related to Figs. 1, 2, 3, 4 in Tables 5, 6, 7, and 8 and find that by choosing small time step sizes for both Cartesian and triangular meshes and for both homogeneous Dirichlet boundary conditions and periodic boundary conditions, the OC with respect to the spatial variable converges to \(k + 1\).

Fig. 1
figure 1

Natural \(\log \)(error) as a function of natural \(\log (h)\) for \(\alpha =0.1, 0.9\) when using piecewise \(P^k, k=1,2,3\) polynomials with triangular meshes. The lowest picture is for reference lines

Fig. 2
figure 2

Natural \(\log \)(error) as a function of natural \(\log (h)\) for \(\alpha =0.1, 0.9\) when using piecewise \(P^k, k=1,2,3\) polynomials for Cartesian meshes. The lowest picture is for reference lines

Fig. 3
figure 3

Natural \(\log \)(error) as a function of natural \(\log (h)\) for \(\alpha =0.1, 0.9\) when using piecewise \(P^k, k=1,2,3\) polynomials for triangular meshes. The lowest picture is for reference lines

Fig. 4
figure 4

Natural \(\log \)(error) as a function of natural \(\log (h)\) for \(\alpha =0.1, 0.9\) when using piecewise \(P^k, k=1,2,3\) polynomials for Cartesian meshes. The lowest picture is for reference lines

Table 1 Accuracy test for Example 1 for Cartesian meshes
Table 2 Accuracy test for Example 1 for triangular meshes
Table 3 Accuracy test for Example 1 for Cartesian meshes
Table 4 Accuracy test for Example 1 for triangular meshes
Table 5 Some results related to Fig. 1
Table 6 Some results related to Fig. 2
Table 7 Some results related to Fig. 3
Table 8 Some results related to Fig. 4

6 Conclusion

In this paper, we have developed an LDG method for 2D time fractional diffusion equations. The numerical stability and convergence of the method for both rectangular and triangular meshes have been theoretically proven. The numerical results demonstrate the applicability and efficiency of the proposed method.