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

Commit

Permalink
Cleaned up examples and initialized a variable in the oblateness calc…
Browse files Browse the repository at this point in the history
… to 0
  • Loading branch information
daminton committed Jul 8, 2021
1 parent e18196b commit 95de996
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
5 changes: 3 additions & 2 deletions examples/rmvs_swifter_comparison/1pl_1tp_encounter/init_cond.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/env python3
"""
For testing RMVS, the code generates clones of test particles based on one that is fated to impact Mercury.
To use the script, modify the variables just after the "if __name__ == '__main__':" line
"""
import numpy as np
from astroquery.jplhorizons import Horizons
import astropy.constants as const
import swiftestio as swio
import swiftest.io as swio
from scipy.io import FortranFile
import sys

Expand Down Expand Up @@ -140,7 +141,7 @@
print(f'BIN_OUT {swifter_bin}')
print(f'OUT_TYPE REAL8')
print(f'OUT_FORM XV')
print(f'OUT_STAT NEW')
print(f'OUT_STAT UNKNOWN')
print(f'J2 {J2}')
print(f'J4 {J4}')
print(f'CHK_CLOSE yes')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
! Swifter input file generated using init_cond.py
T0 0
TSTOP 0.2
DT 0.00034223134839151266
TSTOP 1.0
DT 0.0006844626967830253
PL_IN pl.swifter.in
TP_IN tp.swifter.in
IN_TYPE ASCII
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
! Swiftest input file generated using init_cond.py
T0 0
TSTOP 0.2
DT 0.00034223134839151266
TSTOP 1.0
DT 0.0006844626967830253
CB_IN cb.swiftest.in
PL_IN pl.swiftest.in
TP_IN tp.swiftest.in
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
2 ! Planet input file generated using init_cond.py
1 39.47692640889762629
1 39.476926408897625193
0.0 0.0 0.0
0.0 0.0 0.0
2 0.00012002693582795246295385 0.010044724833237895015
2 0.00012002693582795244940133 0.0100447248332378922085
4.25875607065041e-05
1.0 0.0 0.0
0.0 6.283185307179586 0.0
Binary file not shown.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/obl/obl.f90
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module subroutine obl_acc_body(self, system)
real(DP) :: r2, irh, rinv2, t0, t1, t2, t3, fac1, fac2

associate(n => self%nbody, cb => system%cb)
self%aobl(:,:) = 0.0_DP
do i = 1, n
r2 = dot_product(self%xh(:, i), self%xh(:, i))
irh = 1.0_DP / sqrt(r2)
Expand Down

0 comments on commit 95de996

Please sign in to comment.