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

Commit

Permalink
Reverted back to the old velocity vector. The "fix" made cascades
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Jan 7, 2023
1 parent a546c0d commit fb9c966
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fraggle/fraggle_generate.f90
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ module subroutine fraggle_generate_pos_vec(collider)
! Shift to the cloud center coordinates
fragments%rc(:,i) = fragments%rc(:,i) + fragment_cloud_center(:,j)

! Make sure that the fragments are positioned away from the impact point
! Make sure that the fragments are positioned away from the impact point
direction = dot_product(fragments%rc(:,i) - impactors%rbimp(:), fragment_cloud_center(:,j) - impactors%rbimp(:))
if (direction < 0.0_DP) then
fragments%rc(:,i) = fragments%rc(:,i) - fragment_cloud_center(:,j)
Expand Down Expand Up @@ -448,7 +448,7 @@ module subroutine fraggle_generate_vel_vec(collider, nbody_system, param, lfailu
vmag = vesc * vscale(i)
rimp(:) = fragments%rc(:,i) - impactors%rbimp(:)
vimp_unit(:) = .unit. rimp(:)
fragments%vc(:,i) = vimp_unit(:) * vsign(i)
fragments%vc(:,i) = (impactors%bounce_unit(:) + vimp_unit(:)) * vsign(i)
fragments%vc(:,i) = vmag * .unit.fragments%vc(:,i) + vrot(:)
end if
end do
Expand Down

0 comments on commit fb9c966

Please sign in to comment.