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

Commit

Permalink
Rearranged the mergeaddsub stuff and set the progress bar to only upd…
Browse files Browse the repository at this point in the history
…ate on the output steps to cut down on the size of the SLURM-generated output files
  • Loading branch information
daminton committed Jan 6, 2023
1 parent 80c7f8c commit 056bcbe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
23 changes: 12 additions & 11 deletions src/collision/collision_resolve.f90
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,18 @@ module subroutine collision_resolve_mergeaddsub(nbody_system, param, t, status)
plnew%mass(1:nfrag) = fragments%mass(1:nfrag)
plnew%Gmass(1:nfrag) = param%GU * fragments%mass(1:nfrag)
plnew%radius(1:nfrag) = fragments%radius(1:nfrag)

if (param%lrotation) then
plnew%Ip(:, 1:nfrag) = fragments%Ip(:, 1:nfrag)
plnew%rot(:, 1:nfrag) = fragments%rot(:, 1:nfrag)
end if

! if (param%ltides) then
! plnew%Q = pl%Q(ibiggest)
! plnew%k2 = pl%k2(ibiggest)
! plnew%tlag = pl%tlag(ibiggest)
! end if

do concurrent(i = 1:nfrag)
volume = 4.0_DP/3.0_DP * PI * plnew%radius(i)**3
plnew%density(i) = fragments%mass(i) / volume
Expand Down Expand Up @@ -407,17 +419,6 @@ module subroutine collision_resolve_mergeaddsub(nbody_system, param, t, status)
end do
end select

if (param%lrotation) then
plnew%Ip(:, 1:nfrag) = fragments%Ip(:, 1:nfrag)
plnew%rot(:, 1:nfrag) = fragments%rot(:, 1:nfrag)
end if

! if (param%ltides) then
! plnew%Q = pl%Q(ibiggest)
! plnew%k2 = pl%k2(ibiggest)
! plnew%tlag = pl%tlag(ibiggest)
! end if

!Copy over or set integration parameters for new bodies
plnew%lcollision(1:nfrag) = .false.
plnew%ldiscard(1:nfrag) = .false.
Expand Down
1 change: 0 additions & 1 deletion src/swiftest/swiftest_driver.f90
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ program swiftest_driver

!> Evaluate any discards or collisional outcomes
call nbody_system%discard(param)
if (display_style == "PROGRESS") call pbar%update(iloop)

!> If the loop counter is at the output cadence value, append the data file with a single frame
if (istep_out > 0) then
Expand Down

0 comments on commit 056bcbe

Please sign in to comment.