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
Fixed indexing of central body
  • Loading branch information
daminton committed Aug 27, 2021
1 parent a56ea81 commit 9af4c72
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
18 changes: 9 additions & 9 deletions examples/whm_gr_test/pl.swifter.in
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
9
1 39.476926408897626
0 39.476926408897626
0.0 0.0 0.0
0.0 0.0 0.0
2 6.5537098095653139645e-06 0.001475126151488013514
1 6.553709809565314146e-06 0.0014751261514880139061
1.6306381826061645943e-05
-0.29510017042975300594 -0.34346884022084378518 -0.000997917547895216684
5.709185893355676925 -6.2220892824670268354 -1.0321515701207669188
3 9.663313399581537916e-05 0.006759061578633709628
2 9.6633133995815381836e-05 0.006759061578633710828
4.0453784346544178454e-05
-0.21096294566811030213 -0.6945147553261317164 0.0026420019351886940041
7.0187176732445560167 -2.1783670470162428854 -0.43491289164169576724
4 0.000120026935827952453094 0.010044949983771722159
3 0.000120026935827952456416 0.010044949983771724966
4.25875607065040958e-05
0.905522725638602366 -0.44829515638659761523 1.8122901980659660508e-05
2.685845700565266851 5.6080546137104218133 -0.00027833838024725729542
5 1.2739802010675941456e-05 0.0072465915674003775008
4 1.2739802010675941808e-05 0.0072465915674003790445
2.265740805092889601e-05
-1.6511945936824949932 0.1180803833522415941 0.042978148735422203042
-0.17443328105136805607 -4.661619009141641736 -0.09341597039948347882
6 0.037692251088985676735 0.3552713110772063034
5 0.03769225108898567778 0.3552713110772063853
0.00046732617030490929307
4.2381319671740662614 -2.694827110197309139 -0.08362807329786287047
1.44742540330701551 2.4581907268113588696 -0.042593445938391914576
7 0.011285899820091272997 0.43766359903328559694
6 0.01128589982009127331 0.4376635990332856823
0.00038925687730393611812
6.4776155764849425722 -7.5454781609219372385 -0.12660625214421539209
1.4343694668413992401 1.3251694474665614901 -0.08010594537316981756
8 0.0017236589478267730203 0.4696622419824256353
7 0.001723658947826773068 0.46966224198242572768
0.00016953449859497231466
14.737783583010530819 13.132284780084109599 -0.14218874866247160904
-0.96494157148906816704 1.0080364706941240677 0.016191990849809560611
9 0.0020336100526728302319 0.781439451609552476
8 0.0020336100526728302882 0.7814394516095526881
0.000164587904124493665
29.578253698940308425 -4.488584904681241383 -0.58928426126360722304
0.16609282485651713797 1.143247554888599065 -0.027336661118935745503
16 changes: 8 additions & 8 deletions examples/whm_gr_test/pl.swiftest.in
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
8
Mercury 6.5537098095653139645e-06 0.001475126151488013514
Mercury 6.553709809565314146e-06 0.0014751261514880139061
1.6306381826061645943e-05
0.38709861919270799335 0.20562987442219879397 7.0036598799530471737
48.303764444546942514 29.187012577257871015 139.02452846395490837
Venus 9.663313399581537916e-05 0.006759061578633709628
Venus 9.6633133995815381836e-05 0.006759061578633710828
4.0453784346544178454e-05
0.72332350338494522113 0.0067851993472706276234 3.3945100118236060105
76.62172575937908903 55.11451498626085055 120.69543184874230235
Earth 0.000120026935827952453094 0.010044949983771722159
Earth 0.000120026935827952456416 0.010044949983771724966
4.25875607065040958e-05
1.000022414803547921 0.016679693167334301573 0.002750719340522077977
175.59912721852418827 287.3487256951211748 232.20474506920808722
Mars 1.2739802010675941456e-05 0.0072465915674003775008
Mars 1.2739802010675941808e-05 0.0072465915674003790445
2.265740805092889601e-05
1.5237056817307590428 0.09335454089002033495 1.8479086301002540793
49.490790672135332784 286.7030449733272235 203.56009534652309867
Jupiter 0.037692251088985676735 0.3552713110772063034
Jupiter 0.03769225108898567778 0.3552713110772063853
0.00046732617030490929307
5.203524963998765074 0.048518619089771883313 1.3035691332389880426
100.516740776557597314 273.38311024861741316 317.57998688455870706
Saturn 0.011285899820091272997 0.43766359903328559694
Saturn 0.01128589982009127331 0.4376635990332856823
0.00038925687730393611812
9.581861578191695372 0.05220296447788015659 2.4862598063103709123
113.59526938704850352 335.69019804854252698 225.44748806008931297
Uranus 0.0017236589478267730203 0.4696622419824256353
Uranus 0.001723658947826773068 0.46966224198242572768
0.00016953449859497231466
19.23638216159032055 0.04433184777155944195 0.7703424893861580136
74.09557761028084144 95.84993853316392176 235.82773290830229485
Neptune 0.0020336100526728302319 0.781439451609552476
Neptune 0.0020336100526728302882 0.7814394516095526881
0.000164587904124493665
30.289653279202511271 0.013458737599393380546 1.769000156955224945
131.74519418988560915 245.79890439350270981 334.51418242279709148
8 changes: 4 additions & 4 deletions python/swiftest/swiftest/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -806,8 +806,8 @@ def swiftest_xr2infile(ds, param, framenum=-1):
A set of three input files for a Swiftest run
"""
frame = ds.isel(time=framenum)
cb = frame.where(frame.id == 1, drop=True)
pl = frame.where(frame.id > 1, drop=True)
cb = frame.where(frame.id == 0, drop=True)
pl = frame.where(frame.id > 0, drop=True)
pl = pl.where(np.invert(np.isnan(pl['Gmass'])), drop=True).drop_vars(['J_2', 'J_4'])
tp = frame.where(np.isnan(frame['Gmass']), drop=True).drop_vars(['Gmass', 'radius', 'J_2', 'J_4'])

Expand Down Expand Up @@ -984,8 +984,8 @@ def swifter_xr2infile(ds, param, framenum=-1):
A set of input files for a Swifter run
"""
frame = ds.isel(time=framenum)
cb = frame.where(frame.id == 1, drop=True)
pl = frame.where(frame.id > 1, drop=True)
cb = frame.where(frame.id == 0, drop=True)
pl = frame.where(frame.id > 0, drop=True)
pl = pl.where(np.invert(np.isnan(pl['Gmass'])), drop=True).drop_vars(['J_2', 'J_4'])
tp = frame.where(np.isnan(frame['Gmass']), drop=True).drop_vars(['Gmass', 'radius', 'J_2', 'J_4'])

Expand Down

0 comments on commit 9af4c72

Please sign in to comment.