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

Commit

Permalink
Merge branch 'master' into oblate_coord_rot
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Oct 16, 2023
2 parents e340618 + f8cf32a commit c64c04d
Show file tree
Hide file tree
Showing 16 changed files with 414 additions and 96 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/draft-pdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on: [push]

jobs:
paper:
runs-on: ubuntu-latest
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
with:
journal: joss
# This should be the path to the paper within your repo.
paper-path: paper/paper.md
- name: Upload
uses: actions/upload-artifact@v1
with:
name: paper
# This is the output path where Pandoc will write the compiled
# PDF. Note, this should be the same directory as the input
# paper.md
path: paper/paper.pdf
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ swiftest_driver.sh
!README.swifter
dump*
!**/.gitignore
!.github/workflows/build_wheels.yml
!.github/workflows/*.yml
!setup.py
!examples/**
!swiftest/**
!tests/**
!.zenodo.json
!CITATION.cff
*ipynb_checkpoints
**/.DS_Store
!version.txt
Expand Down
58 changes: 58 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"description": "Official release for the Journal of Open Source Software.",
"license" : "GPLv3+",
"title": "profminton/swiftest: v2023.10.2",
"version": "v2023.10.2",
"upload_type": "software",
"publication_date": "2023-10-07",
"creators": [
{
"name": "Carlisle Wishard",
"affiliation": [
"Department of Earth, Atmospheric, and Planetary Sciences, Purdue University, USA",
"Evansville Museum of Arts, History & Science, USA"
],
"orcid": "0009-0001-0733-3268"
},
{
"name": "Jennifer Pouplin",
"affiliation": [
"Department of Earth, Atmospheric, and Planetary Sciences, Purdue University, USA",
"School of Aeronautics and Astronautics, Purdue University, USA"
]
},
{
"name": "Jacob Elliott",
"affiliation": "Department of Earth, Atmospheric, and Planetary Sciences, Purdue University, USA"
},
{
"name": "Dana Singh",
"affiliation": "SAIC, Princeton, NJ, USA"
},
{
"name": "Kaustub Anand",
"affiliation": [
"Department of Earth, Atmospheric, and Planetary Sciences, Purdue University, USA",
"Department of Physics and Astronomy, Purdue University, USA"
]
},
{
"name": "David Minton",
"affiliation": "Department of Earth, Atmospheric, and Planetary Sciences, Purdue University, USA",
"orcid": "0000-0003-1656-9704"
}
],
"access_right": "open",
"related_identifiers": [
{
"scheme": "url",
"identifier": "https://github.com/profminton/swiftest/tree/v2023.10.2",
"relation": "isSupplementTo"
},
{
"scheme": "doi",
"identifier": "10.5281/zenodo.8417147",
"relation": "isVersionOf"
}
]
}
22 changes: 22 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
cff-version: 1.1.0
message: "If you use this software, please cite it as below."
authors:
- name: Wishard
given-names: Carlislse
orcid: https://orcid.org/0009-0001-0733-3268
- family-names: Pouplin
given-names: Jennifer
- family-names: Elliott
given-names: Jacob
- family-names: Dana
given-names: Singh
- family-names: Anand
given-names: Kaustub
- family-names: Minton
given-names: David
affiliation: "1"
orcid: https://orcid.org/0000-0003-1656-9704
title: profminton/swiftest: v2023.10.2
version: v2023.10.2
date-released: 2023-10-07

6 changes: 4 additions & 2 deletions cmake/Modules/SetSwiftestFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -563,8 +563,10 @@ IF (CMAKE_BUILD_TYPE STREQUAL "RELEASE" OR CMAKE_BUILD_TYPE STREQUAL "PROFILE")
)
# Tells the compiler to link to certain libraries in the Intel oneAPI Math Kernel Library (oneMKL).
SET_COMPILE_FLAG(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE}"
Fortran "-qmkl=cluster" # Intel
"-qmkl" # Intel
Fortran "-mkl=cluster"
"-mkl"
"-qmkl=cluster"
"-qmkl"
)
# Enables additional interprocedural optimizations for a single file compilation
SET_COMPILE_FLAG(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE}"
Expand Down
56 changes: 34 additions & 22 deletions examples/Fragmentation/Fragmentation_Movie.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,24 @@
Generates and runs a set of Swiftest input files from initial conditions with the SyMBA integrator. All simulation
outputs are stored in the subdirectory named after their collisional regime.
**NOTE: You must have ffmpeg installed on your system before running this script. For instance, on MacOS:
```brew install ffmpeg```
on Ubuntu:
```sudo apt-get install ffmpeg```
Inputs
_______
None.
User selects which collisional movie to generate
Output
------
collisions.log : An ASCII file containing the information of any collisional events that occured.
collisions.nc : A NetCDF file containing the collision output.
data.nc : A NetCDF file containing the simulation output.
encounters.nc : A NetCDF file containing the encounter output.
init_cond.nc : A NetCDF file containing the initial conditions for the simulation.
param.00...0.in : A series of parameter input files containing the parameters for the simulation at every output stage.
param.in : An ASCII file containing the inital parameters for the simulation.
param.restart.in : An ASCII file containing the parameters for the simulation at the last output.
swiftest.log : An ASCII file containing the information on the status of the simulation as it runs.
collision.mp4 : A movie file named after the collisional regime depicting the collision.
Files are stored in directories for each collision type name requested
[COLLISION_TYPE].mp4 : A movie file named after the collisional regime depicting the collision.
"""

Expand All @@ -48,6 +50,22 @@
movie_titles = dict(zip(available_movie_styles, movie_title_list))
num_movie_frames = 1000


# ----------------------------------------------------------------------------------------------------------------------
# To increase the number of bodies generated in each collision type, decrease the value of the corresponding nfrag_reduction number
# ----------------------------------------------------------------------------------------------------------------------
nfrag_reduction = {"disruption_headon" : 10.0,
"disruption_off_axis" : 10.0,
"supercatastrophic_headon" : 10.0,
"supercatastrophic_off_axis" : 10.0,
"hitandrun_disrupt" : 10.0,
"hitandrun_pure" : 1.0,
"merge" : 1.0,
"merge_spinner" : 1.0,
}



# These initial conditions were generated by trial and error
names = ["Target","Projectile"]
pos_vectors = {"disruption_headon" : [np.array([1.0, -5.0e-05, 0.0]),
Expand Down Expand Up @@ -124,16 +142,6 @@
"merge_spinner" : 5.0e-3,
}

nfrag_reduction = {"disruption_headon" : 1.0,
"disruption_off_axis" : 1.0,
"supercatastrophic_headon" : 1.0,
"supercatastrophic_off_axis" : 10.0,
"hitandrun_disrupt" : 1.0,
"hitandrun_pure" : 1.0,
"merge" : 1.0,
"merge_spinner" : 1.0,
}

density = 3000 * swiftest.AU2M**3 / swiftest.MSun
GU = swiftest.GMSun * swiftest.YR2S**2 / swiftest.AU2M**3
body_radius = body_Gmass.copy()
Expand Down Expand Up @@ -358,7 +366,11 @@ def vec_props(self, c):
# Set fragmentation parameters
minimum_fragment_gmass = 0.01 * body_Gmass[style][1]
gmtiny = 0.50 * body_Gmass[style][1]
sim.set_parameter(collision_model="fraggle", encounter_save="both", gmtiny=gmtiny, minimum_fragment_gmass=minimum_fragment_gmass, nfrag_reduction=nfrag_reduction[style])
sim.set_parameter(collision_model="fraggle",
encounter_save="both",
gmtiny=gmtiny,
minimum_fragment_gmass=minimum_fragment_gmass,
nfrag_reduction=nfrag_reduction[style])
sim.run(dt=5e-4, tstop=tstop[style], istep_out=1, dump_cadence=0)

print("Generating animation")
Expand Down
26 changes: 25 additions & 1 deletion examples/Multibody_Fragmentation/Multibody_Movie.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
Generates, runs, and processes a set of initial conditions for a multi-body super-catastrophic distruption collisional event.
All Swiftest output files are stored in the /supercatastrophic_multi subdirectory.
**NOTE: You must have ffmpeg installed on your system before running this script. For instance, on MacOS:
```brew install ffmpeg```
on Ubuntu:
```sudo apt-get install ffmpeg```
Inputs
_______
None.
Expand Down Expand Up @@ -47,6 +56,16 @@
movie_titles = dict(zip(available_movie_styles, movie_title_list))
num_movie_frames = 1000


# ----------------------------------------------------------------------------------------------------------------------
# To increase the number of bodies generated in each collision type, decrease the value of the corresponding nfrag_reduction number
# ----------------------------------------------------------------------------------------------------------------------
nfrag_reduction = {
"supercatastrophic_multi" : 5.0,
}



# These initial conditions were generated by trial and error
names = ["Body1","Body2","Body3","Body4"]

Expand Down Expand Up @@ -287,7 +306,12 @@ def vec_props(self, c):
# Set fragmentation parameters
minimum_fragment_gmass = 0.05 * body_Gmass[style][1]
gmtiny = 0.10 * body_Gmass[style][1]
sim.set_parameter(collision_model="fraggle", encounter_save="both", gmtiny=gmtiny, minimum_fragment_gmass=minimum_fragment_gmass, verbose=False)
sim.set_parameter(collision_model="fraggle",
encounter_save="both",
gmtiny=gmtiny,
minimum_fragment_gmass=minimum_fragment_gmass,
nfrag_reduction=nfrag_reduction[style],
verbose=False)
sim.run(dt=5e-4, tstop=tstop[style], istep_out=1, dump_cadence=0)

print("Generating animation")
Expand Down
Loading

0 comments on commit c64c04d

Please sign in to comment.