From d9eaa18ba1f2a51d4af61dd89412197eccf784b4 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Tue, 6 Jul 2021 09:30:17 -0400 Subject: [PATCH] Fixed double allocation problem for planetocentric structure --- src/rmvs/rmvs_setup.f90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rmvs/rmvs_setup.f90 b/src/rmvs/rmvs_setup.f90 index 2835aea6c..7955fc74a 100644 --- a/src/rmvs/rmvs_setup.f90 +++ b/src/rmvs/rmvs_setup.f90 @@ -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 @@ -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