
A Appendix A: Jacobi polynomials and beyond In the following we review a few properties of classical orthogonal polynomials, Gauss quadratures, and the extension of these ideas to simplices. We make no attempt to be complete and refer to the many excellent texts on classical polynomials for more details (e.g., [89, 111, 197, 296]). (α,β) The classical Jacobi polynomial, Pn (x), of order n is a solution to the singular Sturm-Liouville eigenvalue problem d d (1 − x2)w(x) P (α,β)(x)+n(n + α + β +1)w(x)P (α,β)(x)=0, (A.1) dx dx n n for x ∈ [−1, 1], where the weight function, w(x)=(1−x)α(1+x)β. w-Weighted orthogonality of the polynomials is a direct consequence of Eq. (A.1). The polynomials are normalized to be orthonormal: 1 (α,β) (α,β) Pi (x)Pj (x)w(x) dx = δij . −1 An important property of the Jacobi polynomials is [296] " d α ,β P (α,β)(x)= n(n + α + β +1)P ( +1 +1)(x). (A.2) dx n n−1 (0,0) Also, recall the special case of Pn (x), known as the Legendre polynomials. While there is no known simple expression to evaluate the Jacobi polyno- mials, it is conveniently done using the recurrence relation (α,β) (α,β) (α,β) (α,β) xPn (x)=anPn−1 (x)+bnPn (x)+an+1Pn+1 (x), (A.3) where the coefficients are given as 2 n(n + α + β)(n + α)(n + β) an = , 2n + α + β (2n + α + β − 1)(2n + α + β +1) 446 A Appendix A: Jacobi polynomials and beyond α2 − β2 bn = − . (2n + α + β)(2n + α + β +2) To get the recurrence started, we need the initial values α,β Γ (α + β +2) P ( )(x)= 2−α−β−1 , 0 Γ (α +1)Γ (β +1) α,β 1 α,β α + β +3 P ( )(x)= P ( )(x) ((α + β +2)x +(α − β)) . 1 2 0 (α +1)(β +1) Here, Γ (x) is the classic Gamma function [4]. A Matlab script for evaluating Jacobi polynomials using the above procedure is given in JacobiP.m. JacobiP.m function [P] = JacobiP(x,alpha,beta,N); % function [P] = JacobiP(x,alpha,beta,N) % Purpose: Evaluate Jacobi Polynomial of type (alpha,beta) > -1 % (alpha+beta <> -1) at points x for order N and returns % P[1:length(xp))] % Note : They are normalized to be orthonormal. % Turn points into row if needed. xp = x; dims = size(xp); if (dims(2)==1) xp = xp’; end; PL = zeros(N+1,length(xp)); % Initial values P_0(x) and P_1(x) gamma0 = 2^(alpha+beta+1)/(alpha+beta+1)*gamma(alpha+1)*... gamma(beta+1)/gamma(alpha+beta+1); PL(1,:) = 1.0/sqrt(gamma0); if (N==0) P=PL’; return; end; gamma1 = (alpha+1)*(beta+1)/(alpha+beta+3)*gamma0; PL(2,:) = ((alpha+beta+2)*xp/2 + (alpha-beta)/2)/sqrt(gamma1); if (N==1) P=PL(N+1,:)’; return; end; % Repeat value in recurrence. aold = 2/(2+alpha+beta)*sqrt((alpha+1)*(beta+1)/(alpha+beta+3)); % Forward recurrence using the symmetry of the recurrence. for i=1:N-1 h1 = 2*i+alpha+beta; anew = 2/(h1+2)*sqrt( (i+1)*(i+1+alpha+beta)*(i+1+alpha)*... (i+1+beta)/(h1+1)/(h1+3)); A Appendix A: Jacobi polynomials and beyond 447 bnew = - (alpha^2-beta^2)/h1/(h1+2); PL(i+2,:) = 1/anew*( -aold*PL(i,:) + (xp-bnew).*PL(i+1,:)); aold =anew; end; P = PL(N+1,:)’; return As is well known (see, e.g., [89]), there is a close connection between Jacobi polynomials and Gaussian quadratures for the approximation of integrals as 1 N f(x)w(x) dx = f(xi)wi. − 1 i=0 Here, (xi,wi) are the quadrature nodes and weights. It can be shown that if (α,β) one chooses xi as the roots of PN+1 (x) and the weights, wi,byrequiringthe integration to be exact for polynomials up to order N, the above summation is in fact exact for f being a polynomial of order 2N +1 – this is the celebrated Gaussian quadrature. Finding the nodes and weights can be done in several ways, with perhaps the most elegant and numerically stable one being based on the recurrence, Eq. (α,β) (A.3). Inspection reveals that setting PN+1 (xi) = 0 truncates the recurrence and the nodes, xi, are the eigenvalues of a symmetric tridiagonal eigenvalue problem. The weights can be recovered from the elements of the eigenvectors; for the details, we refer to [131]. In JacobiGQ.m, an implementation of this algorithm is offered. JacobiGQ.m function [x,w] = JacobiGQ(alpha,beta,N); % function [x,w] = JacobiGQ(alpha,beta,N) % Purpose: Compute the N’th order Gauss quadrature points, x, % and weights, w, associated with the Jacobi % polynomial, of type (alpha,beta) > -1 ( <> -0.5). if (N==0) x(1)=(alpha-beta)/(alpha+beta+2); w(1) = 2; return; end; % Form symmetric matrix from recurrence. J = zeros(N+1); h1 = 2*(0:N)+alpha+beta; J = diag(-1/2*(alpha^2-beta^2)./(h1+2)./h1) + ... diag(2./(h1(1:N)+2).*sqrt((1:N).*((1:N)+alpha+beta).*... ((1:N)+alpha).*((1:N)+beta)./(h1(1:N)+1)./(h1(1:N)+3)),1); if (alpha+beta<10*eps) J(1,1)=0.0;end; J=J+J’; 448 A Appendix A: Jacobi polynomials and beyond % Compute quadrature by eigenvalue solve [V,D] = eig(J); x = diag(D); w = (V(1,:)’).^2*2^(alpha+beta+1)/(alpha+beta+1)*gamma(alpha+1)*... gamma(beta+1)/gamma(alpha+beta+1); return; When solving partial differential equations using high-order and spectral methods, one often uses nodes based on Gauss-like quadrature points, as they are known to allow for high-order accurate interpolation (see Chapter 3). How- ever, the pure Gauss points, computable with JacobiGQ.m, are less favorable since they do not include grid points at the end of the intervals. While not a major obstacle, it is often convenient to include these end points to impose boundary conditions. One often uses Gauss-Lobatto points, given as the roots of (1 − x2) × d (α,β) dx PN (x). Using Eq. (A.2), it is easily realized that the interior Gauss- − (α+1,β+1) Lobatto points are the (N 2)-th-order Gauss points of PN−2 (x) with the end points added. A simple routine utilizing this is shown as JacobiGL.m. JacobiGL.m function [x] = JacobiGL(alpha,beta,N); % function [x] = JacobiGL(alpha,beta,N) % Purpose: Compute the N’th order Gauss Lobatto quadrature % points, x, associated with the Jacobi polynomial, % of type (alpha,beta) > -1 ( <> -0.5). x = zeros(N+1,1); if (N==1) x(1)=-1.0; x(2)=1.0; return; end; [xint,w] = JacobiGQ(alpha+1,beta+1,N-2); x = [-1, xint’, 1]’; return; A.1 Orthonormal polynomials beyond one dimension The extension of polynomial modal expansions to the multidimensional case is a bit more complicated, mainly due to the added geometric variation of the domain (e.g., quadrilaterals/hexahedrals or triangles/tetrahedra). In the case of domains/elements that are logically cubic, a simple dimension-by-dimension approach suffices – this approach is known as ten- sor products and is used widely; for example, to represent a function u(x, y) on [−1, 1]2, one can use a Legendre expansion A.1 Orthonormal polynomials beyond one dimension 449 N uh(x, y)= uˆijPi(x)Pj(y). i,j=0 2 1 Note that this basis has (N +1) terms, while only 2 (N +1)(N +2) terms are needed for completeness in two dimensions. Orthonormality is clearly main- tained in a dimension-by-dimension fashion. For more complex elements (e.g., simplices), the construction of an ortho- normal basis of order N is a bit more complicated. To ensure good approxi- mation properties in finite domains, the polynomials should be orthonormal eigensolutions to a multidimensional singular Sturm-Liouville problem. The construction of such polynomials has been pursued by several authors [103, 201, 261]. For the two-dimensional simplex T2 = {(r, s)|r, s ≥−1; r + s ≤ 0}, the N-th-order orthonormal basis is given as √ (0,0) (2i+1,0) i ∀(i, j) ≥ 0; i + j ≤ N : ψij(r, s)= 2Pi (a)Pj (b)(1 − b) , where the extended coordinates (a, b) ∈ [−1, 1]2 relates to (r, s) ∈ T2 as 1+r a =2 − 1,b= s. 1 − s 1 Note that there are exactly 2 (N +1)(N + 2) terms in the polynomial basis of order N. A script to evaluate the basis in the (a, b) coordinates is shown in Simplex2DP.m. Simplex2DP.m function [P] = Simplex2DP(a,b,i,j); % function [P] = Simplex2DP(a,b,i,j); % Purpose : Evaluate 2D orthonormal polynomial % on simplex at (a,b) of order (i,j). h1 = JacobiP(a,0,0,i); h2 = JacobiP(b,2*i+1,0,j); P = sqrt(2.0)*h1.*h2.*(1-b).^i; return; Similarly, one can derive an orthonormal basis for the three-dimensional simplex, T3 = {(r, s, t)|r, s, t ≥−1; r + s + t ≤−1}, with the N-th-order orthonormal basis being ∀(i, j, k) ≥ 0; i + j + k ≤ N : √ (0,0) (2i+1,0) (2i+2j+2,0) i i+j ψijk(r, s, t)=2 2Pi (a)Pj (b)Pk (b)(1 − b) (1 − c) , 450 A Appendix A: Jacobi polynomials and beyond where the extended coordinates (a, b, c) ∈ [−1, 1]3 relates to (r, s, t) ∈ T3 as 1+r 1+r a = −2 − 1,b=2 − 1,c= t.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages55 Page
-
File Size-