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

BugFix for sinks #51

Merged
merged 2 commits into from
Feb 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/nbody/particle_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,9 @@ class Particle {
const Real dv2 = SQR(dv[0]) + SQR(dv[1]) + SQR(dv[2]);

// Convert the gas coordinates to a spherical system centered on the particle
const auto &[dr, er, et, ep] = CartToSph(dx);
const auto &[dr, ex1, ex2, ex3] = CartToSph(dx);
std::array<Real, 3> et{ex1[1], ex2[1], ex3[1]};
std::array<Real, 3> ep{ex1[2], ex2[2], ex3[2]};

// Pull out the tangential relative velociteis
const Real dvt = dv[0] * et[0] + dv[1] * et[1] + dv[2] * et[2];
Expand Down