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

Commit

Permalink
Browse files Browse the repository at this point in the history
Removed need to copy inner and outer interpolation variables to planetocentric object
  • Loading branch information
daminton committed Apr 17, 2021
1 parent adf2da7 commit 12b37b7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/modules/whm_classes.f90
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ module whm_classes
procedure, public :: step => whm_step_tp !! Steps the particle forward one stepsize
end type whm_tp



interface
!> WHM massive body constructor method
module subroutine whm_setup_pl(self,n)
Expand Down
2 changes: 1 addition & 1 deletion src/rmvs/rmvs_getacch.f90
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module subroutine rmvs_getacch_tp(self, cb, pl, config, t, xh)
config_planetocen%lextra_force = .false.
config_planetocen%lgr = .false.
! Now compute the planetocentric values of acceleration
call whm_getacch_tp(tp, cb, pl, config_planetocen, t, pl%xh)
call whm_getacch_tp(tp, cb, pl%planetocentric(ipleP)%pl, config_planetocen, t, pl%xh)

! Now compute any heliocentric values of acceleration
if (tp%lfirst) then
Expand Down
4 changes: 1 addition & 3 deletions src/rmvs/rmvs_step.f90
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ subroutine rmvs_step_in(pl, cb, tp, config, outer_time, dto)
plenci%xh(:,:) = xbeg(:,:)
plenci%vh(:,:) = vbeg(:,:)
call tpenci%set_beg_end(xbeg = xbeg, xend = xend)
call tpenci%step(cbenci, plenci, config, inner_time, dti)
call tpenci%step(cbenci, pl, config, inner_time, dti)
do j = 1, nenc(i)
tpenci%xheliocentric(:, j) = tpenci%xh(:, j) + pl%inner(enc_index )%x(:,i)
end do
Expand Down Expand Up @@ -497,7 +497,6 @@ subroutine rmvs_make_planetocentric(pl, cb, tp, config)
tpenci%xh(j, :) = tpenci%xheliocentric(j, :) - pl%inner(0)%x(j, i)
tpenci%vh(j, :) = pack(tp%vh(j,:), encmask(:)) - pl%inner(0)%v(j, i)
end do
allocate(plenci%inner, source = pl%inner)
! Make sure that the test particles get the planetocentric value of mu
call tpenci%set_mu(cbenci)
end associate
Expand Down Expand Up @@ -539,7 +538,6 @@ subroutine rmvs_end_planetocentric(pl, cb, tp)
tp%vh(j, tpind(1:nenc(i))) = tpenci%vh(j,1:nenc(i)) + pl%inner(NTPHENC)%v(j, i)
end do
deallocate(pl%planetocentric(i)%tp)
deallocate(pl%planetocentric(i)%pl%inner)
end associate
end do
end associate
Expand Down

0 comments on commit 12b37b7

Please sign in to comment.