Supports approximating functions and solving differential equations on disks in ApproxFun
Author JuliaApproximation
4 Stars
Updated Last
1 Year Ago
Started In
September 2015


Build Status codecov

This is an experimental package to add support for multivariate orthogonal polynomials on disks, spheres, triangles, and other simple geometries to ContinuumArrays.jl. At the moment it primarily supports triangles. For example, we can solve variable coefficient Helmholtz on the triangle with zero Dirichlet conditions as follows:

julia> using MultivariateOrthogonalPolynomials, StaticArrays, LinearAlgebra

julia> P = JacobiTriangle()
JacobiTriangle(0, 0, 0)

julia> x,y = first.(axes(P,1)), last.(axes(P,1));

julia> u = P * (P \ (exp.(x) .* cos.(y))) # Expand in Triangle OPs
JacobiTriangle(0, 0, 0) * [1.3365085377830084, 0.5687967596428205, -0.22812040274224554, 0.07733064070637755, 0.016169744493985644, -0.08714886622738759, 0.00338435674992512, 0.01220019521126353, -0.016867598915573725, 0.003930461395801074  …  ]

julia> u[SVector(0.1,0.2)] # Evaluate expansion

See the examples folder for more examples, including non-zero Dirichlet conditions, Neumann conditions, and piecing together multiple triangles. In particular, the examples from Olver, Townsend & Vasil 2019.

This code relies on Slevinsky's FastTransforms C library for calculating transforms between values and coefficients. At the moment the path to the compiled FastTransforms library is hard coded in c_transforms.jl.


S. Olver, A. Townsend & G.M. Vasil (2019), A sparse spectral method on triangles, arXiv:1902.04 S. Olver & Y. Xuan (2019), Orthogonal polynomials in and on a quadratic surface of revolution, arXiv:1906.12305 G.M. Vasil, K.J. Burns, D. Lecoanet, S. Olver, B.P. Brown & J.S. Oishi (2016), Tensor calculus in polar coordinates using Jacobi polynomials, J. Comp. Phys., 325: 53–73