Skip to content

Commit

Permalink
Update example/particles/particles.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Ryan <bryan10@illinois.edu>
  • Loading branch information
alexrlongne and brryan authored Oct 29, 2024
1 parent d1e3e37 commit feafba6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion example/particles/particles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ TaskStatus CreateSomeParticles(MeshBlock *pmb, const double t0) {
v(2, n) = mu;
// Project v onto plane normal to sphere
Real vdN = v(0, n) * x(n) + v(1, n) * y(n) + v(2, n) * z(n);
Real inverse_NdN = r * r;
Real inverse_NdN = 1. / (r * r);
v(0, n) = v(0, n) - vdN * inverse_NdN * x(n);
v(1, n) = v(1, n) - vdN * inverse_NdN * y(n);
v(2, n) = v(2, n) - vdN * inverse_NdN * z(n);
Expand Down

0 comments on commit feafba6

Please sign in to comment.