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

Commit

Permalink
More fixes to calls to unallocateds. Also work on a scheme to reduce …
Browse files Browse the repository at this point in the history
…the number of fragments when the Fraggle velocity function fails to converge.
  • Loading branch information
daminton committed Jan 13, 2023
1 parent bf4fc81 commit 8b8be4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/fraggle/fraggle_generate.f90
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ module subroutine fraggle_generate_vel_vec(collider, nbody_system, param, lfailu
! We didn't converge. Reset the fragment positions and velocities and try a new configuration with some slightly different parameters
! Reduce the number of fragments by one
nlast = fragments%nbody
fragments%Ip(:,1) = fragments%mass(1) * impactors%Ip(:,1) + fragments%mass(nlast) * impactors%Ip(:,nlast)
fragments%Ip(:,1) = fragments%mass(1) * fragments%Ip(:,1) + fragments%mass(nlast) * fragments%Ip(:,nlast)
fragments%mass(1) = fragments%mass(1) + fragments%mass(nlast)
fragments%Ip(:,1) = fragments%Ip(:,1) / fragments%mass(1)
fragments%Gmass(1) = fragments%Gmass(1) + fragments%mass(nlast)
Expand Down
2 changes: 2 additions & 0 deletions src/swiftest/swiftest_discard.f90
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ module subroutine swiftest_discard_tp(self, nbody_system, param)
logical, dimension(:), allocatable :: ldiscard
integer(I4B) :: npl, ntp

if (self%nbody == 0) return

associate(tp => self, cb => nbody_system%cb, pl => nbody_system%pl)
ntp = tp%nbody
npl = pl%nbody
Expand Down

0 comments on commit 8b8be4f

Please sign in to comment.