### Discontinuous Galerkin Methods

Min-Hung Chen

Department of Mathematics, NCKU

2020 Summer Workshop for Scientific Computing Sep. 1, 2020

### Outline

**1** Introduction
DG for ODE

**2** Linear Hyperbolic System

**3** Steady-State Problems
Elliptic Problems
Fenics and Colab

**4** HDG

Elliptic Model Problem

Matlab tools for HDG - HDG3D

**5** Summary

**M.-H. Chen** **Discontinuous Galerkin Methods** **2 / 47**

### Introduction

What is the Discontinuous Galerkin Method?:

a method between a finite element and a finite volume method local to the generating element

a practical framework for the development of high-order accurate methods using unstructured grids

**Introduction**

### A short (and biased) historical overview of the DGM

^{1}

First DG method introduced in 1973 by Reed and Hill for linear transport.

First studied in 1974 by Lesaint and Raviart.

Extended to nonlinear hyperbolic conservation laws in the 90’s by B.

Cockburn and C.-W. Shu.

Extended to compressible flow in 1997 first by F. Bassi and S. Rebay.

New DG methods for diffusion appear and some old ones (the IP

methods of the late 70’s) are resuscitated. A unified analysis is proposed in 2002 by D. Arnold, F. Brezzi, B. Cockburn and D. Marini.

They clash with the well-established mixed and continuous Galerkin methods. In response, the HDG methods are introduced in 2009 by B.

Cockburn, J. Gopalakrishnan and R. Lazarov. The HDG methods are strongly related to the hybrid methods and to the hybridization

techniques of the mid 60’s introduced as implementation techniques for mixed methods.

1https://www.lacan.upc.edu/dg2017/

**M.-H. Chen** **Discontinuous Galerkin Methods** **4 / 47**

### Notation

Jump Operator:

[[w]] =

w|_{K}+n^{+}+ w|_{K}−n^{−} on ∂K^{+}∩ ∂K^{−}

wn on ∂Ω

[[v]] =

v|_{K}+· n^{+}+ v|_{K}−· n^{−} on ∂K^{+}∩ ∂K^{−}

v · n on ∂Ω

Average Operator:

{w} =

1

2(w|_{K}++ w|_{K}−) on ∂K^{+}∩ ∂K^{−}

w on ∂Ω

{v} =

1

2(v|_{K}++ v|_{K}−) on ∂K^{+}∩ ∂K^{−}

**DG for ODE**

### ODE

^{2}

Equation

d

dtu(t) = f (t), t ∈ (0, T ), u(0) = u0.
Partition of (0, T ) = {t^{n}}^{N}_{n=0}, I^{n}= (t^{n}, t^{n+1}):

Local Basis: {φ^{n}_{j}}^{k}_{j=0};(for example, φ^{n}_{j}(t) = P_{j}(^{2t−t}_{t}_{n+1}^{n+1}_{−t}^{−t}_{n}^{n}))
weak form:

Z

I^{n}

d

dtu_{h}(s)v(s) ds =
Z

I^{n}

f (s)v(s) ds, or

− Z

I^{n}

u_{h}(s)d

dtv(s) ds + u_{h}v|^{t}_{t}^{n+1}n =
Z

I^{n}

f (s)v(s) ds, DG form:

− Z

I^{n}

uh(s)d

dtv(s) ds +uchv|^{t}_{t}^{n+1}n =
Z

I^{n}

f (s)v(s) ds,

2B. Cockburn, Discontinuous Galerkin methods, ZAMM Z. Angew. Math. Mech. 83

**M.-H. Chen** **Discontinuous Galerkin Methods** **6 / 47**

### Numerical Flux

DG form: −R

I^{n}uh(s)_{dt}^{d}v(s) ds +cuhv|^{t}_{t}^{n+1}n =R

I^{n}f (s)v(s) ds,
Upwinding Numerical Flux u_{c}h(t^{n}) =

u0, if t^{n}= 0,
uh(t^{n−}), otherwise.

Assuming Numerical Solution: uh|_{I}n(t) =Pk

i=0a^{n}_{i}φ^{n}_{i}(t)
Numerical Scheme: On I^{n}, for j = 0, ..., k,

− Z

I^{n}
k

X

i=0

a^{n}_{i}φ^{n}_{i}(s)d

dtφ^{n}_{j}(s) ds +

k

X

i=0

a^{n}_{i}φ^{n}_{i}φ^{n}_{j}(t^{n+1}) −

k

X

i=0

a^{n−1}_{i} φ^{n−1}_{i} φ^{n}_{j}(t^{n})

= Z

I^{n}

f (s)φ^{n}_{j}(s) ds.

Matrix Equation: M

a^{n}_{0}

..
.
a^{n}

= F

**DG for ODE**

### Properties of the DG methods

Discontinuous from element to element.

Locally conservative

uch|^{t}_{t}^{n+1}n =R

I^{n}f (s) ds,

Relation between the residuals and jumps

− Z

I^{n}

uh(s)d

dtv(s) ds +uchv|^{t}_{t}^{n+1}n =
Z

I^{n}

f (s)v(s) ds, Integration by parts,

Z

I^{n}

d

dtu_{h}(s)v(s) ds + (uc_{h}− u_{h})v|^{t}_{t}^{n+1}n =
Z

I^{n}

f (s)v(s) ds, Or,

Z

I^{n}

R(s)v(s) ds = (uh−uch)v|^{t}_{t}^{n+1}n

Take v = 1,

Z

I^{n}

R(s) ds = [[uh]] (t^{n})

**M.-H. Chen** **Discontinuous Galerkin Methods** **8 / 47**

### Example

d

dtu = e^{t}u(t), t ∈ (0, 2), u(0) = 1.

dg ode.zip

Rate of Convergence and super-convergence (P^{3})
N L^{2}-error order L^{∞}node order

2 0.50E+02 - 0.45E+02 -

4 0.66E+01 2.92 0.11E+01 5.33 8 0.63E-00 3.40 0.14E-01 6.34 16 0.44E-01 3.83 0.11E-03 6.93 32 0.28E-02 4.00 0.87E-06 7.01 64 0.17E-03 4.03 0.68E-09 7.02

**DG for ODE**

### Numerical Solutions of P

^{3}

### (Left) and P

^{5}

### (Right)

**M.-H. Chen** **Discontinuous Galerkin Methods** **10 / 47**

Relation between the residuals and jumps

Zt^{n+1}
t^{n}

R(s) ds = [[uh]] (t^{n})

Interval 1 Interval 2

k Error [[u]] Ratio Error [[u]] Ratio

1 0.33E-01 0.19E+00 0.17 0.19E-00 0.11E+01 0.17 2 0.35E-02 0.26E-01 0.13 0.27E-01 0.20E-00 0.14 3 0.34E-03 0.31E-02 0.11 0.34E-02 0.30E-01 0.12 4 0.32E-04 0.33E-03 0.097 0.41E-03 0.40E-02 0.10 5 0.28E-05 0.32E-04 0.087 0.45E-04 0.50E-03 0.090 6 0.24E-06 0.30E-05 0.080 0.47E-05 0.57E-04 0.082

Interval 3 Interval 4

k Error [[u]] Ratio Error [[u]] Ratio

1 0.19E-00 0.11E+02 0.17 0.73E+02 0.96E+02 0.76 2 0.43E-01 0.30E+01 0.14 0.29E+02 0.17E+03 0.18 3 0.72E-02 0.60E-00 0.12 0.46E+01 0.37E+02 0.12 4 0.11E-03 0.11E-01 0.10 0.95E-00 0.87E+01 0.11 5 0.16E-04 0.17E-02 0.094 0.18E-00 0.18E+01 0.098

**Linear scalar equation**

### Advection Equation

Equation (Ω ⊂ R^{d})

ut+ ∇ · (au) = 0in Ω × (0, T ), u(t = 0) = u0,on Ω.

Triangulation: Th

Local Space: V (K) for K ∈ Th

weak form: For all v ∈ V (K)

Z

K

(uh)tv dx + Z

K

∇ · (au_{h})v dA = 0,

or _{Z}

K

(uh)tv dx − Z

K

auh· ∇v dx + Z

∂K

auh· nv ds = 0,

DG form: _{Z}

K

(uh)tv dx − Z

K

auh· ∇v dx + Z

∂Kaudh· nv ds = 0,

**M.-H. Chen** **Discontinuous Galerkin Methods** **12 / 47**

### Numerical Flux and Stability

u_{t}+ ∇ · (au) = 0,

Stability for the transport equation 1

2 Z

R^{d}

u^{2}(x, T ) dx +1
2

Z T 0

Z

R^{d}

∇ · a(x)u^{2}(x, t) dx dt = 1
2

Z

R^{d}

u^{2}_{0}(x) dx
Stable if ∇ · a ≥ 0

**Linear scalar equation**

DG form

Z

K

(uh)tv dx − Z

K

auh· ∇v dx + Z

∂K

audh· nv ds = 0,
Stability for the DG methods (Take v = u_{h})

1 2 Z

R^{d}

u^{2}_{h}(x, T ) dx +1
2

Z T 0

Z

R^{d}

∇ · a(x)u^{2}_{h}(x, t) dx dt +
Z T

0

Θh(t) dt =1 2 Z

R^{d}

u^{2}_{h,0}(x) dx,

where

Θ_{h}(t) = X

K∈T_{h}

(1 2 Z

K

∇ · (a(x)u^{2}_{h})(x, t) dx) +
Z

∂K

aud_{h}(x, t) · nu_{h}(x, t) ds).

= X

K∈T_{h}

Z

∂K

(audh· nu_{h}(x, t) −1

2au^{2}_{h}· n) ds.

= X

e∈E_{h}

Z

e

(audh− a{u_{h}}) · [[u_{h}]] ds.

Numerical Flux: (Θh(t) ≥ 0)

I General: audh(t^{n}) = a{uh} + C [[u_{h}]]

I Up-winding: C =^{1}_{2}|a · n|Id ⇒audh(t^{n}) = a lim↓0uh(x − a)

I Lax-Friedrichs: C =^{1}_{2}|a|Id ⇒audh(t^{n}) = a{uh} +^{1}_{2}|a| [[u_{h}]]

**M.-H. Chen** **Discontinuous Galerkin Methods** **14 / 47**

### DG Scheme

DG form _{Z}

K

(uh)tv dx − Z

K

auh· ∇v dx + Z

∂K

audh· nv ds = 0,

audh(t^{n}) = a{uh} + C [[uh]]

Assuming Numerical Solution: uh|K(t, x) = a_{i}(t)φ_{i}(x)
Numerical Scheme: On K, for j = 0, ..., k,

Z

K

(ai)tφi(x)φj(x) dx − Z

K

aaiφi(x) · ∇φj(x) dx + Z

∂K

aud_{h}· nφj(x) ds = 0,

ODE

Md

dtU = N U

**Linear scalar equation**

### Example

ut+ ux= 0 in (0, T = 1) × (0, 1)
u(t = 0) = sin 2πx on (0, 1)
Rate of Convergence (P^{4}with RK 5)

N L^{2}-error order
10 0.17E-05 -
20 0.52E-07 5.01
40 0.16E-08 5.01
80 0.51E-10 5.00
160 0.16E-11 5.00

**M.-H. Chen** **Discontinuous Galerkin Methods** **16 / 47**

### Procedures to implement the RK-DG methods

Conservation Form:

u_{t}+ ∇·f (u) = 0,
DG space discretization

Z

K

(u_{h})_{t}v_{h}dx −
Z

K

f (u_{h}) · ∇v_{h}dx +
Z

∂K

f (u[_{h}) · n_{K}v_{h}ds = 0.

Here, the proper definition of [f (uh)is essential for the stability and convergence of the method.

RK time discretizatin:

d

dtuh= L(uh)

**Linear System**

### Wave Equation

Equation

utt− c^{2}4u = 0in R^{d}× (0, T ).

First-order system

Ut+ ∇ · F (U ) = 0, in R^{d}× (0, T ),

where

U =

q1

.. . qd

u

, F (U ) = −c

u . . . 0 ..

. . .. ... 0 . . . u q1 . . . qd

.

Triangulation: Th

Local Space: U (K) = P^{k}(K) × . . . × P^{k}(K)for K ∈ Th

DG form: For all V ∈ U (K)

Z

K

(Uhi)tVi− Z

K

Fij(Uh)Vi,j+ Z

∂K

FcijnjVidx = 0,

**M.-H. Chen** **Discontinuous Galerkin Methods** **18 / 47**

### Wave Equation

Equation

utt− c^{2}4u = 0in R^{d}× (0, T ).

First-order system

Ut+ ∇ · F (U ) = 0, in R^{d}× (0, T ),

where

U =

q1

.. . qd

u

, F (U ) = −c

u . . . 0 ..

. . .. ... 0 . . . u q1 . . . qd

.

Triangulation: Th

Local Space: U (K) = P^{k}(K) × . . . × P^{k}(K)for K ∈ Th

DG form: For all V ∈ U (K)

Z

K

(Uhi)tVi− Z

K

Fij(Uh)Vi,j+ Z

∂K

FcijnjVidx = 0,

**Linear System**

### Numerical Flux and Stability

DG form: for all V ∈ U (K)

Z

K

(Uhi)tVi− Z

K

Fij(Uh)Vi,j+ Z

∂K

FcijnjVidx = 0,

Stability for the DG methods (Take V = Uh)

1 2 Z

R^{d}

U_{h}^{2}(x, T ) dx +1
2

Z T 0

Θh(t) dt =1 2 Z

R^{d}

U_{h}^{2}(x, 0) dx,

where

Θh(t) = X

e∈E_{h}

Z

e

( cFij− {Fij}) · [[Uh, i]] dx.

Numerical Flux

Fcij= {Fij} + C_{ijkl}[[Uhk]]_{l}

**M.-H. Chen** **Discontinuous Galerkin Methods** **19 / 47**

### Examples of the DG methods

Numerical Flux

Fcij= {Fij} + Cijkl[[Uhk]]_{l}

Up-winding:

Fcij = {Fij} + |c|

2 [[q]] δij+|c|

2 [[u]]_{j}δ_{i(d+1)}
Lax-Friedrichs:

Fcij= {Fij} +|c|

2 [[qi]]_{j}δij+|c|

2 [[u]]_{j}δ_{i(d+1)}
Generalization of the Up-winding flux :

Fcij= {Fij} + (C22[[q]] − C12· [[u]])δij+ (C12[[q]] + C11· [[u]])δij

**Linear System**

### RK-DG Scheme

DG form _{Z}

K

(Uhi)tVi− Z

K

Fij(Uh)Vi,j+ Z

∂K

FcijnjVidx = 0,

Fcij= {Fij} + Cijkl[[Uhk]]_{l}

Numerical Solution: Uh|K(t, x) = a_{i}(t)φ_{i}(x)
Numerical Scheme: On K, for j = 0, ..., k,

Z

K

(ai)tφi(x) · φj(x) dx − Z

K

F (aiφi(x)) · ∇φj(x) dx + Z

∂K

F · nφb j(x) ds = 0,

ODE

Md

dtU = N U

**M.-H. Chen** **Discontinuous Galerkin Methods** **21 / 47**

### Numerical Experiments

1D Test: Wave equation with sound speedc(x) = ^{√}^{1}_{µ}

∂_{t}u − c(x)^{2}∂_{x}v = 0, in (0, T ) × (−2, 2)

∂tv − ∂xu = 0, in (0, T ) × (−2, 2) c(x) =

2 if x ∈ (−1, 1) 1 otherwise Initial conditions:

u(x, t = 0) = φ(x), x ∈ (−2, 2) v(x, t = 0) = −φ(x), x ∈ (−2, 2) Boundary Condition: (Transparent BC)

u + v =0 at x = 2 u − v =2φ(x − t) at x = −2

**Linear System**

### Profile

φ(x) = ψ(x + 1 + 0.5 0.5 ), ψ(y) =

(2y − 1)^{10}(2y + 1)^{10} if |y| < .5,

0 otherwise.

φ(x − 1)

**M.-H. Chen** **Discontinuous Galerkin Methods** **23 / 47**

### Rate of Convergence

h L^{∞}-error order L^{2}-error order L^{1}-error order
0.1250 0.64E-01 0.00 0.13E-01 0.00 0.25E-01 0.00
0.0625 0.17E-02 5.25 0.34E-03 5.28 0.63E-03 5.32
0.0312 0.60E-04 4.81 0.52E-05 6.01 0.86E-05 6.19
0.0156 0.40E-05 3.90 0.26E-06 4.31 0.34E-06 4.68
0.0078 0.25E-06 3.97 0.16E-07 4.00 0.21E-07 4.02
0.0039 0.16E-07 3.99 0.10E-08 4.00 0.13E-08 4.00

P^{3}-elements and SSP-RK4 scheme at T = 1.5

h L^{∞}-error order L^{2}-error order L^{1}-error order
0.1250 0.92E-02 0.00 0.19E-02 0.00 0.38E-02 0.00
0.0625 0.12E-03 6.26 0.12E-04 7.40 0.23E-04 7.40
0.0312 0.37E-05 5.04 0.22E-06 5.70 0.26E-06 6.43
0.0156 0.12E-06 4.97 0.70E-08 5.00 0.76E-08 5.11
0.0078 0.37E-08 5.00 0.22E-09 5.00 0.24E-09 5.00
0.0039 0.12E-09 4.99 0.68E-11 5.00 0.74E-11 5.00

P^{4}-elements, SSP-RK5 scheme at T = 1.5.

**Elliptic Problems**

### Elliptic Equation

Consider a second-order elliptic model problem:

−∆u = f in Ω, u = uD on ∂Ω.

Introduce an auxiliary variable q and rewrite the equation as q = ∇u in Ω,

−∇·q = f in Ω,
u = u_{D} on ∂Ω.

**M.-H. Chen** **Discontinuous Galerkin Methods** **25 / 47**

### Definition

For each element K of the mesh T_{h} of the domain Ω, we define
where n_{K} is the outward unit normal to K,

(u, v)K = Z

K

uv dx, (1)

hw, vi_{∂K} =
Z

∂K

wv ds. (2)

**Elliptic Problems**

### Weak form and DG method

The approximate solution (q_{h}, uh)on the element K is taken in the
space V (K) × W (K) and is defined as the solution, for all

(v, w) ∈ V (K) × W (K), of the equations

(q_{h}, v)_{K}+ (u_{h}, ∇·v)_{K}− hub_{h}, n_{K}· vi_{∂K} = 0,
(q_{h}, ∇w)_{K}− hqb_{h}· n_{K}, wi_{∂K} = (f, w)_{K},
with Dirichlet boundary condition

buh= uD on ∂K ∩ ∂Ω

All the DG methods are generated by choosing the local spaces
V (K) × W (K)and the numerical tracesqb_{h}· n_{K}andub_{h}.

**M.-H. Chen** **Discontinuous Galerkin Methods** **27 / 47**

### Numerical traces

The definition of the numerical tracesqb_{h} andub_{h}strongly influences the
properties of the corresponding DG method. In this context, we also
require that the numerical traces be linear functions of the traces of
q_{h}· n_{K} and u_{h} which are consistent and single valued.

Example (Cockburn and Shu 1998)

qb_{h} := {q_{h}} − C_{qq}[[q_{h}]] − C_{qu}[[u_{h}]] ,
ub_{h} := {u_{h}} − C_{uu}[[u_{h}]] − Cuq[[q_{h}]] .

Let us consider DG methods having a numerical tracebuh independent
of q_{h}. This allows for the easy elimination of the variable q_{h}, which can
now be expressed in terms of u_{h}in an elementwise manner, and
results in the so-called primal formulation of the method.

**Elliptic Problems**

Mixed Form of LDG Methods
Find (q_{h}, u_{h}) ∈ M_{h}× V_{h}such that

a_{h}(q_{h}, v) + b_{h}(u_{h}, v) = G_{h}(v),

−b_{h}(w, qh) + ch(uh, w) = Fh(w),

The corresponding linear system has the form

A B

−B^{t} C

Q U

=

G F

Aand C are symmetric B is antisymmetric.

**M.-H. Chen** **Discontinuous Galerkin Methods** **29 / 47**

### Numerical Result: Elliptic Interface Problem

Model Problem

−∇ · β∇u = f in Ω1∪ Ω2,
u = gon ∂Ω,
u|_{Ω}_{1}− u|Ω2 = aon ΓI,
((β∇u)|Ω_{1}− (β∇u)|Ω_{2}) · ne = bon ΓI,

where f , g, a, and b are functions of x and y, neis the outward unit normal vector to ∂Ω1, and β is a positive finite constant function on Ω1

and Ω2, separately.

(Chen, Wu, TJM2016 )

**Elliptic Problems**

### The Model Problem and LDG method

We assume that Ω = [−1, 1] × [0, 3] is the entire domain and Ω1is the open interior domain embedded in Ω with a complicated interface

ΓI(θ) =

0.6 cos θ − 0.3 cos 3θ 1.5 + 0.7 sin θ − 0.07 sin 3θ + 0.2 sin 7θ

for θ ∈ [0, 2π]. The exterior domain is Ω2= Ω \ Ω1.

Figure:Domain(left) and numerical solution (right) of test problem 2.

The media property is given by β =

1 in Ω1,

10 in Ω2. The discontinuous exact solution is u(x, y) =

e^{x}(y^{2}+ x^{2}sin y) in Ω1,

−(x^{2}+ y^{2}) in Ω2.

The corresponding jump conditions a and b, Dirichlet condition g, and source term f can be derived easily.

**M.-H. Chen** **Discontinuous Galerkin Methods** **31 / 47**

### The Model Problem and LDG method

Table:p-convergence of u and q (25 elements) for test problem 2.

Basis function DoF L^{2}-error of u L^{2}-error of q
Q^{1} 300 6.615e − 01 2.641e + 01
Q^{2} 675 1.599e − 01 1.129e + 01
Q^{3} 1200 4.450e − 02 4.346e + 00
Q^{4} 1875 6.711e − 03 9.273e − 01
Q^{5} 2700 2.652e − 03 4.010e − 01
Q^{6} 3675 3.512e − 04 7.475e − 02
Q^{7} 4800 1.095e − 04 2.204e − 02
Q^{8} 6075 2.148e − 05 5.815e − 03
Q^{9} 7500 3.297e − 06 7.967e − 04
Q^{10} 9075 9.766e − 07 3.258e − 04
Q^{11} 10800 8.334e − 08 2.376e − 05
Q^{12} 12675 3.172e − 08 1.316e − 05
Q^{13} 14700 3.406e − 09 1.621e − 06

**M.-H. Chen** **Discontinuous Galerkin Methods** **32 / 47**

**Elliptic Problems**

### p-convergence and Domain

Figure:p-convergence of u and q on a 25-element mesh (left). Corresponding curved-edge quadrilateral mesh with 25 elements (right).

**M.-H. Chen** **Discontinuous Galerkin Methods** **33 / 47**

### Fenics Project

The FEniCS Project is a collection of free and open-source
software components with the common goal to enable automated
solution of differential equations.^{3}

The components provide scientific computing tools for working with computational meshes, finite-element variational formulations of ordinary and partial differential equations, and numerical linear algebra.

FEniCS enables users to quickly translate scientific models into efficient finite element code. With the high-level Python and C++

interfaces to FEniCS, it is easy to get started. ^{4}
FEniCS runs on a multitude of platforms.

3https://en.wikipedia.org/wiki/FEniCS Project

**Fenics and Colab**

### Reference:

Solving PDEs in Python: The FEniCS Tutorial I (Free)

Automated Solution of Differential Equations by the Finite Element Method: The FEniCS Book (Free PDF)

Introduction to Automated Modeling with FEniCS by Ridgway Scott

FENICS Examples (John Burkardt)

**M.-H. Chen** **Discontinuous Galerkin Methods** **35 / 47**

Poisson problem (CG):R

Ω∇u · ∇v dx =R

Ωf v dx

%m a t p l o t l i b i n l i n e
**from f e n i c s import ∗**

mesh = UnitSquareMesh ( 8 , 8 )

V = FunctionSpace ( mesh , ” Lagrange ” , 1 )

u0 = E x p r e s s i o n ( ” 1+x [ 0 ] ∗ x [ 0 ] + 2 ∗ x [ 1 ] ∗ x [ 1 ] ” , degree =2) bc = D i r i c h l e t B C ( V , u0 , ” on boundary ” )

f = Constant ( − 6 . 0 ) u = T r i a l F u n c t i o n ( V ) v = T e s t F u n c t i o n ( V )

a = i n n e r ( grad ( u ) , grad ( v ) ) ∗ dx L = f ∗ v ∗ dx

u = F u n c t i o n ( V ) s o l v e ( a == L , u , bc ) p l o t ( u )

**Fenics and Colab**

### Google Colaboratory (Colab)

What is Colaboratory?

Colaboratory, or ”Colab” for short, allows you to write and execute Python in your browser, with

Zero configuration required Free access to GPUs Easy sharing

Some sample code:

MyPoissonCG link: CG method for Poisson problem.

MyPoissonDG link: DG method for Poisson problem.

Reference: https://github.com/leodenale/FenicsOnColab

**M.-H. Chen** **Discontinuous Galerkin Methods** **37 / 47**

### Motivation for HDG methods

However, the DG methods (for second-order elliptic equations) have been criticized because:

For the same mesh and the same polynomial degree, the number of globally coupled degrees of freedom of the DG methods is much bigger than those of the CG method. Moreover, the orders of convergence of both the vector and scalar variables are also the same.

**Elliptic Model Problem**

### Elliptic Equation

Consider a second-order elliptic model problem:

cq + ∇u = 0 in Ω,

∇·q = f in Ω,
bu = u_{D} on ∂Ω.

Here c is a matrix-valued function which is symmetric and uniformly positive definite on Ω

**M.-H. Chen** **Discontinuous Galerkin Methods** **39 / 47**

### The HDG methods

^{5}

### .

Rewrite the equations. If for each K ∈ Ω_{h}, we assume that we know
the traceubon ∂K, we can obtain (q, u) inside K as the solution of
Consider a second-order elliptic model problem:

cq + ∇u = 0 in K,

∇·q = f in K, u = ub on ∂K.

Thenubcan be determined as the solution, on each edge F ∈ E_{h}, of
[[q · n]]b = 0 if F ∈ E_{h}^{o}, (interior edges)

ub = u_{D} if F ∈ E_{h}^{∂}, (exterior edges)
Note: [[q · n]] :=b bq^{+}· n^{+}+bq^{−}· n^{−}.

5The Hybridizable Discontinuous Galerkin Methods, Proceedings of the

**Elliptic Model Problem**

### The local problems: A weak formulation on each element.

On each element K ∈ Ω_{h}, we define (q_{h}, u_{h}) ∈ V (K) × W (K)in terms
of (ub_{h}, f )such that

(cq_{h}, v)K− (u_{h}, ∇·v)K+ hub_{h}, v · ni_{∂K} = 0,

−(q_{h}, ∇w)K+ hqbh· n, wi_{∂K} = (f, w)K,
for all (v, w) ∈ V (K) × W (K), where

qb_{h}· n = q_{h}· n + τ (u_{h}−ub_{h}) on ∂K.

Note: (u, w)_{K}:=R

Kuw dx, hw, vi_{∂K} =R

∂Kwv ds

**M.-H. Chen** **Discontinuous Galerkin Methods** **41 / 47**

### The global problem: The weak formulation for u b

_{h}

### .

For each face F ∈ E_{h}^{o}, we takeub_{h}|_{F} in the space M (F ). We determine
ubhby requiring that,

hν, [[qb_{h}]]i_{F} = 0, ∀ν ∈ M (F ) if F ∈ E_{h}^{o},
bu_{h} = u_{D} if F ∈ E_{h}^{∂}.

All the HDG methods are generated by choosing the local spaces V (K), W (K), M (F ) and the stabilization function τ .

**Elliptic Model Problem**

Notice thatbu_{h} is the data of the local problems but is the unknown
of the global problem. So, the only globally-coupled degrees of
freedom are those ofbuh.

By solving the local problems, we express q_{h}, u_{h}andqb_{h} in terms
ofubhand f . With these expressions, we construct the matrix
equation associated to the global problem.

After solving it, we can insert the actual values ofbu_{h}in the

expressions we had obtained for q_{h}, u_{h} andqb_{h}. Next, we describe
this procedure more precisely.

**M.-H. Chen** **Discontinuous Galerkin Methods** **43 / 47**

### The main features of the HDG methods.

The HDG methods are obtained by discretizing characterizations
of the exact solution written in terms of many local problems, one
for each element of the mesh Ω_{h}, with suitably chosen data, and
in terms of a single global problem that actually determines them.

This permits an efficiently implementation since they inherit the above-mentioned structure of the exact solution. This is what renders them efficiently implementable, especially within the framework of hp-adaptive methods, as is typical of DG methods.

**Matlab tools for HDG - HDG3D**

### HDG3D

Matlab implementation of the Hybridizable Discontinuous Galerkin method on general tetrahedrizations of polyhedra in three

dimensional space.

Developed by group Team Pancho at the Department of Mathematical Sciences at the University of Delaware.

Project website: https://team-pancho.github.io/HDG3D/

Remark:

Move “A simple example.m” up one level.

Move the directory “meshes” up one level.

**M.-H. Chen** **Discontinuous Galerkin Methods** **45 / 47**

### Summary and Reference

Main features of the DG methods:

High-order accurate.

Locally Conservative.

Adaptivity

High parallelizability,

The HDG methods are obtained by constructing discrete versions (based on discontinuous Galerkin methods) of the above

characterization of the exact solution.

In this way, the globally coupled degrees of freedom will be those of the corresponding global formulations.

### Reference

B. Cockburn, G. Karniadakis, C.-W. Shu, The development of

Discontinuous Galerkin methods, in Discontinuous Galerkin methods.

Theory, computation and applications, Lecture Notes in Computational Sicence and Engineering, Volume 11, Springer, 2000.

B. Cockburn and C.-W. Shu, Runge-Kutta Discontinuous Galerkin methods for convection-dominated problems, J. Sci. Comput. 16 (2001), pp. 173-261.

D. Arnold, F. Brezzi, B. Cockburn and D. Marini, Unified analysis of discontinuous Galerkin methods for elliptic problems, SINUM 39 (2002), pp. 1749-1779.

B. Cockburn, Discontinuous Galerkin methods, ZAMM Z. Angew. Math.

Mech. 83 (2003), pp. 731-754.

B. Cockburn, Discontinuous Galerkin methods for computational fluid dynamics, Encyclopedia of Computational Mechanics Second Edition (2018): 1-63.

**M.-H. Chen** **Discontinuous Galerkin Methods** **47 / 47**