From 518790ec64604be32395cec965de92bb971b50db Mon Sep 17 00:00:00 2001 From: Carlisle Wishard Date: Tue, 1 Jun 2021 17:25:47 -0400 Subject: [PATCH] symba_frag_pos updated energy error success criteria and reporting --- src/symba/symba_frag_pos.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/symba/symba_frag_pos.f90 b/src/symba/symba_frag_pos.f90 index 5681cb400..9fb00c0cf 100644 --- a/src/symba/symba_frag_pos.f90 +++ b/src/symba/symba_frag_pos.f90 @@ -99,8 +99,8 @@ subroutine symba_frag_pos(param, symba_plA, family, x, v, L_spin, Ip, mass, radi if (lmerge) write(*,*) 'Failed to find radial velocities' if (.not.lmerge) then call calculate_system_energy(linclude_fragments=.true.) - if ((abs(dEtot) - Qloss) / Qloss > Etol) then - write(*,*) 'Failed due to high energy error: ',(abs(dEtot) - Qloss) / Qloss + if ((abs(dEtot / Etot_before) < Qloss) .or. (dEtot > 0.0_DP)) then + write(*,*) 'Failed due to high energy error: ', abs(dEtot / Etot_before) lmerge = .true. else if (abs(dLmag) > Ltol) then write(*,*) 'Failed due to high angular momentum error: ', dLmag