1 Introduction

In this paper, we continue to study direct discontinuous Galerkin method [1] and other three versions of the direct discontinuous Galerkin (DDG) method [2,3,4] for solving the nonlinear diffusion equation

$$\begin{aligned} \frac{\partial U}{\partial t}=\nabla \cdot (A(U)\nabla U), ({{\textbf {x}}},t)\in \Omega \times (0,T), \end{aligned}$$
(1)

with the initial data \(U_0({{\textbf {x}}})=U({{\textbf {x}}},0)\). Nonlinear diffusion matrix \(A(U)\in {\mathbb {R}}^{d\times d}\) can be anisotropic and none symmetric, but is assumed to have real and nonnegative eigenvalues. We adapt \(\Omega \subset {\mathbb {R}}^d\) to denote the computational domain. In this study, we consider a 2-dimensional setting with \(d=2\). Our focus is to derive a generalized and unified DDG method for nonlinear diffusion Eq. (1) that can be easily extended and applied to system and multi dimensional cases.

The discontinuous Galerkin (DG) method was first introduced by Reed and Hill for neutron transport equations in 1973 [5]. However, it is after a series of papers by Cockburn, Shu et al. [6,7,8,9] that the DG method became the archetype of high order methods used in the scientific community. Essentially, the DG method is a finite element method, but with a discontinuous piecewise polynomial space defined for the numerical solution and test function in each element. Due to this property, the DG method has a smaller and more compact stencil compared to its continuous counterpart. Hence, the data structure required to implement DG methods is extremely local, which allows efficient parallel computing and hp-adaptation.

One of the key features of the DG method is that the communication between computational elements is established through a numerical flux defined at element interfaces. In this regard, the DG method bears a striking similarity to finite volume method, where a Riemann solver is employed to calculate the numerical flux. Therefore, the DG method enjoys the high-order polynomial approximations as a finite element method while benefiting from the characteristic decomposition of the wave propagation provided by Riemann solvers as a finite volume method. For this reason, the DG method has been successfully applied to hyperbolic problems, i.e. compressible Euler equations, in the last three decades, cf. [10,11,12].

On the other hand, for elliptic and parabolic problems, i.e. linear/nonlinear diffusion equations, the numerical flux must involve a proper definition for the solution gradient at element interfaces. It is, in fact, the variety of this definition that leads to several DG methods such as the interior penalty (IPDG) methods [13,14,15], the nonsymmetric interior penalty (NIPG) method [16, 17] and the symmetric interior penalty (SIPG) method [18,19,20]. Another important group of DG methods for solving diffusion problems include the method of Bassi and Rebay (BR) and its variations [21,22,23,24]; the local DG (LDG) method [25,26,27]; the method of Baumann and Oden (BO) [28, 29]; hybridized DG (HDG) method [30]. Recent works include the weakly over-penalized SIPG method [31]; weak DG [32] method and ultra weak DG method [33, 34]. For a review of these methods, we refer to [35, 36] and the references therein. Among the many DG methods mentioned, there is little discussion of nonlinear diffusion equations except Bassi and Rebay [21] and Local DG related methods [25, 30].

In addition to all the efforts mentioned above to devise a numerical flux for the diffusive terms in elliptic/parabolic equations, Liu and Yan [1] introduced Direct DG (DDG) method for nonlinear diffusion equations. Inspired by the exact trace formula corresponding to the solution of heat equation with a smooth initial data that contains a discontinuous point, Liu and Yan derived a simple formula for the numerical flux to compute the solution derivative at the element interface. Although DDG method is proven to converge to the exact solution optimally when measured in an energy norm, it suffers from an order loss in the \(L_2\)-norm when the solution space is approximated by even degree polynomials. In order to recover optimal convergence, Liu and Yan [2] developed the direct DG method with interface correction (DDGIC). In their subsequent studies, Yan and collaborators presented symmetric and nonsymmetric versions of the DDG method [3, 4]. Even though DDG methods degenerate to the IPDG method with piecewise constant and linear polynomial approximations, there exist a number of advantages with DDG methods for higher order approximations. For such advantages, we refer to the discussions on a third order bound preserving scheme in [37], superconvergence to \(\nabla U\) in [38, 39] and elliptic interface problems with different jump interface conditions in [40].

Despite the aforementioned favorable features, in the previous versions of DDG methods, the numerical flux definition is based on the antiderivative of the nonlinear diffusion matrix A(U). However, this antiderivative might not exist if the diffusion matrix A(U) is complicated enough. Therefore, the previous DDG methods are not applicable to nonlinear equations with such diffusion matrices. One important example where the diffusion matrix A(U) cannot be integrated explicitly is the energy equation of compressible Navier–Stokes equations. A similar difficulty arises for the interface terms involving test function. This problem is addressed by defining a new direction vector on element interfaces, which depends on the nonlinear diffusion matrix A(U) and geometric information of the interface. With the introduction of the nonlinear direction vector, the evaluation of the nonlinear numerical flux is greatly simplified. Interface terms can also be clearly defined with no ambiguity. Danis and Yan recently applied the method in [41] to solve compressible Navier–Stokes equations with DDGIC method. This treatment of a generic diffusion process opens up the possibility of a straightforward extension of all DDG versions to the complicated nonlinear diffusion equations, which motivates this study.

In this paper, the concept of the nonlinear direction vector is extended to all versions of DDG method in a generalized, unified framework. The new framework does not only address the problem of calculating the antiderivative of the diffusion matrix, but also provides an easy and practical recipe for using the DDG methods for general system of conservation laws. Moreover, interface terms of all versions of DDG methods are presented within a unified format that is clean and easy to be evaluated. Nonlinear stability analyses are presented for the new DDGIC, symmetric DDG and nonsymmetric DDG methods, and we investigate their performance in several numerical experiments. Since DDG methods degenerate to the IPDG method with low order approximations as mentioned, all numerical tests are conducted with high order polynomial approximations. In the numerical tests, optimal order of accuracy are obtained for DDGIC and symmetric DDG methods over uniform triangular meshes while a slight fraction of order loss is observed for nonsymmetric DDG method with even degree polynomial approximations. It is also shown that singular or blow up phenomena can be well captured under the new DDG framework.

Throughout the paper, we denote the exact solution of Eq. (1) by the uppercase U and the DG solution of Eq. (1) by the lowercase u. The rest of the paper is organized as follows. In Sect. 2, we briefly review the direct DG methods. In Sect. 3, the new methodology is described. In Sect. 4, nonlinear stability analysis are presented. Implementation details of the new methods are explained and several numerical examples are presented in Sect. 5. Finally, we draw our conclusions in Sect. 6.

2 A Review of Direct DG Methods

In this section, we will present a brief review of the original direct DG methods [1,2,3,4] and the required notation for later use.

We consider a shape regular triangular mesh partition \({\mathcal {T}}_h\) of \(\Omega \) such that \({\overline{\Omega }}= \cup _{{K\in {\mathcal {T}}_h}} K\). For each element K, we denote the diameter of the inscribed circle by \(h_K\). Furthermore, we define the numerical solution space as

$$\begin{aligned} {\mathbb {V}}_h^k:=\{v\in L^2(\Omega ): v(x,y)\big \vert _K\in {\mathbb {P}}_k(K)\}, \end{aligned}$$

where \(h=\max _{K}\{h_K\}\) and \({\mathbb {P}}_k(K)\) represents the space of polynomials of degree k in two dimensions. Note that this solution space is discontinuous across element interfaces. For this purpose, we adopt the following notation for the interface solution jump and average

where \(u^+\) and \(u^-\) are the solution values calculated from the exterior and interior of the element K.

Next, for a test function \(v\in {\mathbb {V}}_h^k\), we multiply Eq. (1) by v, integrate it by parts and apply the divergence theorem to obtain the weak form of Eq. (1). Along with the initial projection, the weak form is then given by

$$\begin{aligned}&\int _{K}u_t v ~dxdy + \int _{K} A(u)\nabla u \cdot \nabla v ~dxdy -\int _{\partial K} \widehat{A(u)\nabla u} \cdot {\textbf{n}}\, v ~ds=0,\quad \forall v\in {\mathbb {V}}_h^k, \end{aligned}$$
(2)
$$\begin{aligned}&\int _{K}u(x,y,0)v(x,y)~dxdy = \int _{K} U_0(x,y)v(x,y)~dxdy,\quad \forall v\in {\mathbb {V}}_h^k. \end{aligned}$$
(3)

In Eq. (2), the volume integration is performed over individual elements K and the surface integral is performed over the element boundary \(\partial K\). Here, \({\textbf{n}}\) is the outward unit normal vector on \(\partial K\). Furthermore, since u(xyt) is discontinuous across the elements, \(A(u)\nabla u\) is multi-valued on \(\partial K\). For this reason, \(A(u)\nabla u\) is written with a hat in the surface integral term in Eq. (2). In fact, \(\widehat{A(u)\nabla u}\) is known as the numerical flux. The original DDG method [1] defines the numerical flux as

(4)

where we denote by \(a_{ij}(u)\) the ij component of the diffusion matrix A(u). Here, \(b_{ij}(u)\) are the components of the matrix B(u). Basically, the components of B(u) are the antiderivatives of \(a_{ij}(u)\) and it is defined as \(b_{ij}(u)=\int ^u a_{ij}(s) ds\). In Eq. (4), \(h_e\) is the average of the element diameters sharing the edge \(\partial K\), \(n_j\) are the components of the unit normal \({\textbf{n}}\) for \(j=1,2\), and the subscripts \(x_j\) denote the partial derivative with respect to the corresponding spatial coordinate axis for \(j=1,2\). Furthermore, \((\beta _0,\beta _1)\) is a pair of coefficients that affects the stability and optimal convergence of the DDG method. Along with Eqs. (2) and (4), the definition of the original direct DG method [1] is now completed.

It is well-known that the original DDG method loses an order for even degree polynomials [1]. This problem is fixed either by including a jump term for the test function or introducing a numerical flux for the test function. What determines the name of the corresponding DDG version is in fact how these additional terms are implemented.

2.1 The DDG Method with Interface Correction

The scheme formulation of the original DDGIC method [2] is given as

where the numerical flux \(\widehat{A(u)\nabla u}\) is calculated using Eq. (4).

2.2 The Symmetric DDG Method

The scheme formulation of the original symmetric DDG method [3] is given by

$$\begin{aligned} \begin{aligned}&\int _{K}u_t v ~dxdy + \int _{K} A(u)\nabla u \cdot \nabla v ~dxdy \\&\quad -\int _{\partial K} \widehat{A(u)\nabla u} \cdot {\textbf{n}}\, v ~ds+\int _{\partial K} \llbracket B(u)\rrbracket \widehat{\nabla v} \cdot {\textbf{n}} ~ds=0,\quad \forall v\in {\mathbb {V}}_h^k. \end{aligned} \end{aligned}$$

As in the DDGIC method, the numerical flux \(\widehat{A(u)\nabla u}\) is calculated by Eq. (4) while the numerical for the test function is given as

(5)

2.3 The Nonsymmetric DDG Method

The scheme formulation of the original nonsymmetric DDG method [4] is given by

$$\begin{aligned} \begin{aligned}&\int _{K}u_t v ~dxdy + \int _{K} A(u)\nabla u \cdot \nabla v ~dxdy \\&\quad -\int _{\partial K} \widehat{A(u)\nabla u} \cdot {\textbf{n}}\, v ~ds-\int _{\partial K} \widetilde{A(v)\nabla v} \cdot {\textbf{n}}\llbracket u \rrbracket ~ds=0,\quad \forall v\in {\mathbb {V}}_h^k. \end{aligned} \end{aligned}$$

Similar to the other DDG versions, the numerical flux \(\widehat{A(u)\nabla u}\) is calculated by Eq. (4). The numerical flux for the test function is defined similarly but with a different penalty coefficient \(\beta _{0v}\):

(6)

3 The New DDG Framework for Nonlinear Diffusion Equations

As can be seen in the previous section, the numerical flux definition of original DDG versions is based on calculating an antiderivative matrix B(u) that is calculated according to

$$\begin{aligned} B(u)=\int ^u A(s) ds. \end{aligned}$$

A major drawback occurs when the components of the diffusion matrix A(u) cannot be integrated explicitly. In such cases, none of the original DDG versions can be implemented. A striking example is the energy equation of compressible Navier–Stokes equations. This drawback limits the use of the original DDG versions only to simple applications where the antiderivative matrix B(u) is available.

The new framework is based on the adjoint-property of inner product, which was used in the proof of a bound-preserving limiter with DDGIC method [37]. On the continuous level, the integrand of the surface integral in the weak form Eq. (2) can be rewritten as

$$\begin{aligned} A(u)\nabla u\cdot {\textbf{n}} = \nabla u \cdot A(u)^T{\textbf{n}}. \end{aligned}$$

By applying the adjoint-property, we define a new direction vector \(\varvec{\xi }(u)=A(u)^T{\textbf{n}}\). As shown in Fig. 1, the new direction vector is simply obtained by stretching/compressing and rotating the unit normal vector \({\textbf{n}}\) through diffusion matrix A(u). On the discrete level, the new direction vector can be calculated by

(7)
Fig. 1
figure 1

The new direction vector \(\varvec{\xi }\)

The numerical flux can suitably be defined as

where the numerical flux \(\widehat{\nabla u}=({\widehat{u}}_x,{\widehat{u}}_y)\) can be computed by the original DDG numerical flux formula for the heat equation [1]:

(8)

Now, we reformulate all DDG versions for Eq. (1) according to the new framework: Find \(u\in {\mathbb {V}}_h^k\) such that

(9)

where \(\sigma =0\) for the basic DDG scheme, \(\sigma =1\) for DDGIC and symmetric DDG schemes, and \(\sigma =-1\) for the nonsymmetric DDG scheme. Furthermore, we denote by \(\widetilde{\nabla v}=({\widetilde{v}}_x,{\widetilde{v}}_y)\) the numerical flux for the test function \(v\in {\mathbb {V}}_h^k\). Along with the following definitions of the numerical flux for the test function, Eq. (9) defines the new DDG versions:

\({\textit{The}\, \textit{baseline}\, \textit{DDG}\, \textit{scheme}\, (\sigma =0)}\):

$$\begin{aligned} \widetilde{\nabla v}={\textbf{0}}. \end{aligned}$$
(10)

\({\textit{The}\,\textit{DDGIC}\,\textit{scheme}\,(\sigma =1)}\):

(11)

\({\textit{The}\, \textit{symmetric}\, \textit{DDG} \,\textit{scheme}\, (\sigma =1)}\):

(12)

\({\textit{The}\,\textit{nonsymmetric}\,\textit{DDG}\, \textit{scheme}\, (\sigma =-1)}\):

(13)

In [37], the adjoint property of inner product was only used in the proof of positivity-preserving (Theorem 3.2). All numerical tests of [37] involving nonlinear diffusion equations were implemented with the original DDGIC scheme formulation [2].

3.1 Boundary Conditions

We briefly discuss the implementation of boundary conditions. For all edges falling on the domain boundaries, i.e. \(\partial K\in \partial \Omega \), the second derivative term in the numerical flux Eq. (8) is dropped and only the solution jump and gradient average are explored to approximate the numerical flux on the domain boundary

For periodic boundary conditions where the periodicity is given as \(U(x,y)=U(x+L_x,y+L_y)\), the boundary condition for exterior \(``+"\) state is set from the interior \(``-"\) state of the periodic boundary such that

$$\begin{aligned} u^+(x,y)&= u^-(x+L_x,y+L_y), \\ \nabla u^+(x,y)&= \nabla u^-(x+L_x,y+L_y). \end{aligned}$$

For Dirichlet boundary condition where the solution on a part of the domain boundary is given, \(U(x,y)|_{(x,y)\in \partial \Omega }=u_D(x,y)\), we simply set

$$\begin{aligned} u^+(x,y)&= u_D(x,y), \\ \nabla u^+(x,y)&= \nabla u^-(x,y). \end{aligned}$$

For Neumann boundary condition where the solution flux along the outward normal on a part of the domain boundary is given, i.e. \(A(u)\nabla U(x,y)\cdot {\textbf{n}} |_{(x,y)\in \partial \Omega }=u_N(x,y)\), we set

$$\begin{aligned} \widehat{A(u)\nabla u} \cdot {\textbf{n}}= u_N(x,y). \end{aligned}$$

We comment that there is no need to adapt direct DG method numerical flux formula (8) on the solution’s gradient when Neumann type boundary condition is considered.

Remark 1

We summarize the main features and advantages of the generalized DDG methods (9) for nonlinear diffusion Eq. (1).

  • Nonlinearity of the diffusion process goes into the corresponding new direction vector defined at the cell interface that greatly simplifies the implementation of the DDG method.

  • Numerical flux for the solution’s gradient \(\nabla u\) can be approximated by the linear numerical flux formula of the original DDG. Since the solution’s gradient is independent of the governing equation, this allows the code reuse for general nonlinear diffusion problems.

  • The nonlinear direction vectors are further applied to define the nonlinear interface terms involving test function.

4 Nonlinear Stability of the New DDG Methods

In this section, we will discuss the nonlinear stability theory of the DDG methods developed in Sect. 3. To simplify the discussion, we will assume periodic boundary conditions on the domain boundaries. The important inequalities used in the proofs of the main theorems are discussed later in Appendix A.

We say that the DDG method is stable in \(L_2\) sense if

$$\begin{aligned} \int _{\Omega } u^2(x,y,T) ~dxdy \le \int _{\Omega } U^2_0(x,y) ~dxdy, \quad \forall T\ge 0. \end{aligned}$$

Note that the primal weak formulation of the new DDG methods is obtained by summing Eqs. (3) and (9) over all element \(K\in {\mathcal {T}}_h\).

$$\begin{aligned}&\int _{\Omega }u_t v ~dxdy+{\mathbb {B}}(u,v)=0,\quad \forall v\in {\mathbb {V}}_h^k. \end{aligned}$$
(14)
$$\begin{aligned}&\int _{\Omega }u(x,y,0)v(x,y)~dxdy = \int _{\Omega } U_0(x,y)v(x,y)~dxdy,\quad \forall v\in {\mathbb {V}}_h^k, \end{aligned}$$
(15)

Here, \(U_0(x,y)\) denotes the initial data and \({\mathbb {B}}(u,v)\) is given by

(16)

where \({\mathcal {E}}_h=\cup _{{K\in {\mathcal {T}}_h}}\partial K\) represents the set of all element edges.

Theorem 2

(Stability of nonsymmetric DDG method) Let the model parameter \(\sigma =-1\) in the scheme formulation Eq. (9) that is equipped with the numerical flux for the gradient of the numerical solution Eq. (8) and the numerical flux for the gradient of the test function Eq. (13). If \(\beta _0 \ge \beta _{0v}\), then we have

$$\begin{aligned} \int _{\Omega } u^2(x,y,T) ~dxdy \le \int _{\Omega } U^2_0(x,y) ~dxdy, \quad \forall T\ge 0. \end{aligned}$$

Proof

By setting \(u=v\), we integrate Eq. (14) with respect to time over (0, T).

$$\begin{aligned} \frac{1}{2}\int _{\Omega }u^2(x,y,T) ~dxdy+\int _0^T{\mathbb {B}}(u,u)~dt=\frac{1}{2}\int _{\Omega }u^2(x,y,0)~dxdy, \end{aligned}$$
(17)

where

(18)

Since A(u) is positive definite, we have \(A(u)\nabla u \cdot \nabla u=\nabla u^TA(u)\nabla u{\ge }0\) and thus,

$$\begin{aligned} \int _0^T\int _{\Omega } A(u)\nabla u \cdot \nabla u ~dxdy\,dt\ge 0, \quad \forall T\ge 0. \end{aligned}$$
(19)

Furthermore, we have that

$$\begin{aligned} \widehat{\nabla u} -\widetilde{\nabla u} = \frac{\beta _0^*}{h_e}\llbracket u \rrbracket {\textbf{n}}, \end{aligned}$$

where \(\beta _0^*=\beta _0-\beta _{0v}\ge 0\) by the assumptions of the theorem. Recalling that and A(u) is the positive definite, we can write

Thus, we have

(20)

Substituting Eqs. (19) and (20) into Eq. (18), and then Eq. (18) into Eq. (17), we obtain

$$\begin{aligned} \int _{\Omega } u^2(x,y,T) ~dxdy \le \int _{\Omega } u^2(x,y,0) ~dxdy, \quad \forall T\ge 0. \end{aligned}$$

Finally, we apply the Schwarz inequality to the initial projection Eq. (15) with \(v=u(x,y,0)\) and obtain

$$\begin{aligned} \int _{\Omega }u^2(x,y,0)~dxdy \le \int _{\Omega } U_0^2(x,y)~dxdy, \end{aligned}$$

which completes the proof. \(\square \)

Theorem 3

(Stability of symmetric DDG method) Assume that A(u) is a positive definite matrix with positive eigenvalues and there exists \(\gamma ,\gamma ^*\in {\mathbb {R}}^{+}\) such that the eigenvalues \(({\gamma _1(u),\gamma _2(u)})\) of A(u) lie between \([\gamma ,\gamma ^*]\) for \(\forall u\in {\mathbb {V}}_h^k\). Furthermore, let the model parameter \(\sigma =1\) in the scheme formulation Eq. (9) that is equipped with the numerical flux for the gradient of the numerical solution Eq. (8) and the numerical flux for the gradient of the test function Eq. (12). If \(\beta _0 \ge C(\beta _1)k^2\left( \frac{\gamma ^*}{\gamma }\right) ^2 \beta _1^2\), then we have

$$\begin{aligned} \begin{aligned}&\frac{1}{2}\int _{\Omega }u^2(x,y,T) ~dxdy + \left( 1-C(\beta _1)k^2\left( \frac{\gamma ^*}{\gamma }\right) ^2 \frac{\beta _1^2}{\beta _0} \right) \int _0^T\int _{\Omega } A(u)\nabla u \cdot \nabla u ~dxdy\,dt \\&\quad \le \frac{1}{2}\int _{\Omega }U^2_0(x,y) ~dxdy, \end{aligned} \end{aligned}$$

where \(C(\beta _1)=C_1/2\beta _1^2 + 2C_2>0\) and \(C_1,C_2>0\) are constants.

Proof

By setting \(u=v\), Eq. (14) becomes

$$\begin{aligned} \frac{1}{2}\frac{d}{dt}\int _{\Omega }u^2 ~dxdy+{\mathbb {B}}(u,u)=0, \end{aligned}$$
(21)

where

(22)

Note that

Therefore, invoking Lemmas 10 to 12, we get

This can be rewritten as

where \(C(\beta _1)=C_1/2\beta _1^2 + 2C_2\). Next, we use the assumption on the eigenvalues of A(u):

$$\begin{aligned} \sum _K \left\| \nabla u \right\| ^2_{L^2(K)}\le \frac{1}{\gamma }\sum _K \int _K \nabla u\cdot A(u)\nabla u ~dxdy, \end{aligned}$$

and obtain

(23)

Substituting this Eq. (23) into Eq. (22), and then, Eq. (22) into Eq. (21) gives

$$\begin{aligned} \frac{1}{2}\frac{d}{dt}\int _{\Omega }u^2 ~dxdy + \left( 1-C(\beta _1)k^2\left( \frac{\gamma ^*}{\gamma }\right) ^2 \frac{\beta _1^2}{\beta _0} \right) \int _{\Omega } A(u)\nabla u \cdot \nabla u ~dxdy \le 0. \end{aligned}$$
(24)

Lastly, we integrate Eq. (24) over (0, T) and recall

$$\begin{aligned} \int _{\Omega }u^2(x,y,0)~dxdy \le \int _{\Omega } U_0^2(x,y)~dxdy, \end{aligned}$$

from the proof of Theorem 2. This completes the proof provided that we have \(\beta _0 \ge C(\beta _1)k^2\left( \frac{\gamma ^*}{\gamma }\right) ^2 \beta _1^2\). \(\square \)

Theorem 4

(Stability of DDGIC method) Assume that A(u) is a positive definite matrix with positive eigenvalues and there exists \(\gamma ,\gamma ^*\in {\mathbb {R}}^{+}\) such that the eigenvalues \(({\gamma _1(u),\gamma _2(u)})\) of A(u) lie between \([\gamma ,\gamma ^*]\) for \(\forall u\in {\mathbb {V}}_h^k\). Furthermore, let the model parameter \(\sigma =1\) in the scheme formulation Eq. (9) that is equipped with the numerical flux for the gradient of the numerical solution Eq. (8) and the numerical flux for the gradient of the test function Eq. (11). If \(\beta _0 \ge C(\beta _1)k^2\left( \frac{\gamma ^*}{\gamma }\right) ^2 \beta _1^2\), then we have

$$\begin{aligned} \begin{aligned}&\frac{1}{2}\int _{\Omega }u^2(x,y,T) ~dxdy + \left( 1-C(\beta _1)k^2\left( \frac{\gamma ^*}{\gamma }\right) ^2 \frac{\beta _1^2}{\beta _0} \right) \int _0^T\int _{\Omega } A(u)\nabla u \cdot \nabla u ~dxdy\,dt \\&\quad \le \frac{1}{2}\int _{\Omega }U^2_0(x,y) ~dxdy. \end{aligned} \end{aligned}$$

where \(C(\beta _1)=C_1/\beta _1^2 + C_2>0\) and \(C_1,C_2>0\) are constants.

Proof

The proof is very similar to the proof of Theorem 3. Therefore, we will only lay out the sketch of the proof. By setting \(u=v\), Eq. (14) becomes

$$\begin{aligned} \frac{1}{2}\frac{d}{dt}\int _{\Omega }u^2 ~dxdy+{\mathbb {B}}(u,u)=0, \end{aligned}$$

where

Note that

As in the proof of Theorem 3, we invoke Lemmas 10 to 12:

where \(C(\beta _1)=C_1/\beta _1^2 + C_2\). Then, following the same lines of steps as in the proof of Theorem 3 will lead to the desired result. \(\square \)

5 Numerical Examples

In this section, the results of several numerical examples are presented. A set of uniform triangular meshes is used to discretize the computational domain \(\Omega \) as shown in Fig. 2. In all simulations, we set \(\beta _0=(k+1)^2\), \(\beta _{0v}=\frac{\beta _0}{2}\) and \(\beta _1=\frac{1}{2k(k+1)}\) in the numerical flux definitions. The time integration is performed by a third order explicit strong stability-preserving (SSP) Runge–Kutta scheme [42]. Unless stated otherwise, the time step size \(\Delta t\) is determined by the following Courant-Friedrichs-Levy (CFL) rule

$$\begin{aligned} \mu \frac{\Delta t}{\min _K{h^2_K}}<\lambda , \end{aligned}$$

where \(\lambda =\frac{1}{2k+1}\) is the CFL number taken for \(P_k\) polynomials (refer to Table 2.2 in [43]). In this paper, unless stated, we choose a uniform CFL value of \(\lambda =0.1\) for all \(P_2\), \(P_3\) and \(P_4\) approximations. Here \(\mu \) is the diffusion constant. Since positivity-preserving limiter is used in Example 5.5 and Example 5.6, a more restrictive time step size is applied through all numerical tests

$$\begin{aligned} \mu \frac{\Delta t}{\min _K{h^2_K}}<\omega _k\,\lambda , \end{aligned}$$
(25)

where \(\omega _k\) depending on the degree k is the minimum quadrature weight to guarantee positivity [44]. We highlight that such polynomial point values used to evaluate positivity limiter are different to those in [37, 39]. Nevertheless, the quadrature points [44] applied to Example 5.5 and Example 5.6 for positivity all work well. The focus of the article is to verify the effectiveness of the new numerical flux formula and the accuracy of the new direct DG methods, we adapt a small time step size (25) to reduce the errors in time and leave spatial discretization errors being the dominant error.

The convergence rates are reported in the \(L_2\) and \(L_\infty \) norms. To do that, we employ the \((k+1)th\) order quadrature rule to calculate the \(L_2\)-error while the \(L_\infty \)-errors are measured using 361 points generated by the same quadrature rule in each element.

Fig. 2
figure 2

The set of structured meshes with \(h=L/5\), where L is the square domain size

Example 5.1

In this example, we consider the heat equation

$$\begin{aligned} \frac{\partial U}{\partial t}=\mu \Delta U, \end{aligned}$$

with periodic boundary conditions on \(\Omega =[0,1]\times [0,1]\) where \(\mu \) is a constant diffusion coefficient. Note that the diffusion matrix A(u) is given as

$$\begin{aligned} A(u)=\mu {\mathbb {I}}, \end{aligned}$$

where \({\mathbb {I}}\in {\mathbb {R}}^{2\times 2}\) is the identity matrix. The initial condition for this example is obtained from the following exact solution at \(t=0\)

$$\begin{aligned} U(x,y,t)=e^{-8\pi ^2\mu t}\cos \left( 2\pi (x+y)\right) . \end{aligned}$$

In this example, we set \(\mu =0.01\) and carry out direct DG approximations up to \(T=1\). In addition, all quadrature rules are exact up to polynomials of degree \(2k+1\). On the coarsest mesh h, time step values of \(\Delta t=9.21\times 10^{-4},\,2.77\times 10^{-4}\) and \(1.0\times 10^{-4}\) for \(k=2,3,4\) are applied. We highlight that these small time step sizes are used in all accuracy tests for linear problems.

The \(L_2\) and \(L_\infty \) errors are listed in Tables 1 and 2, respectively. We observe that optimal \((k+1)th\) order convergence is obtained by the DDGIC and symmetric DDG methods. For nonsymmetric DDG method, a slight order loss is observed with even degree polynomial approximations, i.e. \(k=2\) and \(k=4\). Recall in [4] for one-dimensional problems and on uniform mesh, optimal convergence order is observed for the nonsymmetric DDG method.

Table 1 \(L_2\) errors for Example 5.1 at \(T=1\)
Table 2 \(L_\infty \) errors for Example 5.1 at \(T=1\)

Example 5.2

In this numerical test, we now consider an anisotropic diffusion equation with mixed derivatives

$$\begin{aligned} \frac{\partial U}{\partial t}=\mu \left( 2U_{xx}+3U_{xy}+3U_{yy}\right) , \end{aligned}$$

with periodic boundary conditions on \(\Omega =[0,1]\times [0,1]\). Note that this equation is still linear, i.e. diffusion matrix A(u) is a constant coefficient matrix. Moreover, it can be written in a nonsymmetric form

$$\begin{aligned} A(u)= \mu \begin{pmatrix} 2 &{} 1 \\ 2 &{} 3 \end{pmatrix}. \end{aligned}$$

A nonsymmetric diffusion matrix is chosen to see how the new DDG methods would behave in such a setting. The initial condition is set from the following exact solution at \(t=0\)

$$\begin{aligned} U(x,y,t)=e^{-32\pi ^2\mu t}\cos (2\pi y)\cos (4\pi x-2\pi y). \end{aligned}$$
(26)

As in the previous example, we set \(\mu =0.01\) and output the approximations at \(T=1\), and all quadrature rules are exact up to polynomials of degree \(2k+1\).

The \(L_2\) and \(L_\infty \) errors are listed in Tables 3 and 4, respectively. The DDGIC and symmetric DDG methods behave similarly in all cases with optimal convergence order obtained. The nonsymmetric DDG method demonstrates optimal \((k+1)\) convergence only for \(k=3\) while it loses an order for even degree polynomials, which is clearer compared to Example 5.1.

Remark 5

This problem has been also tested equivalently with the diffusion matrix

$$\begin{aligned} A(u)= \mu \begin{pmatrix} 2 &{} 1.5 \\ 1.5 &{} 3 \end{pmatrix}, \end{aligned}$$

which is symmetric-positive definite. We note that the performance of the new DDG methods does not change with this diffusion matrix and the same results in Tables 3 and 4 are obtained. Therefore, those results are not reported.

Table 3 \(L_2\) errors for Example 5.2 at \(T=1\)
Table 4 \(L_\infty \) errors for Example 5.2 at \(T=1\)

Example 5.3

In this example, we consider the porous medium equation

$$\begin{aligned} \frac{\partial U}{\partial t}=\mu \Delta (U^\gamma ), \end{aligned}$$
(27)

where \(\gamma \) is a model parameter. Note that this equation models a nonlinear diffusion process for \(\gamma \ne 1\), i.e. coefficients of the diffusion matrix A(u) are functions of u:

$$\begin{aligned} A(u)= \mu \begin{pmatrix} \gamma u^{\gamma -1} &{} 0 \\ 0 &{} \gamma u^{\gamma -1} \end{pmatrix}=\mu \gamma u^{\gamma -1}{\mathbb {I}}, \end{aligned}$$

where \({\mathbb {I}}\in {\mathbb {R}}^{2\times 2}\) is the identity matrix. The diffusion matrix is diagonal, but for \(\gamma >1\), Eq. (27) becomes highly nonlinear. In order to assess the performance of the new DDG methods on a highly nonlinear diffusion problem and measure the convergence rate, we solve Eq. (27) on \(\Omega =[0,1]\times [0,1]\) with \(\gamma =3\) and employ the method of manufactured solutions by enforcing the solution

$$\begin{aligned} U(x,y,t)=e^{-8\pi ^2\mu t}\sin (2\pi (x+y)). \end{aligned}$$

The initial condition for this problem is obtained from this manufactured solution at \(t=0\). Also, note that the boundary conditions are periodic. Furthermore, we set \(\mu =0.01\) and conduct approximations to \(T=1\), and employ quadrature rules that are exact up to polynomials of degree \(4k+1\). On the coarsest mesh h, time step values of \(\Delta t=10^{-4},\,1.94\times 10^{-5}\) and \(5.31\times 10^{-6}\) for \(k=2,3,4\) are applied, respectively.

The \(L_2\) and \(L_\infty \) errors are listed in Tables 5 and 6. We observe that all DDG methods converge with optimal \((k+1)th\) order accuracy for all reported cases. Although this problem is nonlinear, the optimal convergence might be due to the diagonal structure of the nonlinear diffusion matrix A(u).

Table 5 \(L_2\) errors for Example 5.3 at \(T=1\)
Table 6 \(L_\infty \) errors for Example 5.3 at \(T=1\)

Example 5.4

In this example, we consider the same equation as in Example 5.3 but with the model coefficient \(\gamma =2\) on \(\Omega =[-10,10]\times [-10,10]\). Here, we investigate the performance of the new DDG methods for two initially disconnected, merging bumps which are defined by the following:

$$\begin{aligned} U_0(x,y)= {\left\{ \begin{array}{ll} e^{\frac{-1}{6-(x-2)^2-(y+2)^2}}, &{} (x-2)^2-(y+2)^2<6 \\ e^{\frac{-1}{6-(x+2)^2-(y-2)^2}}, &{} (x+2)^2-(y-2)^2<6 \\ 0, &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

Note that \(U(x,y,t)=0\) on \(\partial \Omega \) for \(t\ge 0\). In this case, we solve the problem on h/16 mesh along with \(\mu =1\) and up to \(T=4\). In Fig. 3, we present a third order (\(k=2\)) symmetric DDG solution. The solutions corresponding to other DDG versions are similar, hence they are not included. We observe that bumps are diffused quickly and merged with finite time. The results are in good agreement with those in literature [3, 4, 45].

Fig. 3
figure 3

The contour plot corresponding to the third (\(k=2\)) order symmetric DDG solution for Example 5.4. 17 equally spaced contours are used between 0 and 0.8

Example 5.5

In this example, we continue to study the same equation as in Example 5.3 but with the model coefficient \(\gamma =2\) on \(\Omega =[-1,1]\times [-1,1]\). Zero boundary condition \(U(x,y,t)=0\) on \(\partial \Omega \) for \(t\ge 0\) is applied and the initial condition is defined as

$$\begin{aligned} U_0(x,y)= {\left\{ \begin{array}{ll} 1, &{} (x,y)\in [-\frac{1}{2},\frac{1}{2}]\times [-\frac{1}{2},\frac{1}{2}] \\ 0, &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

We set \(\mu =1\), solve the problem on h/16 mesh and run the simulations to \(T=0.005\).

Since the initial condition is discontinuous, a maximum-principle-satisfying (MPS) limiter is employed to guarantee the stability of the numerical solutions obtained by new DDG methods. The limiter in [39], which is similar to the linear scaling limiter in [46], is implemented to keep the numerical solution in \(0\le u(x,y,t) \le 1\) for \(t\ge 0\). Note that the CFL condition Eq. (25) is still in use, and the DDG parameters \(\beta _0\) and \(\beta _1\) are kept the same.

In Fig. 4, the numerical solution obtained by the DDGIC method for a third order approximation (\(k=2\)) is shown. We observe that the numerical solution diffuses out smoothly in a stable manner and is in good agreement with Example 5.7 of [47].

Fig. 4
figure 4

The third (\(k=2\)) order numerical solution obtained by DDGIC with MPS limiter for Example 5.4 at \(T=0.005\). a The solution along \(y=0\), b surface plot. 19 equally spaced contour levels are used between 0 and 1

Example 5.6

In this example, we consider

$$\begin{aligned} \frac{\partial U}{\partial t}=\mu \left( 2U_{xx}+3(U^{1.5})_{yy}\right) +U^2, \end{aligned}$$
(28)

with the initial condition \(U_0(x,y)=200\sin {(\pi x)}\sin {(\pi y)}\) on \(\Omega =[0,1]\times [0,1]\). We apply the homogeneous Dirichlet boundary condition. Due to the last term on the right-hand side of Eq. (28), the solution eventually blows up. If a positivity-preserving limiter is not used, the numerical solution immediately becomes negative in the region near the initial bump. This leads to an execution error due to square-root of a negative number. Therefore, the linear scaling limiter of [39] (similar to the limiter in [46]) is employed to maintain the stability of the numerical approximation. However, the limiter’s lower bound is set to 0 to preserve the positivity of the numerical solution. Furthermore, since the solution does not have an upper bound due to the source term, the CFL condition in Eq. (25) is not able to maintain the stability of the nonlinear diffusion process. Therefore, we follow [48] and modify Eq. (25) as

$$\begin{aligned} \mu \frac{\Delta t}{\min _K{h^2_K}}<\min {\left( \omega _k\lambda ,\frac{1}{\max _K{u}}\right) }. \end{aligned}$$

The modified CFL condition adaptively decreases \(\Delta t\) while the solution u gets bigger. As in the previous example, the DDG parameters \(\beta _0,\beta _1\) are kept the same. The h/16 mesh is used to solve this problem. We set the CFL value as \(\lambda =0.01\) and choose \(\mu =1\), and the quadrature rules are exact up to polynomials of degree \((2k+1)th\). As for the stopping criterion, we follow [48] and take \(\Delta t<10^{-13}\). However, it is worth emphasizing that the focus of this paper is not to design a positivity-preserving limiter. Instead, we simply explore the performance of the new DDG methods in computationally challenging cases. We follow [49] and restart the Runge-Kutta time step with \(\Delta t/2\) when it is no longer possible to maintain the positivity of the numerical solution in one or more cells.

For a third (\(k=2\)) order solution, we observe that the restart algorithm is only activated at the last time-step at \(t=1.8155\times 10^{-2}\) for all DDG versions. However, it turns out that the time step becomes smaller than the machine precision \(\epsilon \), i.e. \(\Delta t<\epsilon \), during the restart procedure. This means that it is no longer possible to continue time-stepping without violating the positivity in one or more cells. Therefore, we denote \(t=1.81552\times 10^{-2}\) as the blow-up time. Note that this value is slightly smaller than the blow-up time \(t=1.82378\times 10^{-2}\) reported in [48]. Thus, we obtain slightly lower values for \(\max _K{u_K}\). In Fig. 5, we show the simulation for a third order (\(k=2\)) numerical solution obtained by the DDGIC method when the solution blows up at \(t=1.81552\times 10^{-2}\). Since the results obtained by other DDG versions are similar, they are not shown. We observe that the numerical solution does not have oscillations and qualitatively similar to that in [48].

Fig. 5
figure 5

The third (\(k=2\)) order numerical solution obtained by DDGIC with MPS limiter for Example 5.6 at \(T=1.81552\times 10^{-2}\)

6 Concluding Remarks

In this paper, we have unified the new framework for direct discontinuous Galerkin (DDG) methods by extending the new DDGIC method [41] to the symmetric and the nonsymmetric DDG versions. Unlike their original counterparts, the new DDG methods do not require evaluating an antiderivative of the nonlinear diffusion matrix. By constructing a new direction vector at each element interface, a linear numerical flux is used regardless of the problem type. Furthermore, the nonlinear linear stability theory of the new methods has been developed and several numerical experiments have been conducted to perform the error analysis. In all numerical examples, the DDGIC and symmetric DDG methods demonstrated optimal \((k+1)th\) order convergence and their performances were assessed to be equivalent. On the other hand, the performance of the nonsymmetric DDG method varied in all numerical examples. The nonsymmetric DDG method achieved optimal \((k+1)th\) order convergence for odd degree polynomials in all examples while an order loss was observed with the even degree polynomials except for the cases with diagonal diffusion matrices. In short, a high-order accuracy is achieved by all new DDG methods. However, the DDGIC and symmetric DDG methods were found to be superior to the nonsymmetric version.