oliverzh2000 / parallel-barnes-hut Goto Github PK
View Code? Open in Web Editor NEWA parallelized and efficient C++ implementation of the Barnes-Hut algorithm for simulating an N-body system.
License: GNU General Public License v3.0
A parallelized and efficient C++ implementation of the Barnes-Hut algorithm for simulating an N-body system.
License: GNU General Public License v3.0
Remove the need to add in extra indent in timing names ex " build octree" (this is disgusting and can be easily fixed).
This is to save time
This serialization mode is (obviously) lossy. Each star is represented by:
This mode is intended for visualization purposes
The isEmpty check is only true when the node being inserted is the root. Try to handle the root separately before inserting the rest of the nodes into the octree.
This decision is made to keep the children of the Nodes as an array of 8 pointers to Nodes. Although it doubles the maximum memory footprint of the OctTree, it allows for much easier debugging and makes life that much brighter.
std::ifstream in{simDir + "\\init.txt"};
This is the culprit. Join the paths intelligently to fix
Huge performance impact for the initialization, but initialization only happens once so who cares right?
Since the length is currently distance from center of octree to the edge of the bounding cube, it is half the length of the cube.
This means that the theta parameter is effectively doubled.
Since the breadth-first ordering guarantees that children are stored contiguously, store only the index of the first child as a 32 bit int, and pack the existence (true/false) of children 0-7 into one single byte.
This reduces memory usage of the Octree by almost half.
Benchmark after change to measure performance impact (since this reduces working set size)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.