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

Commit

Permalink
Fixed double allocation problem for planetocentric structure
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Jul 6, 2021
1 parent f8c3dec commit d9eaa18
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/rmvs/rmvs_setup.f90
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module subroutine rmvs_setup_pl(self,n)
allocate(pl%inner(0:NTPHENC))
if (.not.pl%lplanetocentric) then
allocate(pl%nenc(n))
pl%nenc(:) = 0
pl%nenc(:) = 0

! Set up inner and outer planet interpolation vector storage containers
do i = 0, NTENC
Expand Down Expand Up @@ -108,14 +108,14 @@ module subroutine rmvs_setup_system(self, param)
associate(npl => pl%nbody)
allocate(pl%planetocentric(npl))
do i = 1, npl
pl%planetocentric(i)%lplanetocentric = .true.
allocate(pl%planetocentric(i)%cb, source=cb)
allocate(rmvs_cb :: pl%planetocentric(i)%cb)
allocate(rmvs_pl :: pl%planetocentric(i)%pl)
select type(cbenci => pl%planetocentric(i)%cb)
class is (rmvs_cb)
select type(plenci => pl%planetocentric(i)%pl)
class is (rmvs_pl)
cbenci%lplanetocentric = .true.
plenci%lplanetocentric = .true.
call plenci%setup(npl)
plenci%status(:) = ACTIVE
! plind stores the heliocentric index value of a planetocentric planet
Expand Down

0 comments on commit d9eaa18

Please sign in to comment.