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

Commit

Permalink
Simplified output in swiftest.log. Also adjusted the size of the circ…
Browse files Browse the repository at this point in the history
…les in the fragmentation movie maker
  • Loading branch information
daminton committed Jan 8, 2023
1 parent 411efd5 commit a489d70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/Fragmentation/Fragmentation_Movie.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def setup_plot(self):

scale_frame = abs(rhy1) + abs(rhy2)
ax = plt.Axes(fig, [0.1, 0.1, 0.8, 0.8])
self.ax_pt_size = self.figsize[0] * 0.7 * 72 / scale_frame
self.ax_pt_size = self.figsize[0] * 72 / scale_frame
ax.set_xlim(-scale_frame, scale_frame)
ax.set_ylim(-scale_frame, scale_frame)
ax.set_xticks([])
Expand Down
7 changes: 2 additions & 5 deletions src/swiftest/swiftest_io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,7 @@ module subroutine swiftest_io_conservation_report(self, param, lterminal)
real(DP) :: GMtot_now
character(len=STRMAX) :: errmsg
integer(I4B), parameter :: EGYIU = 72
character(len=*), parameter :: EGYTERMFMT = '(" DL/L0 = ", ES12.5 &
"; DE_collisions/|E0| = ", ES12.5, &
"; D(E_orbit+E_collisions)/|E0| = ", ES12.5, &
"; DM/M0 = ", ES12.5)'
character(len=*), parameter :: EGYTERMFMT = '(" DL/L0 = ", ES12.5, "; DE/|E0| = ", ES12.5, "; DM/M0 = ", ES12.5)'

associate(nbody_system => self, pl => self%pl, cb => self%cb, npl => self%pl%nbody, display_unit => param%display_unit, nc => param%system_history%nc)

Expand Down Expand Up @@ -175,7 +172,7 @@ module subroutine swiftest_io_conservation_report(self, param, lterminal)
nbody_system%L_total_error = norm2(L_total_now(:) - nbody_system%L_total_orig(:)) / norm2(nbody_system%L_total_orig(:))
nbody_system%Mescape_error = nbody_system%GMescape / nbody_system%GMtot_orig
nbody_system%Mtot_error = (GMtot_now - nbody_system%GMtot_orig) / nbody_system%GMtot_orig
if (lterminal) write(display_unit, EGYTERMFMT) nbody_system%L_total_error, nbody_system%Ecoll_error, nbody_system%te_error,nbody_system%Mtot_error
if (lterminal) write(display_unit, EGYTERMFMT) nbody_system%L_total_error, nbody_system%te_error,nbody_system%Mtot_error
if (abs(nbody_system%Mtot_error) > 100 * epsilon(nbody_system%Mtot_error)) then
write(*,*) "Severe error! Mass not conserved! Halting!"
! Save the frame of data to the bin file in the slot just after the present one for diagnostics
Expand Down

0 comments on commit a489d70

Please sign in to comment.