From e44cd8bda49014521e1fa64ef0b4406128aed457 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Sat, 29 May 2021 22:06:34 -0400 Subject: [PATCH] Tweaked tolerance values based on testing results --- src/symba/symba_frag_pos.f90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/symba/symba_frag_pos.f90 b/src/symba/symba_frag_pos.f90 index d34adba3b..cb4b59006 100644 --- a/src/symba/symba_frag_pos.f90 +++ b/src/symba/symba_frag_pos.f90 @@ -104,9 +104,10 @@ subroutine symba_frag_pos(param, symba_plA, family, x, v, L_spin, Ip, mass, radi if (.not.lmerge) then call calculate_system_energy(linclude_fragments=.true.) if ((abs(dEtot) - Qloss) / Qloss > Etol) then - write(*,*) 'Energy error is too high: ',(abs(dEtot) - Qloss) / Qloss + write(*,*) 'Failed due to high energy error: ',(abs(dEtot) - Qloss) / Qloss lmerge = .true. else if (abs(dLmag) > Ltol) then + write(*,*) 'Failed due to high angular momentum error: ',(abs(dEtot) - Qloss) / Qloss lmerge = .true. end if end if @@ -498,7 +499,7 @@ subroutine set_fragment_tangential_velocities(lerr) ! Internals integer(I4B) :: i real(DP) :: L_orb_mag - real(DP), parameter :: TOL = 1e-8_DP + real(DP), parameter :: TOL = 2e-8_DP real(DP), dimension(:), allocatable :: v_t_initial type(lambda_obj) :: spinfunc real(DP), dimension(1) :: f_spin !! Fraction of pre-impact angular momentum that is converted to fragment spin @@ -570,7 +571,6 @@ function spin_objective_function(f_spin_input) result(fval) real(DP) :: fval ! Internals integer(I4B) :: i, j - real(DP), parameter :: TOL = 1e-8_DP real(DP), dimension(NDIM) :: L_frag_spin real(DP) :: L_orb_mag real(DP), dimension(:), allocatable :: v_t_initial @@ -711,7 +711,7 @@ subroutine set_fragment_radial_velocities(lerr) ! Arguments logical, intent(out) :: lerr ! Internals - real(DP), parameter :: TOL = 1e-11_DP + real(DP), parameter :: TOL = 1e-12_DP integer(I4B) :: i, j real(DP), dimension(:), allocatable :: v_r_initial, v_r_sigma real(DP), dimension(:,:), allocatable :: v_r