Basic parameters, definitions, and global type definitions used throughout the Swiftest project Adapted from David E. Kaufmann’s Swifter routine: globals.f90 and module_swifter.f90
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=I4B), | public, | parameter | :: | ACTIVE | = | 0 |
Symbolic names for body/particle status codes: |
| character(len=*), | public, | parameter | :: | ADD | = | '+1' |
String labels for body/particle addition/subtraction in discard file |
| integer(kind=I4B), | public, | parameter | :: | BINUNIT | = | 20 |
File unit number for the binary output file |
| character(len=*), | public, | parameter | :: | BIN_OUTFILE | = | 'data.nc' | |
| character(len=*), | public, | parameter | :: | CB_INFILE | = | 'cb.in' |
Default file names that can be changed by the user in the parameters file |
| character(len=*), | public, | parameter | :: | CB_TYPE_NAME | = | "Central Body" | |
| integer(kind=I4B), | public, | parameter | :: | COLLIDED | = | -14 | |
| real(kind=DP), | public, | parameter | :: | DEG2RAD | = | PI/180.0_DP |
Definition of conversion factor from degrees to radians |
| integer(kind=I4B), | public, | parameter | :: | DISCARDED_DRIFTERR | = | -7 | |
| integer(kind=I4B), | public, | parameter | :: | DISCARDED_PERI | = | -4 | |
| integer(kind=I4B), | public, | parameter | :: | DISCARDED_PLQ | = | -6 | |
| integer(kind=I4B), | public, | parameter | :: | DISCARDED_PLR | = | -5 | |
| integer(kind=I4B), | public, | parameter | :: | DISCARDED_RMAX | = | -1 | |
| integer(kind=I4B), | public, | parameter | :: | DISCARDED_RMAXU | = | -3 | |
| integer(kind=I4B), | public, | parameter | :: | DISCARDED_RMIN | = | -2 | |
| integer(kind=I4B), | public, | parameter | :: | DISRUPTED | = | -9 | |
| integer, | public, | parameter | :: | DP | = | c_double |
Symbolic name for kind types of double-precision reals |
| integer(kind=I4B), | public, | parameter | :: | ELLIPSE | = | -1 |
Symbolic names for orbit types - ellipse |
| integer(kind=I4B), | public, | parameter | :: | FAILURE | = | -1 |
Symbolic name for function return/flag code for failure |
| real(kind=DP), | public, | parameter | :: | GC | = | 6.6743E-11_DP |
Universal gravitational constant in SI units |
| integer(kind=I4B), | public, | parameter | :: | GRAZE_AND_MERGE | = | -11 | |
| integer(kind=I4B), | public, | parameter | :: | HELP | = | -3 |
Symbolic name for function return/flag code for printing the usage message |
| integer(kind=I4B), | public, | parameter | :: | HIT_AND_RUN_DISRUPT | = | -12 | |
| integer(kind=I4B), | public, | parameter | :: | HIT_AND_RUN_PURE | = | -13 | |
| integer(kind=I4B), | public, | parameter | :: | HYPERBOLA | = | 1 |
Symbolic names for orbit types - hyperbola |
| integer, | public, | parameter | :: | I1B | = | c_int_least8_t |
Symbolic name for kind types of 1-byte integers |
| integer, | public, | parameter | :: | I2B | = | c_int_least16_t |
Symbolic name for kind types of 2-byte integers |
| integer, | public, | parameter | :: | I4B | = | c_int_least32_t |
Symbolic name for kind types of 4-byte integers |
| integer, | public, | parameter | :: | I8B | = | c_int_least64_t |
Symbolic name for kind types of 8-byte integers |
| integer(kind=I4B), | public, | parameter | :: | INACTIVE | = | 1 | |
| character(len=*), | public, | parameter | :: | INT_BS | = | "Bulirsch-Stoer" | |
| character(len=*), | public, | parameter | :: | INT_HELIO | = | "Democratic Heliocentric" | |
| character(len=*), | public, | parameter | :: | INT_RA15 | = | "Radau 15th order" | |
| character(len=*), | public, | parameter | :: | INT_RINGMOONS | = | "SyMBA-RINGMOONS" | |
| character(len=*), | public, | parameter | :: | INT_RMVS | = | "Regularized Mixed Variable Symplectic" | |
| character(len=*), | public, | parameter | :: | INT_SYMBA | = | "SyMBA" | |
| character(len=*), | public, | parameter | :: | INT_TU4 | = | "T+U 4th order" | |
| character(len=*), | public, | parameter | :: | INT_WHM | = | "Wisdom-Holman Method" | |
| integer(kind=I4B), | public, | parameter | :: | LOWERCASE_BEGIN | = | iachar('a') |
ASCII character set parameter for lower to upper conversion - start of lowercase |
| integer(kind=I4B), | public, | parameter | :: | LOWERCASE_END | = | iachar('z') |
ASCII character set parameter for lower to upper conversion - end of lowercase |
| integer(kind=I4B), | public, | parameter | :: | LUN | = | 42 |
File unit number for files that are opened and closed within a single subroutine call, and therefore should not collide |
| real(kind=DP), | public, | parameter | :: | L_SUN | = | 3.828e26_DP |
Solar luminosity in SI units; Mamajek, et al (2015). IAU 2015 Resolution B3. https://doi.org/10.48550/arXiv.1510.07674 |
| integer(kind=I4B), | public, | parameter | :: | MERGED | = | -8 | |
| integer(kind=I4B), | public, | parameter | :: | NAMELEN | = | 32 |
Maximum size of name strings |
| character(len=*), | public, | parameter | :: | NC_INFILE | = | 'init_cond.nc' | |
| integer(kind=I4B), | public, | parameter | :: | NDIM | = | 3 |
Miscellaneous constants: Number of dimensions in our reality |
| integer(kind=I4B), | public, | parameter | :: | NDIM2 | = | 2*NDIM |
2x the number of dimensions |
| integer(kind=I4B), | public, | parameter | :: | NDUMPFILES | = | 2 |
Standard file names |
| integer(kind=I4B), | public, | parameter | :: | NEW_PARTICLE | = | -15 | |
| integer(kind=I4B), | public, | parameter | :: | NTHERSHOLD | = | 1000 |
Threshold value for OpenMP loop parallelization |
| integer(kind=I4B), | public, | parameter | :: | OLD_PARTICLE | = | -16 | |
| integer(kind=I4B), | public, | parameter | :: | PARABOLA | = | 0 |
Symbolic names for orbit types - parabola |
| character(len=*), | public, | parameter | :: | PARAM_RESTART_FILE | = | "param.restart.in" | |
| integer(kind=I4B), | public, | parameter | :: | PARTICLEUNIT | = | 44 |
File unit number for the binary particle info output file |
| real(kind=DP), | public, | parameter | :: | PI | = | 3.141592653589793238462643383279502884197_DP |
Definition of /(\pi) |
| real(kind=DP), | public, | parameter | :: | PI3BY2 | = | 4.712388980384689857693965074919254326296_DP |
Definition of /(3 \pi / 2) |
| real(kind=DP), | public, | parameter | :: | PIBY2 | = | 1.570796326794896619231321691639751442099_DP |
Definition of /(\pi / 2) |
| character(len=*), | public, | parameter | :: | PL_INFILE | = | 'pl.in' | |
| character(len=*), | public, | parameter | :: | PL_TINY_TYPE_NAME | = | "Semi-Interacting Massive Body" | |
| character(len=*), | public, | parameter | :: | PL_TYPE_NAME | = | "Massive Body" | |
| integer, | public, | parameter | :: | QP | = | c_float128 |
Symbolic name for kind types of quad-precision reals |
| integer, | public, | parameter | :: | QP | = | c_double |
No support for quad precision. Defining QP as the same as DP |
| real(kind=DP), | public, | parameter | :: | RAD2DEG | = | 180.0_DP/PI |
Definition of conversion factor from degrees to radians |
| character(len=*), | public, | parameter | :: | RING_FILE | = | 'ring.nc' | |
| character(len=*), | public, | parameter | :: | SEED_TYPE_NAME | = | "Ringmoons Seed" | |
| real(kind=DP), | public, | parameter | :: | SIGMA | = | 5.670374419e-8_DP |
Stefan-Boltzmann constant in SI units |
| real(kind=DP), | public, | parameter | :: | SIXTH | = | 0.166666666666666666666666666666666666667_DP |
Definition of 1 / 3 |
| integer, | public, | parameter | :: | SP | = | c_float |
Symbolic name for kind types of single-precision reals |
| integer(kind=I4B), | public, | parameter | :: | STRMAX | = | 512 |
Maximum size of character strings |
| character(len=*), | public, | parameter | :: | SUB | = | '-1' | |
| integer(kind=I4B), | public, | parameter | :: | SUCCESS | = | 0 |
Symbolic name for function return/flag code for success |
| integer(kind=I4B), | public, | parameter | :: | SUPERCATASTROPHIC | = | -10 | |
| character(len=STRMAX), | public | :: | SWIFTEST_LOG_FILE |
Name of file to use to log output when using “COMPACT” or “PROGRESS” display style (each co-image gets its own log file) |
|||
| character(len=*), | public, | parameter | :: | SWIFTEST_LOG_FILE | = | "swiftest.log" |
Name of file to use to log output when using “COMPACT” or “PROGRESS” display style |
| integer(kind=I4B), | public, | parameter | :: | SWIFTEST_LOG_OUT | = | 33 |
File unit for log file when using “COMPACT” display style |
| real(kind=DP), | public, | parameter | :: | THIRD | = | 0.333333333333333333333333333333333333333_DP |
Definition of 1 / 3 |
| character(len=*), | public, | parameter | :: | TP_INFILE | = | 'tp.in' | |
| character(len=*), | public, | parameter | :: | TP_TYPE_NAME | = | "Test Particle" | |
| real(kind=DP), | public, | parameter | :: | TWOPI | = | 6.283185307179586476925286766559005768394_DP |
Definition of 2 \pi |
| character(len=*), | public, | parameter | :: | UNKNOWN_INTEGRATOR | = | "UKNOWN INTEGRATOR" |
Symbolic name for integrator types |
| integer(kind=I4B), | public, | parameter | :: | UPPERCASE_OFFSET | = | iachar('A')-iachar('a') |
ASCII character set parameter for lower to upper conversion - offset between upper and lower |
| integer(kind=I4B), | public, | parameter | :: | USAGE | = | -2 |
Symbolic name for function return/flag code for printing the usage message |
| character(len=*), | public, | parameter | :: | VERSION | = | "2026.7.0" |
Swiftest version |
| real(kind=DP), | public, | parameter | :: | VSMALL | = | sqrt(TINY(1._DP)) |
Very small number used to prevent floating underflow |
| real(kind=DP), | public, | parameter | :: | YARK_RADIUS_THRESHOLD | = | 2.5e4_DP |
Radius threshold for yarkovsky effects.Yarkovsky effect is negligible for bodies with R > 25 km = 2.5e4 m (Bottke, et al, 2006; doi:10.1146/annurev.earth.34.031405.125154) |
| real(kind=DP), | public, | parameter | :: | einsteinC | = | 299792458.0_DP |
Speed of light in SI units |
| integer(kind=I4B), | public | :: | nthreads | = | 1 |
Number of OpenMP threads |