Skip to content

Commit

Permalink
Merge pull request #51 from lanl/dempsey/sink
Browse files Browse the repository at this point in the history
BugFix for sinks
  • Loading branch information
adamdempsey90 authored Feb 4, 2025
2 parents 2cf920d + edf179b commit db7c9dd
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit db7c9dd

Please sign in to comment.