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

Commit

Permalink
Merge branch 'debug' of github.itap.purdue.edu:MintonGroup/swiftest i…
Browse files Browse the repository at this point in the history
…nto debug
  • Loading branch information
daminton committed Feb 9, 2023
2 parents d50121b + 41713a3 commit 9dd9035
Show file tree
Hide file tree
Showing 44 changed files with 287 additions and 1,449 deletions.
3 changes: 2 additions & 1 deletion examples/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
!helio_gr_test
!whm_gr_test
!Chambers2013
!solar_impact
!solar_impact
!Swifter_Swiftest
3 changes: 1 addition & 2 deletions examples/Basic_Simulation/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
!.gitignore
!initial_conditions.py
!output_reader.py
!run_from_file.py
!read_old_run.py
!README.txt
23 changes: 23 additions & 0 deletions examples/Basic_Simulation/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh
This file is part of Swiftest.
Swiftest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Swiftest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Swiftest.
If not, see: https://www.gnu.org/licenses.

README.txt

Swiftest Example : Basic_Simulation
Author : Carlisle Wishard and David Minton
Date : December 6, 2022

Included in the Basic_Simulation example directory are the following files:

- README.txt : This file
- initial_conditions.py : A Python Script that generates and runs a set of initial conditions.
- output_reader.py : A Python Script that processes out.nc and generates output.eps

This example is intended to be run with Swiftest SyMBA. For details on how to generate, run, and analyze this example,
see the Swiftest User Manual.
11 changes: 4 additions & 7 deletions examples/Basic_Simulation/initial_conditions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python3

"""
Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh
This file is part of Swiftest.
Expand All @@ -9,7 +11,6 @@
If not, see: https://www.gnu.org/licenses.
"""

#!/usr/bin/env python3
"""
Generates and runs a set of Swiftest input files from initial conditions with the SyMBA integrator. All simulation
outputs are stored in the /simdata subdirectory.
Expand All @@ -20,12 +21,8 @@
Output
------
data.nc : A NetCDF file containing the simulation output.
dump_bin1.nc : A NetCDF file containing the necessary inputs to restart a simulation from t!=0.
dump_bin2.nc : A NetCDF file containing the necessary inputs to restart a simulation from t!=0.
dump_param1.in : An ASCII file containing the necessary parameters to restart a simulation.
dump_param2.in : An ASCII file containing the necessary parameters to restart a simulation.
fraggle.log : An ASCII file containing the information of any collisional events that occured.
data.nc : A NetCDF file containing the simulation output.
collisions.log : An ASCII file containing the information of any collisional events that occured.
init_cond.nc : A NetCDF file containing the initial conditions for the simulation.
param.in : An ASCII file containing the parameters for the simulation.
swiftest.log : An ASCII file containing the information on the status of the simulation as it runs.
Expand Down
3 changes: 2 additions & 1 deletion examples/Basic_Simulation/output_reader.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python3

"""
Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh
This file is part of Swiftest.
Expand All @@ -9,7 +11,6 @@
If not, see: https://www.gnu.org/licenses.
"""

#!/usr/bin/env python3
"""
Reads and processes a Swiftest output file.
Expand Down
3 changes: 2 additions & 1 deletion examples/Chambers2013/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*
!.gitignore
!init_cond.py
!scattermovie.py
!scattermovie.py
!README.txt
23 changes: 23 additions & 0 deletions examples/Chambers2013/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh
This file is part of Swiftest.
Swiftest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Swiftest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Swiftest.
If not, see: https://www.gnu.org/licenses.

README.txt

Swiftest Example : Chambers2013
Author : David Minton and Carlisle Wishard
Date : December 6, 2022

Included in the Chambers2013 example directory are the following files:

- README.txt : This file
- init_cond.py : A Python Script that generates and runs a set of initial conditions.
- scattermovie.py : A Python Script that processes data.nc and generates Chambers2013-aescatter.mp4 or Chambers2013-aiscatter.mp4

This example is intended to be run with Swiftest SyMBA. For details on how to generate, run, and analyze this example,
see the Swiftest User Manual.
17 changes: 16 additions & 1 deletion examples/Chambers2013/init_cond.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python3

"""
Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh
This file is part of Swiftest.
Expand All @@ -9,7 +11,20 @@
If not, see: https://www.gnu.org/licenses.
"""

#!/usr/bin/env python3
"""
Generates a set of Swiftest input files from initial conditions with the SyMBA integrator. All simulation
outputs are stored in the /simdata subdirectory.
Input
------
None.
Output
------
init_cond.nc : A NetCDF file containing the initial conditions for the simulation.
param.in : An ASCII file containing the parameters for the simulation.
"""

import swiftest
import numpy as np
from numpy.random import default_rng
Expand Down
19 changes: 18 additions & 1 deletion examples/Chambers2013/scattermovie.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python3

"""
Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh
This file is part of Swiftest.
Expand All @@ -9,7 +11,22 @@
If not, see: https://www.gnu.org/licenses.
"""

#!/usr/bin/env python3
"""
Creates a movie from a set of Swiftest output files. All simulation
outputs are stored in the /simdata subdirectory.
Input
------
param.in : ASCII Swiftest parameter input file.
data.nc : A NetCDF file containing the simulation output.
Output
------
Chambers2013-aescatter.mp4 : A .mp4 file plotting eccentricity vs semimajor axis.
OR
Chambers2013-aiscatter.mp4 : A .mp4 file plotting inclination vs semimajor axis.
"""

import swiftest
import numpy as np
import matplotlib.pyplot as plt
Expand Down
2 changes: 2 additions & 0 deletions examples/Fragmentation/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
!.gitignore
!Fragmentation_Movie.py
!Multibody_Movie.py
!swiftest_fragmentation.py
!README.txt
9 changes: 3 additions & 6 deletions examples/Fragmentation/Fragmentation_Movie.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,12 @@
Inputs
_______
param.in : ASCII text file
Swiftest parameter input file.
out.nc : NetCDF file
Swiftest output file.
param.in : ASCII Swiftest parameter input file.
data.nc : A NetCDF file containing the simulation output.
Returns
-------
fragmentation.mp4 : mp4 movie file
Movie of a fragmentation event.
fragmentation.mp4 : A .mp4 file of a fragmentation event.
"""

import swiftest
Expand Down
9 changes: 3 additions & 6 deletions examples/Fragmentation/Multibody_Movie.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,12 @@
Inputs
_______
param.in : ASCII text file
Swiftest parameter input file.
out.nc : NetCDF file
Swiftest output file.
param.in : ASCII Swiftest parameter input file.
data.nc : A NetCDF file containing the simulation output.
Returns
-------
fragmentation.mp4 : mp4 movie file
Movie of a fragmentation event.
fragmentation.mp4 : A .mp4 file of a fragmentation event.
"""

import swiftest
Expand Down
23 changes: 23 additions & 0 deletions examples/Fragmentation/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh
This file is part of Swiftest.
Swiftest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Swiftest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Swiftest.
If not, see: https://www.gnu.org/licenses.

README.txt

Swiftest Example : Fragmentation
Author : David Minton and Carlisle Wishard
Date : December 6, 2022

Included in the Fragmentation example directory are the following files:

- README.txt : This file
- swiftest_fragmentation.py : A Python Script that generates and runs three sets of initial conditions.
- Fragmentation_Movie.py : A Python Script that processes an out.nc file and generates a movie (.mp4) of a collisional event.
- Multibody_Movie.py : A Python Script that processes an out.nc file and generates a movie (.mp4) of a multi-body collisional event.

This example is intendedto be run with Swiftest SyMBA. For details on how to generate, run, and analyze this example, see the Swiftest User Manual.
10 changes: 4 additions & 6 deletions examples/Fragmentation/swiftest_fragmentation.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python3

"""
Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh
This file is part of Swiftest.
Expand All @@ -8,7 +10,7 @@
You should have received a copy of the GNU General Public License along with Swiftest.
If not, see: https://www.gnu.org/licenses.
"""
#!/usr/bin/env python3

"""
Generates and runs a set of Swiftest input files from initial conditions with the SyMBA integrator. All simulation
outputs for the disruption case are stored in the /disruption subdirectory. All simulation outputs for the hit and run
Expand All @@ -31,11 +33,7 @@
init_cond.nc : A NetCDF file containing the initial conditions for the simulation.
collision_000001.nc : A NetCDF file containing the data for the collisions.
encounter_000001.nc : A NetCDF file containing the data for the close encounters.
dump_bin1.nc : A NetCDF file containing the necessary inputs to restart a simulation from t!=0.
dump_bin2.nc : A NetCDF file containing the necessary inputs to restart a simulation from t!=0.
dump_param1.in : An ASCII file containing the necessary parameters to restart a simulation.
dump_param2.in : An ASCII file containing the necessary parameters to restart a simulation.
fraggle.log : An ASCII file containing the information of any collisional events that occured.
collisions.log : An ASCII file containing the information of any collisional events that occured.
param.in : An ASCII file containing the parameters for the simulation.
swiftest.log : An ASCII file containing the information on the status of the simulation as it runs.
Expand Down
4 changes: 4 additions & 0 deletions examples/Swifter_Swiftest/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*
!.gitignore
!8pl_0tp
!108_pl_50tp
12 changes: 12 additions & 0 deletions examples/Swifter_Swiftest/8pl_0tp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
*
!.gitignore
!cb.swiftest.in
!init_cond.py
!param.swifter.in
!param.swiftest.in
!pl.swifter.in
!pl.swiftest.in
!README.txt
!tp.swifter.in
!tp.swiftest.in
!swiftest_symba_vs_swifter_symba.ipynb
29 changes: 29 additions & 0 deletions examples/Swifter_Swiftest/8pl_0tp/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh
This file is part of Swiftest.
Swiftest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Swiftest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Swiftest.
If not, see: https://www.gnu.org/licenses.

README.txt

Swiftest Example : Swifter_Swiftest/8pl_0tp
Author : David Minton and Carlisle Wishard
Date : August 15, 2022

Included in the symba_swifter_comparison/8pl example directory are the following files:

- README.txt : This file
- param.swiftest.in : The Swiftest parameter input file
- param.swifter.in : The Swifter parameter input file
- cb.swiftest.in : The Swiftest central body input file
- pl.swifter.in : The Swifter massive body input file
- pl.swiftest.in : The Swiftest massive body input file
- tp.swifter.in : The Swifter test particle input file
- tp.swiftest.in : The Swiftest test particle input file
- init_cond.py : A Python Script that generates two sets of initial conditions: one Swifter and one Swiftest
- swiftest_symba_vs_swifter_symba.ipynb : A Jupyter Notebook for processing and analysing Swifter and Swiftest data

This example is intended to be run with the SyMBA integrator for both Swifter and Swiftest. For details on how to generate, run, and analyze this example, see the Swiftest User Manual. To obtain a copy of Swifter, please see https://www.boulder.swri.edu/swifter/home.html.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python3

"""
Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh
This file is part of Swiftest.
Expand All @@ -9,7 +11,26 @@
If not, see: https://www.gnu.org/licenses.
"""

#!/usr/bin/env python3
"""
Generates and runs a set of Swiftest input files and a set of Swifter input files from initial conditions with the
SyMBA integrator.
Input
------
None.
Output
------
param.swiftest.in : An ASCII file containing the parameters for the Swiftest simulation.
param.swifter.in : An ASCII file containing the parameters for the Swifter simulation.
cb.swiftest.in : An ASCII file containing the central body data for the Swiftest simulation.
pl.swifter.in : An ASCII file containing the massive body data for the Swifter simulation.
pl.swiftest.in : An ASCII file containing the massive body data for the Swiftest simulation.
tp.swifter.in : An ASCII file containing the test particle data for the Swifter simulation.
tp.swiftest.in : An ASCII file containing the test particle data for the Swiftest simulation.
"""

import numpy as np
import swiftest
import swiftest.io as swio
Expand Down
16 changes: 0 additions & 16 deletions examples/Swifter_Swiftest/cb.in

This file was deleted.

Loading

0 comments on commit 9dd9035

Please sign in to comment.