multi-dimensional parallel discontinuous galerkin โ€ฆ...sample 2d mesh โˆ’ฮ” = ๐‘– ฮฉ = ฮ“ ๐œ•๐‘ข...

Post on 24-Jul-2020

0 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Multi-dimensional Parallel Discontinuous Galerkin Method

Mentors: Dr. Ohannes Karakashian, Dr. Kwai Wong, Michael Wise

Zhe Zhu

The Chinese University of Hong Kong

7/29/2016

Agenda

1. Background

2. How DG works

3. Solve 2D equation

4. Solve 3D Equation

5. Parallelization

6. Future work

Background

Goal:

Implement DG-FEM to solve Poissonโ€™s equation in parallel on HPC platform

โˆ’ฮ”๐‘ข = ๐‘“ ๐‘–๐‘› ฮฉ๐‘ข = ๐‘”๐‘‘ ๐‘œ๐‘› ฮ“๐ท๐œ•๐‘ข

๐œ•๐‘›= ๐‘”๐‘› ๐‘œ๐‘› ฮ“๐‘

Ax=b Approximate solution of u

Problem Setting:

How DG works

Element term

Interior edge term

Boundary edge term

Penalty term

Jump term

Diagonal local block

Local block Local block

Global matrix A

Solve Ax=b

๐‘Žโ„Ž(๐‘ข, ๐‘ฃ)Given

equation

Weak form

LHS: Ax RHS: b

๐‘Žโ„Ž(๐‘ข, ๐‘ฃ) F(v)

Divided into three parts

Computed in parallel

Combine all local blocks

Use Trilinos to finish parallel solving

Test function v

How DG works

Given equation

Weak form

LHS: Ax RHS: b

๐‘Žโ„Ž(๐‘ข, ๐‘ฃ) F(v)

Test function v

โˆ’ฮ”๐‘ข = ๐‘“ ๐‘–๐‘› ฮฉ๐‘ข = ๐‘”๐‘‘ ๐‘œ๐‘› ฮ“๐ท

๐œ•๐‘ข

๐œ•๐‘›= ๐‘”๐‘› ๐‘œ๐‘› ฮ“๐‘

How DG works

Given equation

Weak form

LHS: Ax RHS: b

๐‘Žโ„Ž(๐‘ข, ๐‘ฃ) F(v)

Test function v

โˆ’ฮ”๐‘ข = ๐‘“ ๐‘–๐‘› ฮฉ๐‘ข = ๐‘”๐‘‘ ๐‘œ๐‘› ฮ“๐ท

๐œ•๐‘ข

๐œ•๐‘›= ๐‘”๐‘› ๐‘œ๐‘› ฮ“๐‘

Bilinear Function for Stiffness Matrix:

:element term : jump term :penalty term

Solving Linear System:

How DG works

Element term

Interior edge term

Boundary edge term

Penalty term

Jump term

Diagonal local block

Local block Local block

Global matrix A

Solve Ax=b

๐‘Žโ„Ž(๐‘ข, ๐‘ฃ)Given

equation

Weak form

LHS: Ax RHS: b

๐‘Žโ„Ž(๐‘ข, ๐‘ฃ) F(v)

Divided into three parts

Computed in parallel

Combine all local blocks

Use Trilinos to finish parallel solving

Test function v

How DG works

Element term

Interior edge term

Boundary edge term

Penalty term

Jump term

Diagonal local block

Local block Local block

Global matrix A

Solve Ax=b

๐‘Žโ„Ž(๐‘ข, ๐‘ฃ)

Divided into three parts

Computed in parallel

Combine all local blocks

Use Trilinos to finish parallel solving

Bilinear Function for Stiffness Matrix:

:element term : jump term :penalty term

Solving Linear System:

Solve 2D Equation

Sample 2D Mesh

โˆ’ฮ”๐‘ข = ๐‘“ ๐‘–๐‘› ฮฉ๐‘ข = ๐‘”๐‘‘ ๐‘œ๐‘› ฮ“๐ท๐œ•๐‘ข

๐œ•๐‘›= ๐‘”๐‘› ๐‘œ๐‘› ฮ“๐‘

โ€ข We want to solve ๐‘ข through numerical method

โ€ข We want to get an approximation of ๐‘ข on the domain.

ฮฉฮ“๐ท

Where ๐‘“, ๐‘”๐‘‘, ๐‘”๐‘› is known

Solve 2D Equation

ฮฉฮ“๐ท

Choose nodal points

โ€ข By calculating the value of u on these nodal points, we can get the approximation of u on ฮฉโ€ข In general, the more nodal points you choose, the higher accuracy of the approximation you get

1. Find a set of independent basic functions { ๐‘ฃ๐‘—}

2. Try to use the linear combination to get the approximate

value on nodal points which can fit into the exact value.

3. Represent u as a linear combination of those basic

functions

Solve 2D Equation

๐‘ข =

๐‘—

๐‘ข๐‘— ๐‘ฃ๐‘—

How to get the approximation of u on these nodal points ?

The two problem we need to solve:

1. How to choose the basic functions?

2. How to represent u as a linear combination of basic functions?

Solve 2D Equation

Solve 2D Equation

Master cell

lagrange interpolation

๐œ‘๐ด = x

๐œ‘๐ต = y

๐œ‘๐ถ = 1-x-y

Solve 2D Equation

๐œ‘๐ด = x

๐œ‘๐ต = y

๐œ‘๐ถ = 1-x-y

๐œ‘๐ด0

๐œ‘๐ต0

๐œ‘๐‘0

๐œ‘๐ด1

๐œ‘๐ต1

๐œ‘๐‘1

โ€ฆ

๐œ‘๐ด7

๐œ‘๐ต7

๐œ‘๐‘7

Divide the mesh into several elements

Solve 2D Equation

Use map to do integration in the master cell

a

b c

(x,y)

( ๐‘ฅ, ๐‘ฆ)

Solve 2D Equation

Bilinear Function for Stiffness Matrix:

:element term : jump term :penalty term

Solving Linear System:

Solve 2D Equation

๐œ™0(๐ผ0)

๐œ™1(๐ผ0)

๐œ™0(๐ผ1)

๐œ™2(๐ผ0)

๐œ™2(๐ผ1)

๐‘ข0

(๐ผ0)

๐‘ข1

(๐ผ0)

๐‘ข2

(๐ผ0)

๐‘ข0

(๐ผ1)

๐‘ข1

(๐ผ1)

๐‘ข2

(๐ผ0)

= โ‹ฏ

๐œ™1(๐ผ1)

๐œ™0(๐ผ0) ๐œ™1

(๐ผ0) ๐œ™2(๐ผ0) ๐œ™0

(๐ผ1)๐œ™1

(๐ผ1)๐œ™2

(๐ผ1)

โ€ฆ

Solve 2D Equation

Triangles

Interior Edges

Boundary Edges

++

--

+-

-+

8*

8*

8*

Solve 2D Equation

Solve 2D Equation

For triangles:

Element-element matrix:

Solve 2D Equation

Solve 2D Equation

We use Gaussian quadrature to do the integration

โ€ข In this example, the function is linear, so we only need one quadrature point to get the answer.

โ€ข When calculate penalty term, we will need at least two quadrature point.

โ€ข The match of the more than one pair of quadrature points is a problem.

Solve 2D Equation

Solve 2D Equation

Get the right number for each blocks and combine those blocks into the global matrix

For edge (++ case)

Solve 2D Equation

The RHS: Global matrixThe LHS: vector

Solve 3D Equation

Nodal point *8

Tetrahedron *6

Inter face *6

Boundary face *12

Solve 3D Equation

lagrange interpolation

๐œ‘๐ด = x

๐œ‘๐ต = y

๐œ‘๐ถ = z

๐œ‘๐ท = 1-x-y-z

Solve 3D Equation

2D 3D

Element term Integration on surface Integration of 3 dimension

Number of quadrature points 0 0

Jump term Integration on line Integration on face

Number of quadrature points 1 1

Penalty term Integration on line Integration on face

Number of quadrature points 2 3

When our basic function is linear, the number of quadrature points needed for each term:

To calculate the penalty term of 3D case, we need to figure out how the three pairs of nodal points are matched.

Solve 3D Equation

1. Find the way of mapping between the two cell and the

master cell respectively

2. Find out the relation between the two cell

3. Find the way of matching

4. Get the right answerIndex match

0 0, 1, 2

1 0, 2, 1

2 1, 0, 2

3 1, 2, 0

4 2, 0, 1

5 2, 1, 0

Solve 3D Equation

Index match

0 0, 1, 2

1 0, 2, 1

2 1, 0, 2

3 1, 2, 0

4 2, 0, 1

5 2, 1, 0

Cell1: [1, 2, 3, 4] Cell2: [3, 1, 5, 4]

1. [1, 2, 3, 4] and [3, 1, 5, 4] are all map to [A, B, C, D]

2. The common face is [1, 3, 4] and [3, 1, 4]

3. The match way is [1, 0, 2]

4. Face [1, 3, 4] maps to [A, C, D] of the master cell

5. Face [3, 1, 4] maps to [A, B, D] of the master cell

6. Get the value of given functions at quadrature points

on [A, C, D] and [A, B, D]

7. Multiply those value according to the match way

Parallelization

1. Divide the global matrix into the combination of several blocks

2. Calculate the right number for each blocks in parallel

3. Combine those blocks into the global matrix

4. Use conjugate gradient method to solve the equation in parallel

Parallelization

After Global Matrix Construction: Solve linear system

โ€ข C programming: dgesv on LAPACK

โ€ข LU factorization: dense matrix solver

โ€ฆ

Cell Matrices

MPI Assembly

Global Matrix

LAPACK dgesvdense matrix solver

Solution

Parallelization

Parallelize the linear system solving process

โ€ข AztecOO on Trilinos

โ€ข Each processor has access to global rows

โ€ฆ

Cell Matrices

MPI Assembly

Global Rows

AztecOO on Trilinos

Solution

Parallelization

Future works

โ€’ Extend the partial differential equation to some time-dependent

equations

โ€’ Finish the parallel code, which can be scaled on existing

supercomputers.

Acknowledgement

This project is sponsored by

Oak Ridge National Laboratory

Joint Institute for Computational Sciences

University of Tennessee, Knoxville

The Chinese University of Hong Kong

Most sincere gratitude to my mentors

Dr. Ohannes Karakashian, Dr. Kwai Wong and Michael Wise

Q & A

top related