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

Commit

Permalink
Switched dLmag to units instead of ratio for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Jun 4, 2021
1 parent 886c1fc commit cfca20e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/symba/symba_frag_pos.f90
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ subroutine symba_frag_pos(param, symba_plA, family, x, v, L_spin, Ip, mass, radi
if ((abs((dEtot - Qloss) / Qloss) > Etol) .or. (dEtot > 0.0_DP)) then
write(*,*) 'Failed due to high energy error: ', abs((dEtot - Qloss) / Qloss), dEtot / abs(Etot_before)
lmerge = .true.
else if (abs(dLmag) > Ltol) then
write(*,*) 'Failed due to high angular momentum error: ', dLmag
else if (abs(dLmag) / Lmag_before > Ltol) then
write(*,*) 'Failed due to high angular momentum error: ', dLmag / Lmag_before
lmerge = .true.
end if
end if
Expand All @@ -124,7 +124,7 @@ subroutine symba_frag_pos(param, symba_plA, family, x, v, L_spin, Ip, mass, radi
else
write(*,*) "symba_frag_pos succeeded after: ",try," tries"
write(*, "(' dL_tot should be very small' )")
write(*,fmtlabel) ' dL_tot |', dLmag
write(*,fmtlabel) ' dL_tot |', dLmag / Lmag_before
write(*, "(' dE_tot should be negative and equal to Qloss' )")
write(*,fmtlabel) ' dE_tot |', dEtot / abs(Etot_before)
write(*,fmtlabel) ' Qloss |', -Qloss / abs(Etot_before)
Expand Down Expand Up @@ -392,7 +392,7 @@ subroutine calculate_system_energy(linclude_fragments)
pe_after = pe
Etot_after = ke_orbit_after + ke_spin_after + pe_after
dEtot = Etot_after - Etot_before
dLmag = norm2(Ltot_after(:) - Ltot_before(:)) / Lmag_before
dLmag = norm2(Ltot_after(:) - Ltot_before(:))
else
Ltot_before(:) = Lorbit(:) + Lspin(:)
Lmag_before = norm2(Ltot_before(:))
Expand Down

0 comments on commit cfca20e

Please sign in to comment.