From 784995c0eff0c98e58d159b9c48f7754493da5f7 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Wed, 14 Dec 2022 11:20:39 -0500 Subject: [PATCH] Fixed problem where the particle type was not being set early enough to make it into the collision file --- src/fraggle/fraggle_io.f90 | 18 ------------------ src/modules/fraggle_classes.f90 | 6 ------ src/symba/symba_collision.f90 | 8 +++++++- 3 files changed, 7 insertions(+), 25 deletions(-) diff --git a/src/fraggle/fraggle_io.f90 b/src/fraggle/fraggle_io.f90 index 6f75c7d01..4ed16f137 100644 --- a/src/fraggle/fraggle_io.f90 +++ b/src/fraggle/fraggle_io.f90 @@ -219,24 +219,6 @@ module subroutine fraggle_io_write_frame(self, nc, param) end subroutine fraggle_io_write_frame - module subroutine fraggle_io_log_pl(pl, param) - !! author: David A. Minton - !! - !! Writes a single message to the fraggle log file - implicit none - ! Arguments - class(swiftest_pl), intent(in) :: pl !! Swiftest massive body object (only the new bodies generated in a collision) - class(swiftest_parameters), intent(in) :: param !! Current swiftest run configuration parameters - ! Internals - integer(I4B) :: i - character(STRMAX) :: errmsg - - return - 667 continue - write(*,*) "Error writing Fraggle message to log file: " // trim(adjustl(errmsg)) - end subroutine fraggle_io_log_pl - - module subroutine fraggle_io_log_regime(colliders, frag) !! author: David A. Minton !! diff --git a/src/modules/fraggle_classes.f90 b/src/modules/fraggle_classes.f90 index 8c75a3fc6..00b791f71 100644 --- a/src/modules/fraggle_classes.f90 +++ b/src/modules/fraggle_classes.f90 @@ -166,12 +166,6 @@ module subroutine fraggle_io_write_frame(self, nc, param) class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters end subroutine fraggle_io_write_frame - module subroutine fraggle_io_log_pl(pl, param) - implicit none - class(swiftest_pl), intent(in) :: pl !! Swiftest massive body object (only the new bodies generated in a collision) - class(swiftest_parameters), intent(in) :: param !! Current swiftest run configuration parameters - end subroutine fraggle_io_log_pl - module subroutine fraggle_io_log_regime(colliders, frag) implicit none class(fraggle_colliders), intent(in) :: colliders diff --git a/src/symba/symba_collision.f90 b/src/symba/symba_collision.f90 index 0353cc7d5..52324c5a3 100644 --- a/src/symba/symba_collision.f90 +++ b/src/symba/symba_collision.f90 @@ -843,8 +843,14 @@ subroutine symba_collision_mergeaddsub(system, param, t, status) plnew%levelg(1:nfrag) = pl%levelg(ibiggest) plnew%levelm(1:nfrag) = pl%levelm(ibiggest) + plnew%lmtiny(1:nfrag) = plnew%Gmass(1:nfrag) < param%GMTINY + where(plnew%lmtiny(1:nfrag)) + plnew%info(1:nfrag)%particle_type = PL_TINY_TYPE_NAME + elsewhere + plnew%info(1:nfrag)%particle_type = PL_TYPE_NAME + end where + ! Log the properties of the new bodies - call fraggle_io_log_pl(plnew, param) allocate(system%fragments%pl, source=plnew) ! Append the new merged body to the list