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

Commit

Permalink
Fixed missing sum in rotphase
Browse files Browse the repository at this point in the history
  • Loading branch information
anand43 committed Oct 24, 2023
1 parent 91f0daf commit d5b7aec
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_drift.f90
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ module subroutine swiftest_drift_cb_rotphase_update(self, param, dt)
class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters
real(DP), intent(in) :: dt !! Stepsize

self%rotphase = MOD((.mag. self%rot(:)) * dt * param%TU2S, 2 * PI) ! radians
self%rotphase = MOD(self%rotphase + (.mag. self%rot(:)) * dt * param%TU2S, 2 * PI) ! radians

end subroutine swiftest_drift_cb_rotphase_update

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 @@ -105,7 +105,7 @@ module subroutine swiftest_sph_g_acc_pl_all(self, nbody_system)
if (pl%lmask(i)) then
r_mag = .mag. rh(:,i)
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
phi = atan2(rh(2,i), rh(1,i)) - cb%rotphase

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(:)
Expand Down

0 comments on commit d5b7aec

Please sign in to comment.