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

Commit

Permalink
Merge branch 'debug'
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Aug 19, 2021
2 parents d1e446e + ba6f482 commit 926822d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion src/io/io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1196,9 +1196,12 @@ module function io_read_frame_system(self, iu, param) result(ierr)
integer(I4B) :: ierr !! Error code: returns 0 if the read is successful
! Internals
character(len=STRMAX) :: errmsg
integer(I4B) :: npl, ntp

ierr = io_read_hdr(iu, param%t, self%pl%nbody, self%tp%nbody, param%out_form, param%out_type)
ierr = io_read_hdr(iu, param%t, npl, ntp, param%out_form, param%out_type)
if (is_iostat_end(ierr)) return ! Reached the end of the frames
call self%pl%setup(npl, param)
call self%tp%setup(ntp, param)

if (ierr /= 0) then
write(errmsg, *) "Cannot read frame header."
Expand Down
10 changes: 5 additions & 5 deletions src/setup/setup.f90
Original file line number Diff line number Diff line change
Expand Up @@ -264,18 +264,18 @@ module subroutine setup_pl(self, n, param)
end if

if (param%lrotation) then
if (allocated(self%rot)) deallocate(self%rhill)
if (allocated(self%Ip)) deallocate(self%rhill)
if (allocated(self%rot)) deallocate(self%rot)
if (allocated(self%Ip)) deallocate(self%Ip)
allocate(self%rot(NDIM, n))
allocate(self%Ip(NDIM, n))
self%rot(:,:) = 0.0_DP
self%Ip(:,:) = 0.0_DP
end if

if (param%ltides) then
if (allocated(self%k2)) deallocate(self%rhill)
if (allocated(self%Q)) deallocate(self%rhill)
if (allocated(self%tlag)) deallocate(self%rhill)
if (allocated(self%k2)) deallocate(self%k2)
if (allocated(self%Q)) deallocate(self%Q)
if (allocated(self%tlag)) deallocate(self%tlag)
allocate(self%k2(n))
allocate(self%Q(n))
allocate(self%tlag(n))
Expand Down

0 comments on commit 926822d

Please sign in to comment.