[Example] Add tree method n-body solver of O(n log n): tree_gravity.py #1440
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issue = close #814
[Click here for the format server]
Thanks to Taichi's lack of recursion, make tree method really hard to implement.
Currently this example only works on one single CPU thread so don't expect too much on FPS...
A paper on n-body parallelization: http://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=82AC752BCA1CEDB59F0CA397E46F7452?doi=10.1.1.315.4896&rep=rep1&type=pdf
Hope this could attract many people in astrophysics. @yuanming-hu Could you update the README.md gallery for this?
I'd like to write a zhihu post on this later when I've time.Done with an English post in: https://forum.taichi.graphics/t/hw-1-2-gravity-simulation-with-tree-method-in-o-n-log-n-2d-3d/980