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

Commit

Permalink
Wrote template for an encounter scrub method that will make use of pa…
Browse files Browse the repository at this point in the history
…rt of the code in the symba_collision.f90 subroutine in the current Fragmentation branch
  • Loading branch information
daminton committed Aug 4, 2021
1 parent 8a3c43c commit 9f5621c
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 10 deletions.
10 changes: 9 additions & 1 deletion src/modules/symba_classes.f90
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ module symba_classes
!> SyMBA class for tracking pl-pl close encounters in a step
type, extends(symba_pltpenc) :: symba_plplenc
contains
procedure :: scrub_non_collision => symba_collision_encounter_scrub !! Processes the pl-pl encounter list remove only those encounters that led to a collisio
end type symba_plplenc

!********************************************************************************************************************************
Expand Down Expand Up @@ -175,6 +176,13 @@ module subroutine symba_collision_check_pltpenc(self, system, param, t, dt, irec
integer(I4B), intent(in) :: irec !! Current recursion level
end subroutine symba_collision_check_pltpenc

module subroutine symba_collision_encounter_scrub(self, system, param)
implicit none
class(symba_plplenc), intent(inout) :: self !! SyMBA pl-pl encounter list
class(symba_nbody_system), intent(inout) :: system !! SyMBA nbody system object
class(swiftest_parameters), intent(in) :: param !! Current run configuration parameterss
end subroutine

module subroutine symba_collision_make_family_pl(self,idx)
implicit none
class(symba_pl), intent(inout) :: self !! SyMBA massive body object
Expand Down Expand Up @@ -259,7 +267,7 @@ end subroutine symba_io_dump_particle_info

module subroutine symba_io_param_reader(self, unit, iotype, v_list, iostat, iomsg)
implicit none
class(symba_parameters), intent(inout) :: self !! Collection of parameters
class(symba_parameters), intent(inout) :: self !! Collection of SyMBA parameters
integer, intent(in) :: unit !! File unit number
character(len=*), intent(in) :: iotype !! Dummy argument passed to the input/output procedure contains the text from the char-literal-constant, prefixed with DT.
!! If you do not include a char-literal-constant, the iotype argument contains only DT.
Expand Down
16 changes: 16 additions & 0 deletions src/symba/symba_collision.f90
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,20 @@ module subroutine symba_collision_make_family_pl(self, idx)
return
end subroutine symba_collision_make_family_pl

module subroutine symba_collision_encounter_scrub(self, system, param)
!! author: David A. Minton
!!
!! Processes the pl-pl encounter list remove only those encounters that led to a collision
!!
implicit none
! Arguments
class(symba_plplenc), intent(inout) :: self !! SyMBA pl-pl encounter list
class(symba_nbody_system), intent(inout) :: system !! SyMBA nbody system object
class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters
! Internals

return
end subroutine


end submodule s_symba_collision
14 changes: 5 additions & 9 deletions src/symba/symba_discard.f90
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,11 @@ module subroutine symba_discard_pl(self, system, param)
class(symba_pl), 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

call symba_discard_nonplpl(self, system, param)

select type(param)
class is (symba_parameters)
if (param%lfragmentation) then

end if


select type(system)
class is (symba_nbody_system)
call symba_discard_nonplpl(self, system, param)
call system%plplenc_list%scrub_non_collision(system, param)
end select

return
Expand Down

0 comments on commit 9f5621c

Please sign in to comment.