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

Commit

Permalink
Fixed problem where the particle type was not being set early enough …
Browse files Browse the repository at this point in the history
…to make it into the collision file
  • Loading branch information
daminton committed Dec 14, 2022
1 parent 67e03ea commit 784995c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 25 deletions.
18 changes: 0 additions & 18 deletions src/fraggle/fraggle_io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
!!
Expand Down
6 changes: 0 additions & 6 deletions src/modules/fraggle_classes.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion src/symba/symba_collision.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 784995c

Please sign in to comment.