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

Commit

Permalink
Merge branch 'debug' into RevampedRestart
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Jan 2, 2023
2 parents 531a35d + ee5f0d6 commit a9be114
Show file tree
Hide file tree
Showing 171 changed files with 23,003 additions and 24,136 deletions.
62 changes: 5 additions & 57 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,83 +2,31 @@
*
# Now, whitelist anything that's a directory
!*/
!*/python
# whitelist only the files that ever need to be tracked
!*.f90
!*.sh
!CMakeLists.txt
!*.cmake
!CHANGELOG
!README.md
!README_figs/**
!README_tables/**
!paper/paper.md
!paper/paper.bib
!README.swifter
!*.in
dump*
!example/cleanup
!example/swifter_symba_omp
!Makefile
src/*/Makefile
!Makefile.Defines
src/*/Makefile.Defines
!.gitignore
!**/.gitignore
!*.py
!*.ipynb
!examples/**
*ipynb_checkpoints

#fxdr library
!fxdr*/*.c
!fxdr*/*.F
!fxdr*/*.3f
!fxdr*/*.h
!fxdr*/*.inc
!fxdr*/cxdrreal64
!fxdr*/test.orig.xdr
!fxdr*/test_read_only.xdr
!fxdr*/configure/
!fxdr*/README*
!fxdr*/Makefile.bak
!fxdr*/Makefile.fxdr
!fxdr*/Makefile.tmpl
!fxdr*/Defines.*

#collresolve
!collresolve/*.c
!collresolve/*.h
!collresolve/*.py
!collresolve/Makefile.am
!collresolve/configure.ac
!collresolve/cambioni2019/*.h
!collresolve/cambioni2019/*.c
collresolve/config.h


**/.DS_Store

#Documentation
!docs/*
!docs/*/*
!docs/*/*/*
!README_figs/*

python/swiftest/tests/convert_code_type/swift2swifter/pl.swift2swifter.in

python/swiftest/tests/convert_code_type/swift2swifter/tp.swift2swifter.in

python/swiftest/tests/convert_code_type/swift2swiftest/cb.swift2swiftest.in

python/swiftest/tests/convert_code_type/swift2swiftest/pl.swift2swiftest.in

python/swiftest/tests/convert_code_type/swift2swiftest/tp.swift2swiftest.in

python/swiftest/tests/convert_code_type/swifter2swiftest/cb.swifter2swiftest.in

python/swiftest/tests/convert_code_type/cb.swifter2swiftest.in

python/swiftest/tests/convert_code_type/swifter2swiftest/pl.swifter2swiftest.in

python/swiftest/tests/convert_code_type/swifter2swiftest/tp.swifter2swiftest.in

!python/swiftest/requirements.txt

bin/
build/*
25 changes: 14 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# You should have received a copy of the GNU General Public License along with Swiftest.
# If not, see: https://www.gnu.org/licenses.

# CMake project file for FOO
# CMake project file for SWIFTEST

##################################################
# Define the project and the depencies that it has
Expand All @@ -29,19 +29,21 @@ ENDIF(NOT CMAKE_Fortran_COMPILER_SUPPORTS_F90)

# Set some options the user may choose
# Uncomment the below if you want the user to choose a parallelization library
OPTION(USE_MPI "Use the MPI library for parallelization" OFF)
OPTION(USE_OPENMP "Use OpenMP for parallelization" OFF)
OPTION(USE_MPI "Use the MPI library for parallelization" ON)
OPTION(USE_OPENMP "Use OpenMP for parallelization" ON)


# This INCLUDE statement executes code that sets the compile flags for DEBUG,
# RELEASE, and TESTING. You should review this file and make sure the flags
# are to your liking.
INCLUDE(${CMAKE_MODULE_PATH}/SetFortranFlags.cmake)
# Locate and set parallelization libraries. There are some CMake peculiarities
# taken care of here, such as the fact that the FindOpenMP routine doesn't know
# about Fortran.
INCLUDE(${CMAKE_MODULE_PATH}/SetParallelizationLibrary.cmake)

INCLUDE(${CMAKE_MODULE_PATH}/SetUpNetCDF.cmake)
INCLUDE(${CMAKE_MODULE_PATH}/SetMKL.cmake)

# This INCLUDE statement executes code that sets the compile flags for DEBUG,
# RELEASE, PROFILING, and TESTING.
INCLUDE(${CMAKE_MODULE_PATH}/SetFortranFlags.cmake)


# There is an error in CMAKE with this flag for pgf90. Unset it
GET_FILENAME_COMPONENT(FCNAME ${CMAKE_Fortran_COMPILER} NAME)
Expand All @@ -54,17 +56,18 @@ ENDIF(FCNAME STREQUAL "pgf90")
############################################################

# Define the executable name
SET(FOOEXE swiftest_driver)
SET(SWIFTEST_DRIVER swiftest_driver)

# Define some directories
SET(SRC ${CMAKE_SOURCE_DIR}/src)
SET(LIB ${CMAKE_SOURCE_DIR}/lib)
SET(BIN ${CMAKE_SOURCE_DIR}/bin)
SET(MOD ${CMAKE_SOURCE_DIR}/include)

# Have the .mod files placed in the lib folder
SET(CMAKE_Fortran_MODULE_DIRECTORY ${LIB})
SET(CMAKE_Fortran_MODULE_DIRECTORY ${MOD})

# The source for the FOO binary and have it placed in the bin folder
# The source for the SWIFTEST binary and have it placed in the bin folder
ADD_SUBDIRECTORY(${SRC} ${BIN})

# Add a distclean target to the Makefile
Expand Down
559 changes: 195 additions & 364 deletions README.md

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions README_tables/add_body_kwargs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# swiftest.add_body(**kwargs)
| Key Word Name | Key Word Description | Options |
|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------|--------------------------------|
| ```name``` | Name(s) of bodies. | string or array-like of strings
| ```id``` | Unique identification value(s) of bodies. | float or array-like of floats
| ```a``` | Semi-major axis value(s) of bodies. Only used if ```init_cond_format``` is set to ```EL```. | float or array-like of floats
| ```e``` | Eccentricity value(s) of bodies. Only used if ```init_cond_format``` is set to ```EL```. | float or array-like of floats
| ```inc``` | Inclination value(s) of bodies. Only used if ```init_cond_format``` is set to ```EL```. | float or array-like of floats
| ```capom``` | Longitude of the ascending node value(s) of bodies. Only used if ```init_cond_format``` is set to ```EL```. | float or array-like of floats
| ```omega``` | Argument of pericenter value(s) of bodies. Only used if ```init_cond_format``` is set to ```EL```. | float or array-like of floats
| ```capm``` | Mean anomaly value(s) of bodies. Only used if ```init_cond_format``` is set to ```EL```. | float or array-like of floats
| ```rh``` | Position vector(s) of bodies. Only used if ```init_cond_format``` is set to ```XV```. | (n,3) array-like of floats
| ```vh``` | Velocity vector(s) of bodies. Only used if ```init_cond_format``` is set to ```XV```. | (n,3) array-like of floats
| ```mass``` | Mass value(s) of bodies. Only for massive bodies. Only ```mass``` **OR** ```Gmass``` may be set. | float or array-like of floats
| ```Gmass``` | Gravitational mass value(s) of bodies. Only for massive bodies. Only ```mass``` **OR** ```Gmass``` may be set. | float or array-like of floats
| ```radius``` | Radius value(s) of bodies. Only for massive bodies. | float or array-like of floats
| ```rhill``` | Hill Radius value(s) of bodies. Only for massive bodies. | float or array-like of floats
| ```rot``` | Rotation rate vector(s) of bodies. Only for massive bodies. Only used if ```rotation``` is set to ```True```. | (n,3) array-like of floats
| ```Ip``` | Principal axes moments of inertia vector(s) of bodies. Only for massive bodies. Only used if ```rotation``` is set to ```True```. | (n,3) array-like of floats
| ```J2``` | The J2 term of the central body. | float or array-like of floats
| ```J4``` | The J4 term of the central body. | float or array-like of floats
54 changes: 54 additions & 0 deletions README_tables/param_options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# **<span>param.in</span>** options
| Parameter Name | Parameter Description | Input Format | Compatible Integrators |
|-------------------------|------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|------------------------|
| ```T0``` | The reference time for the start of the simulation in time units. | floating point (ex. ```0.0```) | all
| ```TSTART``` | Simulation start time for a restarted run in time units. | floating point (ex. ```0.0```) | all
| ```TSTOP``` | Simulation end time in time units. Must be greater than ```TSTART```. | floating point (ex. ```100.0```) | all
| ```DT``` | Simulation step size in time units. Must be less than or equal to ```TSTOP```-```TSTART```. | floating point (ex. ```0.005```) | all
| ```ISTEP_OUT``` | The number of time steps (```DT```) between output saves to memory. | integer (ex. ```200```) | all
| ```DUMP_CADENCE``` | The number of output steps between when data saved to memory is written to file. Setting to ```0``` results in writing data to file only at the completion of the simulation. | integer (ex. ```100```) | all
| ```IN_TYPE``` | Input file format. | ```ASCII```, ```NETCDF_FLOAT```, and ```NETCDF_DOUBLE``` | all
| ```NC_IN``` | NetCDF input file name. Only if ```IN_TYPE``` is set to ```NETCDF_FLOAT``` or ```NETCDF_DOUBLE```. | string (ex. ```init_cond.nc```) | all
| ```PL_IN``` | Massive body input file name. Only if ```IN_TYPE``` is set to ```ASCII```. | string (ex. ```pl.in```) | all
| ```TP_IN``` | Test particle input file name. Only if ```IN_TYPE``` is set to ```ASCII```. | string (ex. ```tp.in```) | all
| ```CB_IN ``` | Central body input file name. Only if ```IN_TYPE``` is set to ```ASCII```. | string (ex. ```cb.in```) | all
| ```IN_FORM``` | Input format. | ```EL```, ```XV``` | all
| ```OUT_TYPE``` | Output file format. | ```NETCDF_FLOAT```, ```NETCDF_DOUBLE``` | all
| ```BIN_OUT``` | Output file name. | string (ex. ```bin.nc```) | all
| ```OUT_FORM``` | Output format. | ```XV```, ```XVEL``` | all
| ```OUT_STAT``` | Output status. | ```NEW```, ```APPEND```, ```REPLACE```, ```UNKNOWN``` | all
| ```CHK_QMIN``` | Pericenter distance at which a test particle is too close to the pericenter of the system in distance units. | floating point, turn off using ```-1.0``` | all
| ```CHK_RMIN``` | Heliocentric distance at which a test particle is considered merged with the central body in distance units. | floating point, turn off using ```-1.0``` | all
| ```CHK_RMAX``` | Heliocentric distance at which a test particle is too distant from the central body in distance units. | floating point (ex. ```1000.0```) | all
| ```CHK_EJECT``` | Heliocentric distance at which an unbound test particle is too distant from the central body in distance units. | floating point (ex. ```1000.0```) | all
| ```CHK_QMIN_COORD``` | Coordinate frame used to check for minimum pericenter distance. | ```HELIO```, ```BARY``` | all
| ```CHK_QMIN_RANGE``` | Upper and lower bounds of the semimajor axis range used to check the pericenter distance. | two floating points, turn off using ```-1.0 -1.0``` | all
| ```EXTRA_FORCE``` | Additional user defined force routines provided. | ```YES```, ```NO``` | all
| ```CHK_CLOSE``` | Check for close encounters. Requires radius of massive bodies to be provided in initial conditions. | ```YES```, ```NO``` | all
| ```INTERACTION_LOOPS``` | Method for checking for interactions between bodies. | ```TRIANGULAR```, ```FLAT```, ```ADAPTIVE``` | all
| ```ENCOUNTER_CHECK``` | Method for checking for close encounters between bodies. | ```TRIANGULAR```, ```SORTSWEEP```, ```ADAPTIVE``` | all
| ```MU2KG``` | Mass units to kilogram conversion factor. | floating point (ex. ```1.988409870698051e+30```) | all
| ```TU2S``` | Time units to seconds conversion factor. | floating point (ex. ```31557600.0```) | all
| ```DU2M``` | Distance units to meters conversion factor. | floating point (ex. ```149597870700.0```) | all
| ```BIG_DISCARD``` | Include data for all fully-interacting bodies (above GMTINY) in each discard. Swifter only. | ```YES```, ```NO``` | all
| ```GR``` | General relativity. | ```YES```, ```NO``` | all
| ```RHILL_PRESENT``` | Hill Radius present in massive body input file. | ```YES```, ```NO``` | SyMBA
| ```ENERGY``` | Track and report the total energy, angular momentum, and mass of the system. | ```YES```, ```NO``` | SyMBA
| ```FRAGMENTATION``` | Resolve collisions with fragmentation. | ```YES```, ```NO``` | SyMBA
| ```ROTATION``` | Rotation of massive bodies. Requires rotation vectors, radii, and moments of inertia to be provided in initial conditions. | ```YES```, ```NO``` | SyMBA
| ```GMTINY``` | Mass cutoff between fully and semi-interacting massive bodies in gravitational mass units. | floating point (ex. ```4e-06```) | SyMBA
| ```MIN_GMFRAG``` | Minimum fragment mass in gravitational mass units. | floating point (ex. ```1e-09```) | SyMBA
| ```TIDES``` | Tidal dissipation model. | ```YES```, ```NO``` | *(under development)*
| ```YORP``` | YORP effect. | ```YES```, ```NO``` | *(under development)*
| ```YARKOVSKY``` | Yarkovsky effect. | ```YES```, ```NO``` | *(under development)*

In the above list, the following are defined as:
- ```HELIO``` - Use the heliocentric coordinate frame for ```CHK_QMIN```
- ```BARY``` - Use the barycentric coordinate frame for ```CHK_QMIN```
- ```XV``` - Heliocentric position and velocity components for ```IN_FORM``` and/or ```OUT_FORM```
- ```EL``` - Osculating orbital elements for ```IN_FORM``` and/or ```OUT_FORM```
- ```XVEL``` - Heliocentric position and velocity components and osculating orbital elements for ```OUT_FORM```
- ```NETCDF_FLOAT``` - Single precision NetCDF format for ```OUT_TYPE```
- ```NETCDF_DOUBLE``` - Double precision NetCDF format for ```OUT_TYPE```

For more details on the ```INTERACTION_LOOPS``` and ```ENCOUNTER_CHECK``` options, see the **Updates to Swifter SyMBA** section below.
Loading

0 comments on commit a9be114

Please sign in to comment.