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

Commit

Permalink
Fixed allocation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Jan 13, 2023
1 parent 57b79a6 commit 3e92b22
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/collision/collision_generate.f90
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ module subroutine collision_generate_merge(self, nbody_system, param, t)
! its index in the main pl structure
ibiggest = impactors%id(maxloc(pl%Gmass(impactors%id(:)), dim=1))
fragments%id(1) = pl%id(ibiggest)
if (allocated(fragments%info)) deallocate(fragments%info)
allocate(fragments%info, source=pl%info(ibiggest:ibiggest))

! Compute the physical properties of the new body after the merge.
Expand Down

0 comments on commit 3e92b22

Please sign in to comment.