Original repo: https://github.com/keyframe41/Fast-Multipole-Method
Additions of fork:
- Correct CMakeLists.txt (Release on default, disabled "Network" module)
- Simple CLI
Warning: JetBrainsMono-Regular.ttf
is required to run this app! (You can change default font in src/main.cpp, if you want). Put it with sim executable.
Also it's recommended (to avoid perfomance issues) to run with OpenMP flags. For example:
env OMP_PROC_BIND=spread OMP_PLACES=threads ./sim --show_stats --draw_boxes --dt 0.01
Simple CMake:
cmake -B build
cmake --build build
This is an implementation of the 2D Fast Multipole Method (FMM) in C++ and SFML. FMM (invented by Greengard and Rokhlin) is an algorithm that solves the N-body problem in O(N) to a desired precision, a significant improvement over more commonly seen methods like Barnes-Hut, which is O(NlogN) with unbounded error. I created a 2-part video series to explain this algorithm, which you can watch here:
The mathematics: https://www.youtu.be/FhMftauQZqU
The implementation and testing: https://youtu.be/uOahsDhVZaE