260 likes | 346 Views
MA557/MA578/CS557 Lecture 22. Spring 2003 Prof. Tim Warburton timwar@math.unm.edu. Interpolation on the Triangle. Recall we are considering a two-dimensional domain. We assume that a triangulation of the domain is given.
E N D
MA557/MA578/CS557Lecture 22 Spring 2003 Prof. Tim Warburton timwar@math.unm.edu
Interpolation on the Triangle • Recall we are considering a two-dimensional domain. • We assume that a triangulation of the domain is given. • In each triangle we are going to create a polynomial approximation of the solution to a PDE. • We discussed briefly an orthogonal basis for the triangle (which you are currently verifying is indeed actually an orthogonal set of functions). • We construct a generalized Vandermonde basis using this basis and a set of nodes.
Reference Triangle • The following will be our basic triangles: • All straight sided triangles are the image of this triangle under the map: s (-1,1) r (-1,-1) (1,-1)
Reference Triangle • The following will be our basic triangles: • All straight sided triangles are the image of this triangle under the map: s (-1,1) r (-1,-1) (1,-1)
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:
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 PKDO coefficients: • So differentiation requires us to compute:
Differentiation cont • So we need to be able to compute: • Recall the definition of the basis functions: • R-derivative:
Quick Jacobi Polynomial Identity • We will make extensive use of the following:
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
s-Derivative We use the chain and product rule to obtain:
s-Derivative From which:
Special Cases Don’t worry about all those denominators having (1-s)since the functions are just polynomials and not singular functions…
Derivative matrices • Given data at M=(p+1)(p+2)/2 points we can directly r and s derivatives with:
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:
Matlab Scripts • After class on Friday I will post code which computes the derivative matrices Dr and Ds for an arbitrary set of M nodes.
Inner Product Matrices • Recall 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 PKDO coefficients and use the orthogonality relationship..
Inner-Product Since the r,s->x,y is linear
Nodal Mass Matrix • Suppose we know the value of f and g at M points then we can compute the PKDO coefficients using the generalized Vandermonde matrix. • We can then integrate by the previous operations (last slide). • All these operations can be concatenated into one mass matrix.
Nodal Mass Matrix • Setting • Where: • Then:
DG Matrices • Recall we need to compute: • We use the coordinate change, chain rule, linearity of the map T->That (reference triangle) and finally the identities we just found:
Summary Set: where hn is the n’th Lagrange interpolant defined as the p’th order polynomial in r,s for which:
Progress With The DG Scheme For Advection • The DG scheme now looks like: • Where we set: and we can now compute everything in the first three inner-product. • Next time we will discuss how to compute everything in the surface inner-product.
Summary of Matrices Recall the factors: are constantover a straightsided triangle.
Next Lecture • We will use a better set of nodes (improve the condition number of the Vandermonde matrix). • Time permitting we will prove consistency.