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

Commit

Permalink
changed and fixed dimensions being passed
Browse files Browse the repository at this point in the history
  • Loading branch information
anand43 committed Sep 28, 2023
1 parent bfbb41e commit 3ffd1a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/swiftest/swiftest_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,7 @@ module subroutine swiftest_sph_g_acc_one(GMcb, r_0, phi, theta, rh, c_lm, g_sph,
real(DP), intent(in) :: theta !! Inclination/Zenith angle (radians)
real(DP), intent(in), dimension(:) :: rh !! distance vector of body
real(DP), intent(in), dimension(:, :, :) :: c_lm !! Spherical Harmonic coefficients
real(DP), intent(out), dimension(:) :: g_sph !! acceleration vector
real(DP), intent(out), dimension(NDIM) :: g_sph !! acceleration vector
real(DP), intent(in), optional :: GMpl !! Mass of input body if it is not a test particle
real(DP), dimension(:), intent(inout), optional :: aoblcb !! Barycentric acceleration of central body (only for massive input bodies)
end subroutine swiftest_sph_g_acc_one
Expand Down
2 changes: 1 addition & 1 deletion src/swiftest/swiftest_sph.f90
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ module subroutine swiftest_sph_g_acc_pl_all(self, nbody_system)
theta = atan2(sqrt(rh(1,i)**2 + rh(2,i)**2), rh(3,i))
phi = atan2(rh(2,i), rh(1,i)) - cb%rotphase ! CALCULATE CB PHASE VALUE FOR PHI

call swiftest_sph_g_acc_one(cb%Gmass, r_mag, phi, theta, rh(:,i), cb%c_lm, g_sph, pl%Gmass, cb%aobl)
call swiftest_sph_g_acc_one(cb%Gmass, r_mag, phi, theta, rh(:,i), cb%c_lm, g_sph, pl%Gmass(i), cb%aobl)
pl%ah(:, i) = pl%ah(:, i) + g_sph(:) - cb%aobl(:)
pl%aobl(:, i) = g_sph(:)
end if
Expand Down

0 comments on commit 3ffd1a0

Please sign in to comment.