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

Commit

Permalink
Fixed floating underflow error. Fixed typo where rot vector was not p…
Browse files Browse the repository at this point in the history
…assed
  • Loading branch information
anand43 committed Oct 30, 2023
1 parent 3994b09 commit db4a0d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/swiftest/swiftest_obl.f90
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ module subroutine swiftest_obl_acc_pl(self, nbody_system)

associate(pl => self, cb => nbody_system%cb)
npl = self%nbody
call swiftest_obl_acc(npl, cb%Gmass, cb%j2rp2, cb%j4rp4, pl%rh, pl%lmask, pl%aobl, pl%Gmass, cb%aobl)
call swiftest_obl_acc(npl, cb%Gmass, cb%j2rp2, cb%j4rp4, pl%rh, pl%lmask, pl%aobl, cb%rot, pl%Gmass, cb%aobl)

#ifdef DOCONLOC
do concurrent(i = 1:npl, pl%lmask(i)) shared(cb,pl)
Expand Down
7 changes: 6 additions & 1 deletion src/swiftest/swiftest_sph.f90
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ module subroutine swiftest_sph_g_acc_one(GMcb, r_0, phi, theta, rh, c_lm, g_sph,
l_max = size(c_lm, 2) - 1
N = (l_max + 1) * (l_max + 2) / 2
allocate(p(N),p_deriv(N))
call PlmON_d1(p, p_deriv, l_max, cos(theta)) ! Orthonormalized Associated Legendre Polynomials and the 1st Derivative

if(cos(theta) > epsilon(0.0_DP)) then
call PlmON_d1(p, p_deriv, l_max, cos(theta)) ! Orthonormalized Associated Legendre Polynomials and the 1st Derivative
else
call PlmON_d1(p, p_deriv, l_max, 0.0_DP)
end if

do l = 1, l_max ! skipping the l = 0 term; It is the spherical body term
do m = 0, l
Expand Down

0 comments on commit db4a0d4

Please sign in to comment.