Approximation of Definite Integrals Over the Volume of the Ball
Jonah A. Reeger

TL;DR
This paper introduces a novel RBF-FD inspired method for efficiently computing definite integrals over 3D ball volumes using arbitrarily scattered nodes, avoiding uniformity constraints and achieving high accuracy with optimal computational complexity.
Contribution
The paper presents a new RBF-FD based algorithm that computes quadrature weights for scattered nodes in three dimensions without uniformity restrictions, with improved efficiency.
Findings
Computes quadrature weights in O(N log N) operations.
Achieves high-order accuracy for scattered nodes.
Removes the need for uniform node distribution.
Abstract
A Radial Basis Function Generated Finite-Differences (RBF-FD) inspired technique for evaluating definite integrals over the volume of the ball in three dimensions is described. Such methods are necessary in many areas of Applied Mathematics, Mathematical Physics and many other application areas. Previous approaches needed restrictive uniformity in the node set, which the algorithm presented here does not require. By using RBF-FD approach, the proposed algorithm computes quadrature weights for arbitrarily scattered nodes in only operations with high orders of accuracy.
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.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
\newsiamremark
remarkRemark \newsiamremarkhypothesisHypothesis
\newsiamthmclaimClaim \headersApproximation of Integrals Over the Volume of the BallJ. A. Reeger
\externaldocumentex_supplement
Approximate Integrals Over the Volume of the Ball††thanks: Acknowledgement: This is a pre-print of an article published in the Journal of Scientific Computing. The final
authenticated version titled ”Approximate Integrals Over the Volume of the Ball” is available online at: https:// doi.org/10.1007/s10915-020-01231-y. \fundingThis work was funded by the Office of Naval Research program Atmospheric Propagation Sciences for High Energy Lasers and the Air Force Office of Scientific Research project Radial Basis Functions for Numerical Simulation.
Jonah A. Reeger
(, ). [email protected]
Abstract
A Radial Basis Function Generated Finite-Differences (RBF-FD) inspired technique for evaluating definite integrals over the volume of the ball in three dimensions is described. Such methods are necessary in many areas of Applied Mathematics, Mathematical Physics and myriad other application areas. Previous approaches needed restrictive uniformity in the node set, which the algorithm presented here does not require. By using RBF-FD approach, the proposed algorithm computes quadrature weights for arbitrarily scattered nodes in only operations with high orders of accuracy.
keywords:
Radial Basis Function, RBF, quadrature, volume, ball
{AMS}
68Q25, 65R99
1 Introduction
This article is concerned with the development of a method for the approximate evaluation of definite integrals over the volume of the ball in of radius . That is, consider volume integration over the domain , with . Applications of this common problem in mathematics abound from the more specific scenarios of estimating the volumes of wells containing hydrocarbons beneath the Earth’s surface [19] and recovering important diagnostic information in, e.g., Thermoacoustic or Photoacoustic Tomogrpahy [9] to some more generic problems in potential theory, magnetism and other concepts in mathematical physics [11].
The approximation of the values of definite integrals (quadrature when considering integration over an interval, or quadrature/cubature when considering integration over domains in two or more dimensions) is a rich topic dating back many centuries to early attempts to measure, for instance, the area of the circle [7]. Since that time much research has been devoted to developing sophisticated and accurate techniques for estimating the values of integrals over intervals, areas, and volumes. There are many texts devoted to summarizing such methods, see, for example [20, 8, 10, 7].
In the simplest case, the rules for quadrature over intervals are often constructed by replacing the integrand with a polynomial interpolant or a polynomial approximation and then integrating, or by enforcing that a rule be exact on a particular class of functions (like polynomials up to a particular degree). This is how to arrive at, for instance, Newton-Cotes or Gaussian Quadrature rules, respectively. These rules for integration over intervals are then often leveraged in the context of iterated integrals by employing one-dimensional quadrature rules for each variable in turn, leading to so-called Cartesian product formulas. Such formulas require structure in the node sets–spacing between nodes that is uniform or tied to the roots of orthogonal polynomials–across each variable of integration. This requirement may be impractical or require an additional interpolation between the structured node set and locations where the integrand is specified.
To overcome these requirements on the structure of the node set, the value of the integral can be approximated utilizing concepts from number theory or through pseudorandom sampling of the integrand as in Monte-Carlo techniques [8]. More common, however, is the alternative method of constructing quadrature rules over areas and volumes by replacing the integrand with a now multivariate polynomial interpolant or approximation and then integrating. It is often the case that the basis set used for interpolation does not depend on the locations of the nodes (e.g. multivariate polynomials). Such basis sets suffer from a question of the existence and uniqueness of an interpolant on unstructured node sets [13, 12], which has prompted the use of Radial Basis Functions (RBFs) in the approximation of the integrand.
The proposed quadrature technique was developed to compute weights at whatever node locations are specified by the user. This is because in applications, numerical quadrature is usually a follow-up to some other task (such as collecting data, or numerically solving PDEs), making it impractical to require node locations that are specific to the quadrature method. The present algorithm is therefore designed to find the quadrature weights given a node set defined by the application. Further, the proposed algorithm allows for node sets featuring spatially varying separation when increased node density is needed to capture fine structure in the integrand.
The numerical method described in this paper is a generalization of RBF-FD (radial basis function-generated finite differences). This approach has so far mostly been used to approximate partial derivatives, with the key difference to regular finite differences that the node points no longer need to be grid-based (in particular, Cartesian node layouts are now known to be less-than-optimal [4]. For surveys of RBFs and of RBF-FD methods as these are applied to PDEs, see [6, 5]. Further, RBFs have been used successfully to construct quadrature rules for an interval in one-dimension, bounded domains in two-dimensions and, more specifically, integrals over bounded two-dimensional (piecewise-)smooth surfaces embedded in three-dimensions [16, 18, 17].
The following Section 2 describes the present quadrature method. Section 3 describes some test examples, with illustrations of convergence rates and computational costs. Finally, section 4 outlines some conclusions. A Matlab implementation of the method is available at Matlab Central’s File Exchange [15].
2 Description of the key steps in the algorithm
Consider evaluating
[TABLE]
where .
Similar to the work presented in [16, 18, 17] for surface integrals, the proposed algorithm can be described in four steps:
Decompose the domain of integration into subdomains. 2. 2.
On the subdomain construct an interpolant of the integrand. 3. 3.
Integrate the interpolant of the integrand to determine weights for integrating a function over the subdomain. 4. 4.
Combine the weights for the integrals over the subdomains to obtain a weight set for approximating the volume integral of over .
Each of these steps is described in greater detail in what follows.
2.1 Step 1: Decompose the domain of integration
Consider first a set of points in , with a subset exactly on the boundary surface. On this set of points construct a tessellation (via Delaunay tessellation or some other algorithm) of tetrahedra. These tetrahedra encompass the bulk of the volume of but not the entire volume.
Let be the set of indices such that if then the tetrahedron has a face that is not shared with any of the other tetrahedra. This face has all three vertices on the surface of and, unless the surface is planar, there is a sliver of volume, , between the unshared face and the spherical surface bounding the ball that must be accounted for in decomposing the volume. Conversely, let be the indices of tetrahedra that do not have a face with three vertices on the surface. With these definitions (1) can be decomposed as
[TABLE]
2.2 Step 2: Construct an interpolant of the integrand
For each tetrahedron in define the sets to be the points in nearest to the midpoint of (the average of the vertices of ). Then for an individual the integral
[TABLE]
is evaluated by first approximating by an RBF interpolant, with interpolation points from the set , and then integrating the interpolant. Often the RBF interpolant is a linear combination of (conditionally-) positive definite RBFs,
[TABLE]
and augmented by multivariate polynomial terms. If , then the same interpolant and set of nodes is used for approximating the integrand over . Define , with , to be the set of all of the trivariate polynomial terms up to degree . The interpolant is constructed as
[TABLE]
where are chosen to satisfy the interpolation conditions , , along with constraints , for .
2.3 Step 3: Integrate the interpolant of the integrand
By integrating the interpolant, the approximation of the integral of is reduced to
[TABLE]
for and
[TABLE]
for . A simple derivation can be carried out to show that the weights can be found by solving the linear system with matrix
[TABLE]
The submatrix is made up of the RBFs evaluated at each point in , that is
[TABLE]
Likewise the matrix consists of the polynomial basis evaluated at each point in so that
[TABLE]
If , the right hand side, , includes integrals of the basis functions over only. That is,
[TABLE]
The integrals of the trivariate polynomial terms can be evaluated exactly via, for instance, the Divergence Theorem or barycentric coordinates. For the RBFs, the integrals can be evaluated by further decomposing into four tetrahedra that share a common vertex. Summing the integrals of the RBFs over the four tetrahedra results in the integral over . This process allows the volume integral over a tetrahedron to be reduced to four integrals in a single dimension. Section 2.3.1 explains this process.
On the other hand, for
[TABLE]
The integrals over are evaluated using the methods described in the previous paragraph while the integrals over are approximated using a scheme discussed in section 2.3.2.
2.3.1 Integrals of RBFs Over Tetrahedra
Suppose that the tetrahedron has vertices , , and , all points in . Let be some point in , which will be common to the four tetrahedra that will be integrated over to obtain the integral over . Although what follows applies for any point in , the point is an interpolation node from the set in this context. A unit length normal vector to the side of with vertices , and is defined by
[TABLE]
and when defining a normal vector in what follows, the order of the vertices matters and should be taken as the order shown in this definition. Further, let , , and be the orthogonal projections of onto the sides of with vertices , and ; , and ; , and ; and , and , respectively. For instance,
[TABLE]
Then by applying the divergence theorem it can be shown that
[TABLE]
This expression for the integral over contains integrals over the four tetrahedra that share as a common vertex. Consider
[TABLE]
since the remaining integrals over the tetrahedra are analogous. The integrand is radially symmetric about and depends only on the distance from suggesting the change of variables
[TABLE]
In this change of variables, triangles similar to the side of with vertices , and are parameterized using barycentric coordinates and scaled by the nonnegative parameter , which also accounts for the distance of the triangle from the point . Under this change of variables the integral becomes
[TABLE]
where is six times the volume of the tetrahedron . This volume appears in the Jacobian determinant from the change of variables. Also,
[TABLE]
is the value of corresponding to the side of with vertices , and .
Now, in the case of , , the iterated integrals in and then can be computed in closed form. However, exploring the integration over in Mathematica indicates the cost of a closed form expression for the integral is computationally too expensive, so the proposed algorithm uses standard pseudospectral methods for evaluating the integrals over .
2.3.2 Integrals Over Slivers of Volume at the Surface
When assigning a sliver of volume to a particular tetrahedron, , care must be taken so that there are no gaps or overlaps between adjacent slivers. Let , , be the triangular faces of . At least one of these faces has all three vertices on the surface of the sphere. In most cases, this will be only one face of (particularly when the volume is well resolved by small enough tetrahedra), call it . It turns out that if the three edges of are projected radially from the center of the sphere to the surface, gaps and overlaps will be prevented. For each edge of the area between the arc on the sphere surface and the edge of the triangle forms a side of the sliver of volume. The boundary of the sliver volume is formed by all three of these sides, the spherical triangle on the surface of the sphere between the three sides, and the triangle . Figure 1 illustrates one of these volumes.
Assigning the slivers of volume in this way provides for a transformation of the coordinates of the sliver which allows the integral over the volume to be written as an iterated integral over a triangular area and a parameter, , which relates to the projection from the origin. Consider any point in the volume. The vector intersects the plane containing at a point that is inside the triangle . All of the points inside can be parameterized by, for instance,
[TABLE]
where , and are now representing the vertices of . With this parameterization of any point in the volume of the sliver can be represented as
[TABLE]
where . Here measures the distance from to . With this parameterization, for instance,
[TABLE]
where is the Jacobian determinant of with respect to , and . The integrals in , , and can be easily treated with any number of quadrature methods over an interval.
2.4 Step 4: Combine weights from the subdomains
Summing over all leads to the approximation of the volume integral over
[TABLE]
Let , , be the set of all pairs such that . Then the volume integral over can be rewritten as
[TABLE]
3 Test Examples
To demonstrate the performance of the method described herein, the algorithm will be applied to four different test integrands featuring varying degrees of smoothness. The fourth of these test integrands includes extremely localized feature. Weights are computed on quasi-uniformly spaced nodes, pseudo-randomly generated nodes, and a clustered node set with increased density near the localized feature of the fourth test integrand. This clustered node set is used demonstrate the performance of the algorithm under localized node refinement. In all of these tests, the radius of the ball is fixed to so that the volume of the ball is equal to one.
3.1 Node Sets
In the cases of quasi-uniformly spaced nodes and the clustered node set, quadrature nodes were generated using a modification of the algorithm presented in [14]. The pseudo-randomly spaced node sets were generated by first drawing a set of points from the two-dimensional Halton sequence and mapping the set to the surface of the ball. Then points were drawn from the three-dimensional Halton sequence, mapping the set to the domain and keeping only points satisfying , where is prescribed to be the average spacing between the nodes on the surface. Examples of the node sets are displayed in figure 2.
3.2 Performance on Test Integrands
The algorithm was applied to four test integrands. When generating quadrature weights, in all cases the radial basis function was and the number of nearest neighbors, , was based on the trivariate polynomial order . Some computational experiments in, for instance, [17, 3, 2] indicated that in the presence of boundaries the number of nearest neighbors must be large enough to overcome effects like Runge phenomenon. The examples given in [17] indicated that the boundary errors were most prominent when nodes were (exactly) uniformly spaced. Therefore, to determine how many nearest neighbors should be included to overcome boundary errors, the algorithm here was modified to compute volume integrals over a cube. When considering a cube the entire volume can be decomposed by tetrahedra, so the algorithm need not consider slivers of volume near the surface. Figure 3 illustrates the absolute error when integrating , with , and , over the volume of the unit cube centered at the origin for various choices of and . The matrix is singular for choices of below , this is indicated by the lower dashed curve in the figure. Further, for each case of it is clear that choices of below can lead to large errors.
Performing a similar experiment for the unit ball, figure 4 illustrates that even the relaxation from nodes that are exactly uniformly spaced to those that are quasi-uniformly spaces can allow for as low as . However, all results shown here utilize .
The first of the test integrands is a degree 30 trivariate polynomial. That is, let
[TABLE]
The coefficients of the polynomial are available in a Matlab file at [15]. The exact value of the integral over the ball is
[TABLE]
with the gamma function, and for the set of coefficients used here the expression evaluates to 3.792079311949332. Figure 5 displays convergence of the approximate integral to the exact value at an order better than O, where corresponds to the order of the trivariate polynomial terms used in the approximation. If refers to a typical node separation distance, this corresponds to a convergence order of better than O, especially in the case of quasi-uniformly spaced nodes. The theory in [1] explains that if the multivariate polynomial basis up to degree is included in the process of RBF interpolation, then all of the terms in the Taylor series up to degree will be handled exactly for the function being interpolated. The remaining terms in the Taylor series are then approximated by the RBF basis that was included. This is leading to a convergence order of at least O.
The second test integrand is the Gaussian
[TABLE]
where
[TABLE]
is a randomly chosen shift of the center of the Gaussian from the origin. In order to have an accurate value to compare to, the volume integral was first approximated by evaluating
[TABLE]
using Matlab’s integral3 command with the absolute and relative tolerances both set to ten times machine precision. The resulting approximation of the integral for is 0.161965667295343. Figure 6 illustrates the error in the integral of over the ball when compared to the result from Matlab after rotating the integrand randomly 100 times. It is clear again that the order of the error is most dependent on the degree of the polynomials used in the interpolation.
The third test integrand is
[TABLE]
with sign the signum function. This function is discontinuous at the plane , so any method based on a continuous approximation of the integrand across the discontinuity should not be expected to achieve better than O (i.e. O) error. Figure 7 illustrates this for the present method.
3.3 Performance When Utilizing Clustered Node Sets
To illustrate further utility of the proposed method, the algorithm was also applied to a test integrand featuring a steep and localized gradient. To capture the rapid change in the integrand node sets were generated that feature more densely clustered nodes near the local feature. The test integrand was
[TABLE]
which has a steep gradient near the origin. Figure 8 illustrates that in cases where quasi-uniformly spaced or pseudo-randomly spaced node sets cannot capture the changes in the integrand, weights generated for node sets with clustering near features improve the approximation under refinement.
3.4 Computational Expense
Just like the algorithms presented in [16, 18, 17], the ability to consider each tetrahedron individually allows the time to compute a set of quadrature weights and the use of memory both to scale like . Figure 9 illustrates the time to compute the set of quadrature weights on nodes for various choice of the polynomial order, . Since the choice of affects the sizes of the systems of linear equations that need to be solved at each iteration, the figure shows an increase in the computational cost as increases.
Further, except for the identification of nearest neighbors in order to construct the local weight set for each tetrahedron/sliver of volume and for the combination of weights in step 4 the algorithm is pleasingly parallel. The parallelization tests in [16] illustrate that these two steps do not have a significant impact on the scalability of the algorithm with the number of cores when considering evaluating surface integrals, and the same is true for the volume integration algorithm described herein.
4 Conclusions
This study has supplemented the previous RBF-FD based approach for evaluating definite integrals [16, 18, 17] with an extension to integrals over volumes. The computational tests illustrate an algorithm that can achieve at least accuracy, with the typical node separation distance and the order of trivariate polynomial basis functions included in the approximation. On a set of nodes in the ball, the computational cost is only and the algorithm is pleasingly parallel. A key feature of the algorithm is that it is able to compute quadrature weights on even irregularly spaced or clustered node sets.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] V. Bayona , An insight into RBF-FD approximations augmented with polynomials , Comput. Math. Appl., 77 (2019), pp. 2337–2353, https://doi.org/10.1016/j.camwa.2018.12.029 . · doi ↗
- 2[2] V. Bayona, N. Flyer, and B. Fornberg , On the role of polynomials in RBF-FD approximations: III. Behavior near domain boundaries , J. Comput. Phys., 380 (2019), pp. 378–399, https://doi.org/10.1016/j.jcp.2018.12.013 . · doi ↗
- 3[3] V. Bayona, N. Flyer, B. Fornberg, and G. A. Barnett , On the role of polynomials in RBF-FD approximations: II. Numerical solution of elliptic PD Es , J. Comput. Phys, 332 (2017), pp. 257–273.
- 4[4] N. Flyer, G. A. Barnett, and L. J. Wicker , Enhancing finite differences with radial basis functions: Experiments on the Navier–Stokes equations , J. Comput. Phys., 316 (2016), pp. 39–62.
- 5[5] B. Fornberg and N. Flyer , A primer on radial basis functions with applications to the geosciences , SIAM, Philadelphia, U.S., 2015.
- 6[6] B. Fornberg and N. Flyer , Solving PD Es with radial basis functions , Acta Numerica, 24 (2015), pp. 215–258.
- 7[7] W. Freeden and M. Gutting , Integration and cubature methods: A geomathematically oriented course , CRC Press, Boca Raton, Florida, United States, 2018.
- 8[8] A. R. Krommer and C. W. Ueberhuber , Computational integration , SIAM, Philadelphia, Pennsylvania, United States, 1998.
