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

Commit

Permalink
Merge branch 'OOPSymba' into OOPTides
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Aug 5, 2021
2 parents 7486a29 + fb21ff7 commit a82da3e
Show file tree
Hide file tree
Showing 53 changed files with 5,736 additions and 1,645 deletions.
4 changes: 2 additions & 2 deletions examples/helio_swifter_comparison/swiftest_vs_swifter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
"output_type": "stream",
"text": [
"Reading Swiftest file param.swiftest.in\n",
"Reading in time 1.001e+00\n",
"Reading in time 1.000e+00\n",
"Creating Dataset\n",
"Successfully converted 1463 output frames.\n",
"Successfully converted 1462 output frames.\n",
"Swiftest simulation data stored as xarray DataSet .ds\n"
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
{
"data": {
"text/plain": [
"[<matplotlib.lines.Line2D at 0x2af2269e12d0>,\n",
" <matplotlib.lines.Line2D at 0x2af2269eeb10>]"
"[<matplotlib.lines.Line2D at 0x2b47a0e74650>,\n",
" <matplotlib.lines.Line2D at 0x2b47a0e71250>]"
]
},
"execution_count": 6,
Expand Down
Binary file modified examples/symba_swifter_comparison/1pl_1pl_encounter/cb.swiftest.in
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@

plfile = FortranFile(swiftest_pl, 'w')
plfile.write_record(npl)

plfile.write_record(np.array([plid1, plid2]))
plfile.write_record(np.array([plid1, plid2], dtype=np.int32))
plfile.write_record(np.vstack([p_pl1[0],p_pl2[0]]))
plfile.write_record(np.vstack([p_pl1[1],p_pl2[1]]))
plfile.write_record(np.vstack([p_pl1[2],p_pl2[2]]))
Expand Down Expand Up @@ -173,6 +172,7 @@
print(f'ENC_OUT {swiftest_enc}')
print(f'EXTRA_FORCE no')
print(f'BIG_DISCARD no')
print(f'DISCARD_OUT discard.swiftest.out')
print(f'ROTATION no')
print(f'GR no')
print(f'MU2KG {MU2KG}')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ DT 0.0006844626967830253
CB_IN cb.swiftest.in
PL_IN pl.swiftest.in
TP_IN tp.swiftest.in
IN_TYPE ASCII
IN_TYPE REAL8
ISTEP_OUT 1
ISTEP_DUMP 1
BIN_OUT bin.swiftest.dat
Expand All @@ -22,6 +22,7 @@ CHK_QMIN_RANGE 0.004650467260962157 1000.0
ENC_OUT enc.swiftest.dat
EXTRA_FORCE no
BIG_DISCARD no
DISCARD_OUT discard.swiftest.out
ROTATION no
GR no
MU2KG 1.988409870698051e+30
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
3 ! Planet input file generated using init_cond.py
1 39.47692640889762629
1 39.476926408897625196
0.0 0.0 0.0
0.0 0.0 0.0
2 0.00012002693582795244940133 0.010044724833237892
Expand Down
Binary file modified examples/symba_swifter_comparison/1pl_1pl_encounter/pl.swiftest.in
Binary file not shown.
1,208 changes: 1,142 additions & 66 deletions examples/symba_swifter_comparison/1pl_1pl_encounter/swiftest_vs_swifter.ipynb

Large diffs are not rendered by default.

Binary file modified examples/symba_swifter_comparison/1pl_1pl_encounter/tp.swiftest.in
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,8 @@
"array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])\n",
"Coordinates:\n",
" * id (id) int64 101 102 103 104 105 106 107 ... 111 112 113 114 115 116\n",
" time float64 110.0</pre><div class='xr-wrap' hidden><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'px'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>id</span>: 16</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-68fe10ea-ef1f-4ba7-a77c-430740095e13' class='xr-array-in' type='checkbox' checked><label for='section-68fe10ea-ef1f-4ba7-a77c-430740095e13' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span>0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0</span></div><div class='xr-array-data'><pre>array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])</pre></div></div></li><li class='xr-section-item'><input id='section-df88b4bc-6c46-45ca-94b7-b00adc9498db' class='xr-section-summary-in' type='checkbox' checked><label for='section-df88b4bc-6c46-45ca-94b7-b00adc9498db' class='xr-section-summary' >Coordinates: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>id</span></div><div class='xr-var-dims'>(id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>101 102 103 104 ... 113 114 115 116</div><input id='attrs-c76f8e4d-402e-49be-9462-76c99c61e023' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-c76f8e4d-402e-49be-9462-76c99c61e023' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3da82dc2-6d43-4516-911e-842e152844d3' class='xr-var-data-in' type='checkbox'><label for='data-3da82dc2-6d43-4516-911e-842e152844d3' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,\n",
" 115, 116])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>time</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>110.0</div><input id='attrs-db177103-0946-45b3-8074-e25ddb54a6c7' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-db177103-0946-45b3-8074-e25ddb54a6c7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-650cafac-02d8-4e7a-a322-e58d16f4428a' class='xr-var-data-in' type='checkbox'><label for='data-650cafac-02d8-4e7a-a322-e58d16f4428a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(110.)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-01a452ff-18b5-42e8-8710-7a17ac440a27' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-01a452ff-18b5-42e8-8710-7a17ac440a27' class='xr-section-summary' title='Expand/collapse section'>Attributes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'></dl></div></li></ul></div></div>"
" time float64 110.0</pre><div class='xr-wrap' hidden><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'px'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>id</span>: 16</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-155160da-35f1-46ed-9008-e723659fbcbd' class='xr-array-in' type='checkbox' checked><label for='section-155160da-35f1-46ed-9008-e723659fbcbd' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span>0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0</span></div><div class='xr-array-data'><pre>array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])</pre></div></div></li><li class='xr-section-item'><input id='section-f2088240-57af-4b1e-9333-8990de4d1448' class='xr-section-summary-in' type='checkbox' checked><label for='section-f2088240-57af-4b1e-9333-8990de4d1448' class='xr-section-summary' >Coordinates: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>id</span></div><div class='xr-var-dims'>(id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>101 102 103 104 ... 113 114 115 116</div><input id='attrs-0185ec9d-c3ca-4b59-a596-1484df8ce930' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-0185ec9d-c3ca-4b59-a596-1484df8ce930' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-78b84922-ca22-4097-bf93-944857fabff6' class='xr-var-data-in' type='checkbox'><label for='data-78b84922-ca22-4097-bf93-944857fabff6' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,\n",
" 115, 116])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>time</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>110.0</div><input id='attrs-79493342-80a9-4b7c-95e2-9e107626dc99' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-79493342-80a9-4b7c-95e2-9e107626dc99' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-efcf6037-4be7-495b-b37c-20a2bfc2d7bd' class='xr-var-data-in' type='checkbox'><label for='data-efcf6037-4be7-495b-b37c-20a2bfc2d7bd' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(110.)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-8dcf67c6-7884-460a-8526-ee7a6885c0b2' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-8dcf67c6-7884-460a-8526-ee7a6885c0b2' class='xr-section-summary' title='Expand/collapse section'>Attributes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'></dl></div></li></ul></div></div>"
],
"text/plain": [
"<xarray.DataArray 'px' (id: 16)>\n",
Expand Down
48 changes: 24 additions & 24 deletions examples/whm_swifter_comparison/pl.swifter.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,35 @@
0 39.476926408897625196
0.0 0.0 0.0
0.0 0.0 0.0
1 6.5537098095653139645e-06 0.0014751238438755500459
1 6.5537098095653139645e-06 0.0014751242768086609319
1.6306381826061645943e-05
-0.065841771551149230746 0.30388831943526661838 0.030872485461978960153
-12.104810966946379345 -1.8005812017180330847 0.9632304211885714761
2 9.663313399581537916e-05 0.006759080797928606587
-0.21794225400065470044 0.24570059548519398995 0.040069659678364698274
-9.768342370075118952 -6.4098488749322373205 0.37225116289830816995
2 9.663313399581537916e-05 0.0067590742435367571566
4.0453784346544178454e-05
-0.65269716062695148917 -0.3065765656441301057 0.033456491497379246824
3.0899533953493179043 -6.72112303206047562 -0.2705477431358893059
3 0.000120026935827952453094 0.010044868190633438806
-0.60413504586259936247 -0.39527613440541492507 0.029436881824798030033
3.992938767473374092 -6.2169034295501688922 -0.3157349287333398891
3 0.000120026935827952453094 0.010044891628501106769
4.25875607065040958e-05
0.58046286084934750615 -0.8332000042504307258 3.7646553415201541957e-05
5.053802748240266633 3.568560918001247615 -0.0001869334511378976778
4 1.2739802010675941456e-05 0.0072467082986392815006
0.6475137988388671717 -0.78146344078682306034 3.4954277703126252982e-05
4.7364737841481480227 3.9858178826605781494 -0.000206181980282845843
4 1.2739802010675941456e-05 0.0072466933032545104062
2.265740805092889601e-05
-1.5891417403740180081 0.4938480736359250889 0.049330990309104823244
-1.3261523862597792352 -4.4445327547884994806 -0.060612990482397517785
5 0.037692251088985676735 0.3552707649709459117
-1.6060166552595489531 0.43262604649099911658 0.048461907252935247647
-1.1388942318608360441 -4.4988235352611598648 -0.066344559364066134143
5 0.037692251088985676735 0.3552707368190505097
0.00046732617030490929307
4.1148395833578952363 -2.8938323061728068453 -0.080043092204059404504
1.5541304908644199467 2.386798324664287883 -0.044683660603562371893
6 0.011285899820091272997 0.43765596788571493287
4.1359946230316175786 -2.8610749953481979801 -0.08065244615734604161
1.536603427793050461 2.399023353553466048 -0.044342472584791124157
6 0.011285899820091272997 0.4376572328164372643
0.00038925687730393611812
6.3589256477393849565 -7.653288021415167286 -0.12000977499446359442
1.4556566113591374531 1.2999494788820976765 -0.08051428750367411639
7 0.0017236589478267730203 0.46957663585116591335
6.3788284394924916754 -7.635463758938534795 -0.121111501730720202974
1.4521392831727842248 1.3041738917825064364 -0.08044788317293871613
7 0.0017236589478267730203 0.46959013246222981483
0.00016953449859497231466
14.816779495279050138 13.049265812461410263 -0.14351615042000470668
-0.9586068527340353378 1.013470229424341294 0.01613039934499510156
8 0.0020336100526728302319 0.7813355837717117843
14.803649648126269156 13.063133279359290029 -0.14329526741228329478
-0.9596636872292902537 1.0125665712568530355 0.016140607193432704789
8 0.0020336100526728302319 0.78135207839715916734
0.000164587904124493665
29.564459991843019537 -4.5824598513731222837 -0.5870359532621901577
0.1697807691732287658 1.1426067858222827636 -0.027409347819614317105
29.566779964594630314 -4.5668176855665958414 -0.58741108465859714904
0.16916723445783939828 1.142713652049310879 -0.027397346380668001207
48 changes: 24 additions & 24 deletions examples/whm_swifter_comparison/pl.swiftest.in
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
8
1 6.5537098095653139645e-06 0.0014751238438755500459
1 6.5537098095653139645e-06 0.0014751242768086609319
1.6306381826061645943e-05
-0.065841771551149230746 0.30388831943526661838 0.030872485461978960153
-12.104810966946379345 -1.8005812017180330847 0.9632304211885714761
2 9.663313399581537916e-05 0.006759080797928606587
-0.21794225400065470044 0.24570059548519398995 0.040069659678364698274
-9.768342370075118952 -6.4098488749322373205 0.37225116289830816995
2 9.663313399581537916e-05 0.0067590742435367571566
4.0453784346544178454e-05
-0.65269716062695148917 -0.3065765656441301057 0.033456491497379246824
3.0899533953493179043 -6.72112303206047562 -0.2705477431358893059
3 0.000120026935827952453094 0.010044868190633438806
-0.60413504586259936247 -0.39527613440541492507 0.029436881824798030033
3.992938767473374092 -6.2169034295501688922 -0.3157349287333398891
3 0.000120026935827952453094 0.010044891628501106769
4.25875607065040958e-05
0.58046286084934750615 -0.8332000042504307258 3.7646553415201541957e-05
5.053802748240266633 3.568560918001247615 -0.0001869334511378976778
4 1.2739802010675941456e-05 0.0072467082986392815006
0.6475137988388671717 -0.78146344078682306034 3.4954277703126252982e-05
4.7364737841481480227 3.9858178826605781494 -0.000206181980282845843
4 1.2739802010675941456e-05 0.0072466933032545104062
2.265740805092889601e-05
-1.5891417403740180081 0.4938480736359250889 0.049330990309104823244
-1.3261523862597792352 -4.4445327547884994806 -0.060612990482397517785
5 0.037692251088985676735 0.3552707649709459117
-1.6060166552595489531 0.43262604649099911658 0.048461907252935247647
-1.1388942318608360441 -4.4988235352611598648 -0.066344559364066134143
5 0.037692251088985676735 0.3552707368190505097
0.00046732617030490929307
4.1148395833578952363 -2.8938323061728068453 -0.080043092204059404504
1.5541304908644199467 2.386798324664287883 -0.044683660603562371893
6 0.011285899820091272997 0.43765596788571493287
4.1359946230316175786 -2.8610749953481979801 -0.08065244615734604161
1.536603427793050461 2.399023353553466048 -0.044342472584791124157
6 0.011285899820091272997 0.4376572328164372643
0.00038925687730393611812
6.3589256477393849565 -7.653288021415167286 -0.12000977499446359442
1.4556566113591374531 1.2999494788820976765 -0.08051428750367411639
7 0.0017236589478267730203 0.46957663585116591335
6.3788284394924916754 -7.635463758938534795 -0.121111501730720202974
1.4521392831727842248 1.3041738917825064364 -0.08044788317293871613
7 0.0017236589478267730203 0.46959013246222981483
0.00016953449859497231466
14.816779495279050138 13.049265812461410263 -0.14351615042000470668
-0.9586068527340353378 1.013470229424341294 0.01613039934499510156
8 0.0020336100526728302319 0.7813355837717117843
14.803649648126269156 13.063133279359290029 -0.14329526741228329478
-0.9596636872292902537 1.0125665712568530355 0.016140607193432704789
8 0.0020336100526728302319 0.78135207839715916734
0.000164587904124493665
29.564459991843019537 -4.5824598513731222837 -0.5870359532621901577
0.1697807691732287658 1.1426067858222827636 -0.027409347819614317105
29.566779964594630314 -4.5668176855665958414 -0.58741108465859714904
0.16916723445783939828 1.142713652049310879 -0.027397346380668001207
Loading

0 comments on commit a82da3e

Please sign in to comment.