×

Computing with functions in the ball. (English) Zbl 1452.65001

Summary: A collection of algorithms in object-oriented MATLAB is described for numerically computing with smooth functions defined on the unit ball in the Chebfun software. Functions are numerically and adaptively resolved to essentially machine precision by using a three-dimensional analogue of the double Fourier sphere method to form “Ballfun” objects. Operations such as function evaluation, differentiation, integration, fast rotation by an Euler angle, and a Helmholtz solver are designed. Our algorithms are particularly efficient for vector calculus operations, and we describe how to compute the poloidal-toroidal and Helmholtz-Hodge decompositions of a vector field defined on the ball.

MSC:

65-04 Software, source code, etc. for problems pertaining to numerical analysis
65Dxx Numerical approximation and computational geometry (primarily algorithms)

References:

[1] G. B. Arfken, Mathematical Methods for Physicists, 3rd ed., Academic Press, Orlando, FL, 1985. · Zbl 0135.42304
[2] J. L. Aurentz and L. N. Trefethen, Chopping a Chebyshev series, ACM Trans. Math. Software, 43 (2017), pp. 33:1-33:21. · Zbl 1380.65032
[3] G. Backus, Poloidal and toroidal fields in geomagnetic field modeling, Rev. Geophys., 24 (1986), pp. 75-109.
[4] R. H. Bartels and G. W. Stewart, Solution of the matrix equation \(AX+ XB= C\), Commun. ACM, 15 (1972), pp. 820-826. · Zbl 1372.65121
[5] Z. Battles and L. N. Trefethen, An extension of MATLAB to continuous functions and operators, SIAM J. Sci. Comput., 25 (2004), pp. 1743-1770. · Zbl 1057.65003
[6] E. R. Benton and K. A. Whaler, Rapid diffusion of the poloidal geomagnetic field through the weakly conducting mantle: A perturbation solution, Geophys. J. Internat., 75 (1983), pp. 77-100. · Zbl 0527.73120
[7] H. Bhatia, G. Norgard, V. Pascucci, and P.-T. Bremer, The Helmholtz-Hodge decomposition-A survey, IEEE Trans. Visual. Comput. Graph., 19 (2013), pp. 1386-1404.
[8] P. Boronski and L. S. Tuckerman, Poloidal-toroidal decomposition in a finite cylinder. I: Influence matrices for the magnetohydrodynamic equations, J. Comput. Phys., 227 (2007), pp. 1523-1543. · Zbl 1126.76055
[9] P. Boronski and L. S. Tuckerman, Poloidal-toroidal decomposition in a finite cylinder: II. Discretization, regularization and validation, J. Comput. Phys., 227 (2007), pp. 1544-1566. · Zbl 1126.76056
[10] J. P. Boyd, The choice of spectral functions on a sphere for boundary and eigenvalue problems: A comparison of Chebyshev, Fourier and associated Legendre expansions, Monthly Weather Rev., 106 (1978), pp. 1184-1191.
[11] R. Bridson, Fluid Simulation for Computer Graphics, AK Peters/CRC Press, Boca Raton, FL, 2015.
[12] K. J. Burns, G. M. Vasil, J. S. Oishi, D. Lecoanet, and B. P. Brown, Dedalus: A flexible framework for numerical simulations with spectral methods, Phys. Rev. Res., 2 (2020), 023068.
[13] H.-B. Cheong, Application of double Fourier series to the shallow-water equations on a sphere, J. Comput. Phys., 165 (2000), pp. 261-287. · Zbl 0986.76064
[14] A. J. Chorin, A numerical method for solving incompressible viscous flow problems, J. Comput. Phys., 2 (1967), pp. 12-26. · Zbl 0149.44802
[15] A. J. Chorin, Numerical solution of the Navier-Stokes equations, Math. Comp., 22 (1968), pp. 745-762. · Zbl 0198.50103
[16] A. J. Chorin, On the convergence of discrete approximations to the Navier-Stokes equations, Math. Comp., 23 (1969), pp. 341-353. · Zbl 0184.20103
[17] C. Clenshaw, A note on the summation of Chebyshev series, Math. Comp., 9 (1955), pp. 118-120. · Zbl 0065.05403
[18] J. Coiffier, Fundamentals of Numerical Weather Prediction, Cambridge University Press, Cambridge, UK, 2011. · Zbl 1246.86011
[19] J. W. Cooley and J. W. Tukey, An algorithm for the machine calculation of complex Fourier series, Math. Comp., 19 (1965), pp. 297-301. · Zbl 0127.09002
[20] P. A. Davidson, An Introduction to Magnetohydrodynamics, Cambridge University Press, Cambridge, UK, 2002. · Zbl 0974.76002
[21] T. A. Driscoll, N. Hale, and L. N. Trefethen, Chebfun Guide, Pafnuty Publications, Oxford, UK, 2014, http://www.chebfun.org/docs/guide/.
[22] C. F. Dunkl and Y. Xu, Orthogonal Polynomials of Several Variables, Cambridge University Press, Cambridge, UK, 2014. · Zbl 1317.33001
[23] N. Flyer and G. B. Wright, A radial basis function method for the shallow water equations on a sphere, Proc. A, 471 (2009), pp. 1-28. · Zbl 1186.76664
[24] B. Fornberg, A pseudospectral approach for polar and spherical geometries, SIAM J. Sci. Comput., 16 (1995), pp. 1071-1081. · Zbl 0831.65119
[25] B. Fornberg and D. Merrill, Comparison of finite difference-and pseudospectral methods for convective flow over a sphere, Geophys. Res. Lett., 24 (1997), pp. 3245-3248.
[26] D. Fortunato and A. Townsend, Fast Poisson solvers for spectral methods, IMA J. Numer. Anal., (2019).
[27] H. Gao, M. K. Mandal, G. Guo, and J. Wan, Singular point detection using discrete Hodge Helmholtz decomposition in fingerprint images, in Proceedings of the IEEE International Conference on Acoustics, Speech, and Signal Processing, 2010, pp. 1094-1097.
[28] J. D. Gardiner, A. J. Laub, J. J. Amato, and C. B. Moler, Solution of the Sylvester matrix equation \(AXB^T+ CXD^T= E\), ACM Trans. Math. Software, 18 (1992), pp. 223-231. · Zbl 0893.65026
[29] I. M. Gelfand, R. A. Minlos, and Z. Y. Shapiro, Representations of the Rotation and Lorentz Groups and their Applications, Courier Dover Publications, New York, 2018.
[30] W. M. Gentleman, Implementing Clenshaw-Curtis quadrature, I. Methodology and experience, Commun. ACM, 15 (1972), pp. 337-342. · Zbl 0234.65024
[31] W. M. Gentleman, Implementing Clenshaw-Curtis quadrature, II. Computing the cosine transformation, Commun. ACM, 15 (1972), pp. 343-346. · Zbl 0234.65024
[32] G. H. Golub and C. F. Van Loan, Matrix Computations, 3rd ed., Johns Hopkins University Press, Baltimore, MD, 2012. · Zbl 0865.65009
[33] Q. Guo, M. K. Mandal, G. Liu, and K. M. Kavanagh, Cardiac video analysis using Hodge-Helmholtz field decomposition, Comput. Biol. Med., 36 (2006), pp. 1-20.
[34] B. Hashemi and L. N. Trefethen, Chebfun in three dimensions, SIAM J. Sci. Comput., 39 (2017), pp. C341-C363. · Zbl 1373.65011
[35] W. Heinrichs, Spectral collocation schemes on the unit disc, J. Comput. Phys., 199 (2004), pp. 66-86. · Zbl 1057.65089
[36] R. Hollerbach, Magnetohydrodynamic Ekman and Stewartson layers in a rotating spherical shell, Proc. A, 444 (1994), pp. 333-346. · Zbl 0807.76095
[37] S. Horn and O. Shishkina, Toroidal and poloidal energy in rotating Rayleigh-Bénard convection, J. Fluid Mech., 762 (2015), pp. 232-255.
[38] R. Kerswell, Recent progress in understanding the transition to turbulence in a pipe, Nonlinearity, 18 (2005), R17. · Zbl 1084.76033
[39] W. Kuang and J. Bloxham, Numerical modeling of magnetohydrodynamic convection in a rapidly rotating spherical shell: Weak and strong field dynamo action, J. Comput. Phys., 153 (1999), pp. 51-81. · Zbl 0957.76096
[40] W. Lowrie, Fundamentals of Geophysics, Cambridge University Press, Cambridge, UK, 2007.
[41] J. C. Mason and D. C. Handscomb, Chebyshev Polynomials, CRC Press, Boca Raton, FL, 2002. · Zbl 1015.33001
[42] P. E. Merilees, The pseudospectral approximation applied to the shallow water equations on a sphere, Atmosphere, 11 (1973), pp. 13-20.
[43] S. Olver, G. Goretkin, R. M. Slevinsky, and A. Townsend, Approxfun, 2019, https://github.com/JuliaApproximation/ApproxFun.jl.
[44] S. Olver and A. Townsend, A fast and well-conditioned spectral method, SIAM Rev., 55 (2013), pp. 462-489. · Zbl 1273.65182
[45] S. A. Orszag, Fourier series on spheres, Monthly Weather Rev., 102 (1974), pp. 56-75.
[46] M. Pharr, W. Jakob, and G. Humphreys, Physically Based Rendering: From Theory to Implementation, Morgan Kaufmann, Cambridge, MA, 2016.
[47] D. Ruiz-Antolin and A. Townsend, A nonuniform fast Fourier transform based on low rank approximation, SIAM J. Sci. Comput., 40 (2018), pp. A529-A547. · Zbl 1382.41006
[48] E. Serre and J. Pulicani, A three-dimensional pseudospectral method for rotating flows in a cylinder, Comput. Fluids, 30 (2001), pp. 491-519. · Zbl 1057.76049
[49] R. M. Slevinsky, Fast and backward stable transforms between spherical harmonic expansions and bivariate Fourier series, Appl. Comput. Harmon. Anal., 47 (2019), pp. 585-606. · Zbl 1495.33006
[50] W. F. Spotz, M. A. Taylor, and P. N. Swarztrauber, Fast shallow-water equation solvers in latitude-longitude coordinates, J. Comput. Phys., 145 (1998), pp. 432-444. · Zbl 0928.76078
[51] P. N. Swarztrauber, The approximation of vector functions and their derivatives on the sphere, SIAM J. Numer. Anal., 18 (1981), pp. 191-210. · Zbl 0492.65010
[52] J. Tan and X. Yang, Physically-based fluid animation: A survey, Sci. China Inf. Sci., 52 (2009), pp. 723-740.
[53] A. Townsend and S. Olver, The automatic solution of partial differential equations using a global spectral method, J. Comput. Phys., 299 (2015), pp. 106-123. · Zbl 1352.65579
[54] A. Townsend and L. N. Trefethen, An extension of Chebfun to two dimensions, SIAM J. Sci. Comput., 35 (2013), pp. C495-C518. · Zbl 1300.65010
[55] A. Townsend, M. Webb, and S. Olver, Fast polynomial transforms based on Toeplitz and Hankel matrices, Math. Comput., 87 (2018), pp. 1913-1934. · Zbl 1478.65147
[56] A. Townsend, H. Wilber, and G. B. Wright, Computing with functions in spherical and polar geometries I. The sphere, SIAM J. Sci. Comput., 38 (2016), pp. C403-C425. · Zbl 1342.65083
[57] L. N. Trefethen, Spectral Methods in MATLAB, SIAM, Philadelphia, PA, 2000. · Zbl 0953.68643
[58] L. N. Trefethen, Approximation Theory and Approximation Practice, SIAM, Philadelphia, PA, 2013. · Zbl 1264.41001
[59] G. M. Vasil, D. Lecoanet, K. J. Burns, J. S. Oishi, and B. P. Brown, Tensor calculus in spherical coordinates using Jacobi polynomials. Part-I: Mathematical analysis and derivations, J. Comput. Phys., 3 (2019), 100013. · Zbl 07785508
[60] H. Wilber, A. Townsend, and G. B. Wright, Computing with functions in spherical and polar geometries II. The disk, SIAM J. Sci. Comput., 39 (2017), pp. C238-C262. · Zbl 1368.65026
[61] G. B. Wright, N. Flyer, and D. A. Yuen, A hybrid radial basis function-pseudospectral method for thermal convection in a 3-D spherical shell, Geochem. Geophys. Geosyst., 11 (2010), Q07003.
[62] G. B. Wright, M. Javed, H. Montanelli, and L. N. Trefethen, Extension of Chebfun to periodic functions, SIAM J. Sci. Comput., 37 (2015), pp. C554-C573. · Zbl 1348.42003
[63] S. Y. K. Yee, Studies on Fourier series on spheres, Monthly Weather Rev., 108 (1980), pp. 676-678.
[64] K. Zhang and G. Schubert, Magnetohydrodynamics in rapidly rotating spherical systems, Ann. Rev. Fluid Mech., 32 (2000), pp. 409-443. · Zbl 0989.76095
[65] K.-K. Zhang and F. Busse, Convection driven magnetohydrodynamic dynamos in rotating spherical shells, Geophys. Astrophys. Fluid Dynam., 49 (1989), pp. 97-116. · Zbl 0683.76097
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. In some cases that data have been complemented/enhanced by data from zbMATH Open. This attempts to reflect the references listed in the original paper as accurately as possible without claiming completeness or a perfect matching.