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.
Restructured kick methods and refactored getacch to get_accel method.…
… Created basic helio setup method
- Loading branch information
Showing
16 changed files
with
188 additions
and
130 deletions.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,53 @@ | ||
| submodule(helio_classes) s_helio_kick | ||
| use swiftest | ||
| contains | ||
| module subroutine helio_kickvb_pl(self, dt) | ||
| !! author: David A. Minton | ||
| !! | ||
| !! Kick barycentric velocities of bodies | ||
| !! | ||
| !! Adapted from Martin Duncan and Hal Levison's Swift routine kickvh.f | ||
| !! Adapted from David E. Kaufmann's Swifter routine helio_kickvb.f90 | ||
| implicit none | ||
| ! Arguments | ||
| class(helio_pl), intent(inout) :: self !! Swiftest generic body object | ||
| real(DP), intent(in) :: dt !! Stepsize | ||
| ! Internals | ||
| integer(I4B) :: i | ||
|
|
||
| associate(pl => self, npl => self%nbody) | ||
| if (npl ==0) return | ||
| do concurrent(i = 1:npl, pl%status(i) == ACTIVE) | ||
| pl%vb(:, i) = pl%vb(:, i) + pl%ah(:, i) * dt | ||
| end do | ||
| end associate | ||
|
|
||
| return | ||
|
|
||
| end subroutine helio_kickvb_pl | ||
|
|
||
| module subroutine helio_kickvb_tp(self, dt) | ||
| !! author: David A. Minton | ||
| !! | ||
| !! Kick barycentric velocities of bodies | ||
| !! | ||
| !! Adapted from Martin Duncan and Hal Levison's Swift routine kickvh_tp.f | ||
| !! Adapted from David E. Kaufmann's Swifter routine helio_kickvb_tp.f90 | ||
| implicit none | ||
| ! Arguments | ||
| class(helio_tp), intent(inout) :: self !! Swiftest generic body object | ||
| real(DP), intent(in) :: dt !! Stepsize | ||
| ! Internals | ||
| integer(I4B) :: i | ||
|
|
||
| associate(tp => self, ntp => self%nbody) | ||
| if (ntp ==0) return | ||
| do concurrent(i = 1:ntp, tp%status(i) == ACTIVE) | ||
| tp%vb(:, i) = tp%vb(:, i) + tp%ah(:, i) * dt | ||
| end do | ||
| end associate | ||
|
|
||
| return | ||
|
|
||
| end subroutine helio_kickvb_tp | ||
| end submodule s_helio_kick |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.