Presentation is loading. Please wait.

Presentation is loading. Please wait.

Generalized Finite Element Methods

Similar presentations


Presentation on theme: "Generalized Finite Element Methods"— Presentation transcript:

1 Generalized Finite Element Methods
Polynomial interpolation Suvranu De

2 Polynomial interpolation Lagrange form Newton form
In this class Interpolation Polynomial interpolation Lagrange form Newton form Interpolation error estimate Piecewise polynomial interpolation (the finite element idea) in 1 and 2D Hermite interpolation

3 Numerical solution recipe
Have to solve a set of differential equations Au=f subject to boundary conditions Bu=0 Step 1: Interpolation/Approximation : approximate unknown u(x) as a linear combination of a bunch of known functions j1(x), j2(x),.. uh(x) = j1(x) a1+ j2(x) a2+... jN(x) aN The functions j1(x), j2(x),... Polynomials/piecewise polynomials Moving least squares (MLS) Reproducing kernel functions Partition of unity (PU) functions Wavelet functions, etc

4 r(x)=Auh-f  0 Numerical solution recipe The residual
Step 2: Residual minimization : strive to “minimize” the residual. e.g., Point collocation Subdomain collocation Galerkin Petrov-Galerkin H-1 Methods

5 Interpolation f(xi)=ui only at the n+1 points f(x)
Given n+1 points (xi,ui), i=0,….,n find a function f(x) such that “f(x) interpolates {ui } at the nodes {xi}” f(xi)=ui only at the n+1 points x0 x1 x2 xn u0 u1 u2 un f(x) x

6 Interpolation Polynomial interpolation: if f(x) is an algebraic polynomial Trigonometric interpolation: if f(x) is a trigonometric polynomial Piecewise polynomial interpolation: if f(x) is locally a polynomial Why find the interpolation? We interpolate to replace a complex function by a combination of simpler functions ….so that numerical integration/differentiation is easier

7 Polynomial interpolation
Lagrange form Given: points x0, x1 and values u0 , u1. Find a linear function (polynomial of degree one) P1(x) = a0 + a1x that interpolates the data u u1 u0 x x0= 0 x1 = 1 u0= P1(x0) = a0 u1= P1(x1) = a0 + a1 i.e., a0 = u0 and a1 = u1 – u0 is the equation of the green line joining the two points P1(x) = u0 + ( u1 – u0) x

8 Polynomial interpolation
Lagrange form u P1(x) = u0 + ( u1 – u0) x Can be rewritten as u1 u0 P1(x) = (1-x) u0 + (x) u1 x x0= 0 x1 = 1 Lagrange form u 1-x x 1 x x0= 0 x1 = 1 A linear interpolation can be expressed as a linear combination of Lagrange polynomials of degree one

9 Polynomial interpolation
Lagrange form u Properties: 1. The Lagrange polynomial at node ‘i’ has a value of unity at that node and a value of zero at all the other nodes (Kronecker delta property) 1 1-x x x x0= 0 x1 = 1 2. The Lagrange polynomials satisfy the Partition of unity property 3. Higher order polynomial reproduction property

10 Polynomial interpolation
Lagrange form So I can represent a constant and a linear function using Linear combinations of Lagrange polynomials of degree one. Can I represent a quadratic ? How would the Lagrange polynomials look for u u2 u0 u1 x x0= 0 x1 = 0.5 x2 = 1 What are the properties of these polynomials?

11 Polynomial interpolation
Lagrange form General case: Given n+1 distinct points x0, x1...., xn and n+1 corresponding values u0, u1...., un, there exists a unique polynomial Pn(x) of degree at most n, such that ui= Pn(xi) for i=0,1,....,n where Therefore

12 Polynomial interpolation
Lagrange form In matrix form Vandermonde matrix The system has a unique solution iff the Vandermonde matrix is nonsingular. The Vandermonde matrix is nonsingular iff the nodes are distinct (what is det(P)?) The interpolating polynomial is unique

13 Polynomial interpolation
Lagrange form Lagrange form is a polynomial of degree ‘n’..why?

14 Polynomial interpolation
Lagrange form Properties Kronecker delta property: 2. Partition of unity property (p=0) 3. Higher order polynomial reproduction property (consistency):

15 Polynomial interpolation
Reproducing Property Proof of Reproducing property : Any function in the “basis” can be exactly reproduced Want to show: How? Now set

16 Polynomial interpolation
Reproducing property the ‘1’ is at the qth location

17 Polynomial interpolation
Lagrange form Nicer form of Lagrange polynomial at node ‘i’ Can you prove this? Nodal polynomial Another form of the Lagrange polynomial

18 Polynomial interpolation
Lagrange form Example:

19 Lagrange form of the interpolating polynomial
Polynomial interpolation Lagrange form Lagrange form of the interpolating polynomial Summarizing: is the unique polynomial interpolating n+1 distinct points

20 For computational purposes, the Lagrange form is not very efficient
Polynomial interpolation Newton form For computational purposes, the Lagrange form is not very efficient u P1(x) = (1-x) u0 + (x) u1 u1 u0 x x0= 0 x1 = 1 P2(x) = Ughh!! have to recalculate Plug in one more point u u1 u2 u0 x x0= 0 x1 = 1 x2 = 2

21 Polynomial interpolation
Newton form u u1 u2 u0 x x0= 0 x1 = 1 x2 = 2 Would be nice if we could write P2(x) = P1(x) + q2(x) Poly of deg 2 Poly of deg 1 q2(x) is a poly of degree 2.

22 Polynomial interpolation
Newton form q2(x) = P2(x) - P1(x) At the nodes x0 and x1 q2(x0) = P2(x0) - P1(x0) = u0 - u0= 0 q2(x1) = P2(x1) - P1(x1) = u1 – u1= 0 q2(x) =C2(x-x0)(x-x1) = C2 w2(x) Nodal polynomial How to compute C2? q2(x2) = P2(x2) - P1(x2) = u2 - P1(x2) Hence,

23 Polynomial interpolation
Newton form In the general case we have a recursive algorithm: Step 1: Compute Step 2: Compute the correction term qn(x) = Cn wn(x) Step 3: Pn(x) = Pn-1(x) + qn(x) Nodal polynomial

24 Polynomial interpolation
Error estimate Question: If data points are discrete samples of a continuous function, then how well does the polynomial interpolant approximate that function between the sample points? Error estimate (see handout) : Let I be an interval containing the n+1 points Let f(x) be a real valued function with continuous derivatives of order (n+1) for all x in I. Let Pnf(x) be the polynomial that interpolates at the points x0 , x1,...., xn .Then the interpolation error at any point x on I is Nodal polynomial What is the error at the nodal points?

25 Polynomial interpolation
Error estimate Since the point x is unknown, result is not particularly useful unless bound on appropriate derivate of f(x) is known. If and then it can be proved that This error estimate is quite deceptive and must be carefully considered.

26 Uniform interpolation of
Polynomial interpolation Uniform interpolation of a “gentle” function 4 points

27 Uniform interpolation of
Polynomial interpolation Uniform interpolation of a “gentle” function 6 points

28 Uniform interpolation of
Polynomial interpolation Uniform interpolation of a “gentle” function 8 points

29 Uniform interpolation of
Polynomial interpolation Uniform interpolation of a “gentle” function 12 points

30 Uniform interpolation of
Polynomial interpolation Uniform interpolation of a “gentle” function 16 points

31 Polynomial interpolation
Uniform grid Polynomial interpolation on uniform grid is generally a bad idea from two perspectives: ERROR: The approximation may not only fail to converge, but may diverge the error estimate depends on : (1) The behavior of the nodal polynomial (2) The behavior of STABILITY: Due to ill conditioning, polynomial approximation may become unstable if there is small perturbation in the data

32 Polynomial interpolation
Runge phenomenon Uniform grid of 12 points

33 Polynomial interpolation
Runge phenomenon Uniform grid of 24 points

34 Polynomial interpolation
Runge phenomenon What is the problem? For uniform grid Hence, polynomial interpolation on equispaced points may not only fail to converge as n ∞, but may become worse. This is known as Runge phenomenon. This problem may be circumvented by using nonuniform nodal spacing (e.g., Chebyshev points)

35 Higher-order Polynomial interpolation
Example Higher-order Polynomial interpolation Equispaced points We have no control over the derivative of the function f(x). Let us see how the nodal polynomial behaves with increase in number of nodes when equispaced points are chosen on the interval [-1,1]. Max(|wn+1(x)|)=1

36 Higher-order Polynomial interpolation
Example Higher-order Polynomial interpolation Equispaced points Max(|wn+1(x)|)=

37 Higher-order Polynomial interpolation
Example Higher-order Polynomial interpolation Equispaced points Notice that the maximum value of the nodal polynomial is decreasing with increase of number of nodes and the maximum (actually the minimum) is shifting to the two terminal intervals. Max(|wn+1(x)|)=

38 Higher-order Polynomial interpolation
Example Higher-order Polynomial interpolation Equispaced points Notice that the maximum value of the nodal polynomial is decreasing with increase of number of nodes and the maximum is shifting to the two terminal intervals. Max(|wn+1(x)|)=

39 Higher-order Polynomial interpolation
Example Higher-order Polynomial interpolation Equispaced points Notice that the maximum value of the nodal polynomial is decreasing with increase of number of nodes and the maximum is shifting to the two terminal intervals. Max(|wn+1(x)|)= x 10-4

40 Higher-order Polynomial interpolation
Example Higher-order Polynomial interpolation Equispaced points For even number of nodes the nodal polynomial is even. For odd number of points it is odd. Max(|wn+1(x)|)= x 10-4

41 Higher-order Polynomial interpolation
Example Higher-order Polynomial interpolation Equispaced points Extremely rapid decrease of maximum error as predicted by the formula (remember that the formula holds only if the function f(x) has n+1 continuous derivatives).

42 Higher-order Polynomial interpolation
Example Higher-order Polynomial interpolation Equispaced points Polynomial interpolation on equispaced points: Max(|wn+1(x)|) decreases monotonically on the interval [-1 1] with increase in ‘n’ The maximum error occurs at the ends. The error in the middle of the interval in MUCH less than the error at the two ends. Conclusion: Polynomial interpolation on equispaced points in not the brightest idea. Need to choose the nodes such that error is more equitably distributed and the maximum error on the interval is minimized.

43 Higher-order Polynomial interpolation
Stability Higher-order Polynomial interpolation Equispaced points In addition to error, higher order polynomial interpolation on equispaced grid may become unstable if there is perturbation in data (e.g., due to round off) If is the perturbed set of data points corresponding to and and are the corresponding polynomial interpolants, then is the Lebesgue constant. For polynomial interpolation on equispaced points

44 Chebyshev points Chebyshev points

45 Higher-order Polynomial interpolation
Example Higher-order Polynomial interpolation Chebyshev points The error is more equitably distributed on the interval and the maximum error is about 2 orders of magnitude lower than polynomial interpolation using same number of equispaced points. Max(|wn+1(x)|)= x 10-6

46 Higher-order Polynomial interpolation
Example Higher-order Polynomial interpolation Chebyshev points Chebyshev Theorem: For all polynomials of degree n+1 and leading coefficient 1, the unique polynomial that has the smallest uniform norm on [-1,1] is the (n+1)th Chebyshev polynomial divided by 2n The error is more equitably distributed on the interval and the maximum error is about 2 orders of magnitude lower than polynomial interpolation using same number of equispaced points.

47 The Lebesgue constant is also much smaller
Example Higher-order Polynomial interpolation Chebyshev points Error estimate for Chebyshev points Stability The Lebesgue constant is also much smaller The error is more equitably distributed on the interval and the maximum error is about 2 orders of magnitude lower than polynomial interpolation using same number of equispaced points.

48 Higher-order Polynomial interpolation
Conclusions Remedy: Utilize nonuniform data points (e.g., Chebyshev points) Use low-order piece-wise polynomial interpolation Use low-order polynomial least-squares fit.

49 Piecewise Lagrange interpolation (the Finite Element idea!)
1 Trying to fit a lot of points with a poly of high degree on equispaced points produces unwanted wiggles (bad idea!). 1 h Good idea: Partition the interval [a,b] into subintervals (elements) and use piece-wise polynomial on each subinterval You get rid of wiggles but lose in smoothness of approximation

50 Piecewise linear interpolation (the Finite Element idea)
shape functions A linear interpolation can be expressed as a linear combination of Lagrange polynomials of degree one u u nodes (h-x)/h x/h 1 u1 u0 x x x0= 0 x1 = h x0= 0 x1 = h element 1 u u u0 u1 u2 1 x x0= 0 x x1 = h x2 = 2h x0= 0 x1 = 1 element 1 element 2

51 Piecewise linear interpolation (the Finite Element idea)
shape functions u 1 h “hat” functions x x0= 0 x1 = 1 The piece-wise linear approximation of f(x) is Notice that FEM shape/basis functions Hence

52 Piecewise linear interpolation (the Finite Element idea)
shape functions u “hat” functions 1 x x0= 0 x1 = 1 h h h h h h h 1 Notice: Each shape function is nonzero only over a small portion of the interval (compact support) Kronecker delta property Partition of unity property Linear polynomial reproduction property

53 Piecewise linear interpolation
error analysis 1 h P1(x) f(x) x h The error at x is C is a constant This is true for each subinterval

54 Piecewise linear interpolation
error analysis Note that We have denoted the piecewise linear approximation of f(x) by The notation means the “maximum value of g(x) on the domain of definition of x”. It defines a “max norm”. e.g., for is 1. This is the error estimate in “max norm”. For sufficiently small ‘h’ the maximum error decreases by a factor of 4 if each subinterval is halved.

55 Piecewise linear interpolation
error analysis Instead of looking at the maximum error, we may want to look at some measure of the error over the entire interval. We will define the of a function g(x) for as In the the interpolation error estimate for piecewise linear interpolation is (see handout)

56 Piecewise linear interpolation
error analysis Point to note: the derivative of the approximation is less accurate than the approximation itself (see handout).

57 Piece-wise polynomial interpolation in 2D
We partition the domain into non-overlapping triangles (elements) which define the so-called triangulation E 1 5 1 2 Lagrange polynomials at the three nodes of element E1 E 1 E 2 E 3 E 4 1 2 3 4 5

58 Piece-wise polynomial interpolation in 2D
1 2 3 4 5 E 1 E 2 E 3 E 4 1 2 3 4 5 Shape function at node 5 is a pyramidal function compactly supported on the union of the 4 elements. Shape function at node 1 is compactly supported on the union of elements E1 and E4

59 Hermite polynomial interpolation
The cubic Hermite polynomial solves the problem f(b) f(a) x a b

60 Hermite polynomial interpolation
Assume 16 conditions and satisfy the Kronecker delta property and satisfy the Kronecker delta property

61 Hermite polynomial interpolation
Choose where are Lagrange polynomials of order one at nodes 1 and 2, respectively.

62 Hermite polynomial interpolation
8 conditions are automatically satisfied 8 of the remaining conditions determine the coefficients a’s and b’s

63 Hermite polynomial interpolation
Finally;

64 Hermite polynomial interpolation
Error estimate Much smaller error than Lagrange polynomial

65 Osculatory interpolation
At the n+1 points {xi}; i=0,1,…,n data: f(xi) as well as f/ (xi) Problem: Find the interpolatory Hermite polynomial HN-1 (x) of degree N-1 where N=2n+2 satisfying

66 Osculatory interpolation
assume: 4(n+1)2 conditions

67 Osculatory interpolation
Choose: Automatically satisfies 4n(n+1) constraints The remaining constraints may be used to compute the 4(n+1) coefficients

68 Osculatory interpolation
Error estimate Much smaller error than Lagrange polynomial interpolation

69 Generalized Hermite interpolation
At the n+1 points {xi}; i=0,1,…,n data: at x0 we are supplied f(x0),f/ (x0),….., f (m0) (x0) at x1 we are supplied f(x1),f/ (x1),….., f (m1) (x1) . at xn we are supplied f(xn),f/ (xn),….., f (mn) (xn) Problem: Find the interpolatory Hermite polynomial HN-1 (x) of degree N-1 where satisfying

70 Generalized Hermite interpolation
assume: conditions Proceed exactly as before (lots of computations!!)

71 Generalized Hermite polynomial
Error estimate Where is a polynomial of degree N defined by Taylor polynomial of f(x) about x0 Special case: n=0, m0=m, N=m+1


Download ppt "Generalized Finite Element Methods"

Similar presentations


Ads by Google