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

Commit

Permalink
Browse files Browse the repository at this point in the history
Added some additional diagnostic outputs to the fragment energy calculation
  • Loading branch information
daminton committed May 11, 2021
1 parent 609ee2e commit e16db5c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/symba/symba_frag_pos.f90
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ subroutine symba_frag_pos (param, symba_plA, family, x, v, L_spin, Ip, mass, rad
call symba_frag_pos_kinetic_energy(xcom, vcom, L_orb, L_spin, m_frag, x_frag, v_frag, ke_target, lmerge)

write(*, "(' ---------------------------------------------------------------------------')")
write(*,fmtlabel) ' T_family |',ke_family / abs(Etot_before)
write(*,fmtlabel) ' T_frag targ |',ke_target / abs(Etot_before)

! Shift the fragments into the system barycenter frame
Expand All @@ -125,12 +126,13 @@ subroutine symba_frag_pos (param, symba_plA, family, x, v, L_spin, Ip, mass, rad
vb_frag(:,i) = v_frag(:, i) + vcom(:)
end do

ke_target = 0._DP
ke_frag = 0._DP
do i = 1, nfrag
ke_target = ke_target + 0.5_DP * m_frag(i) * dot_product(vb_frag(:, i), vb_frag(:, i))
ke_frag = ke_frag + 0.5_DP * m_frag(i) * dot_product(vb_frag(:, i), vb_frag(:, i))
end do
write(*, "(' ---------------------------------------------------------------------------')")
write(*,fmtlabel) ' T_frag calc |',ke_target / abs(Etot_before)
write(*,fmtlabel) ' T_frag calc |',ke_frag / abs(Etot_before)
write(*,fmtlabel) ' residual |',1.0_DP - ke_frag / ke_target

! Calculate the new energy of the system of fragments
call symba_frag_pos_energy_calc(npl, symba_plA, lexclude, ke_after, ke_spin_after, pe_after, Ltot_after,&
Expand Down

0 comments on commit e16db5c

Please sign in to comment.