This repository was archived by the owner on Aug 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Swifter to Swiftest conversion script to swifterio and example folder
- Loading branch information
Showing
9 changed files
with
289 additions
and
162 deletions.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| 0.00029591220819207774 | ||
| 0.004650467260962157 | ||
| 4.7535806948127355e-12 | ||
| -2.2473967953572827e-18 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| ! Swifter input file generated using init_cond.py | ||
| T0 0 | ||
| TSTOP 80.0 | ||
| DT 1.0 | ||
| PL_IN pl.in | ||
| TP_IN tp.in | ||
| IN_TYPE ASCII | ||
| ISTEP_OUT 1 | ||
| ISTEP_DUMP 1 | ||
| BIN_OUT bin.dat | ||
| OUT_TYPE REAL8 | ||
| OUT_FORM XV | ||
| OUT_STAT NEW | ||
| J2 4.7535806948127355e-12 | ||
| J4 -2.2473967953572827e-18 | ||
| CHK_CLOSE yes | ||
| CHK_RMIN 0.004650467260962157 | ||
| CHK_RMAX 1000.0 | ||
| CHK_EJECT 1000.0 | ||
| CHK_QMIN 0.004650467260962157 | ||
| CHK_QMIN_COORD HELIO | ||
| CHK_QMIN_RANGE 0.004650467260962157 1000.0 | ||
| ENC_OUT enc.dat | ||
| EXTRA_FORCE no | ||
| BIG_DISCARD no | ||
| RHILL_PRESENT yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| 10 | ||
| 1 0.00029591220819207775568 | ||
| 0.0 0.0 0.0 | ||
| 0.0 0.0 0.0 | ||
| 2 4.9125474498983625e-11 0.0014751258227142052 ! mercury | ||
| 1.6306381826061646e-05 | ||
| 0.008059842448018334 -0.4616051037329109 -0.03846017738329229 | ||
| 0.02248719132054853 0.001934639213990692 -0.001904656977422976 | ||
| 3 7.243452483873647e-10 0.006759134232034942 ! venus | ||
| 4.0453784346544176e-05 | ||
| -0.5115875215389065 0.5030818749037324 0.03642547299277956 | ||
| -0.01425515725454357 -0.01452868630179309 0.0006232072038298823 | ||
| 4 8.997011382166019e-10 0.010044625087011913 ! earthmoon | ||
| 4.25875607065041e-05 | ||
| -0.1090020607540907 -1.009893805009766 4.823302918632528e-05 | ||
| 0.01682491922568941 -0.001910549762056979 3.992660742687128e-08 | ||
| 5 9.549535102761465e-11 0.007246789790242477 ! mars | ||
| 2.2657408050928896e-05 | ||
| -1.342897929331636 0.9778655112682739 0.05343398538723887 | ||
| -0.007712315645393206 -0.01011917844182223 -2.287744801261131e-05 | ||
| 6 2.8253459086313547e-07 0.3552720805286442 ! jupiter | ||
| 0.0004673261703049093 | ||
| 3.923184193414315 -3.168419770483168 -0.0746147877972047 | ||
| 0.004655552638985802 0.006232623300954468 -0.0001300429201057457 | ||
| 7 8.459715183006416e-08 0.4376460836930155 ! saturn | ||
| 0.00038925687730393614 | ||
| 6.185794462795267 -7.804174837804826 -0.110498432926239 | ||
| 0.004066833203985018 0.003458637040736611 -0.0002219310939327014 | ||
| 8 1.2920249163736674e-08 0.46946272948265794 ! uranus | ||
| 0.00016953449859497232 | ||
| 14.9290976575471 12.92949673572929 -0.1454099139559955 | ||
| -0.002599557960646664 0.002795888198858545 4.391864857782088e-05 | ||
| 9 1.5243589003230834e-08 0.7811947848333599 ! neptune | ||
| 0.00016458790412449367 | ||
| 29.54416169025338 -4.716921603714237 -0.5838030174427992 | ||
| 0.0004792636209523189 0.00312573757291745 -7.53264045199501e-05 | ||
| 10 2.1919422829042796e-12 0.05379680851617536 ! plutocharon | ||
| 7.943294877391593e-06 | ||
| 14.54448346259197 -31.05223519593471 -0.8828000265625595 | ||
| 0.002923077617691739 0.0006625916902153526 -0.0009142553677224461 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| 9 | ||
| 2 4.9125474498983625e-11 | ||
| 1.6306381826061646e-05 | ||
| 0.008059842448018334 -0.4616051037329109 -0.03846017738329229 | ||
| 0.02248719132054853 0.001934639213990692 -0.001904656977422976 | ||
| 3 7.243452483873647e-10 | ||
| 4.0453784346544176e-05 | ||
| -0.5115875215389065 0.5030818749037324 0.03642547299277956 | ||
| -0.01425515725454357 -0.01452868630179309 0.0006232072038298823 | ||
| 4 8.997011382166019e-10 | ||
| 4.25875607065041e-05 | ||
| -0.1090020607540907 -1.009893805009766 4.823302918632528e-05 | ||
| 0.01682491922568941 -0.001910549762056979 3.992660742687128e-08 | ||
| 5 9.549535102761465e-11 | ||
| 2.2657408050928896e-05 | ||
| -1.342897929331636 0.9778655112682739 0.05343398538723887 | ||
| -0.007712315645393206 -0.01011917844182223 -2.287744801261131e-05 | ||
| 6 2.8253459086313547e-07 | ||
| 0.0004673261703049093 | ||
| 3.923184193414315 -3.168419770483168 -0.0746147877972047 | ||
| 0.004655552638985802 0.006232623300954468 -0.0001300429201057457 | ||
| 7 8.459715183006416e-08 | ||
| 0.00038925687730393614 | ||
| 6.185794462795267 -7.804174837804826 -0.110498432926239 | ||
| 0.004066833203985018 0.003458637040736611 -0.0002219310939327014 | ||
| 8 1.2920249163736674e-08 | ||
| 0.00016953449859497232 | ||
| 14.9290976575471 12.92949673572929 -0.1454099139559955 | ||
| -0.002599557960646664 0.002795888198858545 4.391864857782088e-05 | ||
| 9 1.5243589003230834e-08 | ||
| 0.00016458790412449367 | ||
| 29.54416169025338 -4.716921603714237 -0.5838030174427992 | ||
| 0.0004792636209523189 0.00312573757291745 -7.53264045199501e-05 | ||
| 10 2.1919422829042796e-12 | ||
| 7.943294877391593e-06 | ||
| 14.54448346259197 -31.05223519593471 -0.8828000265625595 | ||
| 0.002923077617691739 0.0006625916902153526 -0.0009142553677224461 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import sys | ||
| import argparse | ||
| import swiftestio as swio | ||
| """ | ||
| Converts initial conditions files from Swifter to Swiftest | ||
| """ | ||
|
|
||
| if __name__ == '__main__': | ||
| ap = argparse.ArgumentParser() | ||
| ap.add_argument("-i", "--input_swifter_param", required=True, help="Input Swifter parameter file to convert") | ||
| ap.add_argument("-o", "--output_swiftest_param", required=True, help="Converted Swiftest parameter file") | ||
| args = vars(ap.parse_args()) | ||
| inparam = args['input_swifter_param'] | ||
| outparam = args['output_swiftest_param'] | ||
| print(f"Swifter parameter is {inparam}") | ||
| print(f"Swiftest parameter file is {outparam}") | ||
| swio.swifter2swiftest(inparam,outparam) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| 1 | ||
| 100 | ||
| 1.01 0.0 0.0 | ||
| 0.0 6.252003053624663 0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| 1 | ||
| 100 | ||
| 1.01 0.0 0.0 | ||
| 0.0 6.252003053624663 0.0 |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.