You are on page 1of 40

Research Internship (PRE)

Field of Study: SIM


Scholar Year: 2017-2018

A modal Discontinuous Galerkin method


on non graded quadtrees
UC Merced summer research program

Confidentiality Notice
Non-confidential report and publishable on Internet

Author: Promotion:
Armand Touminet 2019
ENSTA ParisTech Tutor: Host Organism Tutor:
Éliane Bécache Maxime Theillard

Internship from 05-14-2018 to 08-22-2018

Name of the host organism: UC Merced


Address: 5200 Lake Rd, Merced, CA 95340, USA
A modal Discontinuous Galerkin method on non graded quadtrees

Confidentiality Notice

This present document is not confidential. It can be communicated outside in paper format
or distributed in electronic format.

Armand Touminet / UC Merced 3


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

Abstract

Discontinuous Galerkin methods are the state of the art of high accuracy numerical analysis.
First introduced by Reed and Hill [10], they allow solving partial differential equations with an
arbitrary order of convergence and show many advantages over classic finite element methods
when it comes to highly scalable parallel computing thanks to a low computational stencil.
In this work, we introduce a modal Discontinuous Galerkin method applied on non graded
quadtrees that implements an adaptative mesh refinement technique. Then we extend the
described method to handle levelset interface with high precision to preserve the convergence
orders. We finally test our method on Poisson equation and discuss the impact of the chosen
numerical flux on the observed order of covergence. Alongside this work comes a scalable
parallel two dimensional implementation in C++.

Armand Touminet / UC Merced 5


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

Acknowledgment

I would like to thank Maxime Theillard for being my supervisor during this internship.
He helped me a lot to get this project working, and helped me solving a lot of problems I
encountered during my work.

I would also like to thank Thomas Bellotti, my coworker during this internship. My discus-
sions with him brought me a lot of insight about my work.

I thank Éliane Bécache for accepting being my ENSTA tutor for this internship.

Finally, I’d like to thank all of the graduate students of UC Merced without whom my
internship would not have been as pleasant as it was.

Armand Touminet / UC Merced 7


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

Contents

Confidentiality Notice 3

Abstract 5

Acknowledgment 7

Contents 9

Introduction 11

I Modal Discontinuous Galerkin Method 13


I.1 Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
I.1.1 The quadtree mesh refinement . . . . . . . . . . . . . . . . . . . . . 13
I.1.2 Modal discretization basis . . . . . . . . . . . . . . . . . . . . . . . . 13
I.1.3 Legendre functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
I.2 Weak formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
I.3 The mass and stiffness matrices . . . . . . . . . . . . . . . . . . . . . . . . . 17
I.3.1 The flux matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
I.4 Imposing boundary conditions . . . . . . . . . . . . . . . . . . . . . . . . . . 19
I.5 Time discretization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

II Implementation 21
II.1 Numerical integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
II.2 Parallelization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

III Examples 25
III.1 The Poisson equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
III.2 Choosing β . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
III.3 A non graded quadtree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
III.4 Higher order is cheaper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

IV Adding an interface 31
IV.1 The new problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
IV.2 Modal basis on cut cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
IV.2.1 Legendre polynomial on bounding boxes . . . . . . . . . . . . . . . . 32
IV.2.2 Algebraic components on cut cells . . . . . . . . . . . . . . . . . . . . 33
IV.2.3 Warped Legendre polynomials . . . . . . . . . . . . . . . . . . . . . . 34

V Conclusion 35

Armand Touminet / UC Merced 9


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

Bibliography 37

A Proofs of the modal basis properties 39

10 Armand Touminet / UC Merced


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

Introduction

The discontinuous Galerkin method aims to provide a high order alternative to the finite
element method. It can be seen as an extension of the finite volume method as it is a particular
case of the first order discontinuous Galerkin method. Its idea is quite simple: we project the
solution of a problem on a vector space containing piecewise polynomial functions. The main
difference with the finite elements method is that no continuity of the solution is enforced at the
interface between two cells of the mesh. This has the benefit of keeping a low computational
stencil which brings a better parallelization potential. Throughout this work, we show how to
set up a modal discontinuous Galerkin method using a non graded quadtree mesh for solving a
simple diffusion equation. Quadtrees are mainly used in an adaptive mash refinement context
to increase accuracy at specific locations. The main focus of this work is to study the orders
of accuracy that the method can achieve. To do so, we explain how to deal with the common
implementation pitfalls that come with high order methods and validate our implementation
on simple examples. We also show how high order can be used to reduce the computation
time while preserving the overall solution accuracy. In a second part, we show how to handle
adding an interface to model various kind of geometries thanks to the level set method. We
show how this integrates to our discontinous Galerkin solver and present several approaches
to deal with the main problems encountered while implementing it.

Armand Touminet / UC Merced 11


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

Part I

Modal Discontinuous Galerkin Method

I.1 Theory
We first construct a modal Discontinuous Galerkin method for the following stationary
Poisson equation
αu − µ∆u = f (I.1)
on a rectangle shaped domain Ω ∈ R2 with Neumann or Dirichlet boundary conditions on
the computational domain boundaries given as

u = uD on ∂Ω (Dirichlet) (I.2)

∇u · n = uN on ∂Ω (Neumann) (I.3)

We first consider this equation without any interface and thus α and µ are constants.

I.1.1 The quadtree mesh refinement


We choose to use a quadtree mesh for discretizing the geometry of the problem instead of
a regular triangulation. This technique is based on recursive mesh refinement. The idea behind
it is very simple: we start with a rectangle shaped domain Ω = [xmin ; xmax ] × [ymin ; ymax ] and
we recursively subdivide it into four equal rectangle which we call cells. We call the level of
a cell the number of subdivisions required to construct it. The purpose of quadree meshes is
that it is really easy to construct an adaptative mesh: if a given problem requires high accuracy
at a given location, then we can refine the mesh only around this location and gain accuracy
while limitig the computation overhead by keeping a coarse mesh at other locations. We say
that a quadtree is graded with a grade factor g when the level difference of two adjacent cells
of the quadtree is not more than g. If we do not enforce such a condition, we say that the
quadtree is non graded. Graded quadtrees are usually used with a grade factor of 2 in finite
element methods or finite volume methods. In this work we show that the Discontinuous
Galerkin method works on non graded quadtrees.

I.1.2 Modal discretization basis


Discontinuous Galerkin methods come in two flavors: the nodal and modal variants. These
variants change the way we model space discretization throughout the computation. In both

Armand Touminet / UC Merced 13


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

L=1

L=3

L=2

Figure I.1: A non graded quadtree

approaches we subdivide the computational domain Ω in small cells on which the solution is
locally computed. The nodal approach consists in defining computation nodes on each cell
and compute the solution on these nodes and then interpolate a Lagrange polynomial on them
to construct the solution on the whole cell. The more computational nodes we define on each
cell, the higher the degree of the constructed Lagrange polynomial is, and the more accurate
the solution is. By assembling all of the local cell defined polynomials, we construct a piecewise
continuous solution.

On the other hand, in the modal variant we define on each cell a functional basis and define
the equation solution as vector in the span of that basis. By cleverly choosing our functions we
can construct a basis such as we increase the accuracy of our computation for each function
we add in the basis. More precisely, we can construct bases with (N + 1)2 functions in each
yielding at least a N -th order of accuracy.

We define the order of accuracy (or order of convergence) of the method as follows: con-
sidering we use a mesh that is constructed depending on a typical spacial step h, the order of
accuracy is computed from the L2 or L∞ error Eh yielded by applying the method on a mesh
constructed from a step of h and h/2 and is given by the following formula
ln(Eh /Eh/2 )
orderh = . (I.4)
ln 2
Its meaning is quite straightforward: dividing the spacial step by 2 divides the error of the
solution by 2orderh . We use this definition of the order of accuracy throughout this paper to
evaluate the performance of the method.

In this work we choose to follow the modal approach and we use shifted and normalized
Legendre polynomials as our base functions. They show several benefits such as forming
orthonormal bases which highly simplify the implementation and reduce the computational
cost.

I.1.3 Legendre functions


More precisely, as we discretize the computational domain Ω following quadtree techniques,
we subdivide Ω in K disjoint rectangles such that Ω = K−1 k=0 Ωk where Ωk = [xk ; xk+1 ] ×
S

14 Armand Touminet / UC Merced


Non-confidential report and publishable on Internet
PART I. MODAL DISCONTINUOUS GALERKIN METHOD

[yk ; yk+1 ]. Then, for all 0 ≤ k ≤ K − 1, we define the shifted and normalized Legendre
polynomial of degree m with the respect to x and n with the respect to y on Ωk by
v ! ! !
u (2n + 1)(2m + 1) x − xk y − yk
u
∀(x, y) ∈ Ω, φkmn (x, y) = t P mn 2 − 1, 2 − 1 1Ωk (x, y)
hkx hky hkx hky
(I.5)
where hkx = xx+1 − xk , hky = yk+1 − yk and where Pnm := Pn Pm . Here, for all n ∈ N,
Pn : [−1; 1] → R denotes the Legendre polynomial of degree n defined as the solution of
Legendre’s differential equation
" #
d   dP (x)
n
 
1 − x2 + n(n + 1)Pn (x) = 1 − x2 Pn00 (x) − 2xPn0 (x) + n(n + 1)Pn (x) = 0 .
dx dx
k
We finally define BN := span(φk00 , ..., φkmn , ..., φkN N ) to be the modal functional basis we use
on each cell for our DG method, and BN = K k
k=0 BN .
L

I.2 Weak formulation


We construct the modal DG scheme from a weak formulation of the equation. We consider
the L2 product between the equation and a test function φ ∈ Bnm
Z Z Z
α uφ dω − µ ∆uφ dω = f φ dω (I.6)
Ω Ω Ω

Before integrating by parts be must break down φ on each cell since it is only piecewise
continuous on Ω
   
K Z Z K Z
uφkpq dω − µ ∆uφkpq dω  = f φkpq dω 
X X X
α (I.7)
   

k=0 0≤p,q≤N Ωk Ωk k=0 Ωk

then we apply Green’s formula which yields


   
K Z Z Z K Z
uφkpq dω + µ ∇u∇φkpq dω − µ f φkpq dω 
X X X
α ∇u · n φpq dγ  =
   

k=0 0≤p,q≤N Ωk Ωk ∂Ωk k=0 Ωk
(I.8)
Where n is the outer normal vector of ∂Ωk .

The value of the solution u is ambiguous at the cells interfaces Ωk since u is not continuous
at those locations. We must thus choose how to properly define a so called numerical flux.
Choosing a numerical flux is a really complex topic and is discussed in many papers (see, e.g.,
[7]). We choose the numerical flux described in [8]

β
∇u
d = [[u]] + ∇u
2
where [[u]] = (u+ − u− )n (see figure I.2 for their definiton) denotes the jump of u at the
interface and ∇u = (∇u+ + ∇u− )/2 is the average of ∇u at the interface. We will see later
how the choice of β can influence the convergence order of the method.

Armand Touminet / UC Merced 15


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

u−
u+

u− u+ Ωk u+ u−
u+
u−

Figure I.2: Conventions for u+ and u− .

We then break down u on Bnm in the following way


N
ukmn φkmn .
X
∀0 ≤ k ≤ K, u|Ωk =
m,n=0

0≤k≤K
We thus construct the vector of unknowns U := (ukmn )0≤m,n≤N and the right hand side
k 0≤k≤K k
vector F := (fmn )0≤m,n≤N . Since the function f is known, we can compute the fmn values
k
by evaluating hf, φmn iL2 (Ωk ) . Including this in (I.2) gives

K K
(αhφkmn , φkpq i+µh∇φkmn , ∇φkpq i)ukmn − φk hf, φkpq i
X X X X X X
µh∇u·n,
d
pq i =
k=0 0≤p,q≤N 0≤n,m≤N 0≤p,q≤N k=0 0≤p,q≤N
(I.9)

We can conveniently rewrite (I.2) as a linear algebra problem by defining the following
matrices, where ` ∈ [[0; K − 1]]

M := (hφkmn , φ`pq i) 0≤k,`≤K−1


0≤m,n,p,q≤N

S := (h∇φmn , ∇φ`pq i)
k

We also define the right hand side vector

F := (hf, φkpq i)

Note that we omited writing some of the indices to avoid obvious readability issues.

The term
P d · n, φk i can also be written as a matrix F, but we’ll discuss it’s
µh∇u pq
0≤p,q≤N
exact expression in the following sections as it requires a particular attention.

Now, with those definitions, (I.2) becomes

(αM + µ(S − F))U = F (I.10)

In the next subsection, we discuss the properties of both M and S and how to construct them,
then we will give some insight about the flux matrix F.

16 Armand Touminet / UC Merced


Non-confidential report and publishable on Internet
PART I. MODAL DISCONTINUOUS GALERKIN METHOD

I.3 The mass and stiffness matrices


The choice of the φknm functions in (I.1.3) is not random, and digging further into their
properties show that both M and S can be constructed pretty much trivially. We first show
some properties of the Legendre polynomials, then we extend them to our modal basis func-
tions. The proofs for the following properties are given in appendix.

Property 1 (Legendre polynomials properties) Let m, n, p, q ∈ N such that n ≤ m. Let


h., .i be the L2 ([−1; 1]) scalar product (or the L2 ([−1; 1]2 ) when it does not make sense). We
have
2
i. hPn , Pm i = δ
2n+1 nm

n
0 P
ii. P2n+1 =1+ (4i + 1)P2i
i=1

n−1
0 P
iii. P2n = (4i + 3)P2i+1
i=0

0 0
iv. hP2n+1 , P2m i=0
0 0
v. hP2n+1 , P2m+1 i = 2n(2n + 3) + 2
0 0
vi. hP2n , P2m i = 2n(2n + 1)
!
Pn0 Pm
vii. ∇Pnm =
Pn Pm0

viii. h∇Pnm , ∇Ppq i = hPn0 , Pp0 ihPm , Pq i + hPn , Pp ihPm0 , Pq0 i

Property 2 (Modal basis functions properties) Let m, n, p, q ∈ N such that m ≤ n. Let


k ∈ [[0; K −1]]. Let h., .i be the L2 (Ωk ) scalar product. Let hkx = xk+1 −xk and hky = yk+1 −yk .
We have
     
k

1 ∂Pnm x−xk y−yk
r
hkx ∂x
2 hkx
− 1, 2 hky
−1 
(2n+1)(2m+1) 
i. ∀x, y ∈ R, ∇φknm (x, y) = 2 hkx hky

 1 ∂P k
      1Ω (x, y)
 k
x−xk y−yk
nm
hky ∂y
2 hkx
− 1, 2 hky
−1

ii. hφknm , φkpq i = δnp δmq


q  
iii. h∇φknm , ∇φkpq i = (2n + 1)(2m + 1)(2p + 1)(2q + 1) 1
hk2
hPn0 , Pp0 ihPm , Pq i + 1
hk2
hPn , Pp ihPm0 , Pq0 i
x y

These properties show that we can avoid numerical quadratures to construct the mass and
stiffness matrices. Note that this no longer holds when the cell is cut, e.g. when an interface
crosses a cell, which we’ll discuss later. But even when considering and interface in Ω we can
still take advantage of thoses formulae the handle the cells that do not intersect the interface.

From (2.ii) we deduce that M is the identity matrix. The stiffness matrix is block sparse,
because h∇φknm , ∇φ`pq i = 0 when k 6= `.

Armand Touminet / UC Merced 17


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

I.3.1 The flux matrix


As seen before, defining numerical fluxes is a complex topic and several approaches are
possible. Let’s consider a cell Ωk = [xk ; xk+1 ] × [yk ; yk+1 ]. The numerical flux term on this
cell can be rewritten
Z Z Z Z Z
\
∇uk ·n uk dγ = \
∇u k ·n φk dγ+ \
∇u k ·n φk dγ+ \
∇uk ·n φk dγ+ \
∇uk ·n φk dγ
mn pq mn pq mn pq mn pq mn pq
∂Ωk ∂ΩL
k
∂ΩR
k
∂ΩB
k
∂ΩT
k
(I.11)
where ∂ΩLk , ∂ΩR
k, ∂ΩB
k, ∂ΩTk
respectively denote the left, right, bottom and top edges of
\
Ωk . Computing this term involves defining ∇φ k
mn properly. We first define it as follows

k
\ k ·n = β
[[umn ]]
∇u mn + ∇ukmn · n. (I.12)
2
The choice of this numerical flux is discussed in [8]. It is shown that for some values of
β this flux ensure time stability of the solution when we consider a time dependent equation.
Time discretization is not the main topic of this work however, but we’ll see later that the
choice of β is important even for stationnary equation, as we observe that for high polynomial
degrees used, a wrong value can lead to a loss of convergence of the method.

The numerical flux is what links the different cells between each other, as computing the
jump and the average of the basis funcitons involves evaluating basis functions from the
neighbor cells. Let’s first assume that each cell has four different neighbors (one for each
edge, which is the case when we consider a structured mesh). Let NΩLk , NΩRk , NΩBk , NΩTk be
the four neighbor cells of Ωk . The term from the left neighbor is

β k ukL + ukmn
\
∇ k
x umn = (umn − ukmn
L
)φkmn − mn ∇x φkmn (I.13)
2 2
!
1
where kL is defined such that ΩkL = NΩLk ,
and ∇x u = ∇u · . The flux matrix is made of
0
the contributions of every neighbor cell. We obtain a similar formula for the other neighbors
except that the normal vector n can give a different sign, e.g. in the term from the top
neighbor
β k kT k ukmn
T
+ ukmn
∇\ uk
y mn = (u − u )φ + ∇y φkmn .
2 mn mn mn
2
We then construct a square flux matrix F of size (K(N + 1)2 )2 in which we store the different
flux contribution as follows: on the (kN 2 +pN +q)-th row we store the different terms coming
\
from ∇u k , and on this row, on the (k N 2 + mN + n)-th column we store the contribution
mn i
from the the cell NΩi k of degree p with the respect to x and q with the respect to y. For
instance, if we note F(i, j) to be the coefficient on row i and column j, then we have

∇x φkmn
!
Z
β kL L
2 2
F(kN + pN + q, kL N + mN + n) = − φmn − φkpq dγ. (I.14)
2 2
∂ΩL
k

This construction completes the definition of (I.2).

18 Armand Touminet / UC Merced


Non-confidential report and publishable on Internet
PART I. MODAL DISCONTINUOUS GALERKIN METHOD

Wall

ΩkL Ωk

Figure I.3: A cell on the domain boundary

Note. Applying this discretization using a polynomial degree N = 0 is identical to using the
finite volumes method. We can see that the flux we chose is compatible with the flux used
in finite volumes solvers (such as in [11]) if β = 2/∆k,ki where ∆k,ki is a typical distance
that depends on the size of the cells Ωk and Ωki . In this, case, the value of beta has a
geometrical meaning and choosing another value leads to a wrong solution. More precisely,
the flux represents the solution variation between the centers of two adjacent cells. When
using a higher order basis, the numerical flux also means to penalize the solution’s gradient
discontinuity at the interface, and we observe that when N ≥ 1, several values for β are
possible.

Unfortunately, the properties of the modal basis shown previously are not always useful
when computing the flux matrix. Indeed, when considering an irregular mesh, the integration
domain ∂Ωki is smaller than the domain on which the functions of the basis are defined, and
integrating Legendre polynomials on subdomains of their definition domain does not have any
useful properties. We thus use numerical quadrature to compute the flux matrix.

I.4 Imposing boundary conditions


The final step of the modal discretization is to properly impose boundary conditions on
the domain boudaries. Imposing those conditions can be done through the numerical flux, by
considering fake neighbor cells outside of the computational domain and adding a numerical
flux from this fake cell to enforce a Neumann or Dirichlet boundary condition. Let’s take the
example of a cell Ωk which left edge is part of the left boundary of Ω.
We assume that ∇u is continuous on ∂ΩkL , which translates to
∇ukmn
L
= ∇ukmn on ∂ΩkL .
We modify the expression of the numerical flux accordingly
dk · n = β k
∇u (u − uD ) + ∇uk · n
2
which, when we break down uk on the modal basis, translates to
!
β β k
φmn + ∇φkmn · n ukmn
X X
\
∇u k ·n = − u +
D
mn
0≤m,n≤N 2 0≤m,n≤N 2
We rewrite (I.3.1) to take the Dirichlet condition into account
!
β k
\
∇ k
x umn = φ − ∇x φkmn ukmn (I.15)
2 mn

Armand Touminet / UC Merced 19


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

These modifications yield a new form for (I.3.1)


!
Z
β k
2 2
F(kN + pN + q, kL N + mN + n) = φ − ∇x φkmn
L
φkpq dγ (I.16)
2 mn
∂ΩL
k

and modify the right hand side vector accordingly to represent the Dirichlet boundary conditions
β Z
F (kN 2 + mN + n) = hf, φkmn i − uD φkmn dγ. (I.17)
2
∂ΩkL

Note that for the sake of readability we only wrote the flux coming from the left cell
boundary, but for the implementation we also take into account the fluxes coming from every
neighbor cell as well.

Imposing Neumann boundary conditions is quite similar. The flux coming from the left fake
cell is given by
k ·n = − N −
u ukmn
∇x φkmn
X X
\
∇u (I.18)
mn
0≤m,n≤N 2 0≤m,n≤N 2
which translates to a new expression in the flux matrix
Z
∇x φkmn
L
F(kN 2 + pN + q, kL N 2 + mN + n) = − φkpq dγ (I.19)
2
∂ΩL
k

and then we modify the right hand side vector as well


Z
uN k
F (kN 2 + mN + n) = hf, φkmn i − φ dγ. (I.20)
2 pq
∂ΩL
k

I.5 Time discretization


Time discretization is not the main purpose of this work, so this part will just present a
few aspects of the previous work done. We need to use a time discretization scheme when
considering a time-dependant equation, such as an adapted form of (I.1)

∂u
α − µ∆u = f (I.21)
∂t
Most of the previous work discretize the time dependant term thanks to a fourth order Runge-
Kutta scheme (see [13]). The tricky part of combining it with a Discontinuous Galerkin method
is that high orders constrain the admissible time steps a lot, and thus CFL numbers are quite
restrictive. For instance, in the CFL given in [4] for an advection equation, the upper bound
of the time step that can be used depends on the polynomial degree used as follows
h
∆t ≤ (I.22)
a(2N + 1)

20 Armand Touminet / UC Merced


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

Part II

Implementation

We implement the modal discontinuous galerkin method described previously in a full C++
software. The main advantage of the method is it’s low computational stencil wich allows a
highly parallel implementation as assembling the different matrices only require information
about the current cell and the neighbor cells. We propose an implementation that uses
distributed parallelism over multiple processors that can be run on a cluster containing many
computational nodes and take advandage of the available computing power to considerably
speed up the computation. The implementation uses PETSc as a parallel framework to store
the algebraic components and to solve the obtained linear system through iterative solvers.
Implementing the method requires dealing with numerical computation very carefully as
insufficient numerical approximations can lead to loosing the orders of convergence given by
the method. In this part, we explain how to deal with the common pitfalls encountered while
implementing the modal method.

II.1 Numerical integration


As explained in part I, computing the flux matrix involves integrating functions that cannot
always be computed explicitely, we thus use numerical integration to compute those terms.
However, using a random integration algorithm leads to either disastrous performance or wrong
convergence order. More precisely, if we consider |Ωk | to be the area of a quadtree cell, we’ve
seen that the L2 error of the numeric solution on this cell is O(|Ωk |N +1 ); we must thus ensure
that integrating a funciton on Ωk yields a O(|Ωk |N +1 ) error. Instead of requiring a precision
higher than the floating point precision, which would drastically reduce the performance of the
computation, we use the Gauss-Legendre method which approximate the integrated function
by a polynomial of any degree. Using this method whith a polynomial degree higher than the
one used for the legendre bases yields both good performance and correct accuracy.

Property 3 (Gauss-Legendre quadrature) Let f be a real function defined on [−1; 1], and
let n be a positive integer. The integral of f over [−1; 1] can be approximated as follows

Z1 n
X
f (x) dx ≈ wi f (xi )
−1 k=1

where (wi , xi )0≤i≤n are the Gauss-Legendre weights and abscissae; xi being the i-th root of
Pn , and wi = 2((1 − x2i )[Pn0 (xi )]2 )−1 .

Armand Touminet / UC Merced 21


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

The idea behin the Gauss-Legendre quadrature is the same as the one behind the dis-
continuous galerkin discretization: approximate the function f with a Legendre polynomial of
degree n. The higher the degree, the more accurate the computation. More precisely, if f is
of class C 2n , then according to [6]

Z1 n
22n+1 (n!)4
f (2n) (ξ)
X
En := f (x) dx − wi f (xi ) = (II.1)
k=1 (2n + 1)[(2n)!]3
−1

where ξ ∈ [−1; 1]. We can adapt this method to integrate functions defined on a segment
[a; b] ∈ R using the substitution

Zb Z1 !
(b − a) (b − a)
f (x) dx = f a+ (1 + x) dx
a
2 2
−1

which yields a modified form of (II.1) given in [6]

Zb n
!
X (b − a) (b − a)2n+1 (n!)4 (2n)
f (x) dx = (b − a) wi f a + (1 + x) + 3
f (ξ). (II.2)
a k=0 2 (2n + 1)[(2n)!]

What’s interesting is that En = O((b − a)2n+1 ) which is an admissible accuracy that won’t
lower the convergence orders of the solver as described previously in this part, provided that
the functions we integrate are sufficiently smooth.

Integrating two-dimensional functions is quite easy by extending the method. Let’s consider
f : [a; b] × [c; d] → R to be such a function. We then have

Zb Zd n X n
!
(b − a)(d − c) X (b − a) (d − c)
f (x, y) dxdy ≈ wi wj f a + (1 + wi ), c + (1 + wj )
a c
4 i=1 j=1 2 2
(II.3)
2n 2
which gives a O([(b − a)(c − d)] ) error. We can even integrate a function f : D ⊂ R → R
provided that we can find a mapping γ : D → [−1; 1]2 that is bijective and of class C 2n , wich
gives
Z n X
n
wi wj f˜ ◦ γ(xi , xj )
X
f (x, y) dxdy ≈ (II.4)
D i=1 j=1

where f˜(x, y) = f (x, y)|Jf (x, y)|, and Jf is the Jacobian matrix of f . This would give a
O(|D|2n ) error.

We use that last formula to compute integrals on cut cells when we consider an interface
in Ω. Finding a good mapping γ can be very tricky when we increase the polynomial degree
used since we need γ to be increasingly smooth in order to keep the orders of convergence.
We show in (III) how a wrong mapping γ can ruin the accuracy of a whole simulation.

We numerically show this phenomenon by comparing the orders of convergence of two simple
cases by integrating f : x 7→ |x| and g : x 7→ ex over [−h; h] by using the Gauss-Legendre
quadrature with a polynomial degree of 4.

22 Armand Touminet / UC Merced


Non-confidential report and publishable on Internet
PART II. IMPLEMENTATION

h f error f order g error g order


1 4.25 × 10−2 - 2.95 × 10−7 -
0.5 1.06 × 10−2 2.00 5.66 × 10−10 9.03
0.25 2.66 × 10−3 2.00 1.10 × 10−12 9.01
0.125 6.65 × 10−4 2.00 1.89 × 10−15 9.19

II.2 Parallelization
Our modal discontinuous Galerkin method can take advantage of cutting edge high per-
formance computing techniques. Particularly, it can be parallelized very efficiently. There are
two main stages in solving a partial differential equation which are very computation heavy:
constructing the left hand side matrix and solving the obtained linear system. Doing either one
of those sequentially leads to disastrous performance. For instance, using an efficient parallel
linear solver is pointless if the matrix is constructed sequentially. In out implementation we use
the PETSc library to help with the parallelization (see [2], [3]). PETSc uses MPI internally to
handle the distributed computing part.

We construct the left hand side matrix of (I.2) in parallel using parallel storage. As dis-
cussed previously, the matrix is block sparse and thus can be efficiently stored in a parallel
CRS (Compressed Row Storage) matrix object. As explained in [3], the key for an efficient
construction is to properly preallocating the object memory. Doing so involves knowing a
reasonable estimation of how many non zero coefficient are stored in each row of the matrix.
Let’s see what is inside a given matrix row. We keep the notations introduced in (I). Let i ≥ 0
such that i = kN 2 + N + q. Given a matrix M , we note M (i, :) its i-th row. Let A be the
left hand side matrix. We have

A(i, :) = αM(i, :) + µ(S(i, :) − F(i, :)).

We have seen that M is the identity matrix, it thus only has a single non zero coefficient on
the i-th column.
Concerning the stiffness matrix, we know that

S(i, `N 2 + mN + n) = h∇φkpq , ∇φ`mn i

which, according to I.3 is zero if one of the following is true

• k 6= `

• n 6≡ p (mod 2)

• m 6≡ q (mod 2)

which means that the total amount of non zero coefficient is always less than (N + 1)2 /4.

The flux matrix is the one that brings the larges amount of non zeros. If a cell Ωk has
r neighbors, then F(i, :) contains r + 1 blocks of (N + 1)2 coefficients which are results of
numerical quadrature which thus cannot be treated as non zeros.
We thus choose that last value of (r + 1)(N + 1)2 to preallocate each row of the matrix.

Armand Touminet / UC Merced 23


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

Computing the numerical flux also shows some pitfalls when it comes to parallel computing.
Indeed, computing the coefficient corresponding to a given cell involves retrieving informations
from the neighbor cells. This can introduce additional overhead if we choose to also use a
parallel storage for the quadtree mesh since it means retrieving data that can be owned by a
different process.

Solving (I.2) in parallel is entirely done by the PETSc implementation of the various linear
solvers. What can be done to decrease the computation time is to use an iterative linear solver
algorithm, such as the biconjugate gradient stabilized method (see [5]).

24 Armand Touminet / UC Merced


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

Part III

Examples

In this part we show the results obtained using our Discontinuous Galerkin solver con-
structed following (I) and (II). The goal is to validate that we obtain the expected convergence
orders and to discuss the impact of several parameters.

III.1 The Poisson equation


We test the solver on (I.1) with α = 1 and µ = 1, and a homogeneous Neumann boundary
condition. We solve this equation on Ω = [−1; 1]2 with different functions for f . We use
different polynomial degrees N for the legendre bases and different mesh refinements for the
quadtree. We call L the level of the quadtree used: a level L means that the initial domain Ω
is subdivided L times using the quadtree technique and is split in 4L cells.

We choose f (x, y) = (1 + π 2 )(cos(πx) + cos(πy)) and expect the solution u(x, y) =


cos(πx) + cos(πy). We list in table III.1 the L2 errors we get for different mesh refinement
levels and polynomial degree used, and in table III.2 we list the corresponding convergence
orders.

Table III.1: L2 errors for different values of the quadtree level L and polynomial degree N

L\N 0 1 2 3 4 5 6
0 2.00 2.00 0.83 0.82 7.80 × 10−2 7.80 × 10−2 3.70 × 10−3
1 2.00 0.41 0.41 1.10 × 10−2 1.10 × 10−2 2.20 × 10−4 2.10 × 10−4
2 0.97 0.39 0.33 4.00 × 10−2 5.40 × 10−3 4.30 × 10−4 3.50 × 10−5
3 0.43 6.90 × 10−2 9.00 × 10−2 2.70 × 10−3 4.00 × 10−4 6.40 × 10−6 6.20 × 10−7
4 0.13 2.40 × 10−2 2.20 × 10−2 1.30 × 10−4 2.40 × 10−5 9.60 × 10−8 9.30 × 10−9
5 0.18 5.20 × 10−3 5.70 × 10−3 9.80 × 10−6 1.60 × 10−6 1.50 × 10−9 1.53 × 10−10
6 0.08 1.30 × 10−3 1.40 × 10−3 5.80 × 10−7 1.00 × 10−7 2.60 × 10−11 2.30 × 10−12

We list L2 errors for higher polynomial degrees as well in table III.3. Because we are
limited in precision by the precision of the computer floating point operations, which is roughly
around 10−15 considering the values involved in the computations, we need to decrease the
solver accuracy in order to obtain relevant results. To do so we increase the size of the
computational domain, and for what follows we chose Ω = [−4; 4]2 .
Finally, we list computation time for each simulation in , tested on 12 processes.

Armand Touminet / UC Merced 25


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

Table III.2: Convergence orders for different values of the quadtree level L and polynomial
degree N

L\N 0 1 2 3 4 5 6
0 - - - - - - -
1 0 2.3 1.0 6.2 2.8 8.4 4.1
2 1.0 0.1 0.3 -1.8 1.0 -1.0 2.6
3 1.2 2.5 1.9 3.9 3.8 6.1 5.8
4 1.7 1.5 2.0 4.4 4.1 6.1 6.1
5 -0.4 2.2 1.9 3.7 3.9 6.0 5.9
6 1.2 2.0 2.0 4.1 4.0 5.9 6.1

Figure III.1: The error (on the left) and the solution of the problem with L = 0 and N = 40

Table III.3: L2 errors for different values of the quadtree level L and polynomial degree N

L\N 15 20 25 30
0 4.5 2.3 × 10−2 1.6 × 10−4 2.6 × 10−9
1 1.2 × 10−3 4.4 × 10−8 1.7 × 10−11 2.0 × 10−13
2 6.1 × 10−8 3.1 × 10−13 7.7 × 10−13 -

26 Armand Touminet / UC Merced


Non-confidential report and publishable on Internet
PART III. EXAMPLES

III.2 Choosing β

Let’s see how β impacts the error on the first example. We first choose N = 0 and L = 5.
We show the results in figure III.2. We see that choosing β 6= 1 leads to wrong results.
Increasing β make the solution converge towards the null function. As explained before, this
happens because N = 0 which is a special case. Here β has a geometrical meaning for the
finite volumes method. We thus must keep β = 1 to preserve convergence. Let’s repeat the
simulations with N = 3 and see the results on figure III.2. Here we see that increasing β
barely changes the error. This is rather surprising because choosing a different numerical flux
does not change the solution. Let’s try with a higher order with N = 9 in figure III.2. Again,
the results are rather surprising. With β = 1, the linear solver fails to converge in under 1000
iterations and yields a very inaccurate solution. With β = 2 the linear solver converges in only
109 iterations and yields a very accurate solution. Increasing β again up to 200 increases both
the error and the linear solver convergence time (473 iterations required). For high orders
there seems to be an optimal value of β for both computation time and accuracy.

Figure III.2: The error map for β = 1, 2, 20, 200 (from top left to bottom right) with N = 0
and L = 5

Armand Touminet / UC Merced 27


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

Figure III.3: The error map for β = 1, 20 with N = 3 and L = 5

Figure III.4: The error map for β = 1, 2, 20, 200 with N = 9 and L = 5

III.3 A non graded quadtree


Here we show results of the same example on a non graded quadtree. More precisely, we
construct a quadtree randomly so that we don’t enforce any property at all. The results in
figure III.3 show that the error does not behave differently for a non graded quadtree as for
a structured mesh. Our modal method thus does not require any particular property of the
mesh used. In particular, no grading factor is required to make it work.

28 Armand Touminet / UC Merced


Non-confidential report and publishable on Internet
PART III. EXAMPLES

Figure III.5: The solution and error map for a random non graded quadtree, with N = 5

Table III.4: L2 errors for different values of the quadtree level L and polynomial degree N

L\N 2 3 5
r 6.7 × 10−1 1.6 × 10−1 1.5 × 10−3
r+1 1.0 × 10−1 2.5 × 10−2 5.6 × 10−5
r+2 1.8 × 10−2 3.2 × 10−3 1.8 × 10−6

III.4 Higher order is cheaper


We compare the execution time of the main computational loop for different quadtree
levels and polynomial degrees in tabular III.5.

Table III.5: Execution time in seconds for the main computation loop

L\N 1 2 3 4 5 6
2 < 0.1 < 0.1 < 0.1 < 0.1 < 0.1 0.1
3 < 0.1 < 0.1 < 0.1 < 0.1 0.1 0.2
4 < 0.1 < 0.1 0.1 0.2 0.5 1.0
5 < 0.1 0.1 0.2 0.9 2.2 5.1
6 0.1 0.4 1.9 5.0 10.4 23.6

Table III.6: Execution time in seconds for the main computation loop with high orders

L\N 15 20 25 30
0 0.2 1.3 4 12.9
1 2.6 23.0 50.0 129.2
2 16.6 81.2 - -
3 57.5 - - -

We can see that increasing the polynomial degree does not increase the execution time
as much as increasing the quadtree level. In fact, to reach a given accuracy, it is faster (in
term of execution time) to increase the polynomial degree than to refine the mesh used. For
instance, to reach a L2 accuracy of around 10−7 , one can choose, according to III.1, either
L = 6 and N = 3 or L = 3 and N = 6. However, according to III.5, the first solution is ten

Armand Touminet / UC Merced 29


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

times slower than the second one. Actually the fastest solution to reach a given accuracy is
always to choose a quadtree of level 0 and to choose an appropriate polynomial degree. The
best mesh is no mesh at all. Of course, this is really unrealistic because for real simulations,
it is mandatory to use a mesh with sufficient refinement to model any kind of geometry, but
our results show that if it is possible to coarsen a mesh for any reason, then it is possible to
do so while preserving L2 accuracy and decreasing computation time.

30 Armand Touminet / UC Merced


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

Part IV

Adding an interface

In this part we want to extend our solver to be able to solve an equation on a specific
domain rather than a square. The computational domain can be described in different ways.
The most simple case is to import a geometry defined by third party tools. These are usually
described by a set of vertices and a connectivity to represent a set of triangles. This method
is great for representing a real object on which we want to solve an equation. For instance,
we could import a mesh representing a plane in order to study its aerodynamics. The second
approach is called the level set technique. It consists in defining a geometry implicitly by
defining a level function ψ on a rectangle shaped domain Ω such that ψ(x, y) < 0 inside the
computational domain, ψ(x, y) > 0 ouside of the computational domain, and ψ(x, y) = 0
on the computational domain boundary. This method was first introduced in [9] and reused
and developped in many different works. This method is particularily efficient for modeling
interface advection such as in diphasic flow simulations (see, e.g., [1]). Note that the first
method can be used with a level set representation since it is possible to define a level function
explicitly that is compatible with a given geometry defined by a mesh. In this work, we
approximate an interface by a segment on each cell. This means that the interface can be
approximated better by refining the quadtree mesh around it. It also means that the accuracy
gain given by increasing the polynomial degree is quite limited by the approximation of the
interface. A possible approach to keep the benefits of polynomial degree refinement without
mesh refinement would be to approximate the interface with higher precision on each cell. For
instance, one could approximate the interface with a polynomial curve of same degree than
the polynomial degree used for the method. This is a possible approach to improve this work
in future work.

IV.1 The new problem


We adapt (I.1) to model that we solve the equation on a closed subdomain Ω̃ ⊂ Ω.

αu − µ∆u = f on Ω̃ (IV.1)
u = 0 on Ω\Ω̃ (IV.2)
u = uD on ∂ Ω̃ (Dirichlet) (IV.3)
∂u
= uN on ∂ Ω̃ (Neumann) (IV.4)
∂n

Armand Touminet / UC Merced 31


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

According to the level set technique, we assume that there exists a function ψ : Ω → R such
that
ψ < 0 on Ω̃
ψ > 0 on Ω\Ω̃
ψ = 0 on ∂ Ω̃

IV.2 Modal basis on cut cells


Unfortunalty, introducing an interface in Ω introduces cut cells in our quadtree mesh that
we need to handle properly. Unfortunately, defining a proper high order Legendre basis on
cut cells is where things start to get tricky. Let’s first try to follow the approach used in the
finite volumes method in [11]. In the finite volumes method, as we approximate the solution
by a constant value on each cell, that would translate in the discontinuous Galerkin method
to take when N = 0, the first modal function trucated to fit in the cut cell. More precisely, if
we consider Ω̃k to be a cut cell,
B0k = ((x, y) 7→ φk00 (x, y)1Ω̃k (x, y)).
Note that the characteristic function 1Ω̃k can be very easily constructed thanks to the levelset
function ψ. Extending this idea to higher orders would lead to the following basis
k
BN = (φ̃kmn )0≤m,n≤N
where
∀(x, y) ∈ Ω̃k , φ̃kmn (x, y) = φkmn (x, y)1Ω̃k (x, y).
We test how this behaves when solving a really simple example by choosing α = 1, µ = 0,
f = (x, y) 7→ x2 + y 2 and ψ = (x, y) 7→ x2 + y 2 − 1.8 (meaning that we choose our interface
to be a circle). Note that by choosing µ = 0 we don’t need to care about anything related to
the numerical fluxes at all since the equation we’re solving is simply u = f .

We observe first order convergence when N = 0, but unfortunatly, for N ≥ 1, the solver
does not work very well. We observe really high error levels which get worse when we try with
even higher degrees. This can be due to the fact that truncated Legendre polynomials do not
have interesting properties, and we also loose the basis functions are no longer orthogonal. We
observe that the obtained linear system is numerically unstable as the obtained matrix is very
close to be singular. We thus need a more subtle approach to define a high order functional
basis.

IV.2.1 Legendre polynomial on bounding boxes


The first approach we follow is to still truncate our Legendre polynomials, but to define
them on a bounding box of the cut cell. We defined a bounding box of a cut cell Ω̃k as
being the smallest rectangle that contains Ω̃k and that is contained in Ωk . The idea is that
the previous approach did not work because, informally, high order functions would vary a lot
near the cell boundaries and cutting a cell near a corner would provoke all kind of numerical
instabilities. Defining the functional basis on a bounding box of the cut cell means keeping a
definition domain coherent with the cut cell size. If we note Ω̂k the bounding box of Ω̃k , that
would mean
Ω̃k ⊂ Ω̂k ⊂ Ωk .

32 Armand Touminet / UC Merced


Non-confidential report and publishable on Internet
PART IV. ADDING AN INTERFACE

Ω̃k Ω̃k

Ω̂k

Ω̃k

Figure IV.1: The three kinds of cut cells and their bounding box

IV.2.2 Algebraic components on cut cells

The major pitfall of defining a functional basis on bounding boxes is that it is no longer
orthogonal for the L2 (Ω̃k ) dot product. This means that the mass matrix is no longer the
identity matrix, and the modal basis properties described in I.3 cannot be used on cut cells.
This means we have to use numerical quadrature to integrate functions on Ω̃k . Unfortunately,
integrating a function f over Ω̃k is not as easy as integrating f 1Ω̃k on Ω̂k (where 1D is
the characteristic function on D) because f 1Ω̃k is not smooth and thus the Gauss-Legendre
quadrature would yield wrong convergence orders. Implementing it properly involves cutting
Ω̃k in several simple shapes and applying a Gauss-Legendre quadrature on each of those shapes.
In our case, as we approximate the interface with a segment on each cell, we only have to deal
with three different cut cell shapes: the triangle, the trapezoid and the pentagon, as shown in
figure IV.1. Each of those shapes can be split in several triangles and then we can integrate a
function f on a triangle Ti by integrating f ◦ γi where γi is a mapping from Ω̂k to Ti that is
bijective and of class C ∞ on the interior of Ω̂k (note that it is not on ∂ Ω̂k ). We can construct
a reference mapping γ on the unit square [−1; 1]2 to the triangle defined by the three following
vertices: (0, 0), (1, 0) and (0, 1) by

1+x
!
γ(x, y) = 2 (IV.5)
(1−x)(1+y)
4

and then construct γi by using isometries.

We also need to adapt the computation of the numerical flux as the shape of a cell boundary
is changed. For a cut cell crossed by the interface we also need to integrate a numerical flux
over the interface to enforce a given boundary condition on the interface. If we note Ik to be
the interface portion on the cell Ω̃k , then we would need to consider the following additional
term in the numerical flux described in I.4
!
Z
β k
φmn + ∇φkmn · n φkpq dγ (Dirichlet) (IV.6)
2
Ik
Z
∇φkmn · n k
φpq dγ (Neumann) (IV.7)
2
Ik

Armand Touminet / UC Merced 33


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

and the following term in the right hand side vector


βZ
uD φkmn dγ (Dirichlet) (IV.8)
2
I
Zk
uN k
− φ dγ (Neumann) (IV.9)
2 mn
Ik

IV.2.3 Warped Legendre polynomials


An other idea we follow here is a more original one: extend the definition of the Legendre
polynomials to a cut cell. To do so, we need to find a bijective mapping γk : Ωk → Ω̃k that
warps a rectangle cell to a cut cell. Then we define our functional basis as follows
k
BN = (φ̃kmn )0≤m,n≤N

where
∀(x, y) ∈ Ω̃k , φ̃kmn (x, y) = φkmn ◦ γ −1 (x, y).
The kind of mapping we use depends on the geometry of the cut cell. We need to find one
for each of the three different cut cell geometries possible.

Triangle. We reuse the mapping defined in IV.5. Its inverse is given by


!
2x − 1
γ −1 (x, y) = 2y (IV.10)
1−x
−1

Trapezoid. Mapping a rectangle to a trapezoid is easy as it is an affine mapping. For


instance, a mapping from [0; 1]2 to the trapezoid defined the the vertices (0, 0), (0, 1), (1, 1),
(1/2, 0) is given by !
(y + 1)x/2
γ(x, y) = (IV.11)
y

Pentagon. Mapping a pentagon to a square smoothly is not intuitive. The first idea is
to split the pentagon into a rectangle and a trapezoid and use the identity function on the
rectangle and the previous mapping on the trapezoid. However this mapping is only piecewise
smooth and leads to wrong convergence orders in our tests. A trick that can be used is to add
a C ∞ connection between the rectangle and the trapezoid to make the mapping of class C ∞ .
We don’t give the exact expression of this mapping here as its expression is quite cumbersome.

Even though this approach can seem quite cheesy as the resulting functional basis is not
even polynomial nor orthogonal, we observe accurate results in our tests for µ = 0 (meaning
that we do not handle the numerical flux. The case where µ 6= 0 was not numerically tested).
It would need more work to implement this properly though.

34 Armand Touminet / UC Merced


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

Part V

Conclusion

In this work we presented a modal discontinuous Galerkin method on non graded quadtrees
with a scalable parallel implementation. We showed that our method leads to arbitrary con-
vergence orders for solving the Poisson equation and that the method does not require any
grading property of the mesh used. We also showed that polynomial degree refinement is
more scalable than mesh refinement. Finally we showed several approaches on how to handle
adding an interface to the geometry of the problem following the level set technique, and how
to adapt the method to handle it properly, even though our implementation is not fully feature
complete for this part, and could be continued and improved in future work. This work could
also be continued and improved by giving a closer look at time dependency and how it would
integrate in the modal approach.

Armand Touminet / UC Merced 35


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

Bibliography

[1] Moataz O. Abu-Al-Saud, Cyprien Soulaine, Amir Riaz, and Hamdi A. Tchelepi. Level-set
method for accurate modeling of two-phase immiscible flow with moving contact lines.
2017.

[2] Satish Balay, Shrirang Abhyankar, Mark F. Adams, Jed Brown, Peter Brune, Kris Buschel-
man, Lisandro Dalcin, Victor Eijkhout, William D. Gropp, Dinesh Kaushik, Matthew G.
Knepley, Dave A. May, Lois Curfman McInnes, Richard Tran Mills, Todd Munson, Karl
Rupp, Patrick Sanan, Barry F. Smith, Stefano Zampini, Hong Zhang, and Hong Zhang.
PETSc users manual. Technical Report ANL-95/11 - Revision 3.9, Argonne National
Laboratory, 2018.

[3] Satish Balay, William D. Gropp, Lois Curfman McInnes, and Barry F. Smith. Efficient
management of parallelism in object oriented numerical software libraries. In E. Arge,
A. M. Bruaset, and H. P. Langtangen, editors, Modern Software Tools in Scientific
Computing, pages 163–202. Birkhäuser Press, 1997.

[4] B. Cockburn and C.-W. Shu. Tvb runge-kutta local projection discontinuous galerkin
methods for scalar conservation laws ii: General framework. Mathematics of Computation,
1989.

[5] H.A. Van der Vorstm. Bi-cgstab: A fast and smoothly converging variant of bi-cg for the
solution of nonsymmetric linear systems. SIAM J. Sci. and Stat. Comput., 1992.

[6] Nash Stephen Kahaner David, Moler Cleve. Numerical Methods and Software. 1989.

[7] Robert M. Kirby and George Em Karniadakis. Selecting the numerical flux in discontinuous
galerkin methods for diffusion problems. Journal of Scientific Computing, 2005.

[8] Hailiang Liu and Jue Yan. The direct discontinuous galerkin (ddg) method for diffusion
with interface corrections. Commun. Comput. Phys. Vol. 8, No. 3, 2010.

[9] Sethian J. A. Osher S. Fronts propagating with curvature-dependent speed: Algorithms


based on hamilton–jacobi formulations. J. Comput. Phys, 1988.

[10] W.H. Reed and T.R. Hill. Triangular mesh methods for the neutron transport equation.
Tech. Report LA-UR-73-479, 1973.

[11] Maxime Theillard, Landry Fokoua Djodom, Jean-Léopold Vié, and Frédéric Gibou. A
second-order sharp numerical method for solving the linear elasticity equations on irregular
domains and adaptive grids – application to shape optimization. Journal of Computational
Physics 233, 2012.

Armand Touminet / UC Merced 37


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

[12] Wikipedia contributors. Legendre polynomials — Wikipedia, the free encyclopedia, 2018.
[Online; accessed 23-August-2018].

[13] Wikipedia contributors. Runge–kutta methods — Wikipedia, the free encyclopedia, 2018.
[Online; accessed 26-August-2018].

38 Armand Touminet / UC Merced


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

Appendix A

Proofs of the modal basis properties

Here we give proofs for the properties enumerated in Property 1 in (I.3).

Proof.

i. See [12].

ii. From [12] we have


0 0
(2n + 1)Pn = Pn+1 − Pn−1 . (A.1)
Summing this for n even gives a telescopic sum that can be reduced to
n
0
+ P10
X
(4i + 1)P2i = P2n+1
i=1

Since P1 = X, P10 = 1 and thus


n
0
X
P2n+1 =1+ (4i + 1)P2i .
i=1

iii. Summing (A.1) for n odd yields


n
0
+ P00 .
X
(4i + 3)P2i+1 = P2n+2
i=0

P00 = 0 and thus


n−1
0
X
P2n = (4i + 3)P2i+1 .
i=0

iv.
n n−1
* +
0 0
X X
hP2n+1 , P2m i = 1+ (4i + 1)P2i , (4i + 3)P2i+1
i=1 i=0
n−1
X n−1
X
= (4i + 3) h1, P2i+1 i + (4i − 3)(4i + 3)hP2i−2 , P2i+1 i
i=0 i=0

Since ∀i, 2i − 2 6≡ 2i + 1 (mod 2), hP2i−2 , P2i+1 i = 0. Moreover, h1, Pn i = 2δ0n and
0 0
thus for i ≥ 0, h1, P2i+1 i = 0. Finally, hP2n+1 , P2m i = 0.

Armand Touminet / UC Merced 39


Non-confidential report and publishable on Internet
A modal Discontinuous Galerkin method on non graded quadtrees

v.
n m
* +
0 0
X X
hP2n+1 , P2m+1 i = 1+ (4i + 1)P2i , 1 + (4j + 1)P2j
i=1 j=1
n
X m
X n X
X m
= h1, 1i + (4i + 1)h1, P2i i + (4j + 1)h1, P2j i + (4i + 1)(4j + 1)hP2i , P2j i
i=1 j=1 i=1 j=1
n Xm
X 2
=2+ (4i + 1)(4j + 1) δij
i=1 j=1 4i + 1
Xn
=2+2 (4i + 1) = 2 + 2n + 4n(n + 1)
i=1
= 2 + 2n(2n + 3)

vi.
*n−1 m−1
+
0 0
X X
hP2n , P2m i = (4i + 3)P2i+1 , (4j + 3)P2j+1
i=0 j=0
X m−1
n−1 X
= (4i + 3)(4j + 3)hP2i+1 , P2j+1 i
i=0 j=0
X m−1
n−1 X 2
= (4i + 3)(4j + 3) δij
i=0 j=0 4i + 3
n−1
X
=2 (4i + 3) = 4n(n − 1) + 6n
i=0
= 2n(2n + 1)

Both vii. and viii. are trivial.

40 Armand Touminet / UC Merced


Non-confidential report and publishable on Internet

You might also like