A fast solver for the narrow capture and narrow escape problems in the sphere

We present an efficient method to solve the narrow capture and narrow escape problems for the sphere. The narrow capture problem models the equilibrium behavior of a Brownian particle in the exterior of a sphere whose surface is reflective, except for a collection of small absorbing patches. The narrow escape problem is the dual problem: it models the behavior of a Brownian particle confined to the interior of a sphere whose surface is reflective, except for a collection of small patches through which it can escape. Mathematically, these give rise to mixed Dirichlet/Neumann boundary value problems of the Poisson equation. They are numerically challenging for two main reasons: (1) the solutions are non-smooth at Dirichlet-Neumann interfaces, and (2) they involve adaptive mesh refinement and the solution of large, ill-conditioned linear systems when the number of small patches is large. By using the Neumann Green's functions for the sphere, we recast each boundary value problem as a system of first-kind integral equations on the collection of patches. A block-diagonal preconditioner together with a multiple scattering formalism leads to a well-conditioned system of second-kind integral equations and a very efficient approach to discretization. This system is solved iteratively using GMRES. We develop a hierarchical, fast multipole method-like algorithm to accelerate each matrix-vector product. Our method is insensitive to the patch size, and the total cost scales with the number N of patches as O(N log N), after a precomputation whose cost depends only on the patch size and not on the number or arrangement of patches. We demonstrate the method with several numerical examples, and are able to achieve highly accurate solutions with 100,000 patches in one hour on a 60-core workstation.


Introduction
We consider the numerical solution of two related problems which arise in the study of Brownian diffusion by a particle in the exterior or interior of a porous sphere. We denote the open unit ball centered at the origin in R 3 by Ω, and assume that the sphere ∂Ω is partially covered by N small patches of radius ε, measured in arclength (Fig. 1). For the sake of simplicity, we assume that the patches are disk-shaped and comment briefly on more general shapes in the conclusion.
The union of the patches is referred to as the absorbing boundary and denoted by Γ A . The remainder of the boundary, Γ R = ∂Ω\Γ A , is referred to as the reflecting boundary. The first problem, called the narrow capture problem, is to calculate the concentrationū(x), at equilibrium, of Brownian particles at x ∈ R 3 \Ω with a given fixed concentration far from the origin, assuming that particles are absorbed (removed) at Γ A . The second problem, called the narrow escape problem, is to calculate the mean first passage time (MFPT) in Ω, namely the expected timev(x) for a Brownian particle released at x ∈ Ω to first reach Γ A . In both settings, particles are reflected from Γ R . In this paper, we sometimes refer to the narrow capture problem as the exterior problem, and the narrow escape problem as the interior problem. These problems have received quite a lot of attention in the mathematics and biophysics communities since the seminal work of Berg and Purcell [1]. We do not seek to review the biophysical background here, Figure 1: A sphere partially covered by disk-shaped patches. We assume each patch is of radius ε. We also assume that distinct patches are separated by a distance of at least ε. In the figure, this means that the regions bounded by the dashed lines do not overlap. but note that the absorbing patches serve as a simplified model for either surface receptors (the capture mechanism) or pores (the escape mechanism) in an otherwise impermeable membrane. We refer the reader to [1,2,3,4,5,6,7] for more detailed discussions of applications and a selection of work on related biophysical models.
Standard arguments from stochastic analysis show that bothū andv satisfy a Poisson equation with mixed Dirichlet-Neumann boundary conditions [8,9]. More precisely, for the capture problem, if the far-field particle concentration is set to be 1, thenū satisfies the exterior Laplace equation: A scalar quantity of interest is the total equilibrium flux J of particles through Γ A : This is sometimes referred to as the capacitance of the system (see Remark 1). For the escape problem, the MFPTv satisfies the interior Poisson equation: Here, the quantity of interest is the average MFPT µ -that is the average, over all possible initial particle positions, of the expected time to escape from Ω through Γ A : Here, and in the remainder of the paper, ∂ ∂n refers to the derivative in the outward normal direction; n points towards the interior of Ω for the exterior problem, and towards the exterior of Ω for the interior problem. In order to understand how the distribution of absorbing patches on the surface affectsū(x),v(x) and the associated quantities J and µ, a variety of asymptotic and numerical methods have been developed (see [1,10,11,12,13,4,5] and the references therein).

Remark 1
The total flux J defined in (2) is sometimes referred to as the capacitance because of a connection to electrostatics. Imagine that the ball Ω is a dielectric with low permittivity, and that Γ A is a collection of perfectly conducting patches on its surface, connected by infinitesimally thin wires so that they act as a single conductor. Suppose also that this object is surrounded by a dielectric with high permittivity and that the outer dielectric is enclosed by an infinitely large perfectly conducting sphere, with a unit voltage drop from the outer conductor to the conducting patches. Then, letting the ratio of the permittivity of the outer dielectric to that of the inner dielectric approach ∞, the electrostatic potential outside Ω satisfies (1), and the electrostatic capacitance of the system is given by J.
Given an arrangement of patches, we present here a fast, high-order accurate numerical scheme for the evaluation ofū, J,v, and µ, of particular use when N is large and ε is small. Such computations are numerically challenging, partly because solutions of elliptic boundary value problems of mixed type are singular near Dirichlet-Neumann interfaces [14,15]. Direct discretization, using either PDE-based methods or integral equation methods, would require many degrees of freedom to resolve the singularities inū andv. Further, the resulting linear systems would be large and ill-conditioned, especially in cases involving large numbers of small patches.
The formulation presented here is well-conditioned, is nearly identical for the capture and escape problems, and suffers no loss in accuracy or increase in computational cost as ε is decreased. To make large-scale problems practical, we have developed a fast algorithm, so that the cost per GMRES iteration [16] is of the order O(N log N ), rather than O(N 2 ). Our method involves the following ingredients: • We make use of the Neumann Green's functions for the interior and exterior of the sphere to recast (1) and (3) as first-kind integral equations for a density σ on Γ A .
• Given a patch radius ε, we precompute the solution operator for the corresponding one-patch integral equation, assuming smooth Dirichlet data which is expanded in a rapidly converging series of Zernike polynomials. We analytically incorporate a square root singularity in the induced density at the Dirichlet/Neumann interface.
• To solve the many-patch integral equation, we use the solution operator for the one-patch integral equation as a block-diagonal "right preconditioner". This yields a second-kind Fredholm system of equations which, upon discretization, is well-conditioned and has a small number of degrees of freedom per patch.
• We solve the resulting linear system by iteration, using GMRES, and accelerate each matrix-vector product by means of a fast algorithm modeled after the fast multipole method (FMM). The fast algorithm uses the interpolative decomposition [17] to derive a compressed representation of the outgoing field induced by the density on a patch, a hierarchical organization of patches into groups at different length scales, and a spectral representation of the smooth incoming field due to densities on distant patches.
Though most of the past work on the narrow capture and narrow escape problems is based on asymptotics, we wish to highlight the numerical work of Bernoff and Lindsay, who also proposed an integral equation method for the narrow capture problem for the sphere and the plane based on the Neumann Green's function [12]. Our approach to discretization shares several characteristics with theirs: both methods incorporate a square root singularity into the density on each patch analytically, and both use a representation in terms of Zernike polynomials for smooth Dirichlet data on each patch.
The paper is organized as follows. In Section 2, we introduce the analytical framework for our method, reformulate the boundary value problems as first-kind integral equations using single layer potentials, and explain how to calculate the scalar quantities J and µ directly as functionals of the layer potential densities. In Section 3, we show how to transform the first-kind integral equations into Fredholm equations of the second-kind, using the solution operator for the one-patch integral equation as a preconditioner. In Sections 4, 5, and 6 we describe our discretization approach for the full system of equations, and in Section 7 we introduce the technical tools involved in our fast algorithm. In Section 8 we describe the full method, including our fast algorithm to accelerate the application of the system matrix. In Section 9, we provide a detailed description of the solver for the one-patch integral equation. We demonstrate the performance of the method with numerical experiments in Section 10.

Analytical setup
Our approach to solving the exterior and interior problems (1) and (3) uses a representation of each solution as an integral involving the corresponding Neumann Green's function. This representation leads to an integral equation, and the scalar quantity of interest -J or µ -can be calculated directly from its solution.

Neumann Green's functions for the sphere
Let us first consider the exterior Neumann problem: Here Ω is a bounded domain, and g a given continuous function on ∂Ω. This problem has a unique solution, and if Ω is the unit ball in R 3 , it may be obtained using the exterior Neumann Green's function G E (x, x ), which is known analytically [18,19]. G E is symmetric, and satisfies with G E (x, x ) = O |x| −1 as |x| → ∞ for fixed x ∈ R 3 \Ω. It can be shown, using Green's second identity, that solves the exterior Neumann problem (6). When x ∈ ∂Ω, G E is given explicitly by If, in addition, x ∈ ∂Ω, then The interior Neumann problem is given by where Ω is a bounded domain and g is a continuous function defined on the boundary, with the additional constraint that g must satisfy the consistency condition ∂Ω g dS = 0.
This problem has a solution which is unique up to an additive constant. The consistency condition precludes the existence of an interior Green's function with zero Neumann data. Rather, for Ω the unit ball in R 3 , we have an interior Neumann Green's function G I (x, x ), also known analytically [18,19]. It is again symmetric and satisfies As before, solves the interior Neumann problem (11). When x ∈ ∂Ω, G I is given by If, in addition, x ∈ ∂Ω, this reduces to This is the same as (10) except for the sign of the second term. In other words, the restrictions of the interior and exterior Green's functions to the boundary ∂Ω are nearly identical.
The following lemma, which we will require in the next section, follows from the second property in (12) and the symmetry of G I .

Lemma 1 Let
Γ be an open subset of ∂Ω and let σ be continuous on Γ. Then for x ∈ ∂Ω\Γ,

The narrow capture problem
We turn now to the narrow capture problem, which is the simpler of the two. We first modify the BVP (1) by defining u = 1 −ū, so that solutions decay as |x| → ∞. The function u satisfies the modified equations Let us denote the unknown Neumann data on Γ A by σ(x ). Then (8) implies that for x ∈ R 3 \Ω, we have By analogy with classical potential theory, we refer to this as a single layer potential representation with density σ supported on Γ A . Since the dominant singularity of the kernel G E is that of the free-space Green's function for the Laplace equation, this single layer potential is continuous up to ∂Ω. Taking the limit as x → Γ A and using the second condition in (16), we obtain the first-kind integral equation where f (x) ≡ 1, with the weakly singular kernel G E . Assuming that we can solve (18) for σ, it follows that u(x), given by (17), is the solution to (16), and thatū = 1 − u solves (1). Furthermore, since σ ≡ ∂u ∂n ≡ − ∂ū ∂n on Γ A , the total flux J from (2) will be given by where we have introduced the shorthand We will not prove the existence of a solution to (18), but sketch a possible approach. If we replace the kernel G E in (18) with its first term 2 |x−x | , which is the free-space Green's function for the Laplace equation (up to a constant scaling factor), we obtain the first-kind integral equation for the Dirichlet problem on an open surface, which we can denote in operator form by This is a well-studied problem, which has a unique solution in the Sobolev space H − 1 2 (Γ A ) given data in H 1 2 (Γ A ) [20]. Writing the full single layer potential operator in the form S 0 + K, where K is a compact pseudodifferential operator of order −2, we may rewrite (18) in the form of a Fredholm integral equation of the second kind: Thus, to prove existence and uniqueness for the single patch equation, one can apply the Fredholm alternative to (20). That is, one need only show that the homogenous version of the single patch equation has no nontrivial solutions. This is straightforward to prove when ε is sufficiently small, since the norm of K goes to zero as ε goes to zero and the corresponding Neumann series converges. We conjecture that the result holds for any ε.

The narrow escape problem
The analytical formulation of the narrow escape problem is somewhat more complicated than that of the narrow capture problem, largely because of the non-uniqueness of the interior Neumann problem, but it leads to a similar integral equation. We first recast the Poisson problem (3) as a Laplace problem with inhomogeneous boundary conditions. Assume that v satisfies for some non-zero constant D. Thenv given bȳ solves (3). We will therefore seek a method to produce a solution of (21) for some D = 0.
where σ satisfies the first-kind integral equation Then v solves (21) with D = −I σ , for I σ defined as in (19), and I σ = 0.
Proof: The function v(x) is harmonic in Ω, and by Lemma 1, it satisfies the third condition of (21) with D ≡ −I σ , as long as I σ = 0. Taking x to Γ A and using the continuity of the single layer potential up to Γ A , we find that v will satisfy the second condition of (21) as long as σ satisfies (24). It remains only to show that if σ satisfies (24), then I σ = 0. If not, then v given by (23) satisfies (21) with D = 0, as does the constant function 1. It follows from Green's identity that solutions to (21) with the same value of D are unique, so we must have v ≡ 1. The formula (14) for G I shows that if |x | = 1, then The question of the existence of a solution to (24) is analogous to that for (18), which was discussed in Section 2.2.
To calculate the average MFPT µ directly from σ, we plug (22) into (5) to obtain To calculate 1 |∂Ω| ∂Ω v dS, we use the representation (23): A calculation using the explicit form (15) of G I gives for any x ∈ ∂Ω. We therefore have 1 Plugging this into (25) and replacing D by −I σ gives

A multiple scattering formalism
We have shown that the solutions of the two boundary value problems of interest, as well the associated scalars J and µ, may be obtained by solving (18) and (24), respectively, on the collection of absorbing patches. These integral equations differ only by the sign of one term in their respective kernels, as seen in Section 2.1. Since our treatment of the two cases is the same, we drop the subscripts on G E and G I , and discuss the solution of For the sake of simplicity, we assume that each patch has the same radius ε. We also assume that the patches are well-separated, in the sense that the distance between the centers of any two patches in arc length along the surface of the sphere is at least 3ε. That is, any two patches are separated by a distance greater than or equal to their own radius. For x ∈ Γ i , we define S ij by More specifically, we define each such operator in a coordinate system fixed about the center of Γ j . Since all the patches have the same radius, the operators S ii are therefore identical, and we denote S ii by S. Thus we may rewrite the many-patch integral equation (27) in the form The aim of this section is to reformulate (28) as a Fredholm system of the second kind in an efficient basis.
Definition 1 Let f be a smooth function on some patch Γ i . The one-patch integral equation with data f is defined by where σ i is an unknown density on Γ i .

Remark 3 Writing (28) in the form
and observing that S ij σ j is a smooth function for Γ j well-separated from Γ i , we see that each σ i satisfies a one-patch integral equation with smooth data. Conversely, if σ 1 , . . . , σ N satisfy (28), then each Sσ i is smooth on Γ i .
It is convenient to make use of an orthonormal basis {q 1 , q 2 , . . . } of smooth functions on each patch, so that for smooth f on Γ i we have in the usual L 2 sense, withf We postpone until Section 4 a discussion of our particular choice of the basis {q n }, which will be constructed using Zernike polynomials. We will denoted byf K the vector of the first K coefficients: Definition 2 Let f be a smooth function on Γ defined by (30), withf ,f K computed as above. The projection operators P and P K are defined by with P K defined in the same manner for n ≤ K. The synthesis operators Q and Q K are defined by f n q n (x).
P and P K are left inverses of Q and Q K , respectively. Finally, we define b n to be the solution of the one-patch integral equation with data given by the basis Thus, if a smooth function f on Γ i is expanded as f = ∞ n=1f n q n , then the solution of the one-patch integral equation with data f is given by This motivates the following definition. Definition 3 We denote the solution operator of the one-patch integral equation in the basis {q n } by We denote the solution operator of the one-patch integral equation in the truncated basis {q n } K n=1 by Note that the construction of B requires solving the one-patch integral equations with data q 1 , q 2 , . . . to obtain b 1 , b 2 , . . ., and that the construction of B K requires solving the first K of these equations. For a fixed patch radius ε, these solutions are universal and do not depend on the number or arrangement of patches in the full problem.
Given B, we are now able to rewrite the integral equation (28) as a well-conditioned Fredholm system of the second kind in the basis {q n }. On Γ i , we define a function f i by Substituting into (28), we have To transform to the basis {q n }, we write f i in the form f i = Qf i and multiply on the left by P to obtain Since the patches Γ i and Γ j are well-separated, PS ij B is a compact operator for i = j, so that (32) is a Fredholm system of the second kind. The corresponding truncated system takes the form where we have used the approximation f i ≈ Q Kf K i .

Remark 4
We refer to the approach described above as a multiple scattering formalism by analogy with the problem of wave scattering from multiple particles in a homogeneous medium. In the language of scattering theory, one would say that for the ith patch, the boundary data is the known data (Sσ i = 1), perturbed by the potential "scattered" from all other patches, namely N j =i S ij σ j . Solving the system (28) corresponds to determining how the collection of uncoupled single patch solutions Sσ i = 1 needs to be perturbed to account for the "multiple scattering" effects.
The approach developed above, where f i = Sσ i are the unknowns, has many advantages over solving (28) directly, even with S −1 as a left preconditioner. By working in the spectral basis, we avoid the need to discretize σ i on each patch, the number of degrees of freedom per patch is significantly reduced, and the linear system is a well-conditioned Fredholm equation of the second kind.

Remark 5
The original unknowns σ i may be recovered from the solution of (32) or (33) using the formula Thus, we may think of the unknownsf i as a representation of the unknown density σ i in the basis {b n }.
We turn now to the construction of an orthonormal basis {q n } for smooth functions on a patch, the construction of the singular solutions b n = S −1 q n , and the efficient solution of the discretized multiple scattering system (33).

A basis for smooth functions on a patch
It is well-known that the Zernike polynomials are a spectrally accurate, orthogonal basis for smooth functions on the disk. For a thorough discussion of these functions, we refer the reader to [21]. Here, we simply summarize their relevant properties.
The Zernike polynomials on the unit disk 0 ≤ r ≤ 1, 0 ≤ θ < 2π are given by where P α,β n (x) is a Jacobi polynomial on [−1, 1]. The Jacobi polynomials are orthogonal on [−1, 1] with respect to the weight function (1 − x) α (1 + x) β . Thus, for fixed m, the functions R m n (r) are orthogonal on [0, 1] with respect to the weight function r. This gives the orthogonality relation The natural truncation of this basis is to fix a cutoff mode M in both the radial and angular variables, and to let 0 ≤ m ≤ n ≤ M . This yields K = (M + 1)(M + 2)/2 basis functions. To use this basis on a generic patch Γ i , we define a polar coordinate system (r, θ) about the patch center, for which r is the distance in arc length along the sphere from the center, and θ is the polar angle. We rescale the radial variable from [0, 1] to [0, ε], transforming the Zernike polynomials to functions on Γ i . Finally, the basis functions q 1 , . . . , q K discussed in Section 3 can be defined as the scaled Zernike polynomials up to mode M . ¿From the orthogonality relation (35), the projection operators P and P K are obtained as normalized inner products against Zernike polynomials in polar coordinates. This Zernike transform can be implemented numerically using a tensor product quadrature with a Gauss-Legendre rule in the radial variable and a trapezoidal rule in the angular variable. The number of grid points required to obtain the exact Zernike coefficients of a function in the space spanned by q 1 , . . . , q K is O(K); we denote this number by K * . We refer to these points as the Zernike sampling nodes x z 1 , . . . , x z K * (see [21] for further details). (33) in the form

Remark 6 Rewriting
we see that the truncation error compared with (32) depends on how well the smooth function is represented in the space spanned by q 1 , . . . , q K . In the one-patch case, the summation term vanishes, and K = 1 is sufficient. For multiple patches, the choice of K depends largely on how well-separated the patches are. Since the Zernike basis is spectrally accurate, M grows only logarithmically with the desired precision.
In practice, a posteriori estimates are easily obtained for any fixed configuration by inspection of the decay of the Zernike coefficientsf K i in the computed solution.

Informal description of the one-patch solver
While the details of our solver for the one-patch integral equation are deferred to Section 9, we outline the general approach here. First, we note that in the absence of curvature (i.e. a flat disk on a half-space) and with the associated terms of the Green's function removed, the solution σ i is known to have a square root singularity at the disk edge [12,14,15,20,22]. In our case, we will explicitly include this square root singularity in the representation of σ i , but also allow for weaker singularities -which we have observed and will demonstrate in Section 9.3 -by using a discretization that is adaptively refined toward the edge ∂Γ i . Assume then that we have discretized the patch Γ i using a suitable polar mesh with n f fine grid points, denoted by x f i,1 , . . . , x f i,n f . The fine grid points for different patches are identical relative to the coordinate systems of their own patches. We denote the corresponding samples of the right-hand side f and σ i by We assume that S is discretized to high-order accuracy by a matrix S with so that the discretized system takes the form We will also require a set of quadrature weights, denoted by w f 1 , . . . , w f n f and identical for each patch, that permit the accurate integration over Γ i of the product of an arbitrary smooth function with the discretized density σ i , taking into account the fact that σ i has an edge singularity. That is, we assume that for any smooth g, with high-order accuracy. In the next section, we will use this quadrature to discretize the operators S ij .
The solutions of the K one-patch integral equations (31) may be obtained in a precomputation, after which we have access to the functions b 1 , . . . , b K sampled on the fine grid. We assemble these functions into an . B is then the discretization of the operator B K , mapping the first K Zernike coefficients of a smooth function to the solution of the corresponding one-patch integral equation sampled on the fine grid. If we denote by Q the discretization of the synthesis operator Q K as an n f × K matrix, then we have, as in Definition 3, SB = Q.
In short, the precomputation amounts to solving this matrix system for B.
6 Discretization of the multiple scattering system We return now to the multiple scattering system (33). The unknowns on Γ i are defined in the truncated Zernike basis asf K i . We will need as intermediate variables the fine grid samples of σ i (x). From Remark 5, we define the sampling vector σ i by and use the quadrature (39). This yields Setting x = x z i,k to be the kth Zernike sampling node on Γ i , we define the matrix S ij by Thus, S ij maps a density sampled on the fine grid on Γ j to the smooth field it induces at the Zernike sampling nodes on Γ i . Lastly, we discretize the truncated Zernike transform P K as a K × K * matrix P using the trapezoidal-Legendre scheme described in Section 4.

Definition 4
The discrete Zernike transform P is defined to be the mapping of a smooth function sampled on the K * Zernike sampling nodes to its K Zernike coefficients.
We can now write the multiple scattering system (33) in a fully discrete form, where 1 is the vector of length K * with all entries equal to 1. Since P ∈ R K×K * , S ij ∈ R K * ×n f , and B ∈ R n f ×K , this is a linear system of dimensions KN × KN , with K << n f degrees of freedom per patch. As a discretization of a Fredholm system of the second kind, it is amenable to rapid solution using an iterative method such as GMRES [16]. We now describe how to calculate the constants J and µ from the solution of (41). We saw in Sections 2.2 and 2.3 that these can be computed directly from I σ = N i=1 Γi σ i dS. Using the fine grid quadrature (39), we have Since we may precompute the row vector I := (w f 1 , . . . , w f n f )B of length K, the cost to compute I σ is O(N K).
When the system (41) is solved iteratively, each matrix-vector product is dominated by the computation of the "multiple scattering events" P j =i for i = 1, . . . , N . That is, for each patch Γ i , we must compute the Zernike coefficients of the field induced on that patch by the densities on all other patches. Note that if we were to calculate the above sums by simple matrix-vector products, the cost would be O(n f KN 2 ). We turn now to the description of a scheme that permits the computation of these sums using O(KN log N ) operations, with a constant which depends only on the desired precision, but not on n f .

Efficient representation of outgoing and incoming fields
Our fast algorithm relies on what is variously referred to as a compressed, skeletonized, or sparsified representation of the far field induced by a source density σ i on a single patch Γ i (Fig. 5). We define the far field region Θ i for a patch Γ i to be the set of points whose distance from the center of Γ i (measured in arc length along the surface of the sphere) is greater than 2ε. In light of our restriction on the minimum patch separation distance, this ensures that the far field region of a particular patch contains every other patch.
Γ i Θ i Excluded region Figure 5: For a patch Γ i , the far field region Θ i is defined as the complement on the surface of the sphere of a disk of radius 2ε, measured in arclength, about the center of Γ i . The black dots in the figure represent the subset of the fine grid points used to efficiently represent the outgoing field induced by the density σ i .
We start from (40), which was used to define the matrix S ij . We will show that there is a subset of p fine grid points with p << n f and modified source strengths for any x ∈ Θ i . Moreover, there is a stable algorithm for obtaining this compressed or skeletonized outgoing representation. Here, π(m) is an indexing function which maps {1, . . . , p} → {1, . . . , n f }, and identifies which of the original fine grid points are used in the representation. The number p represents the numerical rank, to a specified precision, of the n f functions {G(x, x f i,l )} on Θ i . Remark 7 The existence of such low-rank factorizations is discussed in detail in [23,24,25]. For the purposes of computation, we will use the interpolative decomposition (ID) [17,23,26], described briefly below. The ID and related compression schemes are essential and widely used in hierarchical, fast algorithms for applying and inverting dense matrices (see for example [27,28,29,30,31,32,33,34,35,36] and the references therein).

The interpolative decomposition
We consider a generic patch Γ i and, for simplicity, drop the patch index i on all quantities. We first discretize Θ on a training grid x t 1 , . . . , x t nt of n t points chosen to be sufficiently fine to accurately represent smooth functions on Θ. We can then obtain a matrix A of size n t × n f , with entries A jl = G(x t j , x f l ), so that the lth column of A is a discretization of the function G(x, x f l ) on the training grid. Given a user-specified tolerance , the ID takes as input a matrix A, and returns the factorization AΠ with where A is n t × p and Π is p × n f . The parameter p is the numerical rank of A determined by the ID as part of the factorization. The columns of A are a p-column subset of the original matrix A, chosen so that the column space of A approximates that of A. The matrix Π contains the coefficients needed to approximately reconstruct the columns of A from those of A. If we define the indexing function π so that the mth column of A is the π(m)th column of A, then the approximation (45) implies that . . , n f . Since the columns of A represent the functions {G(x, x f l )} on a fine training grid, the expression above holds not just for x ∈ {x t j }, but more generally for x ∈ Θ. That is, Summing both sides of this expression against ( σ) l w f l and rearranging yields where W is a diagonal n f × n f matrix with W ll = w f l . Since σ = Bf K , we let T := ΠW B to obtain the representation (44) with ρ = Tf K .
T is a generic p × K matrix which may be formed and stored once Π, W , and B are available. We emphasize that each of these matrices is identical for all patches of a given radius ε and may therefore be precomputed. Π is obtained from a single interpolative decomposition, W is a simply a matrix of quadrature weights, and B is computed by solving a sequence of one-patch integral equations as explained in Section 5. Using this compression scheme alone, it is straightforward to reduce the cost of computing the sums (43) from O(Kn f N 2 ) to O(KpN 2 ). The tools introduced in the remainder of this section will allow us to reduce the cost further to O(KpN log N ).

Quadtree on the sphere
We now describe a data structure which will enable us to organize groups of patches in a hierarchical fashion. We first inscribe the sphere in a cube (see Fig. 6). We then project each patch center onto the surface of the cube via the ray from the origin through the patch center (indicated by the arrows in the figure). This defines a set of points on the surface of the cube. We then build a quadtree on each face of the cube, subdividing boxes until there is only one point per box, and pruning empty boxes in the process. The union of these six quadtrees is an FMM-like full tree data structure, which provides a subdivision of the sphere itself into a hierarchy of levels. The patches assigned to a particular box in the full tree will be said to form a patch group. Each patch is a member of one patch group at each level of the full tree. At the leaf level, each group consists of a single patch. We define parent, child, and neighbor boxes in the full tree in the same way as in an ordinary quadtree. The only modification to the definition of a neighbor box is that it wraps across cube edges and corners. Thus, a box adjacent to an edge has eight neighbors (like an interior box) unless it is a corner box, in which case it has seven neighbors. Well-separatedness and the interaction list for boxes or their corresponding patch groups are define as in the usual FMM. Two boxes at a given level are well-separated if they are not neighbors, and the interaction list for a particular box is comprised of the well-separated children of its parent's neighbors. We will sometimes refer to a patch Γ i as being in the interaction list of some patch group γ, by which we mean that Γ i is contained in a group which is in the interaction list of γ. Figure 6: The sphere is inscribed in a cube and each patch center is projected to a face of the cube by a ray emanating from the sphere center (left). An adaptive quad tree is then built on each face until, at the finest level, there is one patch in every non-empty leaf node in the quad tree (right).

The representation of incoming fields on patch groups
Since the incoming field due to remote source patches in the interaction list of a patch group γ is smooth, it can be efficiently represented on a spectral polar grid (see Fig. 7). This requires the construction of a bounding circle on the surface of the sphere, enclosing all of the patches in γ, which circumscribes the grid. Incoming field values can then be obtained at arbitrary points inside the bounding circle by interpolation. We refer to the grid samples of the incoming field as an incoming representation. The bounding circle is straightforward to construct using a "smallest circle algorithm" for a collection of points in the plane, suitably adapted to the sphere (see [37,38,39] and the references therein for discussion of the smallest circle problem). Given a bounding circle for a patch group, we can build a local polar coordinate system (r, θ), for which r = 0 corresponds to the center of the patch group, and r = R corresponds to the bounding circle. We must select an incoming grid in these coordinates which can represent a smooth incoming field in a high order manner with as few grid points as possible. For this, we will use a parity-restricted Chebyshev-Fourier basis, formed by taking products of scaled Chebyshev polynomials in the radial variable r ∈ [−R, R] with trigonometric functions in the angular variable θ ∈ [0, 2π). The coefficients of an expansion in these basis functions corresponding to Chebyshev and Fourier modes of different parity can be shown to be zero, hence the name of the basis. This is an efficient and spectrally accurate basis with a simple associated grid [21]. Namely, the coefficients of the expansion may be computed from function samples on a polar grid comprised of the scaled Chebyshev nodes in r ∈ [0, R] and equispaced nodes in θ ∈ [0, 2π). The desired field may then be evaluated at any point inside a patch group's bounding circle by evaluating the resulting Chebyshev-Fourier expansion. It is straightforward to verify that the number of grid points and coefficients required to obtain an accuracy is O(log 2 (1/ )).

Solution of the multiple scattering system
We now describe our method to solve the discretized many-patch system (41), including the fast algorithm for accelerating the computation of the multiple scattering interactions (43) within a GMRES iteration.
Step 1: Precomputation (for each choice of ε) Given the patch radius ε, select the Zernike truncation parameter K and form the matrix Q.
(a) Solve the system SB = Q described in Section 9.
(b) Construct the matrix T defined in Section 7.1 by building and composing the matrices Π, W , and B. Π need not be stored after T is formed.
(c) Construct the vector I = (w f 1 , . . . , w f n f )B, used to obtain the quantities J and µ in (42). At this point we no longer need to store B, only the p × K matrix T and the 1 × K vector I. The storage associated with the outputs of the precomputation phase is therefore negligible.
Step 2: Construction of hierarchical data structure Let N denote the number of patches on the surface of the sphere, assumed to satisfy the the minimum patch separation condition introduced in Section 3.
(a) Form the quadtree on the sphere described in Section 7.2. The data structure should associate each patch with its group at every level, and identify the interaction list of every patch group.
(b) For each patch group, construct the incoming grid described in Section 7.3. For each patch, construct the Zernike sampling grid described in Section 4.

Step 3: Iteration
We use GMRES to solve the system (41). At each iteration, we must apply the system matrix; that is, we must computef 2. Loop through every patch group in every level. For each patch group γ, loop through all patches in its interaction list. For each such patch Γ i , evaluate the field induced by the density on Γ i on the incoming grid of γ, using the outgoing representation (44). Add together all such field values to obtain the total incoming field on the incoming grid.
Cost: If q is an upper bound on the number of points in each incoming grid, the cost of evaluating a single outgoing representation on an incoming grid is at most qp. At each level, the outgoing representation corresponding to each patch must be evaluated on at most 27 incoming grids, since the interaction list of each patch's group at that level contains at most 27 other groups. There are approximately log 4 N levels. Therefore, the cost of this step is approximately 27qpN log 4 N .

3.
At the leaf level of the tree, each patch group γ contains a single patch, say Γ i . Though we have already evaluated the outgoing representation for Γ i on the incoming grids of all (single-patch) groups in the interaction list of γ, we now do so also for the neighbors of γ, which are also single-patch groups but are not contained in the interaction list of γ. We add these contributions to the field values already stored on the incoming grids of these neighbor patches.
Cost: Since each leaf-level single-patch group has at most 8 neighbors, the cost of this step is approximately 8qpN .
Note: For each patch Γ i , the incoming field due to every other patch has now been stored in the incoming grid of exactly one patch-group of which Γ i is a member. Indeed, every other patch is either a neighbor of Γ i at the leaf level, or it is contained in exactly one of the interaction lists of the patch groups containing Γ i .

4.
Loop through each patch group. For every patch Γ i in a group γ, evaluate the interpolant of the incoming field stored on the incoming grid of γ at the Zernike sampling nodes on Γ i .
Cost: There are O(K) Zernike sampling nodes, so the cost of each interpolation is approximately q 2 to form the interpolant and Kq to evaluate it. Each patch is a member of a single group at each level, so we must carry out approximately N log 4 N such interpolations. The total cost is therefore approximately (q 2 + Kq)N log 4 N . (For large q, this step could be accelerated with fast transform methods but q is generally too small for this to provide any significant benefit.) At this point, we have computed the field due to all other patches on the Zernike sampling grid on each patch. That is, we have computed the sums j =i S ij Bσ j for i = 1, . . . , N .
5. Apply the matrix P to the values stored on the Zernike sampling grid on each patch and addf K i to the result to obtain (47).
The total cost of each iteration is therefore O(N log N ), with asymptotic constants which involve the parameters K, q, and p associated with the resolution of smooth functions on spectral grids. The singular character of the problem is dealt with entirely during the precomputation phase.

Optimizations and parallelization
While the algorithm described above has the desired computational complexity, there are several practical considerations that are worth discussing to optimize its performance.
Selection of incoming grid parameters: Rather than making a uniform choice of the radial and azimuthal truncation parameters for the incoming grid, we can compute these adaptively as follows. For each patch group γ, we determine the distance from its bounding circle to the nearest patch in its interaction list. We then adaptively construct an incoming grid which accurately interpolates a collection of point sources G(x, x ) at points x this distance away. This adaptive interpolation is carried out by increasing the incoming grid truncation parameters until the last few Legendre-Fourier coefficients of the interpolant fall below some specified tolerance.
Additional compression of the outgoing representation: Instead of using the same outgoing coefficients ρ i for each level of the quadtree, we can associate with each patch a different outgoing representation for each level. Recall that the far field regions Θ i were constructed identically for each patch Γ i to be as large as possible, consistent with the minimum patch separation. This way, one could build a single generic matrix T taking a density on a patch to its outgoing representation. T was built by compressing the outgoing field due to a generic patch Γ against a grid on a generic far field region Θ. Instead, we can build one such matrix for each level of the quadtree by constructing a generic far field region for each level. Each such far field region is an annulus or disk on the surface of the sphere. For each level, it is taken to be just large enough so that for any i = 1, . . . , N , in the coordinate system of Γ i , it covers the bounding circle of every group γ containing Γ i in its interaction list at that level. Using the interpolative decomposition, we can then recompress the outgoing representation for a generic patch against training grids on each of the approximately log 4 N new far field regions. We obtain one matrix T per level, each of which has fewer rows and therefore yields fewer outgoing coefficients than the original.
Parallelization: Each step of the algorithm to compute (47) may be straightforwardly parallelized. Steps (1) and (5) are parallelized over all patches; steps (2) and (4) are parallelized over all patch groups at all levels; step (3) is parallelized over all patch groups at the leaf level.

The one-patch integral equation
In this section, we describe in detail a solver for the integral equation (29), as well as the construction of the far-field quadrature nodes x f i,1 , . . . , x f i,n f and weights w f 1 , . . . , w f n f discussed in Section 5. We assume that a patch Γ has radius ε and make use of cylindrical coordinates (r, θ, z). If we take the center of the patch to be the north pole of the sphere, then r = 0 corresponds to the z-axis, r = 0 and z = ±1 to the north and south poles, respectively, and θ = 0 to the x-axis. Following the approach of [40,41], we use the rotational symmetry of Γ to reduce the integral equation over the patch to a sequence of one-dimensional integral equations, each corresponding to a Fourier mode in the variable θ. More precisely, we denote by C the arc which generates Γ via rotation about the z-axis: C(t) ≡ (r(t), z(t)) = (sin(t), cos(t)) for t ∈ [0, ε]. In this parametrization, t is simply the arclength along the sphere.
Representing σ as a Fourier series in θ, and taking the Fourier transform of both sides of this equation, upon rearrangement, gives the following integral equation for the Fourier modes: Here G n (t, t ), σ n (t), and f n (t) are the Fourier transforms of G(r(t), r (t ), z(t) − z (t ), θ), σ(r(t), z(t), θ) and f (r(t), z(t), θ) with respect to θ. Thus, after solving the one-dimensional modal equations (48), we can recover σ(r(t), z(t), θ) from its Fourier series. Note that the Fourier series is spectrally convergent because σ(r(t), z(t), θ) is smooth as a function of θ, even though it is singular as a function of t at the edge t = ε.

Evaluation of the modal kernels
Let Then, using the formulae (10) and (15), it is straightforward to show that G n = G n for G I (x, x ). We can write |x − x | in terms of t, t andθ = θ − θ as |x − x | = 2 1 − cos(t) cos(t ) − sin(t) sin(t ) cos(θ) .
The integrands are not smooth at t = t ,θ = 0, so we must use specialized methods to evaluate each kernel. G (1) n (t, t ) is simply the cosine transform of the Coulomb kernel and arises in boundary integral equations for electrostatics on axisymmetric surfaces. In [41], an efficient evaluation algorithm is described which involves writing the modal kernel in terms of Legendre functions of half-integer order and using their associated three-term recurrence. We refer the reader to this paper for further details.
The kernel G (2) n (t, t ) is weakly singular and may be evaluated by adaptive Gaussian quadrature. However, the following formula, discovered by a combination of analytical manipulation and symbolic calculation with Mathematica, has been numerically verified for a wide range of values and is significantly faster: The integrand in the expression for G  n (t, t ) may be evaluated relatively quickly by adaptive Gaussian quadrature.

Discretization of the modal integral equations
Since (48) is a singular integral equation, care must be taken to discretize it accurately. The dominant singularity of the kernel G n (t, t ) at t = t is the logarithmic singularity of G (1) n (t, t ). An analogous classical problem is therefore the first-kind integral equation arising from the solution of the Dirichlet problem on an open arc in two dimensions by a single layer potential. Stable and accurate numerical schemes for this problem can be found, for example, in [42,43,44]. As described in [44], when the domain is the interval [−1, 1], the solution of 1 −1 log |t − s|σ(s) ds = f (t) (49) can be computed with spectral accuracy in the form σ(t) = g(t)/ (1 + t)(1 − t), where g is a smooth function whose Chebyshev coefficients depend in a simple manner on those of f . For an open arc, the corresponding integral equation can be preconditioned using the solution of (49). This procedure results in a Fredholm equation of the second kind for which the density may be represented as a Chebyshev expansion and computed stably with high order accuracy.
In the present context, the inclusion of the additional weakly singular kernels G (2) n and G n cause the singularity of σ n (t) to be more complex, but our numerical evidence suggests that there is still a dominant square root singularity at t = ε. To be more precise, if we represent σ n by near t = ε, we can investigate the effectiveness of representing g n in a basis of orthogonal polynomials. While the exact behavior of g n (t) is not understood analytically, the numerical results presented in Section 9.3 suggest that it is only mildly non-smooth. We note that there is no singularity at the endpoint t = 0, since this point corresponds to the patch center, at which there is no physical singularity.
To resolve the endpoint singularity of σ n , we discretize it on a set of panels [a 0 , a 1 ], [a 1 , a 2 ], . . . , [a m−1 , a m ] on [0, ε] which are dyadically refined towards t = ε: On each panel, except the last, σ n is represented as a Legendre series of fixed order k. Since σ n is smooth on each such panel and separated from its singularity by a distance equal to the panel length, it can be shown that this representation has an error of size O(e −k log 2 (1/ε)). This argument is widely used in handling endpoint and corner singularities in the context of boundary integral equations [45,46,47,48,49,50]. On the last panel, we analytically incorporate a square root singularity into our representation of σ n as above, and expand g n (t) = σ n (t) √ ε − t as a series of Jacobi polynomials with α = − 1 2 and β = 0. If the singularity of σ n at t = ε were exactly of square root type, this would yield a spectrally accurate representation of σ n . Instead, as we will show in Section 9.3, we obtain a representation which is finite order but resolves the solution quite well even for modest truncation parameters.
Thus we have rewritten (48) as and discretized σ n by Legendre polynomials for the first m − 1 panels and by Jacobi polynomials for the last. Sampling the resulting equations at the corresponding quadrature nodes -Gauss-Legendre for the first m − 1 panels and Gauss-Jacobi for the last -yields a collocation method for σ n , in which σ n is determined by its piecewise polynomial basis coefficients. For each collocation node t i , we compute the system matrix entries by adaptively integrating G n (t i , t ) in t against the piecewise polynomial basis functions. We compute the values f n (t i ) by discretizing the Fourier transform of f (r(t i ), z(t i ), θ) in θ by the trapezoidal rule, which is spectrally accurate for smooth, periodic functions. We solve the resulting set of linear systems -one for each Fourier mode -by LU factorization and back substitution. The factorizations may be reused, since we must solve a one-patch integral equation for many different right hand sides.
We can now define the fine grid points and the smooth quadrature weights introduced in Section 5.
The points x f i,1 , . . . , x f i,n f are the tensor products of the collocation nodes in the radial direction with equispaced points -the trapezoidal rule quadrature nodes -in the azimuthal direction. w f 1 , . . . , w f n f are the corresponding quadrature weights -products of the panel-wise Gauss weights with the trapezoidal rule weight.

Numerical investigation of the singularity of σ n
In this section, we contrast two strategies for representing σ n in (50). In the first, we use m = 1 panels, and represent g n in a basis of Jacobi polynomials, which takes into account the square root singularity in σ n . This approach would yield spectral accuracy with respect to g n if σ n only contained a square root singularity. The second strategy is the one described above; we use m > 1 panels with a Jacobi polynomial basis of fixed degree only in the last panel. These experiments give us some insight into the nature of the true singularity in σ n , and justify our discretization choice.
In both cases, we solve the interior one-patch integral equation by the method described above for a basis of Zernike polynomials with truncation parameter M = 15. The results do not change significantly if we solve the exterior equation instead. We do this for several different choices of ε. The Fourier series truncation is fixed sufficiently large to resolve the highest azimuthal Zernike mode. For each solution, we measure the residual error in L 2 , normalized by the patch size: Here |Γ| is the surface area of the patch, and f is a Zernike polynomial. This measures the extent to which the computed solution of the one-patch BVP satisfies the Dirichlet boundary condition. This solution automatically satisfies the Neumann boundary condition and the PDE, because of its representation as a single layer potential with the Neumann Green's function, so a small L 2 residual error corresponds to a solution which nearly satisfies the boundary value problem. This error is computed by quadrature on a Legendre-Fourier grid which does not overlap with the grid on which the integral equation is solved, so it is not the same as the residual of the solution to the discrete linear system. Using the first strategy (m = 1), we measure the error (51) for each Zernike polynomial, as the number of Jacobi basis functions is increased. The error is defined to be the maximum taken over all Zernike polynomials. The results are presented in the left panel of Fig. 8. We observe an initial regime of rapid convergence, followed by much slower convergence. Indeed, 15 basis functions are required to resolve the highest Zernike modes we have used as data. Afterward, the slow regime of convergence suggests that σ n has a dominant square root singularity and a subdominant term which is nonsmooth, but much smaller. We also notice that performance improves as ε is decreased, which is not surprising since as ε → 0, we approach the flat case in which σ n has a pure square root singularity.
The second strategy is explored in the right panel of Fig 8. Here, we fix 20 basis functions per panel -sufficient to begin with a good error constant, according to the first experiment. We then increase the number m of panels. Although we can already obtain quite good accuracy using the first strategy, the second allows us to reach near-machine precision. The improvement is particularly dramatic for larger choices of ε.

Numerical experiments
An important parameter in studying narrow escape and narrow capture problems is the patch area fraction f N,ε . Since the surface area of a single patch of radius ε is given by Assuming ε is sufficiently small, we may write Given N , we will use (53) to compute the patch radius ε for a given patch area fraction.

Convergence with respect to the Zernike basis
We first investigate the convergence of the solution with respect to the Zernike truncation parameter M , which determines the largest radial and azimuthal Zernike modes used to represent the smooth incoming field on each patch. We fix the patch area fraction at f N,ε = 0.05 and carry out experiments with N = 10, 100, and 1000 patches. ε is computed from (53). The patch locations are drawn from a uniform random distribution on the sphere, with a minimal patch separation of 2ε enforced. In each case, we solve the onepatch problems with the truncation parameter M set to 1, 3, 5, . . . , 15. The one-patch solutions are obtained, guided by the results in Fig. 8, using 13 panels with 20 basis functions per panel, and the number of Fourier modes set equal to the number of azimuthal modes in the Zernike basis. The ID and GMRES tolerances are set to 10 −15 , and the incoming grid tolerance is set to 10 −12 .
We measure error in two ways. The first, as in (51), is to examine the relative L 2 residual of the multiple scattering system (28) (the discrepancy of the computed boundary values with the Dirichlet data) on a random patch Γ i : . (54) The second is to examine the difference between the computed average mean first passage time (MFPT) µ and a reference value, denoted by µ ref . We obtain µ ref by carrying out a more refined simulation, with M = 17 on each patch, while also increasing the number of panels and basis functions used to solve the one-patch problem to 19 and 30, respectively, and doubling the numbers of both radial and azimuthal modes used in the incoming grids of all patch groups. This is a self-consistent convergence test for µ.
The results are presented in Fig. 9. In all cases, we observe the expected spectral convergence with respect to M , and can reach errors of approximately 10 −12 or less. We also find that the residual error appears to provide a good upper bound on the error of µ until convergence is reached.

Large scale simulations
We next study the performance of our solver as N is increased and ε is decreased. The error is measured by computing the L 2 residual (54) on a random patch. The parameters for the one-patch solver are set as in the previous section with M = 15, but we fix the ID tolerance at 10 −11 , the GMRES tolerance at 10 −10 , and the incoming grid truncation tolerance at 10 −8 . This selection of parameters yields errors in range 10 −7 − 10 −10 for all of our experiments. Our calculations are performed on either a laptop with a 4-core Intel i7-3630QM 2.40GHz processor or a workstation with four Intel Xeon E7-4880 2.50GHz processors. each of which has 15 cores. The algorithm has been implemented in Fortran, and in both cases, the hierarchical fast algorithm is parallelized over all available cores using OpenMP. We consider randomly located patches, uniformly located patches and patches that are highly clustered. For each experiment we report N , ε, the computed value of the average MFPT µ, truncated at 8 significant digits, the L 2 residual error on a random patch, the total number of GMRES iterations, the total solve time, and the time per GMRES iteration. We also compute the parallel scaling factor -namely, the ratio of the time to compute the matrix-vector product (47) using a single core to the time required using all cores on the 60-core workstation. Fixing the patch area fraction at f N,ε = 0.05, we let ε be given by (53) for N = 10, 100, 1000, 10 000, 100 000, with patches randomly distributed on the sphere with a minimum patch separation of 2ε. The corresponding results are given in Table 1. In the left panel of Fig. 10, we plot the time per GMRES iteration as a function of N using the 4-core laptop and the 60-core workstation, as well as a reference curve with O (N log N ) scaling. In Fig. 11, we also plot the computed MFPTv just inside the unit sphere -on a sphere of radius 1 − ε/5 -for N = 10, 100, 1000, 10 000. The case N = 100 000 case was plotted earlier, in Fig. 2.
Note that the number of GMRES iterations increases with N , as one would expect from the increased complexity of the problem, but slowly. The computation with N = 100 000 required just over an hour to complete using the 60-core workstation. The computation with N = 10 000 required just over 45 minutes to solve on the 4-core laptop, and the computation with N = 1000 required approximately one minute. (The case N = 100 000 was not attempted on the laptop because of memory requirements.) Note from the data in Table 1 that we achieve approximately 85% parallel efficiency at N = 1000 and an efficiency near 90% for the largest calculation. Note also from Fig. 10 that the complexity of the fast algorithm is consistent with the expected O (N log N ) Table 1: Narrow escape problem with random patches at patch area fraction f N,ε = 0.05. Using the same patch area fraction as in the previous example, we let N take the same values, but place the patch centers at the Fibonacci spiral points, which are approximately uniform on the sphere [12]. Results are shown in Table 2 and the middle panel of Fig. 10. The computed MFPTv on the sphere of radius 1 − ε/5 was plotted in Fig. 3 for the case N = 10 000. The MFPT is plotted for the N = 100 and N = 1000 cases in Fig. 11.

Example 3: Clustered patches
In our final example, we configure the patches to form a collection of 20 clusters. Each cluster is contained within a disk on the surface of the sphere centered at the vertices of a dodecahedron inscribed in the sphere, and the radii of the disks are chosen so that all 20 disks cover one quarter of the area of the sphere. Patch centers are placed randomly on the sphere, and a proposed center is accepted if it falls within one of the disks, while enforcing a minimum patch separation distance of 2ε. We choose ε empirically to be as large  Table 2: Narrow escape problem with uniform patches at patch area fraction f N,ε = 0.05.
as possible so that our random placement process yields the desired number N of patches in a reasonable amount of time. For sufficiently large N , this results in a much denser packing of patches within each cluster than we had in our previous examples. The results of our simulations are provided in Table 3 and the right panel of Fig. 10. The MFPT is plotted on a sphere of radius 1 − ε/5 in Fig. 4 for the N = 10 000 case and in Fig. 11 for the N = 100 and N = 1000 cases. The denser packing of patches leads to a greater number of GMRES iterations than in the previous examples and longer computation times, but the difference is mild. The case with N = 100 000 required just over an hour and a half to solve on our 60-core workstation. The simulation with N = 10 000 required 75 minutes on a laptop, and the simulation with N = 1000 required about one minute.  Table 3: Narrow escape problem with clustered patches.
Remark 8 We carried out the simulations above for the corresponding exterior problem as well (the narrow capture problem). As expected (since the integral equations are nearly identical), the timings and errors are similar and are therefore omitted.

Conclusions
We have developed a fast solver for the narrow capture and narrow escape problems on the sphere with arbitrarily-distributed well-separated disk-shaped patches. We solve the corresponding mixed boundary value problems by an integral equation scheme derived using the Neumann Green's functions for the sphere. Our numerical method combines a high order accurate solver for the one-patch problem, a multiple scattering formalism, and a hierarchical fast algorithm. We have demonstrated the scheme on examples with N as large as 100 000, significantly larger than previously accessible. The ability to carry out such large-scale simulations will permit a systematic study of the asymptotic approaches described, for example, in [10] and [11]. Possible extensions of our method include the consideration of narrow escape and narrow capture problems when the patches are asymmetric and have multiple shapes. Assuming some separation between patches, the multiple scattering formalism still applies, but the single patch integral equation will not be solvable by separation of variables and the compressed representation of outgoing fields will need to be computed for each distinct patch type. Neither of these extra steps, however, affects the asymptotic O(N log N ) scaling Figure 11: Plots of the MFPTv on a sphere of radius 1 − ε/5 for the experiments described in Section 10.2. The first two rows correspond to Example 1 with N = 10, 100, 1000, 10 000. The third row corresponds to Example 2 with N = 100, 1000. The final row corresponds to Example 3 with N = 100, 1000. of the fast algorithm. Exterior problems involving multiple spheres with different arrangements of patches could also be simulated by a simple modification of our multiple scattering approach.
A more challenging problem is to extend our method to non-spherical geometries. For this, one would either have to discretize the entire domain surface, rather than just the absorbing patches, or construct the Neumann Green's function for such a domain numerically. In the latter case, aspects of our multiple scattering approach would carry over. We are currently investigating these issues and will report on our progress at a later date.