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

Commit

Permalink
Bug fixes that allows the movie to work
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Dec 6, 2022
1 parent b0a8b8a commit b9a0570
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/symba/symba_io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ module subroutine symba_io_encounter_write_frame(self, nciu, param)
call check( nf90_put_var(nciu%id, nciu%rot_varid, pl%rot(:,i), start=[1,idslot, tslot], count=[NDIM,1,1]), "symba_io_encounter_write_frame_base nf90_put_var body rotx_varid" )
end if
charstring = trim(adjustl(pl%info(i)%name))
call check( nf90_put_var(nciu%id, nciu%ptype_varid, charstring, start=[1, idslot], count=[NAMELEN, 1]), "symba_io_encounter_write_frame nf90_put_var particle_type_varid" )
charstring = trim(adjustl(pl%info(i)%particle_type))
call check( nf90_put_var(nciu%id, nciu%name_varid, charstring, start=[1, idslot], count=[NAMELEN, 1]), "symba_io_encounter_write_frame nf90_put_var name_varid" )
charstring = trim(adjustl(pl%info(i)%particle_type))
call check( nf90_put_var(nciu%id, nciu%ptype_varid, charstring, start=[1, idslot], count=[NAMELEN, 1]), "symba_io_encounter_write_frame nf90_put_var particle_type_varid" )
end do
end select

Expand Down
4 changes: 3 additions & 1 deletion src/symba/symba_util.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1320,11 +1320,13 @@ module subroutine symba_util_take_encounter_snapshot(self, param, t)
class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters
real(DP), intent(in) :: t !! current time
! Arguments
type(symba_encounter_snapshot) :: snapshot
type(symba_encounter_snapshot), allocatable :: snapshot
integer(I4B) :: i, npl_snap, ntp_snap

associate(npl => self%pl%nbody, ntp => self%tp%nbody)

allocate(symba_encounter_snapshot :: snapshot)

if (npl > 0) allocate(symba_pl :: snapshot%pl)
if (ntp > 0) allocate(symba_tp :: snapshot%tp)
if (npl + ntp == 0) return
Expand Down

0 comments on commit b9a0570

Please sign in to comment.