From f13b6c7ed93d90b8a7a4390f7ba16c51faf91100 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Wed, 11 Aug 2021 19:49:30 -0400 Subject: [PATCH 1/2] Made updating of nbody in append more consistent --- src/util/util_append.f90 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/util_append.f90 b/src/util/util_append.f90 index 979da7a19..cb15fa18c 100644 --- a/src/util/util_append.f90 +++ b/src/util/util_append.f90 @@ -177,10 +177,9 @@ module subroutine util_append_body(self, source, lsource_mask) call util_append(self%capom, source%capom, nold, nsrc, lsource_mask) call util_append(self%omega, source%omega, nold, nsrc, lsource_mask) call util_append(self%capm, source%capm, nold, nsrc, lsource_mask) + self%nbody = nold + count(lsource_mask(:)) end associate - self%nbody = count(self%status(:) /= INACTIVE) - return end subroutine util_append_body From 9d7a741b88ed4c63a450b1613cd4d62449307f31 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Wed, 11 Aug 2021 22:38:19 -0400 Subject: [PATCH 2/2] Fixed issue where failed fragmentation event lead to lost particles instead of pure hit and run --- src/symba/symba_fragmentation.f90 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/symba/symba_fragmentation.f90 b/src/symba/symba_fragmentation.f90 index 335ab9e66..5a2d49bd6 100644 --- a/src/symba/symba_fragmentation.f90 +++ b/src/symba/symba_fragmentation.f90 @@ -81,6 +81,12 @@ module function symba_fragmentation_casedisruption(system, param, family, x, v, write(*,*) 'No fragment solution found, so treat as a pure hit-and-run' status = ACTIVE nfrag = 0 + select type(pl => system%pl) + class is (symba_pl) + pl%status(family(:)) = status + pl%ldiscard(family(:)) = .false. + pl%lcollision(family(:)) = .false. + end select else ! Populate the list of new bodies write(*,'("Generating ",I2.0," fragments")') nfrag @@ -360,6 +366,12 @@ module function symba_fragmentation_casesupercatastrophic(system, param, family, write(*,*) 'No fragment solution found, so treat as a pure hit-and-run' status = ACTIVE nfrag = 0 + select type(pl => system%pl) + class is (symba_pl) + pl%status(family(:)) = status + pl%ldiscard(family(:)) = .false. + pl%lcollision(family(:)) = .false. + end select else ! Populate the list of new bodies write(*,'("Generating ",I2.0," fragments")') nfrag