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

Commit

Permalink
Added mass loss exception commit
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Aug 30, 2021
1 parent 1312cb7 commit a2b8b4a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/io/io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ module subroutine io_conservation_report(self, param, lterminal)
Ecoll_error = param%Ecollisions / abs(param%Eorbit_orig)
Etotal_error = (Eorbit_now - param%Ecollisions - param%Eorbit_orig - param%Euntracked) / abs(param%Eorbit_orig)
Merror = (GMtot_now - param%GMtot_orig) / param%GMtot_orig
if (Merror < -10 * epsilon(Merror)) then
write(*,*) 'Mass loss! Halting!'
call util_exit(FAILURE)
end if
write(*, EGYTERMFMT) Lerror, Ecoll_error, Etotal_error, Merror
end if
end associate
Expand Down

0 comments on commit a2b8b4a

Please sign in to comment.