TL;DR
This paper develops a spectral method using bivariate orthogonal polynomials on triangles, enabling efficient, sparse discretizations for solving large-scale linear PDEs with high polynomial degrees.
Contribution
It introduces a spectral method on triangles leveraging analogues of univariate tools, allowing for sparse, high-degree polynomial discretizations of PDEs.
Findings
Enables solving PDEs with polynomial degrees in the thousands.
Achieves sparse discretizations with millions of degrees of freedom.
Provides practical algorithms for spectral methods on triangular domains.
Abstract
In this paper, we demonstrate that many of the computational tools for univariate orthogonal polynomials have analogues for a family of bivariate orthogonal polynomials on the triangle, including Clenshaw's algorithm and sparse differentiation operators. This allows us to derive a practical spectral method for solving linear partial differential equations on triangles with sparse discretizations. We can thereby rapidly solve partial differential equations using polynomials with degrees in the thousands, resulting in sparse discretizations with as many as several million degrees of freedom.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
A sparse spectral method on triangles
Sheehan Olver Department of Mathematics, Imperial College, London, UK. ([email protected])
Alex Townsend Department of Mathematics, Cornell University, Ithaca, NY 14853. ([email protected]) This work is supported by National Science Foundation grant No. 1645445.
Geoffrey Vasil School of Mathematics & Statistics, The University of Sydney, Australia. ([email protected])
Abstract
In this paper, we demonstrate that many of the computational tools for univariate orthogonal polynomials have analogues for a family of bivariate orthogonal polynomials on the triangle, including Clenshaw’s algorithm and sparse differentiation operators. This allows us to derive a practical spectral method for solving linear partial differential equations on triangles with sparse discretizations. We can thereby rapidly solve partial differential equations using polynomials with degrees in the thousands, resulting in sparse discretizations with as many as several million degrees of freedom.
keywords:
bivariate orthogonal polynomials, spectral methods, partial differential equations, triangle, Clenshaw’s algorithm
{AMS}
33D50, 65N35
1 Introduction
Univariate orthogonal polynomials are fundamental in applied and computational mathematics. They are used for the development of quadrature rules [8], spectral theory of Jacobi operators [24], eigenvalue statistics of random matrices [5], computational approximation theory [26], and to derive spectral methods for the numerical solution of differential equations [2, 3, 15, 18, 27, 28]. On the contrary, multivariate orthogonal polynomials currently have a more limited impact in applications and computational methods, though it is an active research area with a promising future.
To demonstrate the potential practical importance of multivariate orthogonal polynomials, we show that many computational tools for univariate orthogonal polynomials can be generalized to a family of bivariate orthogonal polynomials on a triangle. These tools allow us to derive a sparse spectral method for solving general linear partial differential equations (PDEs) with Dirichlet and Neumann conditions on triangles. While the techniques are general, we demonstrate the method on the following PDEs:
[TABLE]
Since triangles can be mapped to each other by affine translations, and polynomials remain polynomial, we can consider a single reference triangle, without loss of generality. Throughout this paper, we select the reference triangle to be the unit simplex: a right-angled triangle of unit height and width, i.e., .
There are several different families of bivariate orthogonal polynomials on [7]. Here, we consider a family that is built from univariate orthogonal polynomials [11]:
[TABLE]
where denotes the degree shifted Jacobi polynomial on with parameters .111In particular, , where is the degree Jacobi polynomial on with parameters . The polynomials in Eq. 1 are one possible generalization on triangles of the Legendre polynomials [13, Tab. 18.3.1]. In particular, the polynomials satisfy three-term recurrence relations (see Eq. 7) and are orthogonal with respect to the standard inner-product on :
[TABLE]
where . They provide a well-conditioned basis to represent integrable functions as a series expansion,
[TABLE]
where the first equality above should be understood in the -sense. In order to do efficient computations with functions defined on a triangle, it is important to be able to rapidly compute expansion coefficients of so that
[TABLE]
for a selected integer . Recently, Slevinsky developed and implemented a fast backward stable algorithm for precisely this task [19, 20], accompanied with an optimized multithreaded open-source C library [21], allowing expansions to be computationally feasible for relatively large . This has greatly improved the practicality of spectral methods for triangular domains.
The use of bivariate orthogonal polynomials on triangles has a long history in the spectral element method and -finite element method (-FEM) literature [10], going back to Dubiner [6]. The polynomials in Eq. 1 lead to highly structured -FEM discretization matrices for PDEs of the form , and when is a constant one can derive sparse discretizations that can be generated in optimal complexity [1]. The present work can be viewed as a generalization of this construction to strong formulations of PDEs that are not necessarily elliptic. Moreover, the properties of bivariate orthogonal polynomials allows us to retain sparsity for high differential order and variable coefficient PDEs (see Section 4.1.2).
Our main idea is to exploit a hierarchy of sparse recurrence relations [16] that hold between the polynomials in Eq. 1 and the so-called Jacobi polynomials on the triangle [7, 11]:222The polynomials for satisfy if or .
[TABLE]
where . In a manner that is analogous to the ultraspherical spectral method [15, 25], we represent the action of partial derivatives by representing the domain and range as vectors of coefficients in different bases so that the matrix representation is sparse. For example, while for cannot be written as a sparse vector of coefficients, we have , (see Corollary A.1). This means that the first partial derivative with respect to has a sparse matrix representation if the range is represented as a vector of coefficients. This can be summarized as
[TABLE]
Moreover, these sparse recurrence relationships form a hierarchy, in the sense that has a sparse representation if the range is represented as a vector of coefficients, for any . Similar, but slightly more complicated, sparse recurrence relations hold for when the range is represented as vectors in coefficients for any (see Section 3.4).
One is also able to combine sparse representations to discretize linear PDEs. For example, the Laplacian operator can be represented by a sparse matrix if the range is selected to be a vector of coefficients while the domain is a vector of coefficients. This is because there exist sparse conversion relationships for converting between certain bases (see Section 3.1). Figure 1 illustrates a typical schema that illustrates how sparse recurrences are combined. In the language of finite-element methods, the test and trial spaces are different with a sparse embedding of the trial space in the test space.
The paper is organized as follows. In Section 2, we establish some general computational tools for bivariate orthogonal polynomials such as Jacobi operators and the bivariate Clenshaw algorithm. In Section 3, we specialize to Eq. 2, where the additional structure allows us to achieve a more efficient Clenshaw algorithm. In Section 4, we employ weighted Jacobi polynomials on the triangle to solve PDEs such as a variable coefficient Helmholtz equation and a biharmonic equation with zero Dirichlet conditions. In Section 5, we extend the ideas to solve linear PDEs with nonzero Dirichlet conditions, and in Section 6 we demonstrate that the framework easily generalizes to systems of PDEs so that it can be used to solve the Helmholtz equation in a polygonal domain.
The appendices contain relationships and additional formulae about orthogonal polynomials on the triangle. Our spectral method depends on explicit rational recurrence relationships that the polynomials satisfy for differentiation, weighted differentiation, and conversion, which we detail in Appendix A. Tackling Dirichlet conditions requires a modification of the basis to enable sparse restriction operators, which we define as in Appendix B. These also have explicit rational recurrence relationships for differentiation and conversion, which we derive in Appendix C.
2 Computations with bivariate orthogonal polynomials
In this section, we derive several computational tools for bivariate orthogonal polynomials such as the Jacobi operators, Clenshaw’s algorithm, and multiplication operators. Later, in Section 3, we specialize these tools to the Jacobi polynomials on the triangle (see Eq. 2).
Consider a sequence of bivariate polynomials
[TABLE]
where is a basis for the space of bivariate polynomials of total degree ,333We say that a bivariate polynomial is of total degree if for some coefficients . for any integer . We say that such a sequence is orthogonal with respect to a nonnegative weight function on if
[TABLE]
where are positive numbers.
It is notationally convenient to write the bivariate polynomials of the same total degree as a single vector-valued polynomial [7] as follows:
[TABLE]
One can then state the orthogonality condition in Eq. 3 more succinctly as
[TABLE]
where is the diagonal matrix with entries for , is a matrix of all zeros of the appropriate size, and denotes the transpose of . The sequence of bivariate polynomials are normalized (orthonormal) if is the identity matrix for all . We also use the notation
[TABLE]
to encode all of the polynomials as a single infinite vector.
2.1 Bivariate function approximation
A sequence of bivariate orthogonal polynomials on can be used to approximate functions that are square integrable with respect to the associated weight function on . For example, provided , we can write
[TABLE]
where and \mbox{\boldmathf\unboldmath}\!=\!{{\left({\boldsymbol{f}_{0},\boldsymbol{f}_{1},\ldots}\right)}^{\top}} are the coefficients of the expansion. Here, the first equality in Eq. 5 is understood in the sense that the difference between the left- and right-hand side is zero in the norm associated to the inner-product.
The expansion coefficients in Eq. 5 are defined by the following integrals:
[TABLE]
where is the orthogonality constant in Eq. 3. In practice, it is usually desirable for the expansion coefficients to rapidly decay, i.e., is a rapidly decaying sequence.
2.2 Jacobi operators
In the theory of univariate orthogonal polynomial an important object is the Jacobi operator, which is a self-adjoint linear operator given by a tridiagonal matrix [24]. It is closely related to the fact that a sequence of univariate orthogonal polynomials satisfies a three-term recurrence. For example, if is a sequence of univariate orthogonal polynomials, then
[TABLE]
for [23, Thm. 3.2.1] and
[TABLE]
The Jacobi operator associated with is the symmetric tridiagonal matrix obtained by a diagonal similarity transform of [24]. This diagonal similarity transform corresponds precisely to the normalization factors required to orthonormalize the sequence of univariate orthogonal polynomials. The transformation is possible provided for all . In particular, if are orthonormal, then is a symmetric tridiagonal matrix.
A related fact that is important for designing spectral methods is that can be interpreted as the “multiplication-by-” operator. That is, if f(x)={\mathbf{P}}(x,y)^{\top}\mbox{\boldmathf\unboldmath} we have
[TABLE]
In other words, J^{\top}\mbox{\boldmathf\unboldmath} gives the coefficients of .
The analogue for bivariate orthogonal polynomials is a pair of commuting operators and [7, §3.4], which satisfy
[TABLE]
Here, and are block tridiagonal operators so that
[TABLE]
where , , and . When deriving spectral methods the operators and play an important role as they can be interpreted as operators for “multiplication-by-” and “multiplication-by-,” respectively. That is,
[TABLE]
In other words, if f(x,y)={\mathbf{P}}(x,y)^{\top}\mbox{\boldmathf\unboldmath}, then J_{x}^{\top}\mbox{\boldmathf\unboldmath} and J_{y}^{\top}\mbox{\boldmathf\unboldmath} give the coefficients of and , respectively.
2.3 Recurrences and the Clenshaw algorithm
For univariate orthogonal polynomials, the three-term recurrence encoded by a Jacobi operator can be used to construct the polynomials themselves at a specified point via forward substitution. Clenshaw’s algorithm is a closely related concept that allows the evaluation of a finite series expansion of univariate orthogonal polynomials at a point [4]. While it is common to interpret the three-term recurrence/Clenshaw’s algorithm as recursions, we prefer to interpret them as forward/backward substitution on a lower/upper triangular system associated to the Jacobi operator as this point-of-view facilitates generalization to the bivariate setting.
Let be a sequence of univariate orthogonal polynomials such that , and suppose that we wish to evaluate at . Since satisfy a three-term recurrence of the form for [23, Thm. 3.2.1], we find that
[TABLE]
where and .
Forward substitution on the lower triangular linear system in Eq. 9 allows one to evaluate for from which one could evaluate . For stability purposes, the Clenshaw algorithm evaluates expansions more directly and can be written as
[TABLE]
Therefore, the Clenshaw algorithm is equivalent to solving the upper triangular linear system , followed by returning the first entry of . Since only has three nonzero subdiagonals, the algorithm requires operations to evaluate .
The bivariate case is more involved. Given , we would like to evaluate at , where (without loss of generality) we assume that . Since there are three-term recurrence relations in both and (see Eq. 7) we find that
[TABLE]
where is the identity matrix and is the zero vector of length . Unlike the univariate case, the system is not lower triangular and so we cannot immediately invert this system via forward recurrence to find .
A reformulation that allows for inversion is to multiply the system to reduce the blocks above the diagonal in Eq. 11 to the identity. First, note that the blocks
[TABLE]
have full column rank for [7, Theorem 3.3.4]. Therefore, has a left-inverse for such that . It follows that an equivalent evaluation scheme can be designed from
[TABLE]
Since is lower triangular we can construct via forward substitution.
Furthermore, a natural bivariate analogue of Clenshaw’s algorithm follows from writing
[TABLE]
Thus can be evaluated by solving an upper triangular linear system using back substitution.
If are dense matrices for , then forward recurrence and Clenshaw’s algorithm require operations. However, in the special case of Jacobi polynomials on the triangle, the matrices involved are sparse (see Section 3) and the complexity can be reduced to operations, which is optimal.
2.4 Multiplication operators
The relations in Eq. 8 show that and are operators that represent “multiplication-by-” and “multiplication-by-”, respectively, in the bivariate orthogonal polynomial basis. Here, we combine these operators together to construct multiplication matrices that represent multiplication by a degree polynomial expanded as .
Suppose we are given a function , and wish to find the expansion coefficients of , where the degree of and can differ. Using and , we find that
[TABLE]
where the definition of is444The matrix is the same as that studied in the literature on bivariate functions of matrices. More precisely, is denoted by in [12], where is the identity matrix and the missing transpose on the second argument is a matter of convention (see [12, Def. 2.1]).
[TABLE]
Since and are block-tridiagonal and each matrix-matrix product increases the block-bandwidth by one, we see that is also a block-banded with upper and lower block-bandwidth .
The expression in Eq. 13 is not ideal for computations when is moderately large because of the inherent ill-conditioning in the monomial basis. It is often computationally beneficial to expand in a bivariate orthogonal polynomial expansion and evaluate using an operator-valued analogue of Clenshaw’s algorithm [22, 28].
The operator-valued analogue of Clenshaw’s algorithm for evaluating is equivalent to the expression:
[TABLE]
where is an infinite identity matrix, is the first canonical unit vector, and is the vector of coefficients for in the bivariate orthogonal polynomial expansion. Here we use the Kronecker product denoted .
In general, and have dense blocks so that the total number of nonzero entries in the principal block matrix of is , and the complexity of constructing using the operator-valued Clenshaw’s algorithm is (where the total number of unknowns is ). In the case of Jacobi polynomials on the triangle, the blocks of and are tridiagonal and there are only nonzero entries, which can be calculated in optimal complexity.
3 Computing with Jacobi polynomials on the triangle
We now specialize the algorithmic ideas in Section 2 to Jacobi polynomials on the triangle (see Eq. 2). Since these polynomials have additional structure, more efficient algorithms can be designed.
We denote the Jacobi polynomials on the triangle that are orthogonal with respect to with by
[TABLE]
and note that series expansions in the basis can be expressed as
[TABLE]
where is the vector of coefficients for . These expansion coefficients can be efficiently computed from samples of by a fast, backward stable algorithm [19, 20, 21]. We further denote the shifted Jacobi polynomials on the unit interval as
[TABLE]
where the alternative ordering of and helps to build analogies with the triangle case.
3.1 Conversion operators
An important property of Jacobi polynomials on the interval is that they have banded conversion operators, which translate between coefficients from expansion in to or . In terms of converting expansions between bases, we can express such conversions as
[TABLE]
where and are upper bidiagonal operators, with rational entries as given in [13, (18.9.5)].
Jacobi polynomials on the triangle have a similar property: we can increment either , , or in the expansion by one:
[TABLE]
Each of these operators are sparse: they have block-bandwidths with diagonal blocks for and upper bidiagonal blocks for and . The entries are rational, and can be determined in closed form by the recurrence relationships in Corollary A.3.
3.2 Constructing Jacobi operators
For Jacobi polynomials, the recurrence relationships that give rise to tridiagonal Jacobi operators, representing multiplication by , are well-known. However, the Jacobi operators can alternatively be derived via lower bidiagonal lowering operators and [13, 18.9.6] that represent multiplication by and :
[TABLE]
Similarly, is equivalent to . In other words, the Jacobi operator corresponding to multiplication by can be constructed via
[TABLE]
Note that the product of a lower bidiagonal operator and an upper bidiagonal operator is a tridiagonal operator, as expected.
To construct the Jacobi operators and for Jacobi polynomials on the triangle, we first note that there exists three lowering operators that satisfy:
[TABLE]
where . We will use other indices to indicate multiple lowering in a row, e.g.,
[TABLE]
corresponds to multiplication by , where the choice for navigating the parameter tree is arbitrary.
We can construct the Jacobi operators from the lowering operators via
[TABLE]
Note that the entries of the lowering operators can be determined by the recurrences in Corollary A.4, and they are sparse. In particular, they have block-bandwidths and diagonal blocks for and lower-bidiagonal blocks for and . This block structure ensures that is block-tridiagonal with diagonal block and that is block-tridiagonal with tridiagonal blocks. Finally, and commute because the and operators commute:
[TABLE]
3.3 Implementation of Clenshaw’s algorithm and multiplication operators
We now exploit the sparsity structure of and to get an complexity Clenshaw algorithm. In particular, using the notation of Section 2.3, since is diagonal and is tridiagonal we can construct a simple left-inverse . That is, we have the following structure:
[TABLE]
Let denote the first sub-block of , let , and let
[TABLE]
Then, the following matrix is a pseudo-inverse of :
[TABLE]
Note that can be applied to a vector in operations. When incorporation into Clenshaw’s algorithm described in Section 2.3, this gives an optimal algorithm for evaluating functions. Furthermore, when incorporated into the construction of the multiplication operators (see Section 2.4), we find that one can construct multiplication operators in operations.
3.4 Differentiation
Jacobi polynomials on the interval have banded recurrence relationships for their derivatives by incrementing both of the parameters, that is, we can represent
[TABLE]
where is zero except for the first super-diagonal [13, 18.9.15]. They also have banded recurrence relationship for their weighted derivatives that decrement the parameters:
[TABLE]
where is zero except for the first sub-diagonal [13, 18.9.16].
These properties translate to partial derivatives of Jacobi polynomials on the triangle. That is, we have555We have similar relationships for , but we omit these for brevity as they are not needed.
[TABLE]
where the entries are derived in Corollary A.1. Both and are sparse: they are block super-diagonal, and their blocks are upper bi-diagonal and super-diagonal, respectively. Similarly, for weighted differentiation we have
[TABLE]
where the entries are derived in Corollary A.2. Both and are also sparse matrices as they are block sub-diagonal, and their blocks are lower bi-diagonal and sub-diagonal, respectively.
Combining differentiation and conversion appropriately allows us to represent more complicated differential operators. For example, the Laplacian can be expressed as an operator that takes coefficients in an expansion to coefficients in an expansion as follows:
[TABLE]
A simple calculation determines that this is also a sparse operator with block-bandwidths and blocks with bandwidths , see the left figure in Fig. 2.
Similarly, we can express the Laplacian as an operator from coefficients in an expansion to coefficients in an expansion by using weighted derivatives and lowering operators:
[TABLE]
This is a sparse operator with block-bandwidths and blocks with bandwidths , see the middle figure in Fig. 2.
Finally, variable coefficients can be constructed by combining lowering, conversion, and Jacobi operators. For example, the variable Helmholtz operator can be represented as
[TABLE]
This still leads to a sparse discretisation, where the block bandwidths depend on the degree of , see the right figure in Fig. 2 for an example with .
4 Solving linear PDEs with zero Dirichlet conditions
We now use the systematic approach to constructing sparse operators to solve PDEs. We construct the operators using BlockBandedMatrices.jl [14], which enables fast multiplication of block-banded matrices with banded blocks by building on BLAS. We then convert the representation to a SuiteSparse compatible sparse matrix format, for matrix factorization and solves.
4.1 Zero Dirichlet conditions
To solve PDEs with vanishing Dirichlet conditions, we use the weighted basis
[TABLE]
For higher order equations like the Biharmonic equation we consider vanishing Dirichlet and Neumann conditions using the weighted basis
[TABLE]
4.1.1 Example 1: Poisson equation
Consider Poisson’s equation on a triangle with zero Dirichlet conditions, i.e.,
[TABLE]
We reduce this equation to a truncation of
[TABLE]
where the coefficients of f(x,y)={\bf P}^{(1,1,1)}(x,y)^{\top}\mbox{\boldmathf\unboldmath} are determined using [19] as implemented in [21]. In Fig. 3 (left), we depict the solution for a specific choice of . In Figure 3 (right), we show the construction time666Timings are performed on an iMac 2017 with 3.8 GHz Intel Core i5, using Julia v1.0 compiled with MKL BLAS. Note that the default OpenBLAS is slower for banded matrix operations. of the matrix (using BlockBandedMatrices.jl), execution time for an LU factorization, and thesolve time (using SuiteSparse via Julia’s SparseArrays.jl). We observe that the construction requires an optimal operations while the factorization and solution time are observed to cost an almost-optimal operations. The same complexities are observed for PDEs on rectangles using a Chebyshev-based spectral method [9].
In Fig. 4, we show the norms of each block of calculated coefficients of the approximation for four right-hand sides with . Note that the rate of decay in the coefficients is a proxy for the rate of convergence of the computed solution. The behavior of the right-hand side at the corners has an impact on the convergence rate; in particular, if and its derivatives vanish at the corners then we observe faster convergence of the solution. The behavior at the origin is particularly important as the Laplacian of the basis always vanishes at the origin. While we only observe algebraic convergence for the first three examples (that is, we do not achieve spectral convergence as ), the rate of convergence is fairly fast, achieving machine precision accuracy when vanishes at the origin with around 10,000 unknowns. Furthermore, the last example shows spectral convergence for a Gaussian bump function, which up to machine precision vanishes to all orders at the corners. Finally, over-resolving the solution does not result in the error plateauxing at machine precision, which means our discretization slightly improves the regularity of the data, similar to the ODE case in [15].
4.1.2 Example 2: Variable coefficient Helmholtz equation with forcing terms
Now, consider a variable coefficient Helmholtz equation with zero Dirichlet conditions, i.e.,
[TABLE]
We first approximate by a polynomial [21] and then use the operator-valued Clenshaw’s algorithm to construct . We obtain the following discretization:
[TABLE]
where and are the Jacobi operators for and
[TABLE]
In Fig. 5 we depict the solution for and plot the timings for construction, factorization, and solution for between 100 and 300, using polynomials of degree . The build time depends only on the discretization size, so we observe an cost.
4.1.3 Example 3: The biharmonic equation
The same technique for constructing a sparse representation of the Laplacian translates to the Biharmonic operator , though now we must use a basis that satisfies both zero Dirichlet and Neumann conditions. We can represent the Laplacian as a map from coefficients in an expansion to coefficients in an expansion by using weighted differentiation and lowering operators:
[TABLE]
Hence, the biharmonic operator can be sparsely represented as a map from coefficients in an expansion to coefficients in an expansion. This is simply given by .
In Fig. 6 we depict a solution to the biharmonic equation and show that the build time grows linearly with respect to the number of degrees of freedom employed to discretize the solution.
5 Nonzero Dirichlet conditions
To handle general nonzero Dirichlet boundary conditions, we wish to construct restriction operators that are sparse operators. To facilitate this, we use a basis where most elements of the basis vanish at the boundary. We take the weighted basis , where are integers, and augment it with additional polynomials so that the basis can represent all bivariate polynomials. This is essentially the same procedure as in [10], but we do it in a way that preserves the sparsity of the restriction operators. Appendix B gives the definition of , where , which is the basis we use to construct sparse discretizations. Here, most of , most of , and most of vanish.
Remark 1**.**
*Formally, can be thought of as , which is made precise in [29] during the construction of the polynomials . However, the construction in [29] is normalized in a way that leads to underflow in double precision computing and we find it simpler to define our own basis in an ad hoc way. *
5.1 Derivative and conversion operators
Partial derivatives and conversion operators \mbox{\boldmathQ\unboldmath}^{(a,b,c)}(x,y) are similar to those derived for \mbox{\boldmathP\unboldmath}^{(a,b,c)}(x,y). Using the formulas in Corollary C.1, we can construct conversion operators that convert from one-edge bases to \mbox{\boldmathP\unboldmath}^{(0,0,0)}:
[TABLE]
Note that each operator is block upper bi-diagonal, with diagonal or upper bi-diagonal blocks. Similarly, Corollary C.3 derives sparse conversion operators from two-edge bases to one edge bases, which we denote by , , , etc. Finally, Corollary C.5 derives sparse conversion operators from the three-edge basis to any of the two-edge bases, which we denote by , , and . We can clearly compose these operators together to convert from, say, \mbox{\boldmathQ\unboldmath}^{(1,1,1)} to \mbox{\boldmathP\unboldmath}^{(0,0,0)}. For this purpose, we can define
[TABLE]
There are always several paths through the parameter space to convert one basis into another; however, any path that is chosen results in the same final conversion operator.
The same principle is true for derivatives, though for our purposes it suffices to restrict our attention to derivatives of the two-edge bases. Corollary C.7 gives us the entries for sparse (block-superdiagonal with at most bidiagonal blocks) operators that satisfy:
[TABLE]
General partial derivative operators can be constructed by combining conversion and derivative operators. For example, we can successfully construct the Laplacian from \mbox{\boldmathQ\unboldmath}^{(1,1,1)} to \mbox{\boldmathP\unboldmath}^{(1,1,1)} as
[TABLE]
This is a sparse operator with block-bandwidths and sub-blockbandwidths equal to .
5.2 Restriction operators
The definitions of , , and each has a simple restriction formula to one of the three edges of the triangle:
[TABLE]
In other words, the restriction operator from expansion in to Legendre expansion on the edge from to is a block-banded operator, where the blocks themselves are very sparse: each block has precisely one nonzero entry. Similarly, the other two bases give restriction operators to the other edges. We denote these restriction operators as , , and , respectively. They are given by
[TABLE]
where {\mbox{\boldmathP\unboldmath}}(x):={\bf P}^{(0,0)}(x)^{\top} are the shifted Legendre polynomials.
For the full Dirichlet operator, we need to restrict to all three edges. Thus we can construct restriction operators from \mbox{\boldmathQ\unboldmath}^{(1,1,1)} to the boundary, where the boundary basis are piecewise mapped Legendre polynomials. This restriction operator can be calculated by combining conversion and the one-edge restrictions as follows:
[TABLE]
This operator is also sparse as each component is a product of sparse operators.
5.3 The -method
An issue we must deal with is boundary data with discontinuities at the corners. Consider, for example, the Laplace equation with Dirchlet conditions:
[TABLE]
If the boundary data has discontinuities, that is, , , or , then the solution itself will have an arg-like singularity: e.g., near the origin we have the local behaviour
[TABLE]
Representing by polynomials is therefore limited as they impose continuity. Other PDEs like the Helmholtz equation have similar before when the boundary data has discontinuities.
To overcome this issue, we adapt the Lanczos -method, see [17] for an overview. The Lanczos -method is a device to produce invertible systems for polynomial spectral methods by augmenting the equations with polynomial correction terms, that also provide error control by measuring the magnitude of the correction term. In our context we use it to capture discontinuities by augmenting the boundary data with corrections of the form
[TABLE]
That is, we add constants and to our discretisation:
[TABLE]
Now in our examples below we actually have mathematically continuous boundary data, however, round-off errors mean our boundary data is slightly discontinuous. The correction terms give a way of capturing this discontinuity without destroying the regularity of . When the solution is resolved the terms are therefore negligible, and we can use the approximation of on its own.
Note that it is possible to add additional correction terms to make the system invertible, but this is a more technical task and hence we prefer to use a QR decomposition to solve the resulting rectangular linear system in a least squares sense. This does incur a substantial penalty, as SuiteSparse’s QR decomposition is significantly slower than its LU decomposition.
5.3.1 Example 4: Laplace’s equation
Consider Laplace’s equation with prescribed Dirichlet data:
[TABLE]
Expanding , , and in Legendre series leads to a system of equations satisfied by . That is,
[TABLE]
where are the coefficients of in the basis \mbox{\boldmathQ\unboldmath}^{(1,1,1)}, are the Legendre coefficients of , are the Legendre coefficients of , and are the Legendre coefficients of . We augment this system with corrections, which are ultimately ignored in the approximation of the solution.
In Fig. 7 we plot the calculated coefficients for for three choices of boundary data: , , and . The first two examples exhibit algebraic decay, with the rate of decay dictated by the number of derivatives matching at the corners. The last example has a smooth solution ( is harmonic) and we see that the algorithm achieves super-algebraic convergence, and is stable for large . We also note that evaluating the approximation is exact to within an accuracy of compared to the exact solution at the arbitrary point .
5.3.2 Example 5: Transport equation
Nothing in this framework depends on the PDE being elliptic. Here, we consider the transport equation given by
[TABLE]
Information travels at a rate and direction dictated by , and depending on its value we need either one or two edges to uniquely determine the solution. If the solution is uniquely determined from the boundary on the bottom, and hence we use the basis . If then information is coming in from the right, so we use the basis on the bottom and hypotenuse edges. If then information comes in from the left and we use the basis on the bottom and left edges. In Fig. 8 we depict the three solutions.
6 Systems of PDEs
Systems of PDEs can be handled in a straightforward way by concatenating their blocks. As an example, we can solve the Poisson equation with Neumann conditions by re-expressing the PDE as a first-order system: writing expressed in the basis \mbox{\boldmathQ\unboldmath}^{(1,0,1)}, and expressed in the basis \mbox{\boldmathQ\unboldmath}^{(0,1,1)}, the system becomes
[TABLE]
6.0.1 Example 6: Helmholtz equation in a polygon
Note that being able to handle systems of PDEs in this manner also allows us to solve on polygonal domains that are partitioned into triangular elements. For example, consider the Helmholtz equation
[TABLE]
on the polygonal domain with the vertices , , , , , and . We can decompose this domain into 4 triangles and represent the solution as well as its first derivatives in orthogonal polynomial expansions. This leads to a system of PDEs. We then impose continuity of the value and the normal derivative across the interfaces of each element, exploiting the fact that the restriction operator maps to the same basis of Legendre polynomials. (The orientation may be different, but reversing orientation of Legendre expansions corresponds to multiplying by a diagonal matrix that swaps the signs of every other coefficients.) We show the success of this approach in Fig. 9 for (left) and (right).
The discretization of the PDE system is sparse, and the complexity of building the matrices is an optimal using degree polynomials within each element.
7 Conclusions
We have shown that bivariate orthogonal polynomials can lead to sparse discretizations of general linear PDEs on triangles with Dirichlet and Neumann boundary conditions. Instead of quadrature, we use sparse recurrence relationships combined with specialized linear algebra routines, allowing optimal complexity for building the linear systems. Multiple triangles can be patched together to solve PDEs on polygonal domains.
Another extension is to tetrahedra in 3D and higher. We expect this to be straightforward because the definitions of orthogonal polynomials on higher dimensional simplices is very similar to the 2D case. In 3D, we can use the following polynomials:
[TABLE]
which are orthogonal with respect to on the unit 3D simplex. The most time-consuming part of such an extension is deriving the recurrences relationships. Note that in 3D and higher the sparsity of our construction is useful even for small discretisation sizes, as a degree dense discretisation (e.g. arising from collocation) would require calculating entries, where the proposed construction would require an optimal operations.
We used direct solvers via SuiteSparse to solve the resulting discretizations, which is fairly efficient with even millions of unknowns. However, to push the methodology further we will need robust iterative methods and the development of preconditioners. It is not yet clear how to design preconditioners in this setting.
Acknowledgments
This work began when the second author visited the first author at The University of Sydney. We are grateful for the travel support provided by The University of Sydney. We also thank Andrew Horning and Nicolas Boulle for carefully reading the draft and improving the text.
Appendix A Recurrence relationships for Jacobi polynomials on the triangle
Here, we outline the recurrence relationships for that we employ, which were previously derived in [16, 29]. We define and .
Corollary A.1**.**
[16, Corollary 1]** The following recurrence relations for the partial derivatives hold:
[TABLE]
Corollary A.2**.**
[16, Corollary 2]** The following recurrence relations for the weighted partial derivatives hold:
[TABLE]
Corollary A.3**.**
[16, Corollary 3]** The following recurrence relations for conversions hold:
[TABLE]
Corollary A.4**.**
[16, Corollary 4]** The following recurrence relations for lowering operators hold:
[TABLE]
[TABLE]
[TABLE]
Appendix B Dirichlet basis definitions
Here, we define a basis, denoted by , that we employ to impose general Dirichlet and Neumann boundary conditions. We construct by augmenting the weighted basis
[TABLE]
so that it spans all the polynomials with . Depending on the choice of , , and , we obtain sparse restriction operators to one, two, or three edges of the triangle. We refer to this basis as the Dirichlet basis for its usefulness in solving PDEs with Dirichlet and Neumann boundary conditions.
B.1 One-edge Dirichlet basis
Definition B.1**.**
The following polynomials vanish at apart from when :
[TABLE]
The following polynomials vanish at apart from when :
[TABLE]
The following polynomials vanish at (i.e., ) apart from when :
[TABLE]
The ordering is chosen so that the conversion operators derived below are upper triangular. Each basis has a simple restriction formula to the corresponding edge.
Proposition B.2**.**
Restriction operator to :
[TABLE]
Restriction operator to :
[TABLE]
Restriction operator to :
[TABLE]
B.2 Two-edge Dirichlet basis
To handle two edges, consider first and . As before, we wish to construct a basis that adds in the missing polynomials to in a way that the restriction operators have the necessary structure. To do this, we select polynomials so that we can construct the conversion operator to expansions in the basis \mbox{\boldmathQ\unboldmath}^{(1,0,0)} and use the restriction operators we already have (see Corollary C.1).
Definition B.3**.**
The following polynomials vanish at and apart from when :
[TABLE]
The following polynomials vanish at and apart from when :
[TABLE]
The following polynomials vanish at and apart from when :
[TABLE]
B.3 Three-edge Dirichlet basis
We finally get to three edges. Again, we want to choose the extra polynomials so that we can easily convert to any two-edge cases. The following does the trick:
Definition B.4**.**
The following polynomials vanish at , , and apart from when , and :
[TABLE]
Appendix C Dirichlet basis recurrence relationships
The following allows us to construct sparse conversion operators from the one-edge Dirichlet basis to the standard Jacobi polynomials on the triangle:
Corollary C.1**.**
The following recurrence relationships hold:
[TABLE]
Proof C.2**.**
*These are either immediate from definitions or are obtained by rearranging recurrence relationships found in Corollary A.4. *
The two-edge Dirichlet basis satisfy several sparse recurrence relationships.
Corollary C.3**.**
The following recurrence relationships hold:
[TABLE]
[TABLE]
[TABLE]
[TABLE]
[TABLE]
[TABLE]
Proof C.4**.**
*These are either immediate from definitions or are obtained by rearranging recurrence relationships found in Corollary A.4. *
The three-edge Dirichlet basis also satisfy several sparse recurrence relationships.
Corollary C.5**.**
The following recurrence relationships hold:
[TABLE]
[TABLE]
Proof C.6**.**
*These are either immediate from definitions or are obtained by rearranging recurrence relationships found in Corollary A.4. *
C.1 Recurrence relationships for the partial derivatives of the Dirichlet basis
We now turn to recurrence relationships for the partial derivatives of the Dirichlet basis, which are needed when imposing Neumann boundary conditions.
Corollary C.7**.**
The following recurrence relationships hold:
[TABLE]
Proof C.8**.**
The first three relations follow from the weighted partial differentiation relationships (see Corollary A.2). The fourth relation requires the additional property that
[TABLE]
which follows from [13, 15.5.6]. The fifth relationship also follows from Corollary A.2. For the sixth equation, if we define , then the relation reduces to
[TABLE]
*and this expression follows from in [16, Lem. 1]. The last three relations follow from the same manipulation. *
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] S. Beuchler and J. Schöberl , New shape functions for triangular p-FEM using integrated Jacobi polynomials , Numer. Math., 103.3 (2006), pp. 339–366.
- 2[2] J. P. Boyd , Chebyshev and Fourier spectral methods, Courier Corporation, 2001.
- 3[3] C. W. Clenshaw , The numerical solution of linear differential equations in Chebyshev series , Math. Proc. Camb. Phil. Soc., Vol. 53. No. 1. (1957) pp. 134–149.
- 4[4] C. W. Clenshaw , A note on the summation of Chebyshev series , Math. Comput., 9 (1955), pp. 118–120.
- 5[5] P. Deift , Orthogonal Polynomials and Random Matrices: a Riemann–Hilbert Approach , Vol. 3, Amer. Math. Soc., 1999.
- 6[6] M. Dubiner , Spectral methods on triangles and other domains , J. Sci. Comput., 6 (1991), pp. 345–390.
- 7[7] C. F. Dunkl and Y. Xu , Orthogonal Polynomials of Several Variables , Cambridge University Press, 2014.
- 8[8] W. Gautschi , Orthogonal Polynomials: Computation and Approximation , Oxford University Press, 2004.
