From 515b00cb79be1283dac796f46492db073d474143 Mon Sep 17 00:00:00 2001 From: Carlisle Wishard Date: Fri, 4 Jun 2021 10:24:36 -0400 Subject: [PATCH] symba_frag_pos fixed failure criteria --- src/symba/symba_frag_pos.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/symba/symba_frag_pos.f90 b/src/symba/symba_frag_pos.f90 index 41b0b9320..1e59a50ae 100644 --- a/src/symba/symba_frag_pos.f90 +++ b/src/symba/symba_frag_pos.f90 @@ -99,7 +99,7 @@ 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 / Etot_before) < Qloss) .or. (dEtot > 0.0_DP)) then + if ((abs(dEtot - Qloss) / Qloss > Etol) .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