From 02c4e20a2b694b5eb5a743861964557d4588b410 Mon Sep 17 00:00:00 2001 From: Carlisle Wishard Date: Fri, 25 Jun 2021 12:09:16 -0400 Subject: [PATCH] added in high angular momentum failure reporting and exit --- src/io/io_conservation_report.f90 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/io/io_conservation_report.f90 b/src/io/io_conservation_report.f90 index d240eb90a..61816acc9 100644 --- a/src/io/io_conservation_report.f90 +++ b/src/io/io_conservation_report.f90 @@ -74,6 +74,11 @@ module subroutine io_conservation_report(t, symba_plA, npl, j2rp2, j4rp4, param, write(*,*) 'dpe : ',(pe_now - pe_last) / abs(Eorbit_orig) write(*,*) end if + if (Lerror > 1e-10) then + write(*,*) 'Something has gone wrong! Angular momentum is too high!' + write(*,*) 'Lerror: ', Lerror + call util_exit(FAILURE) + end if end if ke_orbit_last = ke_orbit_now ke_spin_last = ke_spin_now