From 6f0c12fcd0b3fa89757e437221035a90c3a79e3b Mon Sep 17 00:00:00 2001 From: David A Minton Date: Tue, 16 May 2023 11:28:01 -0400 Subject: [PATCH] Put in the oblateness accelerations for central body for test particles in outer encounter of RMVS --- src/rmvs/rmvs_step.f90 | 4 ++++ src/rmvs/rmvs_util.f90 | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/rmvs/rmvs_step.f90 b/src/rmvs/rmvs_step.f90 index bcb38797a..11f7d2756 100644 --- a/src/rmvs/rmvs_step.f90 +++ b/src/rmvs/rmvs_step.f90 @@ -202,6 +202,10 @@ subroutine rmvs_step_out(cb, pl, tp, nbody_system, param, t, dt) call tp%step(nbody_system, param, outer_time, dto) tp%lfirst = lfirsttp else + if (param%loblatecb) then + call swiftest_obl_acc(npl, cb%Gmass, cb%j2rp2, cb%j4rp4, pl%rbeg, pl%lmask, pl%outer(outer_index-1)%aobl, pl%Gmass, cb%aoblbeg) + call swiftest_obl_acc(npl, cb%Gmass, cb%j2rp2, cb%j4rp4, pl%rend, pl%lmask, pl%outer(outer_index)%aobl, pl%Gmass, cb%aoblend) + end if call tp%step(nbody_system, param, outer_time, dto) end if do j = 1, npl diff --git a/src/rmvs/rmvs_util.f90 b/src/rmvs/rmvs_util.f90 index 224ba2cd1..6b26bf12f 100644 --- a/src/rmvs/rmvs_util.f90 +++ b/src/rmvs/rmvs_util.f90 @@ -298,13 +298,15 @@ module subroutine rmvs_util_setup_pl(self, n, param) allocate(pl%outer(i)%v(NDIM, n)) pl%outer(i)%x(:,:) = 0.0_DP pl%outer(i)%v(:,:) = 0.0_DP + allocate(pl%outer(i)%aobl(NDIM, n)) + pl%outer(i)%aobl(:,:) = 0.0_DP end do do i = 0, NTPHENC allocate(pl%inner(i)%x(NDIM, n)) allocate(pl%inner(i)%v(NDIM, n)) - allocate(pl%inner(i)%aobl(NDIM, n)) pl%inner(i)%x(:,:) = 0.0_DP pl%inner(i)%v(:,:) = 0.0_DP + allocate(pl%inner(i)%aobl(NDIM, n)) pl%inner(i)%aobl(:,:) = 0.0_DP end do ! if (param%ltides) then