# Discontinuous Galerkin method

In applied mathematics, discontinuous Galerkin methods (DG methods) form a class of numerical methods for solving differential equations. They combine features of the finite element and the finite volume framework and have been successfully applied to hyperbolic, elliptic, parabolic and mixed form problems arising from a wide range of applications. DG methods have in particular received considerable interest for problems with a dominant first-order part, e.g. in electrodynamics, fluid mechanics and plasma physics. Indeed, the solutions of such problems may involve strong gradients (and even discontinuities) so that classical finite element methods fail, while finite volume methods are restricted to low order approximations.

Discontinuous Galerkin methods were first proposed and analyzed in the early 1970s as a technique to numerically solve partial differential equations. In 1973 Reed and Hill introduced a DG method to solve the hyperbolic neutron transport equation.

The origin of the DG method for elliptic problems cannot be traced back to a single publication as features such as jump penalization in the modern sense were developed gradually. However, among the early influential contributors were Babuška, J.-L. Lions, Joachim Nitsche and Miloš Zlámal. DG methods for elliptic problems were already developed in a paper by Garth Baker in the setting of 4th order equations in 1977. A more complete account of the historical development and an introduction to DG methods for elliptic problems is given in a publication by Arnold, Brezzi, Cockburn and Marini. A number of research directions and challenges on DG methods are collected in the proceedings volume edited by Cockburn, Karniadakis and Shu.

## Overview

Much like the continuous Galerkin (CG) method, the discontinuous Galerkin (DG) method is a finite element method formulated relative to a weak formulation of a particular model system. Unlike traditional CG methods that are conforming, the DG method works over a trial space of functions that are only piecewise continuous, and thus often comprise more inclusive function spaces than the finite-dimensional inner product subspaces utilized in conforming methods.

As an example, consider the continuity equation for a scalar unknown ${\displaystyle \rho }$ in a spatial domain ${\displaystyle \Omega }$ without "sources" or "sinks" :

${\displaystyle {\frac {\partial \rho }{\partial t}}+\nabla \cdot \mathbf {J} =0,}$

where ${\displaystyle \mathbf {J} }$ is the flux of ${\displaystyle \rho }$.

Now consider the finite-dimensional space of discontinuous piecewise polynomial functions over the spatial domain ${\displaystyle \Omega }$ restricted to a discrete triangulation ${\displaystyle \Omega _{h}}$, written as

${\displaystyle S_{h}^{p}(\Omega _{h})=\{v_{|\Omega _{e_{i}}}\in P^{p}(\Omega _{e_{i}}),\ \ \forall \Omega _{e_{i}}\in \Omega _{h}\}}$

for ${\displaystyle P^{p}(\Omega _{e_{i}})}$ the space of polynomials with degrees less than or equal to ${\displaystyle p}$ over element ${\displaystyle \Omega _{e_{i}}}$ indexed by ${\displaystyle i}$. Then for finite element shape functions ${\displaystyle N_{j}\in P^{p}}$ the solution is represented by

${\displaystyle \rho _{h}^{i}=\sum _{j=1}^{\text{dofs}}\rho _{j}^{i}(t)N_{j}^{i}({\boldsymbol {x}}),\quad \forall {\boldsymbol {x}}\in \Omega _{e_{i}}.}$

Then similarly choosing a test function

${\displaystyle \varphi _{h}^{i}({\boldsymbol {x}})=\sum _{j=1}^{\text{dofs}}\varphi _{j}^{i}N_{j}^{i}({\boldsymbol {x}}),\quad \forall {\boldsymbol {x}}\in \Omega _{e_{i}},}$

multiplying the continuity equation by ${\displaystyle \varphi _{h}^{i}}$ and integrating by parts in space, the semidiscrete DG formulation becomes:

${\displaystyle {\frac {d}{dt}}\int _{\Omega _{e_{i}}}\rho _{h}^{i}\varphi _{h}^{i}\,d{\boldsymbol {x}}+\int _{\partial \Omega _{e_{i}}}\varphi _{h}^{i}\mathbf {J} _{h}\cdot {\boldsymbol {n}}\,d{\boldsymbol {x}}=\int _{\Omega _{e_{i}}}\mathbf {J} _{h}\cdot \nabla \varphi _{h}^{i}\,d{\boldsymbol {x}}.}$

## Scalar hyperbolic conservation law

A scalar hyperbolic conservation law is of the form

{\displaystyle {\begin{aligned}\partial _{t}u+\partial _{x}f(u)&=0\quad {\text{for}}\quad t>0,\,x\in \mathbb {R} \\u(0,x)&=u_{0}(x)\,,\end{aligned}}}

where one tries to solve for the unknown scalar function ${\displaystyle u\equiv u(t,x)}$, and the functions ${\displaystyle f,u_{0}}$ are typically given.

### Space discretization

The ${\displaystyle x}$-space will be discretized as

${\displaystyle \mathbb {R} =\bigcup _{k}I_{k}\,,\quad I_{k}:=\left(x_{k},x_{k+1}\right)\quad {\text{for}}\quad x_{k}

Furthermore, we need the following definitions

${\displaystyle h_{k}:=|I_{k}|\,,\quad h:=\sup _{k}h_{k}\,,\quad {\hat {x}}_{k}:=x_{k}+{\frac {h_{k}}{2}}\,.}$

### Basis for function space

We derive the basis representation for the function space of our solution ${\displaystyle u}$. The function space is defined as

${\displaystyle S_{h}^{p}:=\left\lbrace v\in L^{2}(\mathbb {R} ):v{\Big |}_{I_{k}}\in \Pi _{p}\right\rbrace \quad {\text{for}}\quad p\in \mathbb {N} _{0}\,,}$

where ${\displaystyle {v|}_{I_{k}}}$ denotes the restriction of ${\displaystyle v}$ onto the interval ${\displaystyle I_{k}}$, and ${\displaystyle \Pi _{p}}$ denotes the space of polynomials of maximal degree ${\displaystyle p}$. The index ${\displaystyle h}$ should show the relation to an underlying discretization given by ${\displaystyle \left(x_{k}\right)_{k}}$. Note here that ${\displaystyle v}$ is not uniquely defined at the intersection points ${\displaystyle (x_{k})_{k}}$.

At first we make use of a specific polynomial basis on the interval ${\displaystyle [-1,1]}$, the Legendre polynomials ${\displaystyle (P_{n})_{n\in \mathbb {N} _{0}}}$, i.e.,

${\displaystyle P_{0}(x)=1\,,\quad P_{1}(x)=x\,,\quad P_{2}(x)={\frac {1}{2}}(3x^{2}-1)\,,\quad \dots }$

Note especially the orthogonality relations

${\displaystyle \left\langle P_{i},P_{j}\right\rangle _{L^{2}([-1,1])}={\frac {2}{2i+1}}\delta _{ij}\quad \forall \,i,j\in \mathbb {N} _{0}\,.}$

Transformation onto the interval ${\displaystyle [0,1]}$, and normalization is achieved by functions ${\displaystyle (\varphi _{i})_{i}}$

${\displaystyle \varphi _{i}(x):={\sqrt {2i+1}}P_{i}(2x-1)\quad {\text{for}}\quad x\in [0,1]\,,}$

which fulfill the orthonormality relation

${\displaystyle \left\langle \varphi _{i},\varphi _{j}\right\rangle _{L^{2}([0,1])}=\delta _{ij}\quad \forall \,i,j\in \mathbb {N} _{0}\,.}$

Transformation onto an interval ${\displaystyle I_{k}}$ is given by ${\displaystyle \left({\bar {\varphi }}_{ki}\right)_{i}}$

${\displaystyle {\bar {\varphi }}_{ki}:={\frac {1}{\sqrt {h_{k}}}}\varphi _{i}\left({\frac {x-x_{k}}{h_{k}}}\right)\quad {\text{for}}\quad x\in I_{k}\,,}$

which fulfill

${\displaystyle \left\langle {\bar {\varphi }}_{ki},{\bar {\varphi }}_{kj}\right\rangle _{L^{2}(I_{k})}=\delta _{ij}\quad \forall \,i,j\in \mathbb {N} _{0}\forall \,k\,.}$

For ${\displaystyle L^{\infty }}$-normalization we define ${\displaystyle \varphi _{ki}:={\sqrt {h_{k}}}{\bar {\varphi }}_{ki}}$, and for ${\displaystyle L^{1}}$-normalization we define ${\displaystyle {\tilde {\varphi }}_{ki}:={\frac {1}{\sqrt {h_{k}}}}{\bar {\varphi }}_{ki}}$, s.t.

${\displaystyle \|\varphi _{ki}\|_{L^{\infty }(I_{k})}=\|\varphi _{i}\|_{L^{\infty }([0,1])}=:c_{i,\infty }\quad {\text{and}}\quad \|{\tilde {\varphi }}_{ki}\|_{L^{1}(I_{k})}=\|\varphi _{i}\|_{L^{1}([0,1])}=:c_{i,1}\,.}$

Finally, we can define the basis representation of our solutions ${\displaystyle u_{h}}$

{\displaystyle {\begin{aligned}u_{h}(t,x):=&\sum _{i=0}^{p}u_{ki}(t)\varphi _{ki}(x)\quad {\text{for}}\quad x\in (x_{k},x_{k+1})\\u_{ki}(t)=&\left\langle u_{h}(t,\cdot ),{\tilde {\varphi }}_{ki}\right\rangle _{L^{2}(I_{k})}\,.\end{aligned}}}

Note here, that ${\displaystyle u_{h}}$ is not defined at the interface positions.

Besides, prism bases are employed for planar-like structures, and are capable for 2-D/3-D hybridation.

### DG-scheme

The conservation law is transformed into its weak form by multiplying with test functions, and integration over test intervals

{\displaystyle {\begin{aligned}\partial _{t}u+\partial _{x}f(u)&=0\\\Rightarrow \quad \left\langle \partial _{t}u,v\right\rangle _{L^{2}(I_{k})}+\left\langle \partial _{x}f(u),v\right\rangle _{L^{2}(I_{k})}&=0\quad {\text{for}}\quad \forall \,v\in S_{h}^{p}\\\Leftrightarrow \quad \left\langle \partial _{t}u,{\tilde {\varphi }}_{ki}\right\rangle _{L^{2}(I_{k})}+\left\langle \partial _{x}f(u),{\tilde {\varphi }}_{ki}\right\rangle _{L^{2}(I_{k})}&=0\quad {\text{for}}\quad \forall \,k\;\forall \,i\leq p\,.\end{aligned}}}

By using partial integration one is left with

{\displaystyle {\begin{aligned}{\frac {\mathrm {d} }{\mathrm {d} t}}u_{ki}(t)+f(u(t,x_{k+1})){\tilde {\varphi }}_{ki}(x_{k+1})-f(u(t,x_{k})){\tilde {\varphi }}_{ki}(x_{k})-\left\langle f(u(t,\,\cdot \,)),{\tilde {\varphi }}_{ki}'\right\rangle _{L^{2}(I_{k})}=0\quad {\text{for}}\quad \forall \,k\;\forall \,i\leq p\,.\end{aligned}}}

The fluxes at the interfaces are approximated by numerical fluxes ${\displaystyle g}$ with

${\displaystyle g_{k}:=g(u_{k}^{-},u_{k}^{+})\,,\quad u_{k}^{\pm }:=u(t,x_{k}^{\pm })\,,}$

where ${\displaystyle u_{k}^{\pm }}$ denotes the left- and right-hand sided limits. Finally, the DG-Scheme can be written as

{\displaystyle {\begin{aligned}{\frac {\mathrm {d} }{\mathrm {d} t}}u_{ki}(t)+g_{k+1}{\tilde {\varphi }}_{ki}(x_{k+1})-g_{k}{\tilde {\varphi }}_{ki}(x_{k})-\left\langle f(u(t,\,\cdot \,)),{\tilde {\varphi }}_{ki}'\right\rangle _{L^{2}(I_{k})}=0\quad {\text{for}}\quad \forall \,k\;\forall \,i\leq p\,.\end{aligned}}}

## Scalar elliptic equation

A scalar elliptic equation is of the form

{\displaystyle {\begin{aligned}-\partial _{xx}u&=f(x)\quad {\text{for}}\quad x\in (a,b)\\u(x)&=g(x)\,\quad {\text{for}}\,\quad x=a,b\end{aligned}}}

This equation is the steady-state heat equation, where ${\displaystyle u}$ is the temperature. Space discretization is the same as above. We recall that the interval ${\displaystyle (a,b)}$ is partitioned into ${\displaystyle N+1}$ intervals of length ${\displaystyle h}$.

We introduce jump ${\displaystyle [{}\cdot {}]}$ and average ${\displaystyle \{{}\cdot {}\}}$ of functions at the node ${\displaystyle x_{k}}$:

${\displaystyle [v]{\Big |}_{x_{k}}=v(x_{k}^{+})-v(x_{k}^{-}),\quad \{v\}{\Big |}_{x_{k}}=0.5(v(x_{k}^{+})+v(x_{k}^{-}))}$

The interior penalty discontinuous Galerkin (IPDG) method is: find ${\displaystyle u_{h}}$ satisfying

${\displaystyle A(u_{h},v_{h})+A_{\partial }(u_{h},v_{h})=\ell (v_{h})+\ell _{\partial }(v_{h})}$

where the bilinear forms ${\displaystyle A}$ and ${\displaystyle A_{\partial }}$ are

${\displaystyle A(u_{h},v_{h})=\sum _{k=1}^{N+1}\int _{x_{k-1}}^{x_{k}}\partial _{x}u_{h}\partial _{x}v_{h}-\sum _{k=1}^{N}\{\partial _{x}u_{h}\}_{x_{k}}[v_{h}]_{x_{k}}+\varepsilon \sum _{k=1}^{N}\{\partial _{x}v_{h}\}_{x_{k}}[u_{h}]_{x_{k}}+{\frac {\sigma }{h}}\sum _{k=1}^{N}[u_{h}]_{x_{k}}[v_{h}]_{x_{k}}}$

and

${\displaystyle A_{\partial }(u_{h},v_{h})=\partial _{x}u_{h}(a)v_{h}(a)-\partial _{x}u_{h}(b)v_{h}(b)-\varepsilon \partial _{x}v_{h}(a)u_{h}(a)+\varepsilon \partial _{x}v_{h}(b)u_{h}(b)+{\frac {\sigma }{h}}{\big (}u_{h}(a)v_{h}(a)+u_{h}(b)v_{h}(b){\big )}}$

The linear forms ${\displaystyle \ell }$ and ${\displaystyle \ell _{\partial }}$ are

${\displaystyle \ell (v_{h})=\int _{a}^{b}fv_{h}}$

and

${\displaystyle \ell _{\partial }(v_{h})=-\varepsilon \partial _{x}v_{h}(a)g(a)+\varepsilon \partial _{x}v_{h}(b)g(b)+{\frac {\sigma }{h}}{\big (}g(a)v_{h}(a)+g(b)v_{h}(b){\big )}}$

The penalty parameter ${\displaystyle \sigma }$ is a positive constant. Increasing its value will reduce the jumps in the discontinuous solution. The term ${\displaystyle \varepsilon }$ is chosen to be equal to ${\displaystyle -1}$ for the symmetric interior penalty Galerkin method; it is equal to ${\displaystyle +1}$ for the non-symmetric interior penalty Galerkin method.

## Direct discontinuous Galerkin method

The direct discontinuous Galerkin (DDG) method is a new discontinuous Galerkin method for solving diffusion problems. In 2009, Liu and Yan first proposed the DDG method for solving diffusion equations.[1][2] The advantages of this method compared with Discontinuous Galerkin method is that the direct discontinuous Galerkin method derives the numerical format by directly taking the numerical flux of the function and the first derivative term without introducing intermediate variables. We still can get a reasonable numerical results by using this method, and the derivation process is more simple, the amount of calculation is greatly reduced.

The direct discontinuous finite element method is a branch of the Discontinuous Galerkin methods. It mainly includes transforming the problem into variational form, regional unit splitting, constructing basis functions, forming and solving discontinuous finite element equations, and convergence and error analysis.

For example, consider a nonlinear diffusion equation, which is one-dimensional:

${\displaystyle U_{t}-{(a(U)\cdot U_{x})}_{x}=0\ \ in\ (0,1)\times (0,T)}$, in which ${\displaystyle U(x,0)=U_{0}(x)\ \ on\ (0,1)}$

### Space discretization

Firstly, define ${\displaystyle \left\{I_{j}=\left(x_{j-{\frac {1}{2}}},\ x_{j+{\frac {1}{2}}}\right),j=1...N\right\}}$, and ${\displaystyle \Delta x_{j}=x_{j+{\frac {1}{2}}}-x_{j-{\frac {1}{2}}}}$. Therefore we have done the space discretization of ${\displaystyle x}$. Also, define ${\displaystyle \Delta x=\max _{1\leq j.

We want to find an approximation ${\displaystyle u}$ to ${\displaystyle U}$ such that ${\displaystyle \forall t\in \left[0,T\right]}$, ${\displaystyle u\in \mathbb {V} _{\Delta x}}$,

${\displaystyle \mathbb {V} _{\Delta x}:=\left\{v\in L^{2}\left(0,1\right):{v|}_{I_{j}}\in P^{k}\left(I_{j}\right),\ j=1,...,N\right\}}$, ${\displaystyle P^{k}\left(I_{j}\right)}$ is the polynomials space in ${\displaystyle I_{j}}$ with degree at most ${\displaystyle k}$.

#### Formulation of the scheme

Flux: ${\displaystyle h:=h\left(U,U_{x}\right)=a\left(U\right)U_{x}}$.

${\displaystyle U}$: the exact solution of the equation.

Multiply the equation with a smooth function ${\displaystyle v\in H^{1}\left(0,1\right)}$ so that we obtain the following equations:

${\displaystyle \int _{I_{j}}U_{t}vdx-h_{j+{\frac {1}{2}}}v_{j+{\frac {1}{2}}}+h_{j-{\frac {1}{2}}}v_{j-{\frac {1}{2}}}+\int a\left(U\right)U_{x}v_{x}dx=0}$,

${\displaystyle \int _{I_{j}}U\left(x,0\right)v\left(x\right)dx=\int _{I_{j}}U_{0}\left(x\right)v\left(x\right)dx}$

Here ${\displaystyle v}$ is arbitrary, the exact solution ${\displaystyle U}$ of the equation is replaced by the approximate solution ${\displaystyle u}$, that is to say, the numerical solution we need is obtained by solving the differential equations.

### The numerical flux

Choosing a proper numerical flux is critical for the accuracy of DDG method.

The numerical flux needs to satisfy the following conditions:

♦ It is consistent with ${\displaystyle h={b\left(u\right)}_{x}=a\left(u\right)u_{x}}$

♦ The numerical flux is conservative in the single value on ${\displaystyle x_{j+{\frac {1}{2}}}}$.

♦ It has the ${\displaystyle L^{2}}$-stability;

♦ It can improve the accuracy of the method.

Thus, a general scheme for numerical flux is given:

${\displaystyle {\widehat {h}}=D_{x}b(u)=\beta _{0}{\frac {\left[b\left(u\right)\right]}{\Delta x}}+{\overline {{b\left(u\right)}_{x}}}+\sum _{m=1}^{\frac {k}{2}}\beta _{m}{\left(\Delta x\right)}^{2m-1}\left[\partial _{x}^{2m}b\left(u\right)\right]}$

In this flux, ${\displaystyle k}$ is the maximum order of polynomials in two neighboring computing units. ${\displaystyle \left[\cdot \right]}$ is the jump of a function. Note that in non-uniform grids, ${\displaystyle \Delta x}$ should be ${\displaystyle \left({\frac {\Delta x_{j}+\Delta x_{j+1}}{2}}\right)}$ and ${\displaystyle {\frac {1}{N}}}$ in uniform grids.

### Error estimates

Denote that the error between the exact solution ${\displaystyle U}$ and the numerical solution ${\displaystyle u}$ is ${\displaystyle e=u-U}$ .

We measure the error with the following norm:

${\displaystyle \left|\left|\left|v(\cdot ,t)\right|\right|\right|={\left(\int _{0}^{1}v^{2}dx+\left(1-\gamma \right)\int _{0}^{t}\sum _{j=1}^{N}\int _{I_{j}}v_{x}^{2}dxd\tau +\alpha \int _{0}^{t}\sum _{j=1}^{N}{\left[v\right]}^{2}/\Delta x\cdot d\tau \right)}^{0.5}}$

and we have ${\displaystyle \left|\left|\left|U(\cdot ,T)\right|\right|\right|\leq \left|\left|\left|U(\cdot ,0)\right|\right|\right|}$,${\displaystyle \left|\left|\left|u(\cdot ,T)\right|\right|\right|\leq \left|\left|\left|U(\cdot ,0)\right|\right|\right|}$

## References

1. ^ Hailiang Liu, Jue Yan, The Direct Discontinuous Galerkin (DDG) Methods For Diffusion Problems,SIAM J. NUMER. ANAL. Vol. 47, No. 1, pp. 675–698.
2. ^ Hailiang Liu, Jue Yan, The Direct Discontinuous Galerkin (DDG) Method for Diffusion with Interface Corrections, Commun. Comput. Phys. Vol. 8, No. 3, pp. 541-564.