asymptotic error analysiswetton/papers/limerickb.pdfubc iamoverview some history more history:...

Post on 06-Nov-2020

1 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Asymptotic Error Analysis

Brian Wetton

Mathematics Department, UBCwww.math.ubc.ca/∼wetton

SIAM Student Day, Limerick, December 7, 2016

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Outline

UBC Institute of Applied Mathematics

Overview

Some HistoryRomberg IntegrationCubic Splines - Periodic Case

More History: Strang’s TrickPDE Problem and Discretization

Piecewise Regular GridsExample SchemeAnalysis

Summary

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Institute of Applied MathematicsUniversity of British Columbia

• Faculty participation from many departments.

• Interdisciplinary graduate programme.

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Overview of the Talk

• Errors from computational methods using regular grids tocompute smooth solutions have additional structure.

• This structure can• allow Richardson Extrapolation• lead to super-convergence• help in the analysis of methods for non-linear problems

• Numerical artifacts (non-standard errors) can be present

• The process of finding the structure and order of errors can becalled Asymptotic Error Analysis. Needs smooth solutions andregular grids.

• Historical examples: Romberg Integration, Cubic Splines,Strang’s Trick.

• New result: a numerical artifact from an idealized adaptivegrid with hanging nodes.

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Trapezoidal Rule

• Trapezoidal Rule Th approximation to∫ ba f (x)dx is the sum of areas of red

trapezoids.

• Widths h = (b − a)/N where N is thenumber of sub-intervals.

• Error bound∣∣∣∣∫ b

af (x)dx − Th

∣∣∣∣ ≤ (b − a)

12Kh2

where K = max |f ′′|• Second order convergence.

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Proof of Error Bound-I

• Consider a subinterval x ∈ [0, h].

• Let L(x) be linear interpolation on this subinterval andg(x) = f (x)− L(x), so g(0) = g(h) = 0.

• The error E of trapezoidal rule on this subinterval is

E =

∫ h

0g(x)dx

• Integrate by parts twice

E = −∫ h

0(x − h/2)g ′(x)dx

=1

2

∫ h

0(x2 − xh)g ′′(x)dx =

1

2

∫ h

0(x2 − xh)f ′′(x)dx

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Proof of Error Bound-II

Subinterval E = 12

∫ h0 (x2 − xh)f ′′(x)dx

|E | ≤ K

2

∫ h

0(xh − x2)dx =

Kh3

12.

Summing over N = (b − a)/h subintervals gives the result

|I − Th| ≤(b − a)

12Kh2

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Trapezoidal Rule Applied

Trapezoidal Rule applied to the integral I =∫ 10 sin xdx

h I − Th

1/2 0.00961/4 0.00241/8 0.00060

1/16 0.000151/32 0.00004

Not only is

|I − Th| ≤(b − a)

12Kh2

but

limh→0

I − Th

h2

exists. There is regularity in the error that can be exploited.

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Error Analysis of Trapezoidal Rule-I

• We had

|E | ≤ Kh3

12⇒ |I − Th| ≤

(b − a)

12Kh2

• but with a bit more work it can be shown that

E = −f ′′aveh3/12 + O(h5)⇒

I − Th = −(b − a)

12Ch2 + O(h4)

where C is average value of f ′′ on the subinterval.

• with more work the error in Trapezoidal Rule can be writtenas a series of regular terms with even powers of h(Euler-McLaurin Formula).

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Error Analysis of Trapezoidal Rule-II

Th = I +(b − a)

12Ch2 + O(h4)

• This error regularity justifies Richardson extrapolation

I = (4

3Th/2 −

1

3Th) + O(h4)

• The O(h4) error above is regular and so can also beeliminated by extrapolation. Repeated application of this ideais the Romberg method.

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Interesting Facts

• Richardson extrapolation of the Trapezoidal Rule is Simpson’sRule

• Trapezoidal and Midpoint Rules are spectrally accurate forintegrals of periodic functions over their period

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Cubic Splines

• Given smooth f (x) on [0,1], spacing h = 1/N, and dataai = f (ih) for i = 0, . . .N the standard cubic spline fit is a C1

piecewise cubic interpolation.• Cubic interpolation on each sub-interval for given values and

second derivative values ci at the end points is fourth orderaccurate.

• If the second derivative values are only accurate to secondorder, the cubic approximation is still fourth order accurate.

• For C1 continuity,

ci−1 + 4ci + ci+1 =6

h2(ai+1 − 2ai + ai−1)

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Cubic Splines - Periodic Analysis

ci−1 + 4ci + ci+1 =6

h2(ai+1 − 2ai + ai−1)

In this case, c has a regular asymptotic error expansion

c = f ′′ + h2(1

12− 1

6)f ′′′′ + . . .

(the fact that ci−1 + ci+1 = 2ci + h2c ′′ + . . . is used). Since thec ’s are second order accurate, the cubic spline approximation isfourth order accurate.

Notes:

• The earliest convergence proof for splines is in this equallyspaced, periodic setting Ahlberg and Nilson, “Convergenceproperties of the spline fit”, J. SIAM, 1963

• Lucas, “Asymptotic expansions for interpolating periodicsplines,” SINUM, 1982.

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Cubic Splines - Non-Periodic Case

ci−1 + 4ci + ci+1 =6

h2(ai+1 − 2ai + ai−1)

In the non-periodic case, additional conditions are needed for theend values c0 and cN :

natural: c0 = 0, O(1)

derivative: 2c0 + c1 = 6h2 (a1 − a0)− 3

h f′(0), O(h2)

not a knot: c0 − 2c1 + c2 = 0, O(h2)

First convergence proof for “derivative” conditions Birkhoff andDeBoor, “Error Bounds for Spline Interpolation”, J Math andMech, 1964.

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Cubic Splines - Numerical Boundary Layer

ci−1 + 4ci + ci+1 =6

h2(ai+1 − 2ai + ai−1)

No regular error can match the natural boundary condition c0 = 0.However, note that

1 + 4κ+ κ2 = 0

has a root κ ≈ −0.268.

Error Expansion:

ci = f ′′(ih)− h21

6f ′′′′(ih)− f ′′(0)κi . . .

The new term is a numerical boundary layer. In this case, thespline fit will be second order near the ends of the interval andfourth order in the interior. Reference?

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Cubic Splines - Computation

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

PDE Problem and DiscretizationStrang, “Accurate Partial Differential Methods II. Non-linearProblems,” Numerische Mathematik, 1964

• Suppose u(x , t), 0 ≤ t ≤ T , x ∈ [0, 1], periodic in x issmooth and solves ut = f (ux ).

• Divide [0, 1] into N sub-intervals of length h = 1/N. LetUi (t) ≈ u(ih, t), i = 1 · · ·N.

• Let D1 be the second order centred finite approximation ofthe first derivative

D1Ui =Ui+1 − Ui−1

2h

= ux (ih, t) +h2

6uxxx (ih, t) + O(h4)

• Semi-discrete scheme (method of lines):

dUi

dt= f (D1U)

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Analysis of Scheme-I

dUi

dt= f (D1U)

dui

dt= f (D1u)− 1

6f ′(ux )uxxxh

2 + O(h4)

Introduce the error E = U − u

dEi

dt= f ′(D1u)D1E + f ′′(D1(u + θE ))(D1E )2 + O(h2)

Introduce the discrete l2 norm

‖E‖2 =

√√√√hN∑i

E 2i

Note that‖E‖∞ ≤ h−1/2‖E‖2

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Analysis of the Scheme-II

To handle the nonlinear error, a bootstrap argument is used.Assume

‖E‖2 ≤ hp for t ≤ T

and show that the scheme converges with order greater than p tofinish the argument.

dEi

dt= f ′(D1u)D1E + f ′′(D1(u + θE ))(D1E )2 + O(h2)

Multiplying the equation above by h and taking the inner productwith E gives (after summation by parts)

d‖E‖2dt

≤ ‖Df ′(D1u)‖∞‖E‖2+‖f ′′(D1(u+θE ))‖∞hp−5/2‖E‖2+O(h2)

Note that the bootstrap argument can’t be closed with thisestimate.

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Asymptotic Error Analysis-IThe truncation error is smooth so it is reasonable to expect errorregularity

U = u + h2e + O(h4)

with e a smooth function of x and t, independent of h. I’ll showhow to construct this function e below, but assume it exists:

• u + h2e has truncation error O(h4) in the discrete equationsso by using E = U − (u + h2e) in the analysis above, thebootstrap argument can be closed.

• The error expression above can be used to show full orderconvergence in maximum norm and difference approximationsto derivatives (super-convergence)

D2U = uxx + h2(1

12uxxxx + exx ) + O(h4)

• Error regularity also leads to full order convergence ofderivatives of solution functionals with respect to parameters.

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Asymptotic Error Analysis-II

• Want u + h2e to satisfy the discrete equations

dU

dt= f (D1U)

to fourth order.

• Plug in, expand, identify the O(h2) term:

et = f ′(ux )ex +1

6f ′(ux )uxxx

• Realize that this problem (linearization about the exactsolution forced by terms involving derivatives of the exactsolution) has a smooth solution. You don’t have to find thesolution, just know that it exists.

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

More History

• Goodman, Hou and Lowengrub, “Convergence of the PointVortex Method for the 2-D Euler Equations,” Comm. PureAppl. Math, 1990

• E and Liu, “Projection Method I: Convergence and NumericalBoundary Layers,” SINUM, 1995

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Piecewise Regular Grids

• Computations on regular grids have many advantages.

• To retain some of the advantages but allow adaptivity,refinement in regular blocks is often done.

Clinton Groth, University of Toronto

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Idealized Piecewise Regular Grid

Consider the idealized setting of a coarse grid and fine grid with astraight interface:

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Problem and Discretization

• Consider the problem ∆u = f .

• The grid spacing is h (coarse) and h/2 (fine).

• The discrete approximation is cell-centred, denoted by U.

• Away from the interface, a five point stencil approximation isused.

• At the interface, ghost points are introduced, related to gridpoints by linear extrapolation.

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Analysis of Piecewise Regular Grid-I

• I advise not to try to analyze the accuracy of the scheme usingthe discrete approximation of the PDE near the interface

• Instead, determine the accuracy at which the “interface”conditions [u] = 0 and [∂u/∂n] = 0 are approximated.

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Analysis of Piecewise Regular Grid-II

• The ghost point extrapolation is equivalent to

1

4(UA + UA∗ + UB + UB∗) =

1

2(UC + UC∗)

1

h(UA − UA∗ + UB − UB∗) =

1

h(UC∗ − UC∗)

(UA − UB − UA∗ + UB∗) = 0

• The first two conditions are second order approximations ofthe “interface” conditions [u] = 0 and [∂u/∂n] = 0.

• They contribute to the second order regular errors of thescheme (different on either side of the grid interface).

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Analysis of Piecewise Regular Grid-III

(UA − UB − UA∗ + UB∗) = 0

• This is satisfied to second order by the exact solution, errorh2uxy/4.

• Note that this only involves fine grid points.

• Expect a parity difference between fine grid solutions at theinterface.

• This results in a numerical artifact of the form

h2A(y)(−1)jκi

where (i , j) is the fine grid index and κ ≈ 0.172.

• This is a numerical boundary layer on the fine grid side thatalternates in sign between vertically adjacent points.

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Piecewise Regular Grid - Analysis Summary

• Coarse grid has regular error Ucoarse = u + h2ecoarse + . . .

• Fine grid has regular error and the artifact

Ufine = u + h2efine + h2uxy (0, y)

8(1− κ)(−1)jκi + · · ·

• Second order convergence in U (surprising? the schemeviolates the “rule of thumb”)

• Artifact causes loss of convergence in D2,yU and D2,x on thefine grid side at the interface.

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Additional Discussion

hqA(y)(−1)jκi

• This artifact is present in all schemes (FE, FD, FV) on thegrid, although the q may vary.

• Determinant condition, satisfied for stable schemes.

• For variable coefficient elliptic problems, κ(y) smooth.

UBC IAM Overview Some History More History: Strang’s Trick Piecewise Regular Grids Summary

Summary

• Asymptotic error analysis can be used to describe regularerrors and numerical artifacts in finite difference methods andother schemes on regular meshes.

• Historical examples of Romberg integration; finite differenceapproximations of nonlinear, first order equations; and splineinterpolation were given.

• Asymptotic error analysis can be used to help understand theaccuracy of different implementations of boundary andinterface conditions.

• A new result describing the errors in methods for ellipticproblems on piecewise regular grids with hanging nodes wasgiven.

top related