Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Flipped sign
Browse files Browse the repository at this point in the history
  • Loading branch information
anand43 committed Nov 1, 2023
1 parent 27f24ab commit c0afdf1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/swiftest/swiftest_sph.f90
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ module subroutine swiftest_sph_g_acc_one(GMcb, r_0, phi, theta, rh, c_lm, g_sph,
! cssc * m = first derivative of ccss with respect to phi

! m > 0
g_sph(1) = g_sph(1) + GMcb * r_0**l / r_mag**(l + 2) * (cssc * m * plm * sin(phi) / sin(theta) &
g_sph(1) = g_sph(1) - GMcb * r_0**l / r_mag**(l + 2) * (cssc * m * plm * sin(phi) / sin(theta) &
+ ccss * sin(theta) * cos(phi) &
* (dplm * cos(theta) + plm * (l + 1))) ! g_x
g_sph(2) = g_sph(2) + GMcb * r_0**l / r_mag**(l + 2) * (-1.0_DP * cssc * m * plm * cos(phi) / sin(theta) &
g_sph(2) = g_sph(2) - GMcb * r_0**l / r_mag**(l + 2) * (-1.0_DP * cssc * m * plm * cos(phi) / sin(theta) &
+ ccss * sin(theta) * sin(phi) &
* (dplm * cos(theta) + plm * (l + 1))) ! g_y
g_sph(3) = g_sph(3) + GMcb * r_0**l / r_mag**(l + 2) * ccss * (-1.0_DP * dplm * sin(theta)**2 &
g_sph(3) = g_sph(3) - GMcb * r_0**l / r_mag**(l + 2) * ccss * (-1.0_DP * dplm * sin(theta)**2 &
+ plm * (l + 1) * cos(theta)) ! g_z
end do
end do
Expand Down

0 comments on commit c0afdf1

Please sign in to comment.