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

Commit

Permalink
Tweaked tolerance values based on testing results
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed May 30, 2021
1 parent 576f699 commit e44cd8b
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 @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e44cd8b

Please sign in to comment.