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

Commit

Permalink
Restructured orbel subroutines. Consolidated them into the single sub…
Browse files Browse the repository at this point in the history
…module file orbel.f90 and put the explicit interfaces back. Added an elemental function for checking collisions between encountering bodies.
  • Loading branch information
daminton committed Jul 27, 2021
1 parent c650865 commit 6e6c0f1
Show file tree
Hide file tree
Showing 7 changed files with 398 additions and 339 deletions.
19 changes: 13 additions & 6 deletions src/modules/swiftest_classes.f90
Original file line number Diff line number Diff line change
Expand Up @@ -661,16 +661,23 @@ end subroutine orbel_scget

module pure subroutine orbel_xv2aeq(mu, x, v, a, e, q)
implicit none
real(DP), intent(in) :: mu
real(DP), dimension(:), intent(in) :: x, v
real(DP), intent(out) :: a, e, q
real(DP), intent(in) :: mu !! Gravitational constant
real(DP), dimension(:), intent(in) :: x !! Position vector
real(DP), dimension(:), intent(in) :: v !! Velocity vector
real(DP), intent(out) :: a !! semimajor axis
real(DP), intent(out) :: e !! eccentricity
real(DP), intent(out) :: q !! periapsis
end subroutine orbel_xv2aeq

module pure subroutine orbel_xv2aqt(mu, x, v, a, q, capm, tperi)
implicit none
real(DP), intent(in) :: mu
real(DP), dimension(:), intent(in) :: x, v
real(DP), intent(out) :: a, q, capm, tperi
real(DP), intent(in) :: mu !! Gravitational constant
real(DP), dimension(:), intent(in) :: x !! Position vector
real(DP), dimension(:), intent(in) :: v !! Velocity vector
real(DP), intent(out) :: a !! semimajor axis
real(DP), intent(out) :: q !! periapsis
real(DP), intent(out) :: capm !! mean anomaly
real(DP), intent(out) :: tperi !! time of pericenter passage
end subroutine orbel_xv2aqt

module subroutine orbel_xv2el_vec(self, cb)
Expand Down
Loading

0 comments on commit 6e6c0f1

Please sign in to comment.