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

Commit

Permalink
Fixed bug due to calling reauze after moving arrays over
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Sep 11, 2021
1 parent 567e5cf commit d2b3a2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/symba/symba_encounter_check.f90
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ module function symba_encounter_check_pl(self, system, dt, irec) result(lany_enc
lany_encounter = nenc > 0
if (lany_encounter) then
associate(plplenc_list => system%plplenc_list)
call plplenc_list%resize(nenc)
allocate(lvdotr(nenc))
allocate(kidx(nenc))
lvdotr(:) = pack(loc_lvdotr(:), lencounter(:))
kidx(:) = pack([(k, k = 1_I8B, nplplm)], lencounter(:))
call move_alloc(lvdotr, plplenc_list%lvdotr)
call move_alloc(kidx, plplenc_list%kidx)
call plplenc_list%resize(nenc)
deallocate(lencounter, loc_lvdotr)
plplenc_list%index1(1:nenc) = pl%k_plpl(1,plplenc_list%kidx(1:nenc))
plplenc_list%index2(1:nenc) = pl%k_plpl(2,plplenc_list%kidx(1:nenc))
Expand Down Expand Up @@ -289,4 +289,4 @@ module pure subroutine symba_encounter_check_one(xr, yr, zr, vxr, vyr, vzr, rhil
return
end subroutine symba_encounter_check_one

end submodule s_symba_encounter_check
end submodule s_symba_encounter_check

0 comments on commit d2b3a2e

Please sign in to comment.