7

I'm interested in implementing the Fast Multipole Method to efficiently simulate a system of repulsive particles.

I've found a large collection of references discussing FMM, but none seem very approachable for non-mathematicians who want to fully understand the algorithm.

Can you recommend a ground-up reference that clearly explains the mathematics behind the process, and includes pseudocode exemplifying a proper implementation?

Mitch Wheat
  • 295,962
  • 43
  • 465
  • 541
KomodoDave
  • 7,239
  • 10
  • 60
  • 92
  • Thanks for downvoting with no explanation why... I've been careful to not word the question with "Best.." or similar. – KomodoDave Feb 05 '13 at 14:01
  • 4
    I'm a software engineer working with a team of research scientists writing codes which use FMM and similar methods. My experience is that there are no explanations of this sort of method which are approachable to non-mathematicians. The ground-up reference you seek is a university-level education in mathematical physics or computational science. The kind of exposition that you can see in http://www.amazon.co.uk/Essentials-Computational-Electromagnetics-Xin-Qing-Sheng/dp/0470829621/ref=sr_1_95?s=books&ie=UTF8&qid=1360075827&sr=1-95#reader_0470829621 is about as approachable as you'll get. – High Performance Mark Feb 05 '13 at 14:56
  • 1
    I think this would be a better question for the [compsci stackexchange](http://scicomp.stackexchange.com/). Anyway, an FMM variant which might be easy to follow as a first step is that of [Walter Dehnen](http://arxiv.org/abs/astro-ph/0003209): it's like a G&R FMM but in Cartesian coordinates, and with a few other tweaks, which simplifies a lot of the arithmetic. There's not much math required beyond vector Taylor expansions. (Ah, this takes me back.) – DSM Feb 06 '13 at 01:24
  • Thanks for the info guys. @High Performance Mark I have an Oxford Uni Comp Sci education and am not afraid of the maths, it's just there are so many references on the subject I wanted to find the most comprehensive coverage of the mathematics behind the algorithm to aid in a complete understanding. – KomodoDave Feb 07 '13 at 10:18
  • @DSM Judging by the abstract that reference looks superb - many, many thanks! If you submit that comment as an answer I'll mark it as correct. – KomodoDave Feb 07 '13 at 10:18

3 Answers3

3

I am by no means an expert in FMM, but this java implementation and introduction is the best source I've found so far for explaining it carefully and slowly. The paper is good at defining terms before using them, and the code at least is useful as a reference point. The math still gets hairy very quickly, but it is what it is :)

A pedestrian introduction to fast multipole methods is a close second. It doesn't explain the actual details of a working FMM implementation, but it's a good introduction to the basic ideas.

Jay Lemmon
  • 1,158
  • 1
  • 8
  • 22
  • Thank you Jay, these links are great. I've seen the first one previously but never noticed the source was available. Very helpful indeed. I look forward to reading the PDF from your second link. – KomodoDave Mar 20 '13 at 09:14
  • For the PDF in the second link, be aware that it doesn't actually go in to any detail on what you need to do to calculate the multipole expansions or anything to limit the error (it basically does a single term multipole expansion and leaves it at that). But it's a great reference to understand how interactions in the farfield get approximated, and how the overall algorithm works to make it run in linear time. – Jay Lemmon Mar 20 '13 at 18:57
3

I like the short course on FMM. In begins with FMM in 1D, than it uses theory of complex variable to do FMM in 2D. And than there is the crazy 3D version which uses theory of spherical harmonics functions, which I guess can be very difficult for non-mathematician. But If you need FMM only in 2D you should be fine.

Unfortunately no pseudo codes are given there.

But do you really need the accuracy of FMM?. You might be fine with Barnes-Hut's algorithm

tom
  • 1,520
  • 1
  • 12
  • 26
2

After running into a similar issue to you, I ended up writing a fully-documented Python fast multipole method implementation, pybbfmm. I've also written a short, mathematics-free tutorial on how the method works. Together, I think they're substantially more accessible than any of the other presentations I could find.

(meta: Although this is effectively a linkpost, the OP is explicitly asking for a link. I've added what I think was missing from the last one - the name fo the library - but I'm not sure how else to offer this answer except as a name and a link. Certainly it doesn't feel any more linkpost-y than the accepted answer. If this one gets deleted as well, I'll give up)

Andy Jones
  • 4,723
  • 2
  • 19
  • 24