This repository was archived by the owner on Aug 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
160 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
submodule(symba_classes) s_symba_gr | ||
use swiftest | ||
contains | ||
|
||
module pure subroutine symba_gr_p4_pl(self, system, param, dt) | ||
!! author: David A. Minton | ||
!! | ||
!! Position kick to massive bodies due to p**4 term in the post-Newtonian correction | ||
!! Based on Saha & Tremaine (1994) Eq. 28 | ||
!! | ||
!! Adapted from David A. Minton's Swifter routine routine gr_symba_p4.f90 | ||
implicit none | ||
! Arguments | ||
class(symba_pl), intent(inout) :: self !! SyMBA massive body object | ||
class(swiftest_nbody_system), intent(inout) :: system !! Swiftest nbody system object | ||
class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters | ||
real(DP), intent(in) :: dt !! Step size | ||
! Internals | ||
integer(I4B) :: i | ||
|
||
if (self%nbody == 0) return | ||
|
||
associate(pl => self, npl => self%nbody) | ||
select type(system) | ||
class is (symba_nbody_system) | ||
do concurrent(i = 1:npl, pl%lmask(i) .and. pl%levelg(i) == system%irec ) | ||
call gr_p4_pos_kick(param, pl%xh(:, i), pl%vb(:, i), dt) | ||
end do | ||
end select | ||
end associate | ||
|
||
return | ||
end subroutine symba_gr_p4_pl | ||
|
||
|
||
module pure subroutine symba_gr_p4_tp(self, system, param, dt) | ||
!! author: David A. Minton | ||
!! | ||
!! Position kick to test particles due to p**4 term in the post-Newtonian correction | ||
!! Based on Saha & Tremaine (1994) Eq. 28 | ||
!! | ||
!! Adapted from David A. Minton's Swifter routine routine gr_symba_p4.f90 | ||
implicit none | ||
! Arguments | ||
class(symba_tp), intent(inout) :: self !! SyMBA test particle object | ||
class(swiftest_nbody_system), intent(inout) :: system !! Swiftest nbody system object | ||
class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters | ||
real(DP), intent(in) :: dt !! Step size | ||
! Internals | ||
integer(I4B) :: i | ||
|
||
if (self%nbody == 0) return | ||
|
||
associate(tp => self, ntp => self%nbody) | ||
select type(system) | ||
class is (symba_nbody_system) | ||
do concurrent(i = 1:ntp, tp%lmask(i) .and. tp%levelg(i) == system%irec) | ||
call gr_p4_pos_kick(param, tp%xh(:, i), tp%vb(:, i), dt) | ||
end do | ||
end select | ||
end associate | ||
|
||
return | ||
end subroutine symba_gr_p4_tp | ||
|
||
end submodule s_symba_gr |
Oops, something went wrong.