From ecdce0b5be1c5b3f031e5eb812b06c738be70e45 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Tue, 13 Dec 2022 06:23:35 -0500 Subject: [PATCH] Minor restructuring --- src/symba/symba_collision.f90 | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/symba/symba_collision.f90 b/src/symba/symba_collision.f90 index 222320588..405c3855d 100644 --- a/src/symba/symba_collision.f90 +++ b/src/symba/symba_collision.f90 @@ -381,22 +381,20 @@ module function symba_collision_check_encounter(self, system, param, t, dt, irec end if end if end do + + ! Extract the pl-pl or pl-tp encounter list and return the pl-pl or pl-tp collision_list + select type(self) + class is (symba_plplenc) + call self%extract_collisions(system, param) + class is (symba_pltpenc) + allocate(tmp, mold=self) + call self%spill(tmp, lcollision, ldestructive=.true.) ! Remove this encounter pair from the encounter list + end select end if end select end select - ! Extract the pl-pl or pl-tp encounter list and return the pl-pl or pl-tp collision_list - if (lany_collision) then - select type(self) - class is (symba_plplenc) - call self%extract_collisions(system, param) - class default - allocate(tmp, mold=self) - call self%spill(tmp, lcollision, ldestructive=.true.) ! Remove this encounter pair from the encounter list - end select - end if - return end function symba_collision_check_encounter