63
Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 15 Instructor: Tim Warburton

Numerical Methods for Partial Differential Equationscaam452/CAAM452Lecture15c.pdf · Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 15 Instructor:

Embed Size (px)

Citation preview

Numerical Methods for Partial Differential Equations

CAAM 452Spring 2005Lecture 15

Instructor: Tim Warburton

CAAM 452 Spring 2005

CAAM 452 Spring 2005

Two-Dimensional Advection• Recall in one-dimensions we chose an arbitrary

section of a pipe.

• We monitored the flux of fluid into and out of the ends of the pipe.

• The conservation equation in 1D we derived was:

• Now we start with a 2D domain and consider any simply connected sub-region:

( ) ( ) ( ) ( ), , , ,b

a

dC u b t C b t u a t C a t

dt= − +

CAAM 452 Spring 2005

Our 2D Domain Ω

Ω

CAAM 452 Spring 2005

Our Sub-region

ω

Ω

ω

CAAM 452 Spring 2005

Outward Normal n

Ω

ω

n

CAAM 452 Spring 2005

Conservation

• Suppose the fluid has a mean velocity everywhere.

• This time is a two-vector.

• The flux of fluid through the boundary is the integral of the concentration C being advected normal to the surface of w:

ω

n=outward pointing normal

u

u

u

( )flux CdSω∂

= − ⋅ u n

CAAM 452 Spring 2005

Conservation Law

• Now we know how much of the concentrate is being advected through the boundary of our sub-region.

• The conservation law is now:

• We apply the divergence theorem (beware this relies on smoothness arguments):

( )dCdV CdS

dt ω ω∂

= − ⋅ u n

( )

( )

dCdV CdS

dt

C dV

ω ω

ω

= − ⋅

= −∇ ⋅

u n

u

CAAM 452 Spring 2005

In Component Form

• Assuming ubar is constant this becomes:

( )dCdV CdV

dt

u v CdVx y

ω ω

ω

= − ⋅∇

∂ ∂= − + ∂ ∂

u

u

v

x

x

=

∂ ∂∇ =

∂ ∂

u

CAAM 452 Spring 2005

Finalize

• For all sub-regions:

• Assuming enough continuity we obtain:

0

dCdV u v CdV

dt x y

C C Cu v dV

t x y

ω ω

ω

∂ ∂+ + ∂ ∂

∂ ∂ ∂= + + = ∂ ∂ ∂

0C C C

u vt x y

∂ ∂ ∂+ + =∂ ∂ ∂

CAAM 452 Spring 2005

Basic Technology For Meshes in 2D

• Our target is to be able to use triangulations of a domain in 2D.

• For example here we have a 5 triangle mesh of an L-shape domain:

CAAM 452 Spring 2005

Global Vertex Numbering

• In order to represent the topology of the triangles we create a global numbering of the unique vertices in the mesh:

• Notice – the allocation of number to vertex is arbitrary.

1 2

3

4

5

6

7

CAAM 452 Spring 2005

Triangle as Ordered Triplet

• We next label each triangle in the mesh (numbers in triangles):

• Again the labeling of the triangles is in an arbitrary order.

1 2

3

4

5

6

7

1

2

3

4

5

CAAM 452 Spring 2005

Triangle as Ordered Triplet cont

1 2

3

4

5

6

7

1

2

3

4

5

We can represent each triangle as atriplet of integers which are the globalvertex numbers of the triangle in acounter-clockwise ordering:

Triangle 1: 7,5,3Triangle 2: 2,5,7Triangle 3: 4,6,1Triangle 4: 1,7,4Triangle 5: 2,7,1

CAAM 452 Spring 2005

Class Exercise Part 1

Given this element to vertex representation of the mesh,can you determine determine the topology of the triangle (i.e. what might the mesh look like)?

Triangle 1: 2,3,6Triangle 2: 5,3,2Triangle 3: 6,3,1Triangle 4: 2,6,4

What is the cost of your algorithm?

CAAM 452 Spring 2005

Class Exercise Part 2

Given this element to vertex representation of the mesh,can you determine which triangles share an edge:

Triangle 1: 1,2,9Triangle 2: 2,3,9Triangle 3: 3,4,5Triangle 4: 3,5,6Triangle 5: 3,6,9Triangle 6: 9,6,7Triangle 7: 8,9,7

What is the cost of your algorithm?

CAAM 452 Spring 2005

Naïve Algorithm

• We could naively try a brute force search.• Two triangles will share an edge if they both

contain two vertices in common.

• So the obvious algorithm is:

a b

CAAM 452 Spring 2005

Alogithm 1

Brute force – test to see which out ofall the edges connects to a given edge.

Cost approx. 9*K^2

We can trim the number of testsby ½ easily (loop elmt2=elmt1+1:K and store result in (elmt1,edge1) and (elmt2,edge2).

Very loopy so Matlab will be very slow.

CAAM 452 Spring 2005

Alogithm 2

Set up the edge to node matrix using Matlab’s sparse matrix facility.

Thinking about the connectivity matrices as sparse matrices allows us to easily find other connectivities:

NodeToEdge = transpose(EdgeToNode)

CAAM 452 Spring 2005

Topology Determined

• So with either approach we now know the topology of the triangles (i.e. which triangles share an edge).

• Consider the advection equation:

• We can use this as the foundation of an upwind finite volume solver:

0

or it's conservation law version:

k kT T

qc q

t

dqdA c nqds

dt ∂

∂ + ⋅∇ =∂

= − ⋅

( ), ,3

1 edge e

12

where ElmtToElmt( , )

e

k e k eek

k kek

e

c n c ndqq q

dt T

k k e

=

=

⋅ − ⋅= − −

=

CAAM 452 Spring 2005

Geometric Factors

• With being the k’th triangle we need to be able to compute and the outward facing unit normals on each edge ( )

, ,3

1 edge e

12

where ElmtToElmt( , )

e

k e k eek

k kek

e

c n c ndqq q

dt T

k k e

=

=

⋅ − ⋅= − −

=

kT

kT,k en

,2kn

,1kn

,3kn

,1kv ,2kv

,3kv( )

( )

( )

,2 ,1,1 ,1 ,2 ,1

,2 ,1,1

,3 ,2,2 ,2 ,3 ,2

,3 ,2,2

,1 ,3,3 ,3 ,1 ,3

,1 ,2,3

1 where

1 where

1 where

k ky yk k k k

sk kkx xs

k ky yk k k k

sk kkx xs

k ky yk k k k

sk kkx xs

v vn L v v

v vL

v vn L v v

v vL

v vn L v v

v vL

−= = − − −

−= = − − −

−= = − − −

CAAM 452 Spring 2005

Computing the Area of a Triangle

• We can use a simple geometric argument to determine the area of a triangle:

( ) ( )

( )( ) ( )( )

,2 ,1 ,3 ,1

,2 ,1 ,3 ,1 ,2 ,1 ,3 ,1

1212

k k k kk

k k k k k k k kx x y y y y x x

T v v v v

v v v v v v v v

= − × −

= − − − − −

CAAM 452 Spring 2005

cont

• We make some approximations:1) that q is in fact constant over the element2) Euler-forward in time and we obtain:

( ), ,3

1,

1

,

2

where is the length of the 'th edge on triangle

e

k e k een n n nk k k e k k

ek

k e

c n c ndtq q T q q

T

T e k

=+

=

⋅ − ⋅= − ∂ −

CAAM 452 Spring 2005

Notes on the Geometric Factors

,1kL

,1 ,1

,1,1 ,1

212

k k

kk kk

L LT hh L

= =

,1kh

,2kL

,2 ,2

,2,2 ,2

212

k k

kk kk

L LT hh L

= =

,2kh,3kL

,3 ,3

,3,3 ,3

212

k k

kk kk

L LT hh L

= =

,3kh

The ratio of the edge length to triangle area gives 2 divided by the perpendicular heightfrom the edge to the vertex not on the edge.

We use the formula: area of triangle = ½*(base*perpendicular height)

CAAM 452 Spring 2005

cont

• Simplifying:

• This looks very much like a one-dimensional scheme applied at each edge – which it is.

• At each edge we use the component of the advection velocity in the direction of the outwards facing normal.

( ), ,3

1,

1e

k e k een n n nk k k kk e

e

c n c nq q dt q q

h

=+

=

⋅ − ⋅= − −

CAAM 452 Spring 2005

Project 1- Overview

• I grabbed a polygonal description of part of coast line of the UK and Eire:

• I then used the Triangle program by Shewchukto generate a trianglemesh.

• Your task: solve the linearizedEuler equations with a pressurepulse set off near the coast.

http://www.mar.dfo-mpo.gc.ca/science/ocean/coastal_hydrodynamics/resolute/resolute.html

CAAM 452 Spring 2005

Project 1 - Equations

• The linearized Euler equations we will consider are:

• where p is the pressure and u,v are the x and ycomponents of the water velocity.

• The boundary condition states that at the boundary the velocity field is tangential to the boundary.

00 0, BC: 0x y

u p

v p un vnt x y

p u v

∂ ∂ ∂ + + = + = ∂ ∂ ∂

CAAM 452 Spring 2005

cont

• We write a first order finite-volume scheme for the linearized Euler equations using upwind fluxes for:

• as (after board demo of characteristic treatment):

( ) ( ) ( )( )1 ,

31 , , ,

,11

1

1

Boundary condition:

, , at the domain boundary

e e e

e e e

n n k ek k xen n k e k e n n k e n n n n

k k y x k k y k k k kk een n

k k

n n n n n nk k k k k k

u u n

v v dt n n u u n v v p ph

p p

u u v v p p

+=

+

=+

= + − + − − − −

= − = − =

00 0, BC: 0x y

u p

v p un vnt x y

p u v

∂ ∂ ∂ + + = + = ∂ ∂ ∂

CAAM 452 Spring 2005

Project Tasks

Q1) Write code to read in the mesh from a .neu mesh file (more about that next time)

Q2) Write start up code to compute: – The area of each triangle– The length of each edge of each triangle– The outwards facing unit normal at each edge of

each triangle

Q3) Implement the first order finite volume scheme for the linearized acoustics. Use a dt which obeys:

( ),

,

10 min with safety factor such that 0

2k e

k edt C h C C≤ ≤ ≤ ≤

CAAM 452 Spring 2005

Project Tasks cont

Q4) By generating a sequence of increasingly refined meshes for a square [-1,1]x[-1,1] find the solution order of accuracy of the scheme. A suitable initial condition is:

The solution for all time is:

( )( )( ) ( ) ( )

, ,0 0, ,0 0, ,0 cos cos

u x y

v x y

p x y x yπ π

=

( )( )( )

( ) ( ) ( )( ) ( ) ( )

( ) ( ) ( )

sin cos sin 2 / 2, ,, , cos sin sin 2 / 2, , cos cos cos 2

x y tu x y t

v x y t x y t

p x y t x y t

π π π

π π π

π π π

=

CAAM 452 Spring 2005

Project Tasks cont

Q5) Use the ocean mesh and model a pressure pulse (Gaussian profile) off the coast of England

• Repeat with 3 increasingly refined meshes to visually display and compare results.

• Plot snap shots at 4 time intervals showing the pulse spreading and interacting with the coast line.

• I will now demo how to build meshes with some in house software based on Shewchuk’striangle mesh generator.

CAAM 452 Spring 2005

Project Details

• You may work in groups of 1 or 2.

• No groups of 3 or more will be permitted.

• The project is due: 03/29/05

• Be prepared to present your results (i.e. make a 5 minute PowerPoint presentation).

• Prepare a report – and I strongly suggest using the Latex stylesheet available from the website.

CAAM 452 Spring 2005

More Advanced Than FV

• As you will find out the finite volume method is robust, but not very accurate.

• To increase the solution order of accuracy we are going to use the discontinuous Galerkin method (DGM or DG)

• The idea: on each triangle we create a p’th order polynomial expansion local to the triangle.

• We then use a flux type formulation to exchange information between triangles.

CAAM 452 Spring 2005

Basics

• First we need to discuss how to create local polynomial approximations on each triangle.

• i.e. we need a robustly computable basis for

• In finite volume and finite element methods it is common to perform calculus type operations (integration, differentiation and interpolation) on a standard element and map the results to a physical element.

( ) i

0 i+j p= xp j

TP T y

≤ ≤

CAAM 452 Spring 2005

Reference Triangle

• The following will be our reference triangle:

• The k’th triangle is the image of this triangle under the map:

s

r

(-1,-1) (1,-1)

(-1,1)

,1 ,2 ,3

,1 ,2 ,3

1 12 2 2

k k kx x xk k ky y y

v v vx r s r sv v vy

+ + + = − + +

CAAM 452 Spring 2005

Reference Triangle Mapped To Physical Triangle

• A typical map will have the following action:

s

r

(-1,-1) (1,-1)

(-1,1)

( ),2 ,2,k kx yv v( ),1 ,1,k k

x yv v

( ),3 ,3,k kx yv v

,1 ,2 ,3

,1 ,2 ,3

1 12 2 2

k k kx x xk k ky y y

v v vx r s r sv v vy

+ + + = − + +

CAAM 452 Spring 2005

Orthonormal Basis for the Triangle

• Fortunately a well behaved, orthonormal basis for the triangle has been discovered (and rediscovered multiple times).

• First we need to know some details about the Jacobipolynomials. These polynomials are parameterized by two reals: and their integer orders n,m such that they satisfy the orthogonality relationship (for integer alpha,beta):

,α β

( ) ( ) ( ) ( )( )

1, ,

1

! !1 1 22 2 2 1 ! !n m nm

n nx xP x P x dx

n n n

α βα β α β α β

δα β α β−

+ +− + = + + + + +

( ) ( )

( ) ( ) ( )

,

, ,

!1

! !

1

n

n

n n

nP

n

P x P x

α β

α β β α

αα

+=

− = − −

CAAM 452 Spring 2005

Jacobi Polynomial Recurrence Relation

( )

( ) ( ) ( )( )( )

,0

,1

1

12 1 2 1

2

P x

P x x

α β

α β α α β

=

= + + + + −

( )( )( ) ( )

( )( ) ( )( ) ( )

( )( )( ) ( )

,1

2 2 ,

,1

2 1 1 2

2 2 !2 1

2 1 !

2 2 2

n

n

n

n n n P x

nn x P x

n

n n n P x

α β

α β

α β

α β α β

α βα β α β

α β

α β α β

+

+ + + + + + =

+ + + + + + − + + + −

− + + + + +

See: http://www.caam.rice.edu/~timwar/MA578S03/MatlabScripts/JACOBI1D.m

We can generate the n’th order Jacobi polynomials at a given x in [-1,1] through the following recurrence relationship:

CAAM 452 Spring 2005

Orthonormal Basis for the Triangle

• The following basis is due to Koornwinder (later revived by Proriol, Dubiner, Owens,….)

• It satisfies the following orthogonality condition:

( ) ( ) ( ) ( )0,0 2 1,0,

1,

2where:

2(1 )1

(1 )

nn

n mn m

br s P a P b

ra

sb s

φ +− =

+= −−

=

( ) ( )

1

, ,1 1

2 22 1 2 2 2

s

ik jli j k l drdsi j i

φ φ δ δ−

− −

=+ + +

CAAM 452 Spring 2005

cont

• Notice that the (n,m) basis member is an n+m’thorder polynomial.

• Moreover, the orthogonality property allows us to determine that the set of basis members with:

• n+m<=p supports all bivariate polynomials with maximum total degree p.

( ) ( ) ( ) ( )0,0 2 1,0,

1,

2where:

2(1 )1

(1 )

nn

n mn m

br s P a P b

ra

sb s

φ +− =

+= −−

=

CAAM 452 Spring 2005

Basis Ordering

In order to simplify the notation we can order the polynomials with a single index (this is not a unique ordering):

( )

( )

( )

( )

( )

( )

( )

( )

ψ φψ φ

ψ φψ φ

ψ φ ψ φ

ψ φψ φ

+

+

+ −+

==

==

= =

==

,0

1 0,02 0,1

2 1,03 1,1

3 2,0 0,

2 2 1,11 p

p

pM p

p pp

where M=(p+1)(p+2)/2 and we have normalized each of the iψ

CAAM 452 Spring 2005

cont

• Next class we will discuss how to use this basis to interpolate, differentiate and integrate data at points in the triangle.

• We continue here to discuss the question of which points to use on the triangle for polynomial interpolation.

CAAM 452 Spring 2005

Interpolation Using Generalized Vandermonde Matrix

• Given a set of nodes lying in the triangle we use V to construct an interpolating polynomial for a function who’s values we know at the nodes:

• The interpolation condition yields:

( ) ( )1

ˆ, ,i M

i ii

f r s r s fψ=

=

( ) ( )

( ) ( )

( ) ( )

1

1

1

1

ˆ, ,

ˆ, where ,

ˆ ,

i M

j j i j j ii

i M

j j ji i ji i j ji

j M

i j jijj

f r s r s f

f r s f r s

f f r s

ψ

ψ

=

=

=

=

=−

=

=

= =

=

V V

V

CAAM 452 Spring 2005

Differentiation

• Suppose we wish to find the derivative of a p’th order polynomial:

• First we note that the approximation becomes equality:

• And interpolation allows us to find the polynomial coefficients:

• So differentiation requires us to compute:

( ) i

0 i+j p= xp j

Tf P T y

≤ ≤∈

( )1

ˆ, m M

n n nm mm

f r s f=

=

= V

( ) ( )

( ) ( )1

1

ˆ, ,

ˆ, ,

m Mm

mm

m Mm

mm

fr s r s f

r r

fr s r s f

s s

ψ

ψ

=

=

=

=

∂∂ =∂ ∂

∂∂ =∂ ∂

( ) ( )1

ˆ, ,i M

i ii

f r s r s fψ=

=

=

CAAM 452 Spring 2005

Differentiation cont

• So we need to be able to compute:

• Recall the definition of the basis functions:

• R-derivative:

and m m

r sψ ψ∂ ∂∂ ∂

( ) ( ) ( )0,0 2 1,02(1 ) 1, 1

(1 ) 2

nn

n mnm

r sr s P P s

sφ + + − = − −

( ) ( ) ( )0,0

2 1,02 2(1 ) 1, 1

1 (1 ) 2

nnm nn

m

dP r sr s P s

r s dx s

φ+

∂ + − = − ∂ − −

CAAM 452 Spring 2005

Quick Jacobi Polynomial Identity

• We will make extensive use of the following:

( ) ( ),

1, 11

12

nn

dP nx P x

dx

α βα βα β + +−

+ + + =

CAAM 452 Spring 2005

r-Derivative

• Ok we need to calculate:

• We can compute these using the definition of the Jacobi polynomials.

• Watch out for s=1 (top vertex) – the r-derivative of all the basis is functions is zero at r=1,s=-1

( ) ( ) ( )0,0

2 1,02 2(1 ) 1, 1

1 (1 ) 2

nnm nn

m

dP r sr s P s

r s dx s

φ+

∂ + − = − ∂ − −

( ) ( ) ( )

( )

1,1 2 1,01

,0

2 1 2(1 ) 1, 1 1

1 2 (1 ) 2

0 when 0 (since P 1)

nnm n

n m

n r sr s P P s n

r s s

n xα β

φ+

∂ + + − = − ≥ ∂ − −

= = =

CAAM 452 Spring 2005

s-Derivative

( ) ( ) ( )( )

( )

( )

( )

2 1,0

0,0 21

0,0

2

2

1,

10

,

0

,0

0

1,

2

2(1 )1

(1 )

2(1 ) 11

(1 )

2 1 2(1 )1

(1

2 2

)

1

2

1

nnm

n

nm

nn

nnm

n

n

m

dPs

dx

sr s P s

r ds

rP P s

s

r sP

n s

P

s

rdx ss

φ

+

+

+

∂ − = ∂

++ − −

+ − + − −

− −

+ + − −−

We use the chain and product rule to obtain:

CAAM 452 Spring 2005

s-Derivative

( ) ( ) ( )( )

( )

( )

1,11

2 1

21

,0

0,0 2 1,0

0,0

2

1

1,

2

2(1 )1

(1 )

2(1 ) 11

(12 22

2 1

12 2

1 2(1 )

) 2

12 (1 )1

nnm

nm

nm

nn

n

n

m

n

n

sr

r n rP

sss P s

s

rP P s

s

r s

n s

nPP

sm

φ

+−

+−

+−

∂ − = ∂

++ − −

+ − + − −

+ + + − −

+ +

( )2,1 s

From which:

CAAM 452 Spring 2005

Special Cases

( ) ( ) ( ) 0 1,0,mmr s P s

s s

φ∂ ∂=∂ ∂

Don’t worry about all those denominators having (1-s)since the functions are just polynomials and not singular functions…

CAAM 452 Spring 2005

Recap

( ) ( )( )

( )

( )

1,1 2 1,012

10,0 2 1,0

0,0 2 2,11

2 1 2(1 ) 1, 1

2 (1 ) 21

2(1 ) 11

(1 ) 2 2

2(1 ) 1 2 21

(1 ) 2 2

nnm n

n m

nn

n m

nn

n m

n r sr s P P s

s ss

r n sP P s

s

r s m nP P

s

φ+

−+

+−

∂ + + − = − ∂ − −

+ − + − − −

+ − + + + − − ( )s

( ) ( ) ( )

( )

1,1 2 1,01

,0

2 1 2(1 ) 1, 1 1

1 2 (1 ) 2

0 when 0 (since P 1)

nnm n

n m

n r sr s P P s n

r s s

n xα β

φ+

∂ + + − = − ≥ ∂ − −

= = =

CAAM 452 Spring 2005

Derivative matrices

• Given data at M=(p+1)(p+2)/2 points we can directly r and s derivatives with:

( ) ( )

( ) ( )

( ) ( )

1

1

1

1

ˆ ,

ˆˆ ˆ, where ,

ˆˆ ˆ, where ,

m M

m j jmjm

m Mr r m

n n nm m nm n nm

m Ms s m

n n nm m nm n nm

f f r s

fr s f r s

r r

fr s f r s

s s

φ

φ

=−

=

=

=

=

=

=

∂∂ = =∂ ∂

∂∂ = =∂ ∂

V

D D

D D

CAAM 452 Spring 2005

One-Stage Differentiation

• Given a vector of values of f at a set of nodes we can obtain a vector of the r and s derivatives at the nodes by:

1

1

ˆ where

ˆ where

r r r

s s s

r

s

∂ = =∂∂ = =∂

f D f D D V

f D f D D V

CAAM 452 Spring 2005

Inner Product Matrices

• We will we need to compute:

• It is not obvious how to do this given the value of f and g at a set of M points.

• Same old trick – construct the polynomial coefficients with the Vandermonde matrix and use the orthogonality relationship..

( )

( ) ( ) ( )( )

1

1 1

,

,, ,

,

TT

s

f g fgdV

x yf r s g r s drds

r s

− −

=

∂=

CAAM 452 Spring 2005

Inner-Product

( ) ( )( ) ( ) ( )

( )( ) ( ) ( )

( )( ) ( ) ( )

( )( ) ( ) ( )

1

1 1

1

1 11 1

1

1 11 1

1

1 1 1

,, , ,

,

, ˆ ˆ, ,,

, ˆ ˆ, ,,

, ˆ ˆ , ,,

s

T

s m M n M

m m n nm n

s n M m M

m m n nn m

sm M

m n m nm

x yf g f r s g r s drds

r s

x yf r s g r s drds

r s

x yf r s g r s drds

r s

x yf g r s r s drds

r s

φ φ

φ φ

φ φ

− −

− = =

= =− −

− = =

= =− −

−=

= − −

∂=

∂ = ∂

∂ = ∂

∂=

( )( ) ( )

( )( )

1

ij1 1

1

, 2 2ˆ ˆ where C, 2 1 2 2 2

, ˆ ˆ,

n M

n

n M m M

m n nm nn m

n M

n n nn

x yf g C

r s i i j

x yf g C

r s

δ

=

=

= =

= =

=

=

∂ = = ∂ + + +

∂=

Since the r,s->x,y is linear

CAAM 452 Spring 2005

Summary So Far

• We are confident that given a set of (p+1)(p+2)/2 interpolation points we can use the orthogonal basis to perform differentiation, integration and interpolation.

• Now – we should be concerned about how to choose the points.

• Recall – in 1D interpolation it is tempting to use the equally spaced points on an interval but this can cause the Runge effect (wild oscillations in the interpolated function).

CAAM 452 Spring 2005

Accuracy of Polynomial Interpolation

• We introduce the operator supremum-norm and the L-infinity norm:

for the p’th order interpolation operator:

• The interpolation error is bounded below by:

( )( )

,0sup where max ,

p

p

x y Tf

I fI f f x y

f∞

∞ ∈≠ ∞

= =

( ) ( ) ( ) ( )*

*

, , , ,

where is the optimal polynomial approximation

in the . norm

pf x y f x y f x y I f x y

f∞ ∞

− ≤ −

pI

CAAM 452 Spring 2005

cont

• This tells us that the interpolating polynomial which approximates a function can only be less or equal in accuracy to the best polynomial approximation.

• Finding the optimal polynomial which approximates a function is an unsolved problem.

• However, there is a theorem by Lebesgue which allows us to bound the interpolation error in terms of the error one would attain by choosing the best possible polynomial approximation.

CAAM 452 Spring 2005

Theorem (Lebesgue)

• Assume that and we consider a set of M interpolation points then:

• i.e. the Lebesgue constant gives us an idea of the optimality of the M points. The smaller is the better.

( )f C T∈

( )

( )( )

( )

*

,1

1

where max , is

termed

, is the 'th Lagrange Cardinal function

the Lebesgue constant and

p p

i Mp p

ix y Ti

i

f I f f f

I h x y

h x y i

∞ ∞

=

∈ =

− ≤ + Λ −

Λ = =

CAAM 452 Spring 2005

Proof

( ) ( )

( ) ( ) ( ) ( )

( )

( ) ( ) ( )

* *

* *

1

* *

1 1

* p

* *

1

*

triangle inequality

, , definition of interpolant

, , , ,

ok since P T

, , ,

p p

n M

n n nn

n M n M

n n n n n nn n

n M

n n n n nn

f I f f f f I f

f f f f x y h x y

f f f x y h x y f x y h x y

f

f f f x y f x y h x y

f f

∞ ∞ ∞

=

∞= ∞

= =

∞= = ∞

=

∞= ∞

− ≤ − + −

≤ − + −

≤ − + −

≤ − + −

≤ −

( ) ( ) ( )

( )

( )

*

1

* *

1

*

1

, , ,

,

1 ,

n M

n n n n nn

n M

nn

n M

nn

f x y f x y h x y

f f f f h x y

h x y f f

=

= ∞

=

∞ ∞= ∞

=

∞= ∞

+ −

≤ − + −

≤ + −

CAAM 452 Spring 2005

Comments

• Note – the Lebesgue number only depends on the distribution of nodes. The only condition on the function being approximated is that it is continuous.

• Here’s the tricky part. It is difficult to compute exactly as it requires us to search the continuum of points in the triangle.

• However, we can approximate this number by randomly sampling a large number of points in the triangle. i.e. for some, large, N compute the following:

( )( )

1,..,1

1,..,

max ,

for some finite subset ,

i Mp

i j jj Ni

j j j N

h x y

x y T

=

= =

=

Λ =

CAAM 452 Spring 2005

Open Problem

• It is still an open problem to find the set of nodes for the triangle which minimize the Lebesgue constant.

• Various attempts have been made:• Hesthaven:• http://epubs.siam.org/sam-bin/getfile/SINUM/articles/30587.pdf

(You will need access permission – so download on on campus)

• Wingate and Taylor:• http://citeseer.nj.nec.com/taylor98fekete.html

• And others.. See comparison tables in Hesthaven paper.

CAAM 452 Spring 2005

Next Class

• We will assume one type of these sets of nodes is being used and will go on to discuss how we can perform necessary manipulations (integration, differentiation, interpolation) with data at these nodes.

• We will then introduce the discontinuous Galerkin method, and show how we can achieve p’th order accurate numerical solutions when the actual solution is sufficiently smooth.

• Furthermore, we will see how boundary conditions are straight forward to implement – in contrast the finite difference methods we saw previously.