Quadrature on a Sphere
Total Page:16
File Type:pdf, Size:1020Kb
QUADRATURE ON A SPHERICAL SURFACE CASPER H. L. BEENTJES Mathematical Institute, University of Oxford, Oxford, UK 3 Abstract. Approximately calculating integrals over spherical surfaces in R can be done by simple extensions of one dimensional quadrature rules. This, however, does not make use of the symmetry or structure of the integration domain and potentially better schemes can be devised by directly using the 3 integration surface in R . We investigate several quadrature schemes for in- 3 tegration over a spherical surface in R , such as Lebedev quadratures and spherical designs, and numerically test their performance on a set of test func- tions. 1. Introduction In various applications the need arises for the calculation of integrals over spher- ical surfaces in R3. Examples being calculations using density functional theory (DFT) in computational chemistry [16], a theory used to calculate molecular prop- erties, or solving systems involving radiative transfer equations, e.g. [15]. Integrals over a spherical surface can be brought into a standard form, namely 2 3 an integral over the unit sphere S = fx 2 R : kxk2 = 1g Z Z 2π Z π (1) I[f] ≡ f(x) dΩ = f('; θ) sin ' d' dθ; 2 S 0 0 where f : S2 ! R and the second integral is in the spherical coordinates repre- sentation. The case of vectorial functions is a trivial extension from this scalar problem. Often the precise form of f is either too complicated to integrate analytically or is not known explicitly and can only be sampled at individual points on S2. It is therefore crucial to be able to compute approximations to integrals of the form (1). One of the most common ways to arrive at such approximations is by use of a numerical scheme, or quadrature, where we approximate the integral by a weighted 2 sum over a finite collection of points fxig ⊂ S N−1 Z X (2) f(x) dΩ ≈ wif(xi) ≡ Q[f]; 2 S i=0 E-mail address: [email protected]. Date: Michaelmas term 2015. 2010 Mathematics Subject Classification. 65D30,65D32. This text is based on a technical report for the Michaelmas 2015 Oxford Mathematics course C6.3 Approximation of Functions lectured by Prof. I. Sobey. 1 2 C. H. L. BEENTJES where wi denote the weights and Q[f] the quadrature of the exact integral. The theory of quadratures for one-dimensional integrals has a long history and many results can be found in literature, see e.g. [8, 28]. Some of this theory can be extended to the case of integrals of the form (1), a noteworthy difference however is that the distribution of points fxig over the surface of the unit sphere is a non-trivial problem on its own. The discretisation of the unit sphere using a product of one-dimensional quadra- ture points is likely to be the most trivial extension of standard quadrature theory, but better results could potentially be achieved by using methods more bespoke to the unit sphere. We will therefore look into the problem of the discretisation of the unit sphere using amongst others rotationally invariant sets of points inspired by an early contribution by Sobolev [26]. This paper furthermore explores some of the existing quadrature schemes avail- able to approximate the standard form of spherical integrals (1), using both equally weighted and non-uniformly weighted point sets. We will compare different schemes in terms of convergence and a measure of their efficiency. 2. Quadrature schemes on a sphere In the construction of a quadrature scheme we have freedom in not only the position of the node set fxig, but in the choice of the weights wi as well. A wide variety of quadratures can, however, be derived under the assumption of fixed weights, i.e. the weights do not have to be constructed in conjunction with the nodes. In this case all weights will have to be equal and such quadrature schemes are known as Chebyshev quadratures. In the case where we need to determine both weights and nodes we will speak of Gauss quadratures. Before we start of with quadrature schemes we state some useful theory about the representation of the 2 2 R 2 class of square-integrable functions on the unit sphere, i.e. L ( ) = f 2 jfj dΩ < S S 1g. 2.1. Spherical harmonics and efficiency of quadratures. Square-integrable functions on the unit sphere can be expanded in terms of the spherical harmonics orthonormal basis on the unit sphere [2]. The spherical harmonical functions are given by m 1 m imθ (3) Yn (θ; ') = p Pn (cos ')e ; −n ≤ m ≤ n; n; m 2 N; 2π m where Pn are the normalised associated Legendre functions, m is the order of the spherical harmonic and n the degree. We define the finite subset of spherical N m harmonics up to degree N as Π = spanfYn (θ; ') : 0 ≤ n ≤ N; −n ≤ m ≤ ng. Using these spherical harmonics we can write any f 2 L2(S2) as 1 n X X m (4) f(θ; ') = cmnYn (θ; '); n=0 m=−n where the coefficients cmn can be found via inner products with the basis functions Z ¯ m (5) cmn = f(θ; ')Yn (θ; ') dΩ: 2 S The decay rate of the coefficients depends on the smoothness of the function f and in effect this determines the convergence rate of the spherical harmonics expansion. QUADRATURE ON A SPHERICAL SURFACE 3 From this expansion we can deduce that it would be advantageous for a quadra- ture scheme to integrate all spherical harmonics up to a certain degree p, i.e. Πp. This idea was used by McLaren [21] to define the efficiency of quadrature schemes as the ratio of the number of spherical harmonics L to which the scheme produces exact integration to the number of degrees of freedom of the scheme. If a quad- rature rule makes use of N points, the number of degrees of freedom will be 3N as per integration node a coordinate (θ; ') and a weight wi must be specified. By imposing the requirement of exact integration of all spherical harmonics up until degree p one can see that L = (p + 1)2 yielding the formula for efficiency as stated by McLaren (p + 1)2 (6) E = : 3N 2.2. Gauss quadratures. 2.2.1. Products of one-dimensional quadratures. Using the formulation of (1) in spherical coordinates we can view the integral over the unit sphere as a product of two one-dimensional integrals over θ and '. As a result we can use quadrature rules for one-dimensional integrals repeatedly to arrive at a quadrature scheme for (1) N−1 M−1 N−1 M−1 X X X X (7) Q[f] = wi vjf(θi;'j) = w~ijf(θi;'j): i=0 j=0 i=0 j=0 The weightsw ~ij are still to be determined by the choice of two one-dimensional quadrature rules. Note that because of the requirement to integrate exactly the spherical harmonics up to a given degree p it is common practice to use an equally spaced scheme, such as the trapezoidal methoad, in θ and Gauss-Legendre scheme for '. An equally spaced grid of M points ensures exact integration of Z 2π (8) eimθ dθ; 0 for jmj ≤ M whereas a Gauss-Legendre scheme of order n guarantees exact inte- gration of all polynomials pl(x) up until degree l = 2n − 1 over the interval [-1,1]. We can use this and rewrite this such that we get exact results for integrals of the form Z π (9) pl(cos ') sin ' d': 0 m Note though that the associated Legendre polynomials Pn are not in fact polyno- mials if m is odd, but the exact integration still holds [2]. In order to integrate all spherical harmonics up until degree p we would need (p + 1)=2 points for the ' integral and (p + 1) points for the θ integral, yielding a total of (p + 1)2=2 points. This results in an efficiency of E = 2=3 as was already pointed out by McLaren [21]. The generation of the nodes and weights, up to very high order, can be done in a fast manner using modern techniques, see for example [28], which makes it an easily adaptable scheme. However, a common critique of this Cartesian product scheme, which we will call Gaussian product from now on, is that the distribution of the nodes is clustered around the poles, as can be seen in Figure 1a. One consequence of this is that the grid distance between points close to the poles shrinks significantly. 4 C. H. L. BEENTJES This could become an issue if the grid is used in solving time-dependent problems where the grid-size often forms a limiting factor for the stable time steps that are allowed. (a) Gaussian product grid (b) Lebedev grid with with N = 800. N = 266. Figure 1. Distribution of nodes for Gauss quadratures. 2.2.2. Lebedev quadratures. More in the spirit of the one-dimensional Gauss quadra- tures we can set out to determine both the nodes and weights at the same time over the whole sphere. In order to do so we impose the constraint that we want to integrate all spherical harmonics up to degree p exactly. This yields a (possibly large1) system of non-linear equations which in theory could then be solved to find the nodes and weights, a difficult if not impossible task in general. It is therefore that we focus here on ideas which stem from a seminal paper by Sobolev [26].