Radial Basis Functions with Compact Support
7.3 The fast multipole algorithm
Table 7.2
Centres q = Iter. Kryl. φ(r ) = r Iter. Kryl. tps It. BFGP tps
400 10 13 33 29 400 30 6 8 5 400 50 5 7 4 900 10 14 42 36 900 30 7 10 6 900 50 4 8 5 Thus λ(d j) = λ
η(s∗ − s)
+ β˜ jλ(d j−1) and γ (d j) = γ
η(s∗ − s)
+ ˜ β jγ (d j−1). Further ˜ α j =
m i=1 λ(d j)ir j ξ i
m i=1 λ(d j)id j(ξ i) .Finally, we set λ(s j+1) = λ(s j) + α˜ jλ(d j) and further γ (s j+1) = γ (s j) +
˜
α jγ (d j).
Table 7.2 gives the iteration numbers needed in order to obtain accuracy ε = 10−8
with a selection of scattered centres and thin-plate splines and φ(r ) = r using the Krylov subspace method, and using thin-plate splines and the BFGP method, respectively. They are taken from Faul and Powell (1999a, 1999b).
7.3 The fast multipole algorithm
There is an intimate relation between the task of evaluating radial basis func- tion approximants and performing particle simulations or the so-calledN -body problem. One of the most successful methods for the numerical solution of the particle simulations is the fast multipole method.
The basic idea of the so-called fast multipole method is to distinguish, for each evaluation of the linear combination s( x ) of thin-plate spline terms at x , say, between the ‘near field’ of points inclose tox and the ‘far field’ of points in far away from x . All thin-plate spline terms of the near field are computed explicitly whereas collective approximations are used to generate the far field contributions. It is important that all the dependencies on the centres of the far field expansions are contained in their coefficients and appear no longer in the form of translates of a basis function, because this saves the costly individual evaluations of the radial basis functions. Hierarchical structures on are gen- erated and used to track down which assemblies of points are far away from others. This is quite comparable with the work in the previous section, where the set of centres was decomposed into small (though overlapping) ‘clouds’ of
184 7. Implementations
points and where corresponding local Lagrange functions were computed. The next step, however, is different.
In this method, a so-called multipole or Laurent series is used to approximate the contribution of each whole cloud of points within that hierarchical structure as a far field. A final step can be added by approximating several Laurent series simultaneously by one finite Taylor expansion. To begin with we wish to be explicit about the aforementioned Laurent expansions. We restrict this section to thin-plate splines in two dimensions and are generally brief, the full details are given in the introductory articles by Beatson and Greengard (1997) and Greengard and Rokhlin (1997).
A typical Laurent series expansion to thin-plate spline terms – which we still use as a paradigm for algorithms with more general classes of radial basis functions – is as stated by Beatson and Newsam (1992) as given below. We take the bivariate case which may be viewed alternatively as a case in one complex variable.
Lemma 7.4. Let z and t be complex numbers, and define
φt ( z): = t − z2 logt − z.
Then, for all z > t ,
φt ( z) =
(¯ z − ¯t )( z − t )
log z − ∞
k =1 1 k
t z
k
which is the same as
( z2 − 2(¯t z) + t 2)log z +
∞
k =0 (ak z¯ + bk ) z−k
,where we are denoting the real part of a complex number z ∈ C by z. Here
bk = −¯t ak and a0 = −t and ak = t k +1/[k (k + 1)] for positive k. Moreover,
if the above series is truncated after p + 1 terms, the remainder is bounded above by t 2 ( p + 1)( p + 2) c + 1 c − 1
1 c
p with c = z/t .One can clearly see from the lemma how expansions may be used to approx- imate the thin-plate spline radial basis functions for large argument and how the point of truncating the series, i.e. the length of the remaining sum, influ- ences the accuracy. A typical length of the truncated series in two-dimensional applications using thin-plate spline is 20. There will be a multiple of log ||
7.3 The fast multipole algorithm 185
It transpires that an important step in the algorithm is again the set-up for structuring the in a suitable way. Then it is required to compute suitable series expansions for the radial basis function at far-away points, that is φ( x ) for large x . For the set-up we need to decide first on the desired acceptable accuracy. This determines where the infinite expansions are to be truncated. The next step is the hierarchical subdivision of the domain into panels, and finally the far field expansions for each panel are computed.
The set-up stage not only constructs the data structure but also prepares the series coefficients that are required later on in the evaluation stage. This is again very similar to the work in the previous section, where the coeffi- cients of the local Lagrange functions were calculated in advance. The data are cast into a tree structure: If the data are fairly uniformly distributed within a square in two dimensions which we assume to be a typical case, then the whole square is the initial parent set which is then repeatedly subdivided into four – in some implementations two – equally sized subsquare child panels. This subdivision is then repeated iteratively until some fixed level. Here, we still remain with the two-dimensional setting, but a three-dimensional version is given in Greengard and Rokhlin, 1997, where an octtree rather than a quadtree is generated.
Next, for each childless panel Q we associate an ‘evaluation list’ for that panel. This works as follows. Every panel that is at the same or a less re- fined level, whose points are all far away from the panel Q and whose parent panel is not far away from a point in Q, goes into the evaluation list of Q. Thus, the far field for any point in Q is the collection of points in the panels in the evaluation list of Q. The near field of a panel Q contains all the re- maining points. For each panel R in the so-called evaluation list, the method proceeds by computing a Laurent expansion for all radial basis functions with centres in R, and the expansion is about the mid-point of R. We always use the highest level (largest possible) panels in the evaluation list for the far field expansions to get the maximum savings in operational cost by evaluating as many terms as possible at the same time. By taking the length of the expan- sion suitably (according to the expansions and remainders given for instance in Lemma 7.4), any accuracy can be achieved by this approach at the price of greater computational expense. Finally, the method calculates the Laurent expansions for higher level panels R by translating the centres of the Laurent ex- pansions of the children of the panel R to the centre of R and combining them. For this there is a mathematical analysis available in the paper by Beatson and Newsam (1992) cited in the bibliography whose work we summarise here and which shows how the series alter when their points of expansion are translated.
186
186 7. Implementations7. Implementations
A typical expansion that approximates an interpolant without a polynomial A typical expansion that approximates an interpolant without a polynomial added added ss(( x x )) ==
ξ ξ ∈∈ λ λξ ξ φφ(( x x −− ξ ξ )) is then of the formis then of the form
ss(( x x )) ≈≈ p p
k k ==11 µ µk k φφk k (( x x )),,with the remainder with the remainder
ξ ξ ∈∈ λ λξ ξ R Rˆˆ(( x x ,, ξ ξ )),,so that remainder plus approximation gives the exact
so that remainder plus approximation gives the exact ss(( x x ). Here, we have used). Here, we have used an approximation of the form
an approximation of the form
p p
k k ==11 φ φk k (( x x ))γ γ k k ((ξ ξ )) ≈≈ φφ(( x x −− ξ ξ ))whose remainder is, in turn,
whose remainder is, in turn, ˆˆ R R(( x x ,, ξ ξ ), and that gives rise to the remainder in the), and that gives rise to the remainder in the previous display.
previous display.
The algorithm can be further improved by re-expanding and combining the The algorithm can be further improved by re-expanding and combining the Laurent expansions as local Taylor expansions. This is possible because the Laurent expansions as local Taylor expansions. This is possible because the Laurent series are infinitely smooth away from their centres, so can be approxi- Laurent series are infinitely smooth away from their centres, so can be approxi- ma
matedted welwelll byby polpolynoynomiamials.ls. WWorkorkinging frofromm parparententss dodownwn toto chichildrldren,en, coecoeffifficiciententss of the Taylor expansion centred on each panel
of the Taylor expansion centred on each panel RR can be found efficiently bycan be found efficiently by re-centring (see the paragraph before last) the expansion from the parent level re-centring (see the paragraph before last) the expansion from the parent level to
to ototheherr papanenelsls anandd adaddidingng cocontntriribbututioionsns frfromom ththee ototheherr papanenelsls onon ththee eevvalaluauatitionon list of the child that are not on the evaluation list of the parent. The result is that list of the child that are not on the evaluation list of the parent. The result is that all the contribution of a far field is contained in a single Taylor series instead all the contribution of a far field is contained in a single Taylor series instead of several Laurent series which come from the various panels in the evaluation of several Laurent series which come from the various panels in the evaluation list of a given panel.
list of a given panel.
The Laurent series may be computed also for multiquadrics for example, i.e. The Laurent series may be computed also for multiquadrics for example, i.e. not only for thin-plate splines, and have the general form for a panel
not only for thin-plate splines, and have the general form for a panel RR φ φ R R(( x x )) == ∞ ∞
j j==00 P P j j(( x x )) x x 22 j j−−11,, x x 00,,for homogeneous polynomials
for homogeneous polynomials PP j j of degreeof degree jj. Then one needs also the local. Then one needs also the local
Taylor expansions of truncated Laurent series. Taylor expansions of truncated Laurent series.
In
In susummmmararyy,, ththee prprinincicipapall ststepepss ofof ththee whwhololee alalgogoririththmm asas dedesisigngneded byby BeBeatatsosonn
et al.
7.3 The fast multipole algorithm
7.3 The fast multipole algorithm 187187
Set-up Set-up
(1)
(1) PerfoPerform as rm as descdescribed aboribed above the repeateve the repeated subdivid subdivision of sion of the squarethe square down to
down to OO((||loglog||) levels and sort the elements of ) levels and sort the elements of into the finest levelinto the finest level panels.
panels. (2)
(2) Form the LaureForm the Laurent series expant series expansionnsions (i.e. compute and store theirs (i.e. compute and store their coefficients) for all fine level panels
coefficients) for all fine level panels RR.. (3)
(3) TrTranslanslate centrate centres of es of expexpansioansions and, by ns and, by workworking up ing up the tree towthe tree towardsards coarser levels, form analogous Laurent expansions for all less refined coarser levels, form analogous Laurent expansions for all less refined levels.
levels. (4)
(4) WWorking down the tree from the coarseorking down the tree from the coarsest levst level to the finest, computeel to the finest, compute Taylor expansions of the whole far field for each panel
Taylor expansions of the whole far field for each panel QQ..
Evaluation at Evaluation at x x
(1)
(1) LocaLocate the finest lete the finest level panvel panelel QQ containing the evaluation pointcontaining the evaluation point x x .. (2)
(2) Then eThen evaluate valuate the interpolthe interpolantant ss(( x x ) by computing near field contributions) by computing near field contributions explicitly with a direct linear equation solver for all centres near to
explicitly with a direct linear equation solver for all centres near to x x , and, and by using Taylor approximations of the far field. For the far field, we use by using Taylor approximations of the far field. For the far field, we use all panels
all panels RR that are far away fromthat are far away from x x and are not subsets of any coarserand are not subsets of any coarser panels already considered.
panels already considered.
The computational cost of the multipole method without set-up is a large The computational cost of the multipole method without set-up is a large multiple of log
multiple of log|||| because of the hierarchical structure. The set-up cost isbecause of the hierarchical structure. The set-up cost is
O
O((||||loglog||||), but the constant contained in this estimate may be large due), but the constant contained in this estimate may be large due to the computation of the various expansions and the complicated design of to the computation of the various expansions and the complicated design of the tree structure. This is so although in principle each expansion is an order the tree structure. This is so although in principle each expansion is an order
O
O(1) procedure. In practice it turns out that the method is superior to direct(1) procedure. In practice it turns out that the method is superior to direct computations if
computations if mm is at least of the order of 200 points.is at least of the order of 200 points. In what way
In what way is this algorithm now related to the is this algorithm now related to the computation of interpolationcomputation of interpolation co
coefefficficieientnts?s? ItIt isis rerelalatetedd inin ononee wawayy bebecacaususee ththee efefficficieientnt eevvalaluauatitionon ofof ththee lilinenearar combination of thin-plate spline translates is required in our first algorithm combination of thin-plate spline translates is required in our first algorithm presented in this chapter. There the residuals
presented in this chapter. There the residuals f f ξ ξ −− ss((ξ ξ ) played an important) played an important rrˆˆole,ole, ss((ξ ξ ) being the current linear combination of thin-plate splines and the) being the current linear combination of thin-plate splines and the current approximation to the solution we require. Therefore, to make the BFGP current approximation to the solution we require. Therefore, to make the BFGP algorithm efficient, fast evaluation of
algorithm efficient, fast evaluation of ss is needed.is needed.
However, the importance of fast availability of residuals at the centres is However, the importance of fast availability of residuals at the centres is not restricted to the BFGP method. Other iterative methods for computing not restricted to the BFGP method. Other iterative methods for computing radial basis function interpolants such as conjugate gradient methods are also radial basis function interpolants such as conjugate gradient methods are also in need of these residuals. In order to apply those conjugate gradient methods, in need of these residuals. In order to apply those conjugate gradient methods, ho
howeweveverr,, ususuauallllyy aa prprececonondidititiononiningg memeththodod isis neneedededed,, anandd ththisis wiwillll bebe didiscscusussesedd in Section 7.4.