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

Commit

Permalink
Fixed array bounds bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed May 24, 2021
1 parent 6a8e04d commit be56439
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/io/io_dump_pl.f90
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ SUBROUTINE io_dump_pl(npl, swiftest_plA, param)
write(LUN) swiftest_plA%xh(:,1:npl)
write(LUN) swiftest_plA%vh(:,1:npl)
if (param%lrotation) THEN
write(LUN) swiftest_plA%Ip(:,:)
write(LUN) swiftest_plA%rot(:,:)
write(LUN) swiftest_plA%Ip(:,1:npl)
write(LUN) swiftest_plA%rot(:,1:npl)
end if
close(LUN)
idx = idx + 1
Expand Down
24 changes: 12 additions & 12 deletions src/symba/symba_rearray.f90
Original file line number Diff line number Diff line change
Expand Up @@ -132,19 +132,19 @@ subroutine symba_rearray(t, npl, nplm, ntp, nsppl, nsptp, symba_plA, symba_tpA,
! Create the particle information and set the status flags of all new particles
allocate(add_l_pl(npl))

where ((symba_plA%helio%swiftest%status(:) == DISRUPTION) .or. &
(symba_plA%helio%swiftest%status(:) == SUPERCATASTROPHIC) .or. &
(symba_plA%helio%swiftest%status(:) == HIT_AND_RUN))
symba_plA%helio%swiftest%info(:)%origin_time = t
symba_plA%helio%swiftest%info(:)%origin_xh(1) = symba_plA%helio%swiftest%xh(1,:)
symba_plA%helio%swiftest%info(:)%origin_xh(2) = symba_plA%helio%swiftest%xh(2,:)
symba_plA%helio%swiftest%info(:)%origin_xh(3) = symba_plA%helio%swiftest%xh(3,:)
symba_plA%helio%swiftest%info(:)%origin_vh(1) = symba_plA%helio%swiftest%vh(1,:)
symba_plA%helio%swiftest%info(:)%origin_vh(2) = symba_plA%helio%swiftest%vh(2,:)
symba_plA%helio%swiftest%info(:)%origin_vh(3) = symba_plA%helio%swiftest%vh(3,:)
add_l_pl(:) = .true.
where ((symba_plA%helio%swiftest%status(1:npl) == DISRUPTION) .or. &
(symba_plA%helio%swiftest%status(1:npl) == SUPERCATASTROPHIC) .or. &
(symba_plA%helio%swiftest%status(1:npl) == HIT_AND_RUN))
symba_plA%helio%swiftest%info(1:npl)%origin_time = t
symba_plA%helio%swiftest%info(1:npl)%origin_xh(1) = symba_plA%helio%swiftest%xh(1,1:npl)
symba_plA%helio%swiftest%info(1:npl)%origin_xh(2) = symba_plA%helio%swiftest%xh(2,1:npl)
symba_plA%helio%swiftest%info(1:npl)%origin_xh(3) = symba_plA%helio%swiftest%xh(3,1:npl)
symba_plA%helio%swiftest%info(1:npl)%origin_vh(1) = symba_plA%helio%swiftest%vh(1,1:npl)
symba_plA%helio%swiftest%info(1:npl)%origin_vh(2) = symba_plA%helio%swiftest%vh(2,1:npl)
symba_plA%helio%swiftest%info(1:npl)%origin_vh(3) = symba_plA%helio%swiftest%vh(3,1:npl)
add_l_pl(1:npl) = .true.
elsewhere
add_l_pl(:) = .false.
add_l_pl(1:npl) = .false.
end where

! check for duplicate names and fix if ncessary
Expand Down

0 comments on commit be56439

Please sign in to comment.