From 3ffd1a057e2236680587c8817a87566f551ea754 Mon Sep 17 00:00:00 2001 From: anand43 Date: Thu, 28 Sep 2023 16:49:44 -0400 Subject: [PATCH] changed and fixed dimensions being passed --- src/swiftest/swiftest_module.f90 | 2 +- src/swiftest/swiftest_sph.f90 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/swiftest/swiftest_module.f90 b/src/swiftest/swiftest_module.f90 index dab54a4ea..817388bbd 100644 --- a/src/swiftest/swiftest_module.f90 +++ b/src/swiftest/swiftest_module.f90 @@ -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 diff --git a/src/swiftest/swiftest_sph.f90 b/src/swiftest/swiftest_sph.f90 index 726948177..7fc6bb4b7 100644 --- a/src/swiftest/swiftest_sph.f90 +++ b/src/swiftest/swiftest_sph.f90 @@ -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