Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Example] Add tree method n-body solver of O(n log n): tree_gravity.py #1440

Merged
merged 6 commits into from
Jul 12, 2020

Conversation

archibate
Copy link
Collaborator

@archibate archibate commented Jul 8, 2020

Related issue = close #814

[Click here for the format server]


video
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

@archibate archibate changed the title [Example] add O(N log N)" tree_gravity.py [Example] Add tree method n-body solver of O(n log n): tree_gravity.py Jul 8, 2020
@codecov

This comment has been minimized.

Copy link
Member

@k-ye k-ye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't fully review this, but the example looks great..

@archibate
Copy link
Collaborator Author

If you'd like to add this image, please use this image: https://forum.taichi.graphics/uploads/default/original/1X/39279d1b253642116c1bbc7cf32968bc844d49df.gif (matplotlib cmap colored)

@archibate
Copy link
Collaborator Author

Merging this for now, feel free to upload the magma image later.

@archibate archibate merged commit e5c06c5 into taichi-dev:master Jul 12, 2020
@FantasyVR FantasyVR mentioned this pull request Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Example] add N-body of O(N log N) make use of sparse
3 participants