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

Commit

Permalink
Removed redundant declare simd statements
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Oct 10, 2021
1 parent fe9356d commit dc7cc31
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 41 deletions.
10 changes: 0 additions & 10 deletions src/drift/drift.f90
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ end subroutine drift_all


module pure elemental subroutine drift_one(mu, px, py, pz, vx, vy, vz, dt, iflag)
!!$omp declare simd(drift_one)
!! author: The Purdue Swiftest Team - David A. Minton, Carlisle A. Wishard, Jennifer L.L. Pouplin, and Jacob R. Elliott
!!
!! Perform Danby drift for one body, redoing drift with smaller substeps if original accuracy is insufficient
Expand Down Expand Up @@ -119,7 +118,6 @@ end subroutine drift_one


pure subroutine drift_dan(mu, px0, py0, pz0, vx0, vy0, vz0, dt0, iflag)
!!$omp declare simd(drift_dan)
!! author: David A. Minton
!!
!! Perform Kepler drift, solving Kepler's equation in appropriate variables
Expand Down Expand Up @@ -197,7 +195,6 @@ end subroutine drift_dan


pure subroutine drift_kepmd(dm, es, ec, x, s, c)
!!$omp declare simd(drift_kepmd)
!! author: David A. Minton
!!
!! Solve Kepler's equation in difference form for an ellipse for small input dm and eccentricity
Expand Down Expand Up @@ -243,7 +240,6 @@ end subroutine drift_kepmd


pure subroutine drift_kepu(dt,r0,mu,alpha,u,fp,c1,c2,c3,iflag)
!!$omp declare simd(drift_kepu)
!! author: David A. Minton
!!
!! Solve Kepler's equation in universal variables
Expand Down Expand Up @@ -272,7 +268,6 @@ end subroutine drift_kepu


pure subroutine drift_kepu_fchk(dt, r0, mu, alpha, u, s, f)
!!$omp declare simd(drift_kepu_fchk)
!! author: David A. Minton
!!
!! Computes the value of f, the function whose root we are trying to find in universal variables
Expand Down Expand Up @@ -303,7 +298,6 @@ end subroutine drift_kepu_fchk


pure subroutine drift_kepu_guess(dt, r0, mu, alpha, u, s)
!!$omp declare simd(drift_kepu_guess)
!! author: David A. Minton
!!
!! Compute initial guess for solving Kepler's equation using universal variables
Expand Down Expand Up @@ -348,7 +342,6 @@ end subroutine drift_kepu_guess


pure subroutine drift_kepu_lag(s, dt, r0, mu, alpha, u, fp, c1, c2, c3, iflag)
!!$omp declare simd(drift_kepu_lag)
!! author: David A. Minton
!!
!! Solve Kepler's equation in universal variables using Laguerre's method
Expand Down Expand Up @@ -403,7 +396,6 @@ end subroutine drift_kepu_lag


pure subroutine drift_kepu_new(s, dt, r0, mu, alpha, u, fp, c1, c2, c3, iflag)
!!$omp declare simd(drift_kepu_new)
!! author: David A. Minton
!!
!! Solve Kepler's equation in universal variables using Newton's method
Expand Down Expand Up @@ -455,7 +447,6 @@ end subroutine drift_kepu_new


pure subroutine drift_kepu_p3solve(dt, r0, mu, alpha, u, s, iflag)
!!$omp declare simd(drift_kepu_p3solve)
!! author: David A. Minton
!!
!! Computes real root of cubic involved in setting initial guess for solving Kepler's equation in universal variables
Expand Down Expand Up @@ -506,7 +497,6 @@ end subroutine drift_kepu_p3solve


pure subroutine drift_kepu_stumpff(x, c0, c1, c2, c3)
!!$omp declare simd(drift_kepu_stumpff)
!! author: David A. Minton
!!
!! Compute Stumpff functions needed for Kepler drift in universal variables
Expand Down
4 changes: 1 addition & 3 deletions src/encounter/encounter_check.f90
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,6 @@ end subroutine encounter_check_all_triangular_pltp


module pure subroutine encounter_check_one(xr, yr, zr, vxr, vyr, vzr, renc, dt, lencounter, lvdotr)
!!$omp declare simd(encounter_check_one)
!! author: David A. Minton
!!
!! Determine whether a test particle and planet are having or will have an encounter within the next time step
Expand Down Expand Up @@ -838,6 +837,7 @@ module subroutine encounter_check_collapse_ragged_list(ragged_list, n1, nenc, in
end associate
if (nenc == 0) return


allocate(index1(nenc))
allocate(index2(nenc))
if (present(lvdotr)) allocate(lvdotr(nenc))
Expand Down Expand Up @@ -1068,7 +1068,6 @@ end subroutine encounter_check_sweep_aabb_all_single_list


pure subroutine encounter_check_sweep_aabb_one_double_list(i, n1, n2, ntot, ext_ind, ibegxi, iendxi, ibegyi, iendyi, ibegx, iendx, ibegy, iendy, lencounteri)
!!$omp declare simd(encounter_check_sweep_aabb_one_double_list)
!! author: David A. Minton
!!
!! Performs a sweep operation on a single body. Encounters from the same lists not allowed (e.g. pl-tp encounters only)
Expand Down Expand Up @@ -1101,7 +1100,6 @@ end subroutine encounter_check_sweep_aabb_one_double_list


pure subroutine encounter_check_sweep_aabb_one_single_list(n, ext_ind, ibegxi, iendxi, ibegyi, iendyi, ibegx, iendx, ibegy, iendy, lencounteri)
!!$omp declare simd(encounter_check_sweep_aabb_one_single_list)
!! author: David A. Minton
!!
!! Performs a sweep operation on a single body. Mutual encounters allowed (e.g. pl-pl)
Expand Down
1 change: 0 additions & 1 deletion src/helio/helio_drift.f90
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ end subroutine helio_drift_tp


pure elemental subroutine helio_drift_linear_one(xhx, xhy, xhz, ptx, pty, ptz, dt)
!!$omp declare simd(helio_drift_linear_one)
implicit none
real(DP), intent(inout) :: xhx, xhy, xhz
real(DP), intent(in) :: ptx, pty, ptz, dt
Expand Down
2 changes: 0 additions & 2 deletions src/kick/kick.f90
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ end subroutine kick_getacch_int_all_tp


module pure subroutine kick_getacch_int_one_pl(rji2, xr, yr, zr, Gmi, Gmj, axi, ayi, azi, axj, ayj, azj)
!!$omp declare simd(kick_getacch_int_one_pl)
!! author: David A. Minton
!!
!! Compute direct cross (third) term heliocentric accelerations for a single pair of massive bodies
Expand Down Expand Up @@ -244,7 +243,6 @@ end subroutine kick_getacch_int_one_pl


module pure subroutine kick_getacch_int_one_tp(rji2, xr, yr, zr, GMpl, ax, ay, az)
!!$omp declare simd(kick_getacch_int_one_tp)
!! author: David A. Minton
!!
!! Compute direct cross (third) term heliocentric accelerations of a single test particle massive body pair.
Expand Down
4 changes: 2 additions & 2 deletions src/modules/encounter_classes.f90
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module encounter_classes
integer(I4B), parameter :: SWEEPDIM = 2

type :: encounter_list
integer(I4B) :: nenc !! Total number of encounters
integer(I4B) :: nenc = 0 !! Total number of encounters
logical, dimension(:), allocatable :: lvdotr !! relative vdotr flag
integer(I4B), dimension(:), allocatable :: status !! status of the interaction
integer(I4B), dimension(:), allocatable :: index1 !! position of the first body in the encounter
Expand Down Expand Up @@ -52,7 +52,7 @@ module encounter_classes
interface
module subroutine encounter_check_all(nenc, index1, index2, x1, v1, x2, v2, renc1, renc2, dt, lencounter, lvdotr)
implicit none
integer(I4B), intent(in) :: nenc !! Number of encounters in the encounter lists
integer(I4B), intent(in) :: nenc !! Number of encounters in the encounter lists
integer(I4B), dimension(:), intent(in) :: index1 !! List of indices for body 1 in each encounter
integer(I4B), dimension(:), intent(in) :: index2 !! List of indices for body 2 in each encounter1
real(DP), dimension(:,:), intent(in) :: x1, v1 !! Array of indices of bodies 1
Expand Down
7 changes: 0 additions & 7 deletions src/operators/operator_cross.f90
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
contains

module pure function operator_cross_sp(A, B) result(C)
!!$omp declare simd(operator_cross_sp)
implicit none
real(SP), dimension(:), intent(in) :: A, B
real(SP), dimension(3) :: C
Expand All @@ -19,7 +18,6 @@ module pure function operator_cross_sp(A, B) result(C)
end function operator_cross_sp

module pure function operator_cross_dp(A, B) result(C)
!!$omp declare simd(operator_cross_dp)
implicit none
real(DP), dimension(:), intent(in) :: A, B
real(DP), dimension(3) :: C
Expand All @@ -30,7 +28,6 @@ module pure function operator_cross_dp(A, B) result(C)
end function operator_cross_dp

module pure function operator_cross_qp(A, B) result(C)
!!$omp declare simd(operator_cross_qp)
implicit none
real(QP), dimension(:), intent(in) :: A, B
real(QP), dimension(3) :: C
Expand All @@ -41,7 +38,6 @@ module pure function operator_cross_qp(A, B) result(C)
end function operator_cross_qp

module pure function operator_cross_i1b(A, B) result(C)
!!$omp declare simd(operator_cross_i1b)
implicit none
integer(I1B), dimension(:), intent(in) :: A, B
integer(I1B), dimension(3) :: C
Expand All @@ -52,7 +48,6 @@ module pure function operator_cross_i1b(A, B) result(C)
end function operator_cross_i1b

module pure function operator_cross_i2b(A, B) result(C)
!!$omp declare simd(operator_cross_i2b)
implicit none
integer(I2B), dimension(:), intent(in) :: A, B
integer(I2B), dimension(3) :: C
Expand All @@ -63,7 +58,6 @@ module pure function operator_cross_i2b(A, B) result(C)
end function operator_cross_i2b

module pure function operator_cross_i4b(A, B) result(C)
!!$omp declare simd(operator_cross_i4b)
implicit none
integer(I4B), dimension(:), intent(in) :: A, B
integer(I4B), dimension(3) :: C
Expand All @@ -74,7 +68,6 @@ module pure function operator_cross_i4b(A, B) result(C)
end function operator_cross_i4b

module pure function operator_cross_i8b(A, B) result(C)
!!$omp declare simd(operator_cross_i8b)
implicit none
integer(I8B), dimension(:), intent(in) :: A, B
integer(I8B), dimension(3) :: C
Expand Down
2 changes: 0 additions & 2 deletions src/operators/operator_mag.f90
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
contains

module pure function operator_mag_sp(A) result(B)
!!$omp declare simd(operator_mag_sp)
implicit none
real(SP), dimension(:), intent(in) :: A
real(SP) :: B
Expand All @@ -16,7 +15,6 @@ module pure function operator_mag_sp(A) result(B)
end function operator_mag_sp

module pure function operator_mag_dp(A) result(B)
!!$omp declare simd(operator_mag_dp)
implicit none
real(DP), dimension(:), intent(in) :: A
real(DP) :: B
Expand Down
13 changes: 0 additions & 13 deletions src/orbel/orbel.f90
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ end subroutine orbel_el2xv


module pure subroutine orbel_scget(angle, sx, cx)
!!$omp declare simd(orbel_scget)
!! author: David A. Minton
!!
!! Efficiently compute the sine and cosine of an input angle
Expand Down Expand Up @@ -182,7 +181,6 @@ end subroutine orbel_scget
! REVISIONS:
!**********************************************************************
pure subroutine orbel_schget(angle,shx,chx)
!!$omp declare simd(orbel_schget)
real(DP), intent(in) :: angle
real(DP), intent(out) :: shx,chx

Expand Down Expand Up @@ -213,7 +211,6 @@ end subroutine orbel_schget
! REVISIONS:
!**********************************************************************
real(DP) pure function orbel_flon(e,icapn)
!!$omp declare simd(orbel_flon)
implicit none
real(DP), intent(in) :: e, icapn
integer(I4B) :: iflag,i
Expand Down Expand Up @@ -301,7 +298,6 @@ end function orbel_flon
! REVISIONS: 2/26/93 hfl
!**********************************************************************
real(DP) pure function orbel_fget(e,capn)
!!$omp declare simd(orbel_fget)
implicit none

real(DP), intent(in) :: e,capn
Expand Down Expand Up @@ -372,7 +368,6 @@ end function orbel_fget
! series for small Q.
!**********************************************************************
real(DP) pure function orbel_zget(iq)
!!$omp declare simd(orbel_zget)
implicit none

real(DP), intent(in) :: iq
Expand Down Expand Up @@ -428,7 +423,6 @@ end function orbel_zget
! REVISIONS: 2/26/93 hfl
!**********************************************************************
real(DP) pure function orbel_esolmd(e,m)
!!$omp declare simd(orbel_esolmd)
implicit none

real(DP), intent(in) :: e
Expand Down Expand Up @@ -484,7 +478,6 @@ end function orbel_esolmd
! REVISIONS:
!**********************************************************************
real(DP) pure function orbel_ehie(e,im)
!!$omp declare simd(orbel_ehie)
implicit none

real(DP), intent(in) :: e,im
Expand Down Expand Up @@ -560,7 +553,6 @@ end function orbel_ehie
! we have an ellipse with e between 0.15 and 0.8
!**********************************************************************
real(DP) pure function orbel_eget(e,m)
!!$omp declare simd(orbel_eget)
implicit none

real(DP), intent(in) :: e,m
Expand Down Expand Up @@ -634,7 +626,6 @@ end function orbel_eget
! REVISIONS: 2/26/93 hfl
!**********************************************************************
real(DP) pure function orbel_ehybrid(e,m)
!!$omp declare simd(orbel_ehybrid)
implicit none

real(DP), intent(in) :: e,m
Expand Down Expand Up @@ -674,7 +665,6 @@ end function orbel_ehybrid
! REVISIONS: 2/26/93 hfl
!**********************************************************************
real(DP) pure function orbel_fhybrid(e,n)
!!$omp declare simd(orbel_fhybrid)
implicit none
real(DP), intent(in) :: e,n

Expand All @@ -694,7 +684,6 @@ end function orbel_fhybrid


module pure subroutine orbel_xv2aeq(mu, px, py, pz, vx, vy, vz, a, e, q)
!!$omp declare simd(orbel_xv2aeq)
!! author: David A. Minton
!!
!! Compute semimajor axis, eccentricity, and pericentric distance from relative Cartesian position and velocity
Expand Down Expand Up @@ -760,7 +749,6 @@ end subroutine orbel_xv2aeq


module pure subroutine orbel_xv2aqt(mu, px, py, pz, vx, vy, vz, a, q, capm, tperi)
!!$omp declare simd(orbel_xv2aqt)
!! author: David A. Minton
!!
!! Compute semimajor axis, pericentric distance, mean anomaly, and time to nearest pericenter passage from
Expand Down Expand Up @@ -899,7 +887,6 @@ end subroutine orbel_xv2el_vec


pure subroutine orbel_xv2el(mu, px, py, pz, vx, vy, vz, a, e, inc, capom, omega, capm)
!!$omp declare simd(orbel_xv2el)
!! author: David A. Minton
!!
!! Compute osculating orbital elements from relative Cartesian position and velocity
Expand Down
1 change: 0 additions & 1 deletion src/util/util_flatten.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
contains

module pure subroutine util_flatten_eucl_ij_to_k(n, i, j, k)
!!$omp declare simd(util_flatten_eucl_ij_to_k)
!! author: Jacob R. Elliott and David A. Minton
!!
!! Turns i,j indices into k index for use in the Euclidean distance matrix for pl-pl interactions.
Expand Down

0 comments on commit dc7cc31

Please sign in to comment.