This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Efficient Exact Quadrature of Regular Solid Harmonics Times Polynomials Over Simplices in 3{\mathbb{R}}^{3}

Shoken Kaneko111kaneko60@umd.edu Department of Computer Science and Institute for Advanced Computer Studies, University of Maryland, College Park, MD 20742, USA. Ramani Duraiswami222ramanid@umd.edu Department of Computer Science and Institute for Advanced Computer Studies, University of Maryland, College Park, MD 20742, USA.
Abstract

A generalization of a recently introduced recursive numerical method [1] for the exact evaluation of integrals of regular solid harmonics and their normal derivatives over simplex elements in 3{\mathbb{R}}^{3} is presented. The original Quadrature to Expansion (Q2X) method [1] achieves optimal per-element asymptotic complexity, however, it considered only constant density functions over the elements. Here, we generalize this method to support arbitrary degree polynomial density functions, which is achieved in an extended recursive framework while maintaining the optimality of the complexity. The method is derived for 1- and 2- simplex elements in 3{\mathbb{R}}^{3} and can be used for the boundary element method and vortex methods coupled with the fast multipole method.

1 Introduction

Recently, Gumerov et al. introduced Quadrature to Expansion (Q2X), a recursive method for the analytical evaluation of integrals of spherical basis functions for the Laplace equation in 3{\mathbb{R}}^{3}, aka solid harmonics, over dd-simplex elements for d{1,2,3}d\in\{1,2,3\} with constant densities [1]. This method achieves exact integration of all bases up to truncation degree psp_{\mathrm{s}} with optimal complexity O(ps2)O(p_{\mathrm{s}}^{2}) per element for any dd in {1,2,3}\{1,2,3\}. This is useful for the Boundary Element Method (BEM) [2] coupled with the Fast Multipole Method (FMM) [3]. The conventional FMM performs an approximate summation of monopoles and dipoles centered at points 𝐫q\mathbf{r}_{q} distributed in space, by expanding them into truncated multipole expansions centered at points 𝐫p\mathbf{r}_{p}. Many such expansions are consolidated into one to achieve efficiency. In the Q2X approach, recently introduced by Gumerov et al. [1], surface layer potential integrals over a surface or a line discretized via simplices were represented as such expansions, with the expansion coefficients, obtained by quadrature over the simplex, evaluated analytically via an optimal recursive procedure. Fig. 1 shows the geometrical relation of the elements with respect to the expansion center 𝐫\mathbf{r}_{*} of the solid harmonics, which is typically the centroid of a cell in an octree data structure to which the elements belong. Recursive analytical methods for high order surface elements have been developed for the close evaluation of layer potential integrals [4], and such a method is also desired for the integration of regular solid harmonics commonly arising in the FMM-BEM. [5] discusses a related method for quadrilateral elements, however a full algorithm for computing integrals for all harmonics and all monomial densities with finite degrees has not been described. Here, we extend the Q2X method to elements with polynomial densities which allows the evaluation of integrals for all regular solid harmonics up to degree psp_{\mathrm{s}} and all monomial density functions up to degree pdp_{\mathrm{d}} with optimal complexity O(ps2pdd)O(p_{\mathrm{s}}^{2}p_{\mathrm{d}}^{d}) per element. All formulation is done for 3{\mathbb{R}}^{3}.

Refer to caption
Figure 1: 2- and 1-simplex in a cell of an octree data structure commonly used in the FMM-BEM. The evaluation point 𝐫p\mathbf{r}_{p} is located in a well-separated position outside the cell the elements reside.

2 Potential integrals in BEM and vortex methods

The BEM is widely used for numerical solution of partial differential equations, e.g. the Poisson equation:

2u(𝐫)=f(𝐫),𝐫Ω3,\displaystyle-\nabla^{2}u(\mathbf{r})=f(\mathbf{r}),\quad\mathbf{r}\in\Omega\subset{\mathbb{R}}^{3}, (1)

with field uu in domain Ω3\Omega\subset{\mathbb{R}}^{3}, and source ff (=0=0 for Laplace). The weak form of 1 can be written in terms of single- and double layer potentials LL, MM [2]:

{(cpγ0,p+Mγ0,qLγ1,q)u}(𝐫p)={N0f}(𝐫p),\displaystyle\{(c_{p}\gamma_{0,p}+M\gamma_{0,q}-L\gamma_{1,q})u\}(\mathbf{r}_{p})=\{N_{0}f\}(\mathbf{r}_{p}), (2)
{Lσ}(𝐫p)𝐫qΓG(𝐫p,𝐫q)σ(𝐫q)𝑑Γ,\displaystyle\{L\sigma\}(\mathbf{r}_{p})\equiv\int_{\mathbf{r}_{q}\in\Gamma}G(\mathbf{r}_{p},\mathbf{r}_{q})\sigma(\mathbf{r}_{q})d\Gamma,
{Mσ}(𝐫p)𝐫qΓG(𝐫p,𝐫q)𝐧qσ(𝐫q)𝑑Γ,\displaystyle\{M\sigma\}(\mathbf{r}_{p})\equiv\int_{\mathbf{r}_{q}\in\Gamma}\frac{\partial G(\mathbf{r}_{p},\mathbf{r}_{q})}{\partial\mathbf{n}_{q}}\sigma(\mathbf{r}_{q})d\Gamma,

with cp=1/2c_{p}=1/2 on a smooth boundary, 𝐧q\mathbf{n}_{q} the outward unit normal, γ0\gamma_{0} and γ1\gamma_{1} the boundary trace and normal derivative operators, respectively, N0N_{0} the Newton potential operator, and G(𝐫p,𝐫q)G(\mathbf{r}_{p},\mathbf{r}_{q}) the Green function for the Laplace equation:

{γ0,qu}(𝐫q)lim𝐫^qΩ𝐫qΓu(𝐫^q),𝐫qΓ=Ω,\displaystyle\{\gamma_{0,q}u\}(\mathbf{r}_{q})\equiv\lim_{\hat{\mathbf{r}}_{q}\in\Omega\to\mathbf{r}_{q}\in\Gamma}u(\hat{\mathbf{r}}_{q}),\quad\mathbf{r}_{q}\in\Gamma=\partial\Omega, (3)
{γ1,qu}(𝐫q)𝐧qqu(𝐫q),𝐫qΓ=Ω,\displaystyle\{\gamma_{1,q}u\}(\mathbf{r}_{q})\equiv\mathbf{n}_{q}\cdot\nabla_{q}u(\mathbf{r}_{q}),\quad\mathbf{r}_{q}\in\Gamma=\partial\Omega,
{N0f}(𝐫p)=𝐫qΩG(𝐫p,𝐫q)f(𝐫q)𝑑Ω,𝐫p3,\displaystyle\{N_{0}f\}(\mathbf{r}_{p})=\int_{\mathbf{r}_{q}\in\Omega}G(\mathbf{r}_{p},\mathbf{r}_{q})f(\mathbf{r}_{q})d\Omega,\quad\mathbf{r}_{p}\in{\mathbb{R}}^{3},
G(𝐫p,𝐫q)=14πr,r|𝐫q𝐫p|.\displaystyle G(\mathbf{r}_{p},\mathbf{r}_{q})=\frac{1}{4\pi r},\quad r\equiv|\mathbf{r}_{q}-\mathbf{r}_{p}|.

In the BEM the boundary Γ\Gamma is discretized into boundary elements which can be either flat or curved surfaces. The layer potential integrals over these elements are evaluated to form the linear system of equations. The densities σ\sigma are approximated via local, typically polynomial, functions with unknown coefficients which must be determined. In the present work we assume the boundary Γ=Ω\Gamma=\partial\Omega is a union of boundary elements Γ=iSi\Gamma=\bigcup_{i}S_{i}, where each SiS_{i} is a flat triangular element with polynomial density functions.

Similarly, in vortex methods the Bio-Savart integral is used to compute potentials due to line elements Λq\Lambda_{q}:

𝐇(𝐫p)=𝐫qΛq(𝐈qσ(𝐫q))×(𝐫p𝐫q)4π|𝐫p𝐫q|3𝑑Λq=×(𝐈qKq(𝐫p))\displaystyle\mathbf{H}(\mathbf{r}_{p})=\int_{\mathbf{r}_{q}\in\Lambda_{q}}\!\!\!\!\!\!\!\!\frac{\left(\mathbf{I}_{q}\sigma(\mathbf{r}_{q})\right)\times\left(\mathbf{r}_{p}-\mathbf{r}_{q}\right)}{4\pi|\mathbf{r}_{p}-\mathbf{r}_{q}|^{3}}d\Lambda_{q}=\nabla\times(\mathbf{I}_{q}K_{q}(\mathbf{r}_{p})) (4)
{Kqσ}(𝐫p)𝐫qΛqG(𝐫p,𝐫q)σ(𝐫q)𝑑Λq,\displaystyle\{K_{q}\sigma\}(\mathbf{r}_{p})\equiv\int_{\mathbf{r}_{q}\in\Lambda_{q}}G(\mathbf{r}_{p},\mathbf{r}_{q})\sigma(\mathbf{r}_{q})d\Lambda_{q},

where 𝐈q\mathbf{I}_{q} is the circulation of the qq-th line element.

2.1 Multipole expansion of potentials

We summarize the formulation also used in [1]. The following definition of regular and singular spherical basis functions, Rnm(𝐫)R_{n}^{m}\left(\mathbf{r}\right) and Snm(𝐫)S_{n}^{m}\left(\mathbf{r}\right) is accepted:

Rnm(𝐫)=(1)ni|m|(n+|m|)!rnPn|m|(cosθ)eimφ,\displaystyle R_{n}^{m}\left(\mathbf{r}\right)=\frac{\left(-1\right)^{n}i^{\left|m\right|}}{(n+\left|m\right|)!}r^{n}P_{n}^{\left|m\right|}(\cos\theta)e^{im\varphi}, (5)
Snm(𝐫)=i|m|(n|m|)!rn1Pn|m|(cosθ)eimφ,\displaystyle S_{n}^{m}\left(\mathbf{r}\right)=i^{-\left|m\right|}(n-\left|m\right|)!r^{-n-1}P_{n}^{\left|m\right|}(\cos\theta)e^{im\varphi},\quad\quad
n=0,1,2,,m=n,,n,\displaystyle n=0,1,2,...,\quad m=-n,...,n,
𝐫=(x,y,z)T=r(sinθcosφ,sinθsinφ,cosθ)T,\displaystyle\mathbf{r}=\left(x,y,z\right)^{T}=r\left(\sin\theta\cos\varphi,\sin\theta\sin\varphi,\cos\theta\right)^{T},

respectively, where (r,θ,φ)\left(r,\theta,\varphi\right) are the spherical coordinates of 𝐫\mathbf{r} and PnmP_{n}^{m} are the associated Legendre functions [6],

Pnm(μ)=(1)m(1μ2)m/22nn!dm+ndμm+n(μ21)n,\displaystyle P_{n}^{m}\left(\mu\right)=\frac{\left(-1\right)^{m}\left(1-\mu^{2}\right)^{m/2}}{2^{n}n!}\frac{d^{m+n}}{d\mu^{m+n}}\left(\mu^{2}-1\right)^{n}, (6)

for nonnegative mm. RnmR_{n}^{m} and SnmS_{n}^{m} obey the symmetry:

Rnm(𝐫)=(1)mRnm(𝐫)¯,Snm(𝐫)=(1)mSnm(𝐫)¯,R_{n}^{-m}\left(\mathbf{r}\right)=\left(-1\right)^{m}\overline{R_{n}^{m}\left(\mathbf{r}\right)},\quad S_{n}^{-m}\left(\mathbf{r}\right)=\left(-1\right)^{m}\overline{S_{n}^{m}\left(\mathbf{r}\right)}, (7)

where the bar indicates the complex conjugate. In these bases the Green’s function can be expanded as

G(𝐫p,𝐫q)=n=0(1)n4πm=nnRnm(𝐫q𝐫)Snm(𝐫p𝐫),\displaystyle G\left(\mathbf{r}_{p},\mathbf{r}_{q}\right)=\sum_{n=0}^{\infty}\frac{(-1)^{n}}{4\pi}\sum_{m=-n}^{n}R_{n}^{-m}\left(\mathbf{r}_{q}-\mathbf{r}_{*}\right)S_{n}^{m}\left(\mathbf{r}_{p}-\mathbf{r}_{*}\right), (8)

given |𝐫p𝐫|>|𝐫q𝐫|\left|\mathbf{r}_{p}-\mathbf{r}_{*}\right|>\left|\mathbf{r}_{q}-\mathbf{r}_{*}\right| where 𝐫\mathbf{r}_{*} is the center of expansion. The integrals of the spherical basis functions over element Sq,ΛqS_{q},\Lambda_{q} are defined as:

Lnm(𝐫)\displaystyle L_{n}^{m}\left(\mathbf{r}_{\ast}\right) (1)n4π𝐫qSqRnm(𝐫q𝐫)σ(𝐫q)𝑑Sq,\displaystyle\equiv\frac{(-1)^{n}}{4\pi}\int_{\mathbf{r}_{q}\in S_{q}}R_{n}^{-m}\left(\mathbf{r}_{q}-\mathbf{r}_{\ast}\right)\sigma(\mathbf{r}_{q})dS_{q}, (9)
Mnm(𝐫)\displaystyle M_{n}^{m}\left(\mathbf{r}_{\ast}\right) (1)n4π𝐧q𝐫qSq(Rnm(𝐫q𝐫))σ(𝐫q)𝑑Sq,\displaystyle\equiv\frac{(-1)^{n}}{4\pi}\mathbf{n}_{q}\cdot\!\!\int_{\mathbf{r}_{q}\in S_{q}}\!\!\!\!\!\!\!\!(\nabla R_{n}^{-m}(\mathbf{r}_{q}-\mathbf{r}_{\ast}))\sigma(\mathbf{r}_{q})dS_{q},
Knm(𝐫)\displaystyle K_{n}^{m}\left(\mathbf{r}_{\ast}\right) (1)n4π𝐫qΛqRnm(𝐫q𝐫)σ(𝐫q)𝑑Λq,\displaystyle\equiv\frac{(-1)^{n}}{4\pi}\int_{\mathbf{r}_{q}\in\Lambda_{q}}R_{n}^{-m}\left(\mathbf{r}_{q}-\mathbf{r}_{\ast}\right)\sigma(\mathbf{r}_{q})d\Lambda_{q},

and are used to expand the layer potentials for SqS_{q} as:

{Fσ}(𝐫p)=n=0m=nnSnm(𝐫p𝐫)Fnm(𝐫),\displaystyle\{F\sigma\}(\mathbf{r}_{p})=\sum_{n=0}^{\infty}\sum_{m=-n}^{n}S_{n}^{m}(\mathbf{r}_{p}-\mathbf{r}_{*})F_{n}^{m}(\mathbf{r}_{*}), (10)

where F={L,M,K}F=\{L,M,K\}. RnmR_{n}^{m} satisfies (see e.g., [7]):

ηRnm(𝐫)=iRn1m+1(𝐫),ξRnm(𝐫)=iRn1m1(𝐫),\displaystyle\frac{\partial}{\partial\eta}R_{n}^{m}\left(\mathbf{r}\right)=iR_{n-1}^{m+1}\left(\mathbf{r}\right),\quad\frac{\partial}{\partial\xi}R_{n}^{m}\left(\mathbf{r}\right)=iR_{n-1}^{m-1}\left(\mathbf{r}\right), (11)
zRnm(𝐫)=Rn1m(𝐫),ξx+iy2,ηxiy2,\displaystyle\frac{\partial}{\partial z}R_{n}^{m}\left(\mathbf{r}\right)=-R_{n-1}^{m}\left(\mathbf{r}\right),\!\!\!\!\quad\xi\equiv\frac{x+iy}{2},\!\!\!\!\quad\eta\equiv\frac{x-iy}{2},
ηη=x+iy,ξξ=xiy.\displaystyle\partial_{\eta}\equiv\frac{\partial}{\partial\eta}=\frac{\partial}{\partial x}+i\frac{\partial}{\partial y},\quad\partial_{\xi}\equiv\frac{\partial}{\partial\xi}=\frac{\partial}{\partial x}-i\frac{\partial}{\partial y}.

Thus, with 𝐧q=(nx,ny,nz)T\mathbf{n}_{q}=(n_{x},n_{y},n_{z})^{T} we have:

𝐧qRnm(𝐫)=inx2[Rn1m+1(𝐫)+Rn1m1(𝐫)]\displaystyle\mathbf{n}_{q}\cdot\nabla R_{n}^{m}\left(\mathbf{r}\right)=i\frac{n_{x}}{2}\left[R_{n-1}^{m+1}\left(\mathbf{r}\right)+R_{n-1}^{m-1}\left(\mathbf{r}\right)\right] (12)
+ny2[Rn1m+1(𝐫)Rn1m1(𝐫)]nzRn1m(𝐫).\displaystyle+\frac{n_{y}}{2}\left[R_{n-1}^{m+1}\left(\mathbf{r}\right)-R_{n-1}^{m-1}\left(\mathbf{r}\right)\right]-n_{z}R_{n-1}^{m}\left(\mathbf{r}\right).

3 Problem statement

For d=2d=2, we denote the vertices of the 2-simplex element as {𝐯1,𝐯2,𝐯3}\{\mathbf{v}_{1},\mathbf{v}_{2},\mathbf{v}_{3}\} and use the parametrization:

𝐫q(u,v)=𝐫uu+𝐫vv+𝐯1=A(u,v,0)T+𝐯1=(x,y,z)T,\displaystyle\mathbf{r}_{q}\left(u,v\right)=\mathbf{r}_{u}u+\mathbf{r}_{v}v+\mathbf{v}_{1}=A(u,v,0)^{T}+\mathbf{v}_{1}=(x,y,z)^{T}, (13)
𝐫u𝐫qu,𝐫v𝐫qv,A(𝐫u,𝐫v,𝐧)T.\displaystyle\mathbf{r}_{u}\equiv\frac{\partial\mathbf{r}_{q}}{\partial u},\quad\!\!\mathbf{r}_{v}\equiv\frac{\partial\mathbf{r}_{q}}{\partial v},\quad\!\!A\equiv(\mathbf{r}_{u},\mathbf{r}_{v},\mathbf{n})^{T}.

In contrast to [1] which used constant parametrization, we extend the method to density functions σ\sigma defined over the elements which are polynomials of the form:

N(u,v)=b=0,c=0b+cpdAbcNbc(u,v),Nbc(u,v)ubvc.\displaystyle N(u,v)=\!\!\!\sum_{b=0,c=0}^{b+c\leq p_{\mathrm{d}}}A_{b}^{c}N_{b}^{c}(u,v),\quad\!\!N_{b}^{c}(u,v)\equiv u^{b}v^{c}. (14)

The integrand of the integrals Lnm,MnmL_{n}^{m},M_{n}^{m} have the form:

Qn,bm,c(u,v)Rnm(𝐫q(u,v)𝐫)Nbc(u,v).\displaystyle Q_{n,b}^{m,c}(u,v)\equiv R_{n}^{m}(\mathbf{r}_{q}(u,v)-\mathbf{r}_{*})N_{b}^{c}(u,v). (15)

We set the origin of the coordinate system so that 𝐫=𝟎\mathbf{r}_{\ast}=\mathbf{0}. The goal is to derive an algorithm for efficient analytical evaluation of integrals 16 for σ=Nbc(u,v)\sigma=N_{b}^{c}(u,v):

Ln,bm,c(𝐫)\displaystyle L_{n,b}^{m,c}\left(\mathbf{r}_{\ast}\right) (1)n4π𝐫qSqRnm(𝐫q𝐫)Nbc(u,v)𝑑Sq,\displaystyle\equiv\frac{(-1)^{n}}{4\pi}\int_{\mathbf{r}_{q}\in S_{q}}R_{n}^{-m}\left(\mathbf{r}_{q}-\mathbf{r}_{\ast}\right)N_{b}^{c}(u,v)dS_{q}, (16)
Mn,bm,c(𝐫)\displaystyle M_{n,b}^{m,c}\left(\mathbf{r}_{\ast}\right) (1)n4π𝐧q𝐫qSq(Rnm(𝐫q𝐫))Nbc(u,v)𝑑Sq,\displaystyle\equiv\frac{(-1)^{n}}{4\pi}\mathbf{n}_{q}\cdot\!\!\int_{\mathbf{r}_{q}\in S_{q}}\!\!\!\!\!\!\!\!(\nabla R_{n}^{-m}(\mathbf{r}_{q}-\mathbf{r}_{\ast}))N_{b}^{c}(u,v)dS_{q},

for all index tuples (n,m,b,c)(n,m,b,c) satisfying 0nps0\leq n\leq p_{\mathrm{s}}, |m|n|m|\leq n, 0b0\leq b, 0c0\leq c, and b+cpdb+c\leq p_{\mathrm{d}}. The coefficients Kn,bmK_{n,b}^{m} for the case d=1d=1 can be expressed by setting c=0c=0, 𝐫q=𝐫uu+𝐯1\mathbf{r}_{q}=\mathbf{r}_{u}u+\mathbf{v}_{1}, and replacing SqS_{q} by Λq\Lambda_{q} in Ln,bm,cL_{n,b}^{m,c}.

4 Q2XP: Q2X for Polynomial elements

We first describe the case d=2d=2. The Q2X method [1] was derived by utilizing the fact that the regular spherical basis functions RnmR_{n}^{m} are homogeneous polynomials of degree nn of arguments (x,y,z)(x,y,z). Similarly, NbcN_{b}^{c} are also homogeneous polynomials of (u,v)(u,v) with degree b+cb+c. Hence, by considering 𝐫\mathbf{r} and (u,v)(u,v) as functions of (ξ,η,z)(\xi,\eta,z), Euler’s homogeneous function theorem gives:

nRnm(𝐫)\displaystyle nR_{n}^{m}(\mathbf{r}) =(ξξ+ηη+zz)Rnm(𝐫),\displaystyle=(\xi\partial_{\xi}+\eta\partial_{\eta}+z\partial_{z})R_{n}^{m}(\mathbf{r}), (17)
(b+c)Nbc(u,v)\displaystyle(b+c)N_{b}^{c}(u,v) =(ξξ+ηη+zz)Nbc(u,v).\displaystyle=(\xi\partial_{\xi}+\eta\partial_{\eta}+z\partial_{z})N_{b}^{c}(u,v).

With as,ta_{s,t} the (s,t)(s,t) entry of A1A^{-1}, αs(±)as,1±ias,2\alpha_{s}^{(\pm)}\equiv a_{s,1}\pm ia_{s,2}, 𝐚s\mathbf{a}_{s} the ss-th row of A1A^{-1}, and βs𝐚s𝐯1\beta_{s}\equiv\mathbf{a}_{s}\cdot\mathbf{v}_{1} we obtain:

(n+b+c)Qn,bm,c+bβ1Qn,b1m,c+cβ2Qn,bm,c1\displaystyle(n+b+c)Q_{n,b}^{m,c}+b\beta_{1}Q_{n,b-1}^{m,c}+c\beta_{2}Q_{n,b}^{m,c-1} (18)
=ξ(iQn1,bm1,c+bQn,b1m,cα1()+cQn,bm,c1α2())\displaystyle=\xi(iQ_{n-1,b}^{m-1,c}+bQ_{n,b-1}^{m,c}\alpha_{1}^{(-)}+cQ_{n,b}^{m,c-1}\alpha_{2}^{(-)})
+η(iQn1,bm+1,c+bQn,b1m,cα1(+)+cQn,bm,c1α2(+))\displaystyle+\eta(iQ_{n-1,b}^{m+1,c}+bQ_{n,b-1}^{m,c}\alpha_{1}^{(+)}+cQ_{n,b}^{m,c-1}\alpha_{2}^{(+)})
+z(Qn1,bm,c+ba13Qn,b1m,c+ca23Qn,bm,c1).\displaystyle+z(-Q_{n-1,b}^{m,c}+ba_{13}Q_{n,b-1}^{m,c}+ca_{23}Q_{n,b}^{m,c-1}).

We define ξ=ξuu+ξvv+ξ0\xi=\xi_{u}u+\xi_{v}v+\xi_{0}, η=ηuu+ηvv+η0\eta=\eta_{u}u+\eta_{v}v+\eta_{0}, and z=zuu+zvv+z0z=z_{u}u+z_{v}v+z_{0}, where the subscripts uu and vv denote partial derivatives with respect to these variables, and

ψn,bm,c0101uQn,bm,c(u,v)𝑑v𝑑u,qn,bm,cQn,bm,c(1,0),\displaystyle\psi_{n,b}^{m,c}\equiv\!\!\int_{0}^{1}\!\!\!\int_{0}^{1-u}\!\!\!\!\!Q_{n,b}^{m,c}\left(u,v\right)dvdu,\quad\!\!\!q_{n,b}^{m,c}\equiv Q_{n,b}^{m,c}(1,0), (19)
hn,bm,c(u)Qn,bm,c(u,1u),jn,bm,c01hn,bm,c(u)𝑑u.\displaystyle h_{n,b}^{m,c}\left(u\right)\equiv Q_{n,b}^{m,c}\left(u,1-u\right),\quad\!\!\!\!j_{n,b}^{m,c}\equiv\!\!\int_{0}^{1}\!\!h_{n,b}^{m,c}\left(u\right)du.

4.1 Recursions

Lemma 1.

The coefficients ψn,bm,c\psi_{n,b}^{m,c} satisfy the recursion:

ψn,bm,c=\displaystyle\psi_{n,b}^{m,c}= ξ0iψn1,bm1,c+η0iψn1,bm+1,cz0ψn1,bm,c+jn,bm,cn+b+c+2.\displaystyle\frac{\xi_{0}i\psi_{n-1,b}^{m-1,c}+\eta_{0}i\psi_{n-1,b}^{m+1,c}-z_{0}\psi_{n-1,b}^{m,c}+j_{n,b}^{m,c}}{n+b+c+2}. (20)
Proof.
uQn,bm,cu+vQn,bm,cv=ξQn,bm,cξ+ηQn,bm,cη+zQn,bm,cz\displaystyle u\frac{\partial Q_{n,b}^{m,c}}{\partial u}+v\frac{\partial Q_{n,b}^{m,c}}{\partial v}=\xi\frac{\partial Q_{n,b}^{m,c}}{\partial\xi}+\eta\frac{\partial Q_{n,b}^{m,c}}{\partial\eta}+z\frac{\partial Q_{n,b}^{m,c}}{\partial z} (21)
(ξ0Qn,bm,cξ+η0Qn,bm,cη+z0Qn,bm,cz)\displaystyle-\left(\xi_{0}\frac{\partial Q_{n,b}^{m,c}}{\partial\xi}+\eta_{0}\frac{\partial Q_{n,b}^{m,c}}{\partial\eta}+z_{0}\frac{\partial Q_{n,b}^{m,c}}{\partial z}\right)
=(n+b+c)Qn,bm,c+bβ1Qn,b1m,c+cβ2Qn,bm,c1\displaystyle=(n+b+c)Q_{n,b}^{m,c}+b\beta_{1}Q_{n,b-1}^{m,c}+c\beta_{2}Q_{n,b}^{m,c-1}
ξ0(iQn1,bm1,c+bQn,b1m,cα1()+cQn,bm,c1α2())\displaystyle-\xi_{0}(iQ_{n-1,b}^{m-1,c}+bQ_{n,b-1}^{m,c}\alpha_{1}^{(-)}+cQ_{n,b}^{m,c-1}\alpha_{2}^{(-)})
η0(iQn1,bm+1,c+bQn,b1m,cα1(+)+cQn,bm,c1α2(+))\displaystyle-\eta_{0}(iQ_{n-1,b}^{m+1,c}+bQ_{n,b-1}^{m,c}\alpha_{1}^{(+)}+cQ_{n,b}^{m,c-1}\alpha_{2}^{(+)})
z0(Qn1,bm,c+ba13Qn,b1m,c+ca23Qn,bm,c1).\displaystyle-z_{0}(-Q_{n-1,b}^{m,c}+ba_{13}Q_{n,b-1}^{m,c}+ca_{23}Q_{n,b}^{m,c-1}).

By integrating both sides over the triangle T={(u,v)|0u,0v,u+v1}T=\{(u,v)|0\leq u,0\leq v,u+v\leq 1\} and applying integration by parts, we obtain 20. See proof of Lemma 2 in [1] for details. ∎

Lemma 2.

The coefficients jn,bm,cj_{n,b}^{m,c} satisfy the recursion:

jn,bm,c=1n+b+c+1(\displaystyle j_{n,b}^{m,c}=\frac{1}{n+b+c+1}( (22)
(ξ0+ξv)(ijn1,bm1,c+bjn,b1m,cα1()+cjn,bm,c1α2())\displaystyle(\xi_{0}+\xi_{v})(ij_{n-1,b}^{m-1,c}+bj_{n,b-1}^{m,c}\alpha_{1}^{(-)}+cj_{n,b}^{m,c-1}\alpha_{2}^{(-)})
+(η0+ηv)(ijn1,bm+1,c+bjn,b1m,cα1(+)+cjn,bm,c1α2(+))\displaystyle+(\eta_{0}+\eta_{v})(ij_{n-1,b}^{m+1,c}+bj_{n,b-1}^{m,c}\alpha_{1}^{(+)}+cj_{n,b}^{m,c-1}\alpha_{2}^{(+)})
+(z0+zv)(jn1,bm,c+ba13jn,b1m,c+ca23jn,bm,c1)\displaystyle+(z_{0}+z_{v})(-j_{n-1,b}^{m,c}+ba_{13}j_{n,b-1}^{m,c}+ca_{23}j_{n,b}^{m,c-1})
bβ1jn,b1m,ccβ2jn,bm,c1+qn,bm,c).\displaystyle-b\beta_{1}j_{n,b-1}^{m,c}-c\beta_{2}j_{n,b}^{m,c-1}+q_{n,b}^{m,c}).
Proof.

Replace Qn,bm,c(u,v)Q_{n,b}^{m,c}(u,v) in 21 by hn,bm,c(u)h_{n,b}^{m,c}(u), integrate both sides over domain u[0,1]u\in[0,1], and apply integration by parts. See proof of Lemma 1 in [1] for details. ∎

The recursion for qn,bm,cq_{n,b}^{m,c} directly follows from 18 by substituting u=1u=1 and v=0v=0.

qn,bm,c=1n+b+c(\displaystyle q_{n,b}^{m,c}=\frac{1}{n+b+c}( (23)
(ξ0+ξu)(iqn1,bm1,c+bqn,b1m,cα1()+cqn,bm,c1α2())\displaystyle(\xi_{0}+\xi_{u})(iq_{n-1,b}^{m-1,c}+bq_{n,b-1}^{m,c}\alpha_{1}^{(-)}+cq_{n,b}^{m,c-1}\alpha_{2}^{(-)})
+(η0+ηu)(iqn1,bm+1,c+bqn,b1m,cα1(+)+cqn,bm,c1α2(+))\displaystyle+(\eta_{0}+\eta_{u})(iq_{n-1,b}^{m+1,c}+bq_{n,b-1}^{m,c}\alpha_{1}^{(+)}+cq_{n,b}^{m,c-1}\alpha_{2}^{(+)})
+(z0+zu)(qn1,bm,c+ba13qn,b1m,c+ca23qn,bm,c1)\displaystyle+(z_{0}+z_{u})(-q_{n-1,b}^{m,c}+ba_{13}q_{n,b-1}^{m,c}+ca_{23}q_{n,b}^{m,c-1})
bβ1qn,b1m,ccβ2qn,bm,c1).\displaystyle-b\beta_{1}q_{n,b-1}^{m,c}-c\beta_{2}q_{n,b}^{m,c-1}).

The expansion coefficients Ln,bm,cL_{n,b}^{m,c} and Mn,bm,cM_{n,b}^{m,c} then can be computed from the ψn,bm,c\psi_{n,b}^{m,c} coefficients using J=|𝐫u×𝐫v|J=|\mathbf{r}_{u}\times\mathbf{r}_{v}|:

Ln,bm,c=\displaystyle L_{n,b}^{m,c}= J4π(1)nψn,bm,c,Mn,bm,c=J4π(1)nln,bm,c,\displaystyle\frac{J}{4\pi}(-1)^{n}\psi_{n,b}^{-m,c},\quad M_{n,b}^{m,c}=\frac{J}{4\pi}(-1)^{n}l_{n,b}^{-m,c}, (24)
ln,bm,c=\displaystyle l_{n,b}^{-m,c}= inx2[ψn1,bm+1,c+ψn1,bm1,c]\displaystyle i\frac{n_{x}}{2}\left[\psi_{n-1,b}^{-m+1,c}+\psi_{n-1,b}^{-m-1,c}\right]
+ny2[ψn1,bm+1,cψn1,bm1,c]nzψn1,bm,c.\displaystyle+\frac{n_{y}}{2}\left[\psi_{n-1,b}^{-m+1,c}-\psi_{n-1,b}^{-m-1,c}\right]-n_{z}\psi_{n-1,b}^{-m,c}.
Remark 3.

Q2XP achieves optimal per-element complexity O(ps2pdd)O(p_{\mathrm{s}}^{2}p_{\mathrm{d}}^{d}) for evaluating all index tuples in question ((n,m,b,c)(n,m,b,c) for d=2d=2 and (n,m,b)(n,m,b) for d=1d=1), whereas a naive application of Gauss-Legendre quadrature requires O(ps2pdd(ps+pd)d)O(p_{\mathrm{s}}^{2}p_{\mathrm{d}}^{d}(p_{\mathrm{s}}+p_{\mathrm{d}})^{d}) for exact evaluation.

4.2 Starting values for recursions

Note that in all recursions ψn,bm,c\psi_{n,b}^{m,c}, jn,bm,cj_{n,b}^{m,c}, and qn,bm,cq_{n,b}^{m,c} should be set to zero for |m|>n\left|m\right|>n. This follows from the fact that Rnm(𝐫)=0R_{n}^{m}\left(\mathbf{r}\right)=0 for |m|>n\left|m\right|>n. The starting values are:

q0,b0,c\displaystyle q_{0,b}^{0,c} =δc,0,j0,b0,c\displaystyle=\delta_{c,0},\quad j_{0,b}^{0,c} =01ub(1u)c𝑑uκb,c\displaystyle=\int_{0}^{1}u^{b}(1-u)^{c}du\equiv\kappa_{b,c} (25)

where table κb,c\kappa_{b,c} can be computed using recursion:

κb,c=cb+1κb+1,c1(c>0),κb,0=1b+1(c=0).\displaystyle\kappa_{b,c}=\frac{c}{b+1}\kappa_{b+1,c-1}\quad(c>0),\quad\kappa_{b,0}=\frac{1}{b+1}\quad(c=0). (26)

Lastly, the starting values for ψ0,b0,c\psi_{0,b}^{0,c} are given by:

ψ0,b0,c\displaystyle\psi_{0,b}^{0,c} =0101uubvc𝑑v𝑑u=01ub[vc+1c+1]01u𝑑u\displaystyle=\int_{0}^{1}\int_{0}^{1-u}u^{b}v^{c}dvdu=\int_{0}^{1}u^{b}\left[\frac{v^{c+1}}{c+1}\right]_{0}^{1-u}du (27)
=1c+101ub(1u)c+1𝑑u=κb,c+1c+1.\displaystyle=\frac{1}{c+1}\int_{0}^{1}u^{b}(1-u)^{c+1}du=\frac{\kappa_{b,c+1}}{c+1}.

From 23, 22, and 20 follows algorithm 1.

Algorithm 1 Evaluate multipole expansion coefficients Ln,bm,cL_{n,b}^{m,c} and Mn,bm,cM_{n,b}^{m,c} for 0nps0\leq n\leq p_{\mathrm{s}}, |m|n|m|\leq n, 0b+cpd0\leq b+c\leq p_{\mathrm{d}}
  1. Compute q0,b0,cq_{0,b}^{0,c}, j0,b0,cj_{0,b}^{0,c}, and ψ0,b0,c\psi_{0,b}^{0,c} using 25 and 27.
  2. Compute coefficients qn,bm,cq_{n,b}^{m,c} using recursion 23.
  3. Compute coefficients jn,bm,cj_{n,b}^{m,c} using 22 and qn,bm,cq_{n,b}^{m,c}.
  4. Compute coefficients ψn,bm,c\psi_{n,b}^{m,c} using 20 and jn,bm,cj_{n,b}^{m,c}.
  5. Compute coefficients Ln,bm,cL_{n,b}^{m,c} and Mn,bm,cM_{n,b}^{m,c} using 24.

The case d=1d=1 can be easily obtained by minor modifications to the case d=2d=2, i.e. setting c=0c=0, ξv=ηv=zv=0\xi_{v}=\eta_{v}=z_{v}=0, J=|𝐫u|J=|\mathbf{r}_{u}|, modifying the recursions accordingly, skipping step 4 and 5 in algorithm 1, and computing the result by:

Kn,bm=\displaystyle K_{n,b}^{m}= J4π(1)njn,bm,0.\displaystyle\frac{J}{4\pi}(-1)^{n}j_{n,b}^{-m,0}. (28)

5 Numerical experiment

Q2XP was tested for the case d=2d=2 on a configuration given by: 𝐫c=(3/2,0,0)T\mathbf{r}_{c}=\left(\sqrt{3}/2,0,0\right)^{T}, 𝐯1=𝐫c+rt(1,0,0)T\mathbf{v}_{1}=\mathbf{r}_{c}+r_{t}\left(1,0,0\right)^{T}, 𝐯2,3=𝐫c+rt(1/2,±3/2,0)T\mathbf{v}_{2,3}=\mathbf{r}_{c}+r_{t}\left(-1/2,\pm\sqrt{3}/2,0\right)^{T}, and rt=0.1r_{t}=0.1. The wall clock times for running a Python implementation of Q2XP for polynomial degrees of up to ps=pd=20p_{\mathrm{s}}=p_{\mathrm{d}}=20 are shown in Fig. 2. Given a complexity expression t=Cpsαpdβt=Cp_{\mathrm{s}}^{\alpha}p_{\mathrm{d}}^{\beta} with tt the computation time and CC a constant, the exponents are extracted as α=1.75\alpha=1.75 and β=1.83\beta=1.83 from the numerical experiment.

Refer to caption
Figure 2: Wall clock times for running Q2XP up to ps=pd=20p_{\mathrm{s}}=p_{\mathrm{d}}=20.

The maximum relative difference over the Ln,bm,cL_{n,b}^{m,c} and Mn,bm,cM_{n,b}^{m,c} coefficients for truncation degrees ps=pd=10p_{\mathrm{s}}=p_{\mathrm{d}}=10 computed by exact Gauss-Legendre quadrature and Q2XP was 2.7×10142.7\times 10^{-14}, indicating good accuracy.

6 Conclusion

We have extended the recursive algorithm presented in [1] for the analytical evaluation of integrals of spherical basis functions over high order dd-simplex elements arising in the FMM-BEM for the Laplace equation in 3{\mathbb{R}}^{3} to the case of polynomial density functions. All multipole expansion coefficients are evaluated analytically up to spherical basis degree of psp_{\mathrm{s}} and the density’s polynomial degree of pdp_{\mathrm{d}} with optimal complexity O(ps2pdd)O(p_{\mathrm{s}}^{2}p_{\mathrm{d}}^{d}). This complexity was confirmed via numerical experiments. While we limited the discussion to d{1,2}d\in\{1,2\}, the case d=3d=3 could also be supported by following the formulation presented here and in [1].

Acknowledgments

This work is supported by Cooperative Research Agreement W911NF2020213 between the University of Maryland and the Army Research Laboratory, with David Hull and Steven Vinci as Technical monitors. Shoken Kaneko thanks Japan Student Services Organization and Watanabe Foundation for scholarships.

References

  • [1] Nail A Gumerov, Shoken Kaneko, and Ramani Duraiswami. Recursive Computation of the Multipole Expansions of Layer Potential Integrals over Simplices for Efficient Fast Multipole Accelerated Boundary Elements. Journal of Computational Physics, 486(1):112118, 2023.
  • [2] Stefan A Sauter and Christoph Schwab. Boundary element methods. In Boundary Element Methods, pages 183–287. Springer, 2010.
  • [3] Leslie Greengard and Vladimir Rokhlin. A fast algorithm for particle simulations. Journal of computational physics, 73(2):325–348, 1987.
  • [4] Shoken Kaneko, Nail A Gumerov, and Ramani Duraiswami. Recursive Analytical Quadrature of Laplace and Helmholtz Layer Potentials in 3\mathbb{R}^{3}. arXiv preprint arXiv:2302.02196, 2023.
  • [5] John Nicholas Newman. Distributions of sources and normal dipoles over a quadrilateral panel. Journal of Engineering Mathematics, 20(2):113–126, 1986.
  • [6] Milton Abramowitz, Irene A Stegun, and Robert H Romer. Handbook of mathematical functions with formulas, graphs, and mathematical tables, volume 56. Americal Journal of Physics, 1988.
  • [7] Nail A. Gumerov and Ramani Duraiswami. Fast multipole method for the biharmonic equation in three dimensions. Journal of Computational Physics, 215(1):363–383, 2006.