MA557/MA578/CS557 Lecture 23

29
1 Spring 2003 Prof. Tim Warburton [email protected] MA557/MA578/CS557 Lecture 23

description

MA557/MA578/CS557 Lecture 23. Spring 2003 Prof. Tim Warburton [email protected]. Basis Ordering. There has been some confusion about the numbering of the PKDO basis functions. There are now a number of basis functions. We will choose an ordering:. - PowerPoint PPT Presentation

Transcript of MA557/MA578/CS557 Lecture 23

Page 1: MA557/MA578/CS557 Lecture 23

1

Spring 2003

Prof. Tim [email protected]

MA557/MA578/CS557Lecture 23

Page 2: MA557/MA578/CS557 Lecture 23

2

Basis Ordering

There has been some confusion about the numbering of the PKDO basis functions. There are now a number of basis functions. We will choose an ordering:

,0

1 0,02 0,1

2 1,03 1,1

3 2,0 0,

2 2 ,11 p

p

pM p

p pp

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

Page 3: MA557/MA578/CS557 Lecture 23

3

Accuracy of Polynomial Interpolation

• We introduce the operator supremum-norm and the Linfinity norm:

for the p’th order interpolation operator.

• The interpolation error is bounded below by:

,0sup where max ,

p

px 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

Page 4: MA557/MA578/CS557 Lecture 23

4

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.

Page 5: MA557/MA578/CS557 Lecture 23

5

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 the Lebesgue constant

p p

i Mp p

ix y T

i

f I f f f

I h x y

p

Page 6: MA557/MA578/CS557 Lecture 23

6

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

Page 7: MA557/MA578/CS557 Lecture 23

7

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:

p

1,..,

1

1,..,

max ,

for some finite subset ,

i Mp

i j jj N

i

j jj N

h x y

x y T

Page 8: MA557/MA578/CS557 Lecture 23

8

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.

Page 9: MA557/MA578/CS557 Lecture 23

9

Fekete Nodes For the Triangle

1) Read the Wingate and Taylor paper over the break.

2) The Fekete nodes are chosen according to:the condition that they are the nodes which maximize the determinant of the VDM matrix.

3) Wingate and Taylor suggest a method for calculating the Fekete nodes based on the method of steepest ascent.

4) Nodes are moved in the direction which most increase the log of the determinant of the generalized Vandermonde matrix.

Page 10: MA557/MA578/CS557 Lecture 23

10

Steepest Descent Approach

Suppose we start with a list of M initial node locations we willsolve the following ODE to steady state. We denote thedeterminant of the Vandermonde matrix by:

We will now show that this is equivalent to solving:

1 1, , log , , , ,n n

i i

M Mr st r s

r s r sV

V

, , ,,

n n n n n nn nr s

tr s r s

h h

r s

Page 11: MA557/MA578/CS557 Lecture 23

11

We need to compute the gradient of log(V)

1 1 11

1 ,M

n

n nn

r sV V

Step 1: expand the determinant of the Vandermonde matrix with respect to the co-determinants:

1 1, , log , , , ,n n

i i

M Mr st r s

r s r sV

Page 12: MA557/MA578/CS557 Lecture 23

12

Step 2: as an example of how to compute the gradient of |V| with respect to the node coordinates we first differentiate with respect to r1

1 1 11

1 1 11

1 1 1 1 1

1 2 2 2 2

1

11 ,

1 ,

, ,

, ,

, ,

Mn

r nn

Mn

r n nn

r r M

M

M M M M M

r r s

r s

r s r s

r s r s

r s r s

V V

V

Page 13: MA557/MA578/CS557 Lecture 23

13

Step 3: Expand derivative terms with respect to the Lagrange interpolating basis for the M nodes

1

1

, , ,

, , ,

m M

n m n m mm

m M

r n r m n m mm

r s h r s r s

r s h r s r s

Page 14: MA557/MA578/CS557 Lecture 23

14

Step 4: replace derivative terms in differentiation of V:

1 1 1 1 11 1

1 2 2 2 2

1

1 1 1 1 1

1 2 2 2 2

1

, , , ,

, ,

, ,

1

, ,

, ,

, ,

m M m M

r m m m r m M m mm m

M

M M M M M

r r M

M

M M M M M

r

h r s r s h r s r s

r s r s

r s r s

r s r s

r s r s

r s r s

V

Page 15: MA557/MA578/CS557 Lecture 23

15

Step 5: factorize matrix

1 1 1 2 1 1 1 1

1 1 1 1 1

1 2 2 2 2

1

1 1 1

1

, , ,0 1 0

0 0 1

, ,

, ,

, ,

,

r r r M

M

M

M M M M M

r

r

h r s h r s h r s

r s r s

r s r s

r s r s

h r s

V

V

Page 16: MA557/MA578/CS557 Lecture 23

16

Conclusion:

1 11

1

,r sh

r r

VV

• This is not exactly as reported in the Wingate & Taylor paper.

• However, since |V| simply scales the node velocities uniformly it will not make very much difference as we are integrating in a “pseudo-time” manner.

Page 17: MA557/MA578/CS557 Lecture 23

17

Interpretation of Algorithm

At each node, the algorithm pushes the node in the direction of the slope of the interpolating polynomial at that node:

At steady state, the interpolating polynomial associated with a node will have (approximately)zero slope at that node..

This is a property shared by the Gauss-Lobatto- Legendre nodes in 1D !.

,n

n n nn

rh r s

st

Page 18: MA557/MA578/CS557 Lecture 23

18

Download The Code

• Download the Fekete node routine computing routine from the class web page.

• Over the break use this code to compute the Fekete nodes for p=1 to p=10.

• Save the node coordinates in a file for each polynomial order..

• These will be the nodes we use for future computations.

Page 19: MA557/MA578/CS557 Lecture 23

19

To Run:

• Unzip the files and set the current directory to the umFEKETE directory.

• In Matlab:

p = 7;[R,S] = am282fekete2d(p);scatter(R,S);

• This might take quite a while. The code will output the approximate Lebesgue constant as the nodes move.

• Run now with p=4

Page 20: MA557/MA578/CS557 Lecture 23

20

P=7 nodes

• Note there are 8 nodes on each edge and a total of 36 nodes.

• The approximate Lebesgue number is: 4.92707087069006

Page 21: MA557/MA578/CS557 Lecture 23

21

am282fekete2d

am282ab

am282jacobideriv2dab

am282derivmatrix2d ˆ

r r1D D V

am282vdm2dab

,a bV

am282jacobi2dab ,n a b

am282jacobi1d, ( )nP x

am282jacobderiv1d,

( )ndPx

dx

, , ,n na b a br s

2 11

1

ra

sb s

Page 22: MA557/MA578/CS557 Lecture 23

22

Surface Mass Matrices

• Recall the DG scheme:

• We now have defined the set of nodes which we can build the hn Lagrange interpolating polynomials.

• The only remaining task is to discretize the boundary terms.

1 1 1

Find , 1,..., such that:

.....

0

where ,

, ,

2

,

,

m M m M m Mm m m

n m n m n mTm m mT T

T

m

n

dC h hh h u h C v h C

dt

C t m M

C C

x y

C

C

h

u n

Page 23: MA557/MA578/CS557 Lecture 23

23

Surface Term

• We now break the boundary integral into the three edge components:

• Last step due to the face normals being constant

• The last step is to compute:

3

1 1

3

1 1

, ,2 2

,2

f

f

fm Mf f

n n m mm f

T T

fm Mf f

n m mTm f

h C h h C

h h C

,f

n m Th h

Page 24: MA557/MA578/CS557 Lecture 23

24

• Starting with edge 1 (-1<=a<=1,b=-1), we will work with the PKDO basis:

,f

n m Th h

1

1

10,0 2 1,0 0,0 2 1,0

1

12 1,0 2 1,0 0,0 0,0

1

2 1,0 2 1,0

,

, 1 , 1

1 ( 1) 1 ( 1)1 1

2 2

1 1

21 1

2 1

ij klT

ij kl

i ki k

i j k l

i kj l i k

i kj l ik

a a da

P a P P a P da

P P P a P a da

P Pi

Page 25: MA557/MA578/CS557 Lecture 23

25

1

1

1

1

2 1,0 2 1,0

ˆ

1

1 0 0

1 1ˆ

0 0 0 0 ˆ

1 1

ˆ0

2, 1 1

2 1

, , , ,

, ,

,

i kj l ikij kl

T

i p j p in M

n n n n ijij ij n ijn i j

i p j p i k p l p k

n m ij klT n ij n kli j k l T

l

ij kln ij n kl Tl

P Pi

r s r s h r s h r s

h h

V

V V

V V

0 0 0

1 1 2 1,0 2 1,0

0 0 0 0

1 1 2 1,0 2 1,0

0 0 0

21 1

2 1

21 1

2 1

i p j p i k p p k

i j k

i p j p i k p l p ki kj l ikn ij n kl

i j k l

i p j p i l p ii ij ln ij n il

i j l

P Pi

P Pi

V V

V V

Page 26: MA557/MA578/CS557 Lecture 23

26

Edge 2

• If we try the same thing with the second edge it gets more complicated:

1

1

10,0 2 1,0 0,0 2 1,0

1

12 1,0 2 1,0

1

,

1, 1,

1 11 1

2 2

1...?

2

ij klT

ij kl

i ki k

i j k l

i ki kj l

b b db

b bP P b P P b db

bP b P b db

Page 27: MA557/MA578/CS557 Lecture 23

27

Edges 2 & 3

• We can use the surface mass matrix from edge 1 by noting that the Fekete nodes have the same distribution on edge 1 as they do on edge 2.

• Identify which nodes correspond and permute the edge 1 matrix.

Page 28: MA557/MA578/CS557 Lecture 23

28

Computing Jump Terms

• Note we need [Cm] which only makes sense for the nodes which lie on the f’th edge.

Page 29: MA557/MA578/CS557 Lecture 23

29

Next Lecture

• Next class we will start examining the consistency of the DG scheme

• Also – finally the consistency analysis.

• Review the Hesthaven-Warburton paper for details.