-
Notifications
You must be signed in to change notification settings - Fork 0
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
Octree and Barnes Hut Implementation #20
Conversation
… segmentation fault in testing
…on and makefile configuration
…t, but need more coverage
…ed an envOctree member to the Grav Environment class; added some tests
…s-hut algo walking down the tree
…aml issue then can ake PR
…floats from doubles; implemented work with Adam's config stuff
…ile; added download of bc in coverage workflow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done sir
src/environment.cpp
Outdated
|
||
// Get the extreme coordinate locations | ||
std::array<float, 2> extremeXCoords = {0, 0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't be zero here. should just be min/max
|
||
// Calculate the forces | ||
std::vector<std::array<float, 3>> forces(nParticles); // Vector to hold the forces | ||
float theta = 0.5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make this a kwarg.
envOctree.updateCoords(extremeXCoords, extremeYCoords, extremeZCoords); | ||
|
||
// Build the Octree | ||
envOctree.build(particlePtrs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
steezy
if (internal) { | ||
|
||
// Midpoints of coordinates | ||
float mX = (xCoords[0] + xCoords[1]) / 2.; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i like .0 but i guess this is fine
Octree<T>* child5; | ||
Octree<T>* child6; | ||
Octree<T>* child7; | ||
std::shared_ptr<Octree<T>> child0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do u think u could add like comments for each of the children that just say which octants they refer to? Might be helpful for understanding the logic in octree.cpp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bang
Might be a little too sick, honestly!