Skip to content

Commit

Permalink
(#55) remove FINVSQRT ifdefs from externalforces; use get_G_code() wh…
Browse files Browse the repository at this point in the history
…ere needed
  • Loading branch information
danieljprice committed Mar 24, 2023
1 parent a2f1519 commit d9575eb
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/main/externalforces.F90
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,7 @@ subroutine externalforce(iexternalforce,xi,yi,zi,hi,ti,fextxi,fextyi,fextzi,phi,
r2 = xi*xi + yi*yi + zi*zi + eps2_soft

if (r2 > epsilon(r2)) then
#ifdef FINVSQRT
dr = finvsqrt(r2)
#else
dr = 1./sqrt(r2)
#endif
R_g = 1.0
factor = 1. + 6.*R_g*dr
dr3 = mass1*dr**3
Expand Down Expand Up @@ -411,11 +407,7 @@ subroutine externalforce(iexternalforce,xi,yi,zi,hi,ti,fextxi,fextyi,fextzi,phi,
!--external force timestep based on sqrt(h/accel)
!
if (hi > epsilon(hi)) then
#ifdef FINVSQRT
dtf1 = sqrt(hi*finvsqrt(f2i))
#else
dtf1 = sqrt(hi/sqrt(f2i))
#endif
else
dtf1 = huge(dtf1)
endif
Expand Down

0 comments on commit d9575eb

Please sign in to comment.