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.
Embarked on a major restructuring of the encounter, collision, and fr…
…agment system. Created a new top-level module specializing in collisions. Wrote it so other collision models besides Fraggle can easily be implemented.
- Loading branch information
Showing
24 changed files
with
1,371 additions
and
1,296 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
Large diffs are not rendered by default.
Oops, something went wrong.
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,73 @@ | ||
| !! Copyright 2022 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh | ||
| !! This file is part of Swiftest. | ||
| !! Swiftest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License | ||
| !! as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. | ||
| !! Swiftest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty | ||
| !! of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
| !! You should have received a copy of the GNU General Public License along with Swiftest. | ||
| !! If not, see: https://www.gnu.org/licenses. | ||
|
|
||
| submodule (collision_classes) s_collision_setup | ||
| use swiftest | ||
| contains | ||
|
|
||
| module subroutine collision_setup_system(self, system, param) | ||
| !! author: David A. Minton | ||
| !! | ||
| !! Initializer for the encounter collision system. Allocates the collider and fragments classes and the before/after snapshots | ||
| implicit none | ||
| ! Arguments | ||
| class(collision_system), intent(inout) :: self !! Encounter collision system object | ||
| class(swiftest_nbody_system), intent(inout) :: system !! Swiftest nbody system object | ||
| class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters | ||
| ! Internals | ||
|
|
||
|
|
||
| return | ||
| end subroutine collision_setup_system | ||
|
|
||
| module subroutine collision_setup_fragments(self, n, param) | ||
| !! author: David A. Minton | ||
| !! | ||
| !! Allocates arrays for n fragments in a collision system. Passing n = 0 deallocates all arrays. | ||
| implicit none | ||
| ! Arguments | ||
| class(collision_fragments), intent(inout) :: self | ||
| integer(I4B), intent(in) :: n | ||
| class(swiftest_parameters), intent(in) :: param | ||
|
|
||
|
|
||
| call self%swiftest_pl%setup(n, param) | ||
| if (n < 0) return | ||
|
|
||
| call self%dealloc() | ||
|
|
||
| if (n == 0) return | ||
|
|
||
| ! allocate(self%rotmag(n)) | ||
| ! allocate(self%v_r_mag(n)) | ||
| ! allocate(self%v_t_mag(n)) | ||
| ! allocate(self%v_n_mag(n)) | ||
|
|
||
| call self%reset() | ||
|
|
||
| return | ||
| end subroutine collision_setup_fragments | ||
|
|
||
|
|
||
| module subroutine collision_setup_impactors(self, system, param) | ||
| !! author: David A. Minton | ||
| !! | ||
| !! Initializes a collider object | ||
| implicit none | ||
| ! Arguments | ||
| class(collision_impactors), intent(inout) :: self !! Fragment system object | ||
| class(swiftest_nbody_system), intent(in) :: system | ||
| class(swiftest_parameters), intent(in) :: param !! Current swiftest run configuration parameters | ||
|
|
||
| return | ||
| end subroutine collision_setup_impactors | ||
|
|
||
| end submodule s_collision_setup | ||
|
|
||
|
|
Oops, something went wrong.