Return to Article Details Modified adaptive quadrature by expansion for Laplace and Helmholtz layer potentials in 2D

Modified adaptive quadrature by expansion
for Laplace and Helmholtz layer potentials in 2D

Hassan Majidian
(Date: May 18, 2025; accepted: September 15, 2025; published online: September 16, 2025.)
Abstract.

An adaptive algorithm based on quadrature by expansion (QBX) is proposed for computing layer potentials at target points near or on a smooth boundary in 2. The algorithm can be viewed as a major modification to the two-phase algorithm AQBX, proposed recently by Klinteberg et al. [SIAM Journal on Scientific Computing, 40(3), 2018]. In the modified AQBX (MAQBX), we consider sharper bounds for the involved truncation error. As a result, the involved stopping criteria are met earlier, and the total computational cost is reduced. Moreover, MAQBX is a single-phase algorithm and its structure is far simpler than that of AQBX. It is recommended that QBX (or any version of it) should be applied on a small part of the boundary that is near the target point, and a classical quadrature is applied on the rest of the boundary (this is often referred to as local QBX). We partially show that for Laplace and Helmholtz potentials, parametric symmetry of the target point with respect to the near part, can improve the convergence of QBX. Based on this observation, we suggest the local MAQBX that is very efficient in practice both for computing layer potentials and for solving boundary integral equations via the Nyström scheme.

Key words and phrases:
quadrature by expansion; layer potential; Laplace problem; Helmholtz problem; adaptive quadrature.
2005 Mathematics Subject Classification:
65R20; 65D30; 65D32
Department of Multidisciplinary Studies, Faculty of Encyclopedia Studies, Institute for Humanities and Cultural Studies, PO Box 14155-6419, Tehran, Iran, e-mail: h.majidian@ihcs.ac.ir

In boundary integral methods (BIMs), one uses Green theorems and transform a boundary value problem (BVP) for PDEs to a well-posed integral equation on the boundary of the domain of definition of the problem (note that the domain of application of BIMs extends far beyond the scope of PDEs). This has many advantages over the traditional volume PDE solvers such as FD, FEM, etc: 1) the dimension of the problem is reduced by one, so one needs fewer sample points to achieve a given accuracy, 2) an exterior problem with an unbounded spatial domain is reduced to a boundary integral equation over a bounded domain, 3) solving integral equations of the second kind is more numerically stable than solving PDEs directly by traditional discretization methods, 4) through the Nyström method, the problem of solving an integral equations of the second kind is reduced to the simpler problem of numerical quadrature or cubature for which high-order rules exist, 5) moving boundaries can be handled more easily, 6) a boundary integral formulation reflects well-posedness of the underlying physical problem more fairly, etc.

Assume that G is the fundamental solution of the PDE associated with a BVP defined in a domain Ωd, d1. In a BIM, the solution u of the problem is represented as a layer potential with a jump discontinuity on the boundary Ω. This jump discontinuity is essential in well-posedness of the resulting boundary integral equation. Consider the double layer potential

(1) Dσ(x):=ΩGnx(x,x)σ(x)dx,

(with nx the outer unit normal at x) and the single layer potential

(2) Sσ(x):=ΩG(x,x)σ(x)dx.

The double layer potential itself and the gradient of the single layer potential satisfy jump discontinuity properties. Thus, the double layer and the single layer potentials are suitable for Dirichlet and Neumann problems, respectively. For the sake of solvability, one usually uses a combined field representation

(3) u(x)=(D+αS)σ(x),xΩ,

where α0 is a coupling parameter. For a Dirichlet problem with the Dirichlet data f on the boundary, we obtain the following boundary integral equation for the unknown density function σ:

(4) (±12I+D+αS)σ(x)=f(x),xΩ,

where the positive and the negative signs correspond to the exterior and the interior problem, respectively. If σ~ is an approximate solution of (4), the solution to BVP at the target point x is achieved by computing the layer potential (D+αS)σ~(x). For Neumann and Robin boundary conditions, BIM is also led to integral equations of the second kind, which are known to be well-posed (see [11] and references therein).

In this paper, we focus on two-dimensional Laplace and Helmholtz problems, though the theory is readily applicable to other problems.

In BIM, singularity is a price which should be paid for well-posedness. Indeed, the singularity of the fundamental solution yields the jump discontinuity property of the layer potential, and the latter causes the term ±I/2 in (4), which renders the boundary integral equation to a well-posed integral equation of the second kind. Singularity of the fundamental solution is inherited by both the boundary integral equation and the layer potential. Indeed, the boundary integral equation is weakly singular, and the layer potential at a target point near the boundary is a nearly singular integral. There are several efficient numerical methods for both the problems (see e.g.[5, 7, 8, 9, 10, 13, 14, 15, 16, 18, 22]), but there is still the need to design more robust algorithms.

Quadrature by expansion (QBX) was introduced in [17] for computing layer potentials at target points on or near the boundary. QBX is easy to implement, high order accurate, and despite earlier methods, dimension-independent. Moreover, QBX can be coupled with fast multipole methods (FMMs) and introduce fast algorithms for both the problems of solving boundary integral equations and computing layer potentials at target points near the boundary. In QBX, the singular integrand is locally expanded about a center with a suitable distance from the boundary. As a result, the singular or nearly singular layer potential is approximated by a sum of several regular integrals. Due to its individual benefits, QBX has been the subject of many studies for the last decade. In [6, 12, 3], convergence of QBX is studied in depth. Some combinations of QBX with FMM are suggested in [26, 25, 20]. QBX has also found applications in simulating spheroids in periodic Stokes flow [2]. For other applications and modifications of QBX one can see [4, 21, 23, 27].

One of the difficulties of QBX is the choice of parameters to achieve the optimal accuracy. The distance r of the expansion center from the boundary, the order p of the expansion, and the number N of abscissas for the underlying quadrature have unspecific interactions on the total accuracy. For example, when p grows, the total error can decreases or increases depending on the values of r and N. Thus, there is an urgent need to determine optimal parameters to achieve a given accuracy.

In [4], this problem has been studied in depth, and an adaptive algorithm is proposed for determining p and N, for a given r. In adaptive QBX, the potential is written as the inner product of a vector of coefficients involving regular integrals over the boundary and a vector of norm one. The error in QBX can be separated into a truncation error and a coefficient error. In adaptive QBX, practical a priori estimates for both of the errors are suggested, which enable one to determine the optimal parameters in order to achieve a given accuracy. The algorithm has two phases. In the first phase, the coefficients are computed by the Gauss-Legendre rules to a given accuracy. In the core of this phase, there is a usable and sharp a priori error estimate for the Gauss-Legendre quadrature. The idea is developed by contour integrals and residue calculus, which was extended later to curves and surfaces in 3 [1, 24]. Meanwhile, the coefficients are computed till a stopping criterion is met for the truncation error. In the second phase, the potential is computed by considering a different stopping criterion for the truncation error. Indeed, in the first phase, an upper bound is employed for the truncation error to compute coefficients contributing in the second phase, while in the second phase, a sharper bound is used to evaluate the potential. This causes that some coefficients are computed in the first phase that do not have any contribution in the second phase, and this in turn exposes an extra and unnecessary computational cost.

In the present paper, we address the above issue. If we consider the sharper bound in both the phases, then they merge into a single one, resulting a modified algorithm that is simpler as well as faster in practice. We also propose some other modifications which improve the logic and convergence of adaptive QBX. The estimate suggested in [4] for the coefficient error actually depends on p. Here, we suggest a p-independent one, which gives a more reasonable bound for the coefficient error. Also, we partially show that for Laplace and Helmholtz potentials, if some symmetry conditions are hold, the convergence of QBX is improved. Such conditions can easily be hold without imposing an extra computational cost.

The rest of paper is organized as follows. In  Section 1, a brief review of QBX is given.  Section 2 contains the modifications to the AQBX algorithm of [4], based on which, we devise the modified AQBX (MAQBX) algorithm in  Section 3. We carry out some numerical experiments in  Section 4 to illustrate the efficiency of the MAQBX algorithm for computing layer potentials as well as solving boundary integral equations. Finally, we give some conclusions in  Section 5.

1. QBX

In this section, we give a review of QBX and its localization. Assume that Ω2 is either interior or exterior of a bounded domain in 2 with smooth boundary Ω. In 2D, it is more convenient to consider 2 as the complex plain and write the potentials in the complex setting. Assume that γ is an analytic 2π-periodic counterclockwise parametrization of the boundary, that is γ([0,2π])=Ω. Assume also that the boundary is so smooth that γ never vanishes. Then, the outer normal n(t) at any point t[0,2π), is determined by iγ(t)/|γ(t)|.

In the complex setting, a 2D layer potential can be written in form of

(5) u(z)=ΩK(z,w)σ(w)dsw,

where z is the target point in 2, K is a linear combination of the fundamental solution and its normal derivative, and dsw is the arc length element with respect to w.

The main assumption of QBX is that the variables of K can be separated by a known addition theorem as

(6) K(z,w)=m=0Amr(w,z0)Bmr(z,z0),|zz0|<|wz0|,

where Amr and Bmr are either scalars or 2-vectors with given r, the distance of the expansion center z0 from the boundary. Note that K(w,w) is unbounded for any wΩ, thus the expansion (6) should have a singular factor. We assume that Bmr is bounded and Amr is the singular part, i.e., Amr(w,w) is unbounded for any wΩ. We also assume that (6) is normalized as

(7) |Bmr(z,z0)|1,
(8) maxm,z|Bmr(z,z0)|=1,

for |zz0|r and integer m0. This normalization is necessary in adaptive QBX (see [4]).

From (6), the potential (5) can be written as

(9) u(z)=m=0amBmr(z,z0),

where

(10) am:=ΩAmr(w,z0)σ(w)dsw.

Since the expansion center is far away from the boundary, the integrals (10) are regular and can be approximated by classical quadrature rules to the given accuracy. Assume that am, for each m, is approximated by a~m. When the distance of z from the boundary is less than r, the u(z) can be approximated by QBX as

(11) up(z):=m=0pa~mBmr(z,z0).

The total error is the summation of the truncation error (eT) and the coefficient error (eC):

(12) u(z)up(z)=u(z)m=0pamBmr(z,z0)eT+m=0p(ama~m)Bmr(z,z0)eC.

See [12] for an error analysis. In practice, the truncation error decreases almost exponentially as rp when p grows. The coefficient error depends on the accuracy of the underlying quadrature rule, but it can be deteriorated as p increases. The interplay between eT and eC, as p grows, naturally leads us to search for the optimal p, which minimizes the total error.

The paper [4] was the first attempt to study this problem in depth, and here, we give some revisions to the algorithm proposed in [4]. Before that, we complete this section by determining Amr and Bmr for Laplace and Helmholtz layer potentials.

1.1. Laplace double layer potential

Fundamental solution of the 2D Laplace problem is Φ(x,x)=log|xx|/(2π). In the complex setting, the corresponding double layer potential can be written as u=v, where

(13) v(z)=12πΩnwzwσ(w)dsw,zΩ.

Now, from the Taylor expansion

(14) 1zw=m=0(zz0)m(wz0)m+1,|zz0|<|wz0|,

the corresponding Amr and Bmr is specified

(15a) Amr(y,z0) =rmnw2π(wz0)m+1,
(15b) Bmr(z,z0) =(zz0)mrm.

1.2. Laplace single layer potential

In the complex setting, the Laplace single layer potential can be written as u=v, where

(16) v(z)=12πΩlog(1wz)σ(w)dsw,zΩ.

Now, from the Taylor expansion

log(1wz) =log(1wz0)log(1zz0wz0)
(17) =log(1wz0)+m=11m(zz0wz0)m,|zz0|<|wz0|,

the corresponding Amr and Bmr is specified by

(18a) A0r(w,z0) =12πlog(1wz0),
(18b) Amr(w,z0) =12πmrm(wz0)m+1,m>0,
(18c) Bmr(z,z0) =(zz0)mrm,m=0,1,.

1.3. Helmholtz double layer potential

In the complex setting, fundamental solution of the 2D Helmholtz problem with the wave number k is

(19) Φk(z,w)=i4H0(1)(k|zw|).

For Helmholtz potentials, one uses the Graf addition theorem [19, §10.23(ii)],

(20) H0(1)(k|zw|)=m=Hm(1)(krw)eimθwJm(krz)eimθz,rz<rw,

where (rw,θw) and (rz,θz) are polar coordinates of wz0 and zz0, respectively, i.e.,

(21a) rw =|wz0|,
(21b) eiθw =wz0|wz0|,
(21c) rz =|zz0|,
(21d) eiθz =zz0|zz0|.

Then, the corresponding Amr and Bmr are given as follows (see [4])

(22a) A0r(w,z0) =d0(w,z0)
(22b) B0r(z,z0) =J0(krz)
(22c) Amr(w,z0) =αmr(dm(w,z0),dm(w,z0)),m>0,
(22d) Bmr(z,z0) =1αmr(Jm(krz)eimθz,Jm(krz)eimθz),m>0,

where

(23) αmr:=2m!(kr2)m,m>0,

and

(24) dm(w,z0)=ik8(Hm1(1)(krw)ei(m1)θwn¯wHm+1(1)(krw)ei(m+1)θwnw),

for all m0. Note that Amr and Bmr are 2-vectors for m>0

1.4. Helmholtz single layer potential

Again, the Graf addition theorem implies that Amr and Bmr, corresponding to the Helmholtz single layer potential, are as follows (see [4])

(25a) A0r(w,z0) =s0(w,z0)
(25b) B0r(z,z0) =J0(krz)
(25c) Amr(w,z0) =αmr(sm(w,z0),sm(w,z0)),m>0,
(25d) Bmr(z,z0) =1αmr(Jm(krz)eimθz,Jm(krz)eimθz),m>0,

where αmr are defined by (23), and

(26) sm(w,z0)=i4Hm(1)(krw)eimθw,

for all m0.

1.5. Localization

For integration of (5), one can split the integration path as Ω=ΓnearΓfar into the ‘near part’ and the ‘far part’. The near part contains points of the boundary which are so near the target point z, that classical quadrature rules on Γnear with a moderate number of abscissas leads to rather large error. More precisely, for a given integer [0,1),

(27) Γnear={wΩ:|wz|r}.

Discussion on the choice of is beyond the scope of this article; interested reader can refer [6, 4] for some comments.

It is recommended that QBX is used only on the near part, and a traditional fast quadrature rule is employed for the far part [6, 4]. This is the so-called local QBX that is compatible with FMM. In local QBX, one divides the boundary into smaller pairwise disjoints panels,

(28) Ω=iΓi,

such that the boundary is well-resolved by the panels, i.e., the curvature of each panel is rather small. One often uses panels of equal length though panels of different lengths are also allowed. In the latter case, it is recommended that the lengths of any two adjacent panels have a ratio in the interval [1/2,2] (see [20] for more details).

Refer to caption
Figure 1. The near (red) and the far (green) parts of a boundary with respect to a target point (black asterisk). z0(j) is the exapnsion center corresponding to the panel Γj, for j=1,2.

Note that the near (or far) part of a boundary with respect to a target point is not necessarily connected. In Fig. 1, the near part is the union of two disjoint curves Γ1 and Γ2. QBX is applied for each panel separately with an individual expansion center, i.e., z0(j) for the panel Γj, for j=1,2. Without losing any generality, we assume that the near part is always connected throughout this paper.

In adaptive local QBX, the only input parameter is the error tolerance ε. In Section 3, we suggest how to choose r and determine the near part by ε. Throughout the paper, by adaptive QBX, we mean adaptive local QBX, and the idea is described on a typical small panel ΓΩ that is near to the target point z and in front of it, i.e., the set {|zw|:wΓ} takes its minimum at a point in int(Γ):={wΓ:Brw(w)ΩΓ for some rw>0}. Here, Brw(w) is an open ball of radius rw centered at w.

2. Some improvements in adaptive QBX

In this section, we give some modifications to the two-phase algorithm proposed in [4] for adaptive QBX. In Section 2.1, the first phase, i.e., the coefficient error, is affected by considering more suitable criteria for the coefficient refinement. In Section 2.2 and Section 2.3, we modify the second phase such that the truncation error reaches the stopping threshold more rapidly. In total, one obtains a single-phase algorithm for adaptive QBX (ref.  Section 3) that is simpler and faster than that of [4].

2.1. p-independent coefficient error estimate

In the algorithm proposed in [4], the quadrature rule is refined so that |ama~m|<ε for each m, where ε>0 is a given tolerance. This strategy has this disadvantage that the upper bound for the coefficient error grows linearly with p. Indeed,

(29) |eC|m=0p|ama~m|(p+1)ε.

If we use the condition |ama~m|<2m2ε for each m instead, then we gain two advantages. Firstly, a~m approximates am more accurately since it is assumed that am decays exponentially by m. Secondly,

(30) m=0p|ama~m|εm=0p2m2=ε(1/22p2)<ε/2.

Thus, the upper bound (30) is independent of p.

Note that 2m2ε may reach the machine epsilon εmach rapidly as m grows. In order to avoid extra effort, one can consider the condition |ama~m|<max{2m2ε,εmach} instead. Since one does not expect that p exceeds, e.g. 50, the inequality (30) will still be valid up to a tolerance scalable to the machine precision.

In order to approximate am to a given accuracy, we suggest the Gauss-Legendre rules, though any other quadrature rule can also be employed, provided that there exists a practical error bound for it that contains no unknown coefficients and can efficiently be evaluated. In [4], the authors suggest such an a priori estimate EC(n,m) of |ama~m|, where a~m is an approximation of am obtained by the n-point Gauss-Legendre quadrature rule:

(31) EC(n,m)=rmm!|2n+1γ(w0)w021|m|σ(w0)||w0±w021|2n+1,

where γ:[1,1]Γ is a parametrization of Γ, and w0 is a zero of the complex function wγ(w)z0. For details on how to approximate w0 and evaluate EC(n,m) robustly, one can see [4, Section 3.1].

2.2. Avoid computing extra coefficients

Truncation error eT depends on the coefficients am, which are unknown. Assume that a~m is an approximation of am for each m.

The algorithm proposed in [4] has two phases. Since it is assumed that the coefficients am decay exponentially as m grows, one can expect that their approximate values a~m do so. In the first phase ([4, Algorithm 1]), starting from m=0, the coefficients am are approximated by a~m to the accuracy of ε till they drop below ε. If m0>0 is the smallest integer such that |a~m0|<ε, then set p:=m0. Thus, by [4, Eq. (14)],

(32) |eT|=|m=p+1amBmr(z,z0)||am0+1||am0+1a~m0+1|+|a~m0+1|<2ε.

In the second phase ([4, Algorithm 2]), only those terms a~mBmr(z,z0) with |a~mBmr(z,z0)|<ε are contributed in the sum (11). This means that there is a possibility that some coefficients a~m are computed in the first phase but do not contribute in the second phase since |Bmr(z,z0)|1. In this case, the value of p is updated in the second phase, accordingly.

For example, consider a small portion Γ of the starfish

(33) γ(t)=(1+.25sin(5t))exp(it),

between 5.05<t<5.2, and the target point z=0.45i (see Fig. 2). For computing the Laplace double layer potential by QBX, as recommended in [4], let r=l/4 with l denoting the length of Γ. The number of computed coefficients a~m at the end of the first phase (num-coeff-phase1) and the number of contributed terms in the approximate potential (11), i.e., p+1, for each tolerance ε are listed in Table 1. The differences between the values of these two rows indicate that a considerable portion of computational cost is devoted to computing some coefficients which never come to use.

Refer to caption
Figure 2. A portion of the ‘starfish’ geometry (33) between 5.05<t<5.2 and a target point at z=0.45i.
ε 103 104 105 106 107 108 109 1010 1011 1012
num-coeff-phase1 5 6 7 9 10 12 14 15 17 19
p+1 3 4 5 5 6 7 8 8 9 10
Table 1. Efficiency of the algorithm proposed in [4] for the Laplace double layer potential at the target point z=0.45i and on the ‘starfish’ geometry (33) limited to 5.05<t<5.2: The number of computed coefficients a~m at the end of Algorithm 1 of [4] (num-coeff-phase1) and the number of contributed terms, p+1, for each tolerance ε are computed.

We can revise the above procedure by approximating am by a~m to the accuracy of 2m2ε (see Section 2.1) till |a~mBmr(z,z0)| drops below ε/4. Let m0>0 be the smallest integer such that |a~m0Bm0r(z,z0)|<ε/3. Then, setting p:=m01,

|eT|=|m=p+1amBmr(z,z0)| |am0Bm0r(z,z0)|
|am0a~m0|+|a~m0Bm0r(z,z0)|
(2m0+1)ε/3ε/2.

2.3. Expansion center

Our observations show that position of the target point with respect to the curve Γ affects the efficiency of adaptive QBX. Indeed, the more symmetric the target point is with respect to Γ, the earlier the condition |a~mBmr(z,z0)|<ε/4 is satisfied. Note that this symmetry is not necessary geometrically, and it should be viewed in the sense of parametrization. In order to explain the idea, we need the following lemma.

Lemma 1.

Consider a holomorphic function h on the lines |z|=r0, for some r0>0. Assume that h satisfies the following conditions in its domain of analyticity: (c1) h(z)¯=h(z¯); (c2) either h(z)=h(z) or h(z)=h(z). Then, the real-valued function ξ defined by

(34) ξ(t0)=|11h(tt0ir0)dt|,

on [1,1], is even.

Proof.

Change of the variables t:=t with (c1) and (c2) yields

ξ(t0) =|11h(t+t0ir0)dt|=|11h(t+t0ir0)¯dt|
=|11h(t+t0+ir0)dt|=|11h(t+t0+ir0)dt|
(35) =|11h(tt0ir0)dt|=ξ(t0).

Thus, under the assumptions of Lemma 1, t0=0 is a critical point of |11h(tt0ir0)dt|. In the following, we use Lemma 1 to show that the coefficients am in either of the Laplace or the Helmholtz layer potentials, are minimized for almost all m, when the projection of the target point on Γ, has the preimage in the middle.

2.3.1. Laplace potentials

Assume that γ:[1,1]Γ is a parametrization of Γ, i.e., γ([1,1])=Γ. Then, for any m0, the coefficient am, corresponding to the Laplace double layer potential, can be written as

am =ym2πΓhm(wz0)nwσ(w)dsw
(36) =r0m2πi11hm(γ(t)γ(t0+ir0))γ(t)σ~(t)dt,

where hm(z)=zm1, σ~=σγ, and z0=γ(t0+ir0) is the expansion center. When the length of Γ is small enough and it resembles a straight segment in the complex plain, we can assume that σ~ is almost constant on [1,1], and γ is approximated by a line, i.e.,

(37) γ(t)bt+q,

for some b,q. Then,

(38) amr0mb2πihm(b)σ~(0)11hm(tt0ir0)dt.

Similarly, for the Laplace single layer potential

(39) amr0m|b|2πmhm(b)σ~(0)11hm(tt0ir0)dt,m>0.

Note that hm(z)=zm1 satisfies all the assumptions of Lemma 1. Thus, t0=0, as a critical point of the factor

(40) ξm(t0):=|11hm(tt0ir0)dt|,

may potentially minimize |am|, though we could not establish any result about it. However, our numerical experiments are all in accordance with this claim. In Fig. 3, for some different values of r0, we have plotted ξm(t0), for m=0,,7, as functions of t0.

Refer to caption
Figure 3. Graphs of ξm(t0), for m=0,,7, as functions of t0. As it is seen, the minimum is always occured at t0=0.

Because of the linear assumption (37), one can imply that γ(t0) is almost the closest point of Γ to z. Therefore, according to the discussion above, the best position of the near part Γ with respect to the target point z is such that γ1(zc) lies near the midpoint of the preimage γ1(Γ), where zc stands for the closest point of Γ to z (see Fig. 4).

Refer to caption
Figure 4. Preimage of the panel Γ. Here, z0=γ(t0+ir0) is the expansion center. It is assumed that the panel Γ is so small that it resembles a stright segment. Thus, becasue of linear assumption (37), one can imply that γ(t0)zc, where zc is the projection of z (or z0) on Γ.
Refer to caption
Figure 5. Positions of the target point z=0.45i with respect to different near parts Γ, corresponding to different partitions of the ‘starfish’ geometry (33) .
Fig midpoint ε p Fig midpoint ε p
104 16 104 13
1 5.15 108 59 5 5.11 108 33
1012 93 1012 94
104 14 104 14
2 5.14 108 56 6 5.10 108 56
1012 93 1012 93
104 13 104 15
3 5.13 108 32 7 5.095 108 58
1012 94 1012 93
104 9 104 16
4 5.12 108 30 8 5.09 108 59
1012 92 1012 93
Table 2. Adaptive QBX for computing the Laplace double layer potential on the panel Γ of the ‘starfish’ geometry (33) with the density function σ1 and the target point z=0.45i. For each tolerance ε, the value of the parameter p at the end of [4, Algorithm 2] depends on the position of z with respect to the near part Γ. Here, we consider 6 different situations corresponding to Fig. 5. For each figure (position), the midpoint of the preimage γ1(Γ) is shown in the column ‘midpoint’. As it is seen, the smallest p always corresponds with Fig. 4, which has the closest midpoint to γ1(zc)=5.1202.

For example, consider the Laplace double layer potential on the ‘starfish’ geometry (33) with the density function σ1 and the target point z=0.45i. Let Γ be the near part of the boundary, on which adaptive QBX is applied. Depending on the partition of the boundary, position of z with respect to Γ can vary. We consider six different situations (see Fig. 5). Clearly, γ1(zc)=5.1202 is fixed in all cases because z is fixed, and it is always in front of the panel Γ. In Table 2, we have shown values of the parameter p at the end of [4, Algorithm 2] for some different tolerances ε. The midpoint of the preimage γ1(Γ) is shown in the row ‘midpoint’. It is seen that the smallest p always corresponds with Fig. 4, in which the midpoint 5.12 is closest to γ1(zc)=5.1202.

2.3.2. Helmholtz potentials

Refer to caption
Figure 6. Graphs of ξ1,m(t0) with k=0.5 and b=1, for m=0,,7, as functions of t0. As it is seen, the minimum is always occured at t0=0 for m>0.
Refer to caption
Figure 7. Graphs of ξ2,m(t0) with k=0.5 and b=1, for m=0,,7, as functions of t0. As it is seen, the minimum is always occured at t0=0 for m>0.

For the Helmholtz single layer potential, the pair

(41) (11h1,m(tt0ir0)dt,11h2,m(tt0ir0)dt)

with

(42) h1,m(z/b)=Hm(1)(k|z|)|z|mzm,h2,m(z/b)=Hm(1)(k|z|)zm|z|m

is the t0-dependent factor of the coefficient am.

Clearly, both h1,m and h2,m satisfy (c2). Note that for any fixed x, Jn(x)0 as |n| grows. Thus, for the coefficient am with larger m, the condition (c1) holds approximately, i.e., hi,m(z)¯hi.m(z¯), i=1,2.

Here again our numerical experiments shows that t0=0 is the minimizer of ξi,m(t0), for each i=1,2, where

(43) ξi,m(t0):=|11hi,m(tt0ir0)dt|,i=1,2.

In Fig. 6 and Fig. 7, for fixed k=0.5, b=1, and some different values of r0, we have plotted ξ1,m(t0) and ξ2,m(t0), respectively, as functions of t0. As it is seen, all the functions are minimized near t0=0 when m>0. As expected, the minimizer in each case approaches 0 as the index m grows.

According to the above discussion, we recommend the following strategy for partitioning of the boundary Ω with respect to the target point z. Find the minimizer t=tmin of |zγ(t)|. For a given dt>0 small enough, let Inear=[tmindt,tmin+dt] be the preimage of the near part, that means that adaptive QBX should be applied on Inear, and a traditional quadrature rule should be employed on [0,2π]Inear. It is recommended that r is set to 0.25l, where l is the length of the near part (see [17]).

3. Algorithms

Assume that an approximation of the density σ(x) is available for any x in the panel ΓΩ. According to the comments in Section Section 2, one can consider the following algorithm as a revision to [4, Algorithms 1,2]:

MAQBX. Modified adaptive QBX based on the Gauss-Legendre quadrature rules, when the panel Γ resembles a straight segment, the target point z lies in the bad annular neighborhood, and r,n are known.
m=0, κ=1
while EC(κn,m)>ε/4 do
κ=κ+1
end while
Apply the (κn)-point Gauss-Legendre rule to find a~m.
δm=a~mBmr(z,z0)
u=0
repeat
  u=u+δm
  m=m+1
  κ=1
  while EC(κn,m)>max{2m2ε,εmach} do
  κ=κ+1
  end while
  Apply the (κn)-point Gauss-Legendre rule to find a~m.
  δm=a~mBmr(z,z0)
until |δm|<ε/3
return up(z)=u and p=m1

Thus, the main algorithm for computing the layer potential (9) on the whole boundary Ω can be described by the following steps:

  1. (1)

    Find the minimizer t=tmin of |zγ(t)|.

  2. (2)

    If |zγ(tmin)| is small enough, use the following steps; otherwise use a classical quadrature rule for computing the layer potential, and stop.

  3. (3)

    For a given dt>0 small enough, set Inear:=[tmindt,tmin+dt].

  4. (4)

    Set the half-width r of the bad annular neighborhood of the boundary to r:=l/4, where l is the length of γ(t), for tInear.

  5. (5)

    Apply MAQBX to the near part Γnear:=γ(Inear), and

  6. (6)

    apply the Gauss-Legendre quadrature to the far part.

Remark 2.

In some cases, we can save some computational efforts in MAQBX. If the target point lies on the boundary, and the potential satisfies a jump condition, it is recommended that QBX should be applied with two expansion centers, say z0 and z0, on the opposite sides of the boundary and the average of the two sided values is considered (see [17, §3.2]). Also for the Helmholtz potentials, one needs to evaluated both Bmr and Bmr for each positive m. On the other hand, the following equalities hold due to Jn(x)=(1)nJn(x) and (|z|/z)m=conj(|z|/z)m:

B(m,z0) =(1)mB(m,z0)¯,
B(m,z0) =(1)mB(m,z0).

Hence, if we compute B(m,z0) for some m, we can immediately obtain B(m,z0), B(±m,z0) with no effort.

In BIM, the density function σ is unknown, but it can be approximated at any set of discrete points on the boundary Ω. Divide the boundary into M panels Γ1,,ΓM of an equal length l. Let γm:[1,1]Γm be a parametrization of Γm for m=1,,M, and consider the roots t1,,tn of the Legendre polynomial of degree n for some integer n1. The set of Mn Gaussian points γm(tj), m=1,,M, j=1,,n, on the boundary form the so-called underlying grid. In adaptive QBX (either the one proposed in this paper or in [4]) the density σ must be unsampled even to a finer grid. For this purpose, as proposed in [4], we use the Lagrange interpolation at the underlying grid. More precisely, for computing σ(x), where x lies on the panel Γm, we use the Lagrange interpolation of σ~:=σγm at t1,,tn. Note that in the main algorithm above, a near part Γ may be different from all Γm (see Fig. 8). However, the computational cost is not affected by whether the near part coincides with a panel of the underlying grid or not because the density should be resolved at finer grids anyway.

Refer to caption
Figure 8. A partition of the ‘starfish’ geometry (33) into 20 panels of an equal length h (the blue dots), and the near part (the red segment) corresponding to the target point located at the red asterisk. The distance of the target point to the curve is less than h/4. The red dot on the curve, is located at γ(tmin), and the interval [tmin0.2,tmin+0.2] is the preimage of the near part. In this example, the near part does not coincide with any panel of the partition.

4. Numerical experiments

In this section, we carry out some numerical experiments by our desktop PC111Intel Core i7-7700 CPU with the clock speed of 3.60 GHz with 32 GB of RAM in order to illustrate efficiency of MAQBX.

4.1. Laplace layer potential evaluation

Consider the Laplace double layer potential on the ‘starfish’ geometry (33) with the density function σ1. The exact value of the potential is 1 for any target point in the interior domain. As target points, consider a 500×500 grid of a small region near the boundary. In the main algorithm, we choose dt=0.1 for each target point, resulting the near part to be always connected. For each target point, we apply MAQBX with n=16 to the near part, and the 256-point Gauss-Legendre rule to the far part of the boundary with the tolerances ε=104,108,1012 (see Fig. 9 for the absolute error).

Refer to caption
Figure 9. Error of MAQBX with n=16 and ε=104,108,1012 from left to right. The algorithm is applied to the Laplace double layer potential with the density σ1 on the ‘starfish’ geometry (33). The target points are defined by a 500×500 grid of a small region near the boundary. For the far parts, the 256-point Gauss-Legendre rule is employed.

4.2. Comparison to AQBX

Here, we consider the CPU run-time consumed in implementation of the previous numerical experiment. For twelve target points, selected randomly close to the boundary (see Fig. 11), we implement adaptive QBX of [4] and Algorithms 1 and 2 proposed in this paper. We run each Matlab code 10 times and consider the average of the run-times. In Fig. 10, we compare performance of adaptive QBX with MAQBX. For each algorithm, we plot the relative error as a function of CPU run-time in seconds. As it is seen, MAQBX converges faster than adaptive QBX of [4] in general.

Refer to caption
Figure 10. Comparison of adaptive QBX of [4] with MAQBX on the ‘starfish’ geometry (33). Each algorithm is applied to the Laplace double layer potential with the density σ1 at a random target point close to the boundary. Each panel corresponds with a single target point. The positions of the target points are depicted in Fig. 11. The relative error is plotted as a function of the run time in seconds.
Refer to caption
Figure 11. The sample target points of Fig. 10.

4.3. Solving a source point scattering problem

Before computing a layer potential, one should approximate the density function σ by solving the corresponding boundary integral equation. A more challenging task for adaptive QBX is thus in the context of solving boundary integral equations in which the target points lies on the boundary. In summary, we find a Nyström approximation of σ at an underlying grid on the boundary. Then, we use an accurate interpolation to approximate σ at a finer grid employed in adaptive QBX for computing the layer potential.

For the wave number k=0.5, consider the Helmholtz exterior problem induced by six source points located in the interior of the ‘starfish’ geometry (33). We apply the boundary integral method with the combined field representation

(44) u=Dkσ+ik2Skσ,

where Sk and Dk are the Helmholtz single layer and double layer potentials, respectively. As the underlying grid, we divide the boundary into 50 panels of equal length and consider 16 Gauss-Legendre points in each panel. We apply the Nyström method to the corresponding boundary integral equation

(45) (12I+Dk+ik2Sk)σ=f,

where f is the Dirichlet data induced by the source points. Then, we use the Lagrange interpolation at the underlying grid to obtain an approximation of the density function. In order to solve the Nyström system, we use GMRES with the matrix-vector product carried out by MAQBX with n=16 and ε=1012. The algorithms with the same parameters are then applied to compute the layer potential as the solution of the source-point problem (see Fig. 12 for the absolute errors). The near part for each target point is bounded in a parameter interval of length 0.02, and the 512-point Gauss-Legendre rule is applied to the far part.

Refer to caption
Figure 12. Error of MAQBX with ε=1012, applied to the Helmholtz Dirichlet problem with the wave number k=0.5 and Dirichlet data induced to six source points (‘+’) in the interior of the ‘starfish’ geometry (33).

4.4. Higher wavenumbers

Here, we repeat the previous experiment, now for the higher wavenumbers k=10,20 and ε=108. The near part for each target point is bounded in a parameter interval of length 0.05. Other parameters of the algorithm remains the same as in Section 4.3. The results (Fig. 13) show that MAQBX is still practical for scattering problems with higher wavenumbers. The same observation has been reported in [4] for AQBX.

Refer to caption
Refer to caption
Figure 13. Error of MAQBX with ε=108, applied to the Helmholtz Dirichlet problem with the wave number k=10,20 and Dirichlet data induced to six source points (‘+’) in the interior of the ‘starfish’ geometry (33).

5. Conclusions

Adaptive QBX is a robust and accurate tool for computing layer potentials at target points near or on the boundary. In this paper, we have modified the main structure of Algorithms 1,2 of [4] in order to obviate the need to compute extra coefficients am, which never appear in the truncated expansion of the potential. The modified AQBX is more rapid than AQBX of [4] in practice.

Acknowledgment

The author would like to thank Alex Barnett, Ludvig af Klinteberg, and Anna-Karin Tornberg for many valuable discussions.

References