diff --git a/.gitignore b/.gitignore index 6bff14a84..a250469db 100644 --- a/.gitignore +++ b/.gitignore @@ -43,15 +43,19 @@ _dependencies !.readthedocs.yaml !docs/ !docs/**/* -docs/**/*.ai docs/_build/ docs/_build/**/* docs/generated/ docs/generated/**/* docs/**/*.DS_Store docs/**/*.swp - - +docs/ +!docs/_static/**/*.png +!docs/_static/**/*.svg +**/*.ai +docs/_static/fortran_docs/ +docs/_static/fortran_docs/*/** +!fortran_docs.md !README_figs/* #Docker and Singularity files diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 9c1872b1a..ccbef0287 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -15,12 +15,12 @@ build: os: ubuntu-22.04 tools: python: "3.11" - -# Optionally build your docs in additional formats such as PDF and ePub -# formats: -# - pdf -# - epub - + apt_packages: + - graphviz + jobs: + pre_build: + - ford fortran_docs.md + - DOC_BUILD=1 pip install . python: install: - requirements: docs/requirements.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ce195ac5..5b2663034 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,111 +13,118 @@ ################################################## CMAKE_MINIMUM_REQUIRED(VERSION 3.6.0...3.27.1) SET(SKBUILD_PROJECT_NAME "swiftest" CACHE STRING "Name of project set by scikit-build") -SET(SKBUILD_SCRIPTS_DIR "${CMAKE_SOURCE_DIR}/bin" CACHE STRING "Install location of binary executable") # Get version stored in text file FILE(READ "version.txt" VERSION) -PROJECT(${SKBUILD_PROJECT_NAME} LANGUAGES C Fortran VERSION ${VERSION}) - -# Use the old method to get Python packages, as that's what scikit-build uses -IF (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.27") - CMAKE_POLICY(SET CMP0148 OLD) -ENDIF () - -# Set some options the user may choose -OPTION(USE_COARRAY "Use Coarray Fortran for parallelization of test particles" OFF) -OPTION(USE_OPENMP "Use OpenMP for parallelization" ON) -OPTION(USE_SIMD "Use SIMD vectorization" ON) -OPTION(BUILD_SHARED_LIBS "Build using shared libraries" ON) - -INCLUDE(GNUInstallDirs) -IF (SKBUILD) - SET(INSTALL_BINDIR ${SKBUILD_PLATLIB_DIR}/${SKBUILD_PROJECT_NAME}) - SET(INSTALL_LIBDIR ${SKBUILD_PLATLIB_DIR}/${SKBUILD_PROJECT_NAME}) - SET(INSTALL_INCLUDEDIR ${INSTALL_LIBDIR}) - IF (APPLE) - SET(CMAKE_INSTALL_RPATH "@loader_path") - ELSEIF (LINUX) - SET(CMAKE_INSTALL_RPATH $ORIGIN) +# Check if DOC_BUILD environment variable is set and skip build if it is +IF (DEFINED ENV{DOC_BUILD}) + MESSAGE(STATUS "DOC_BUILD is set. Skipping build process.") + PROJECT(${SKBUILD_PROJECT_NAME} VERSION ${VERSION}) +ELSE() + SET(SKBUILD_SCRIPTS_DIR "${CMAKE_SOURCE_DIR}/bin" CACHE STRING "Install location of binary executable") + PROJECT(${SKBUILD_PROJECT_NAME} LANGUAGES C Fortran VERSION ${VERSION}) + # Use the old method to get Python packages, as that's what scikit-build uses + IF (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.27") + CMAKE_POLICY(SET CMP0148 OLD) ENDIF () -ELSE () - SET(INSTALL_BINDIR ${CMAKE_INSTALL_BINDIR}) - SET(INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR}) - SET(INSTALL_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR}) -ENDIF () - -# Have the .mod files placed in the include folder -SET(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod) - -# Add our local modules to the module ldpath -FILE(TO_CMAKE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules" LOCAL_MODULE_PATH) -LIST(APPEND CMAKE_MODULE_PATH ${LOCAL_MODULE_PATH}) - -IF (CMAKE_Fortran_COMPILER_ID MATCHES "^Intel") - SET(COMPILER_OPTIONS "Intel" CACHE STRING "Compiler identified as Intel") -ELSEIF (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") - SET(COMPILER_OPTIONS "GNU" CACHE STRING "Compiler identified as gfortran") -ELSE () - MESSAGE(FATAL_ERROR "Compiler ${CMAKE_Fortran_COMPILER_ID} not recognized!") -ENDIF () - -# The following section is modified from Numpy f2py documentation -IF(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR) - MESSAGE(FATAL_ERROR "In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there.\n") -ENDIF() -FIND_PACKAGE(NETCDF_Fortran REQUIRED) -IF (MSVC) - FIND_PACKAGE(HDF5 NAMES hdf5 COMPONENTS C HL REQUIRED CONFIG) - MESSAGE(STATUS "HDF5_FOUND: ${HDF5_FOUND}") - MESSAGE(STATUS "HDF5_VERSION: ${HDF5_VERSION}") - MESSAGE(STATUS "HDF5_LIBRARIES: ${HDF5_LIBRARIES}") - MESSAGE(STATUS "HDF5_INCLUDE_DIRS: ${HDF5_INCLUDE_DIRS}") -ELSE () - FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED) -ENDIF () - -# Ensure scikit-build modules -FIND_PACKAGE(Python COMPONENTS Interpreter Development.Module REQUIRED) - - -SET(SRC "${CMAKE_SOURCE_DIR}/src") -SET(PY "${CMAKE_SOURCE_DIR}/swiftest") - -##################################### -# Tell how to install this executable -##################################### -IF(CMAKE_SYSTEM_NAME STREQUAL "Windows") - SET(CMAKE_INSTALL_PREFIX "C:\\Program Files\\swiftest") - FILE(TO_CMAKE_PATH ${CMAKE_INSTALL_PREFIX} CMAKE_INSTALL_PREFIX) - SET(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "Path for install") -ELSE() - SET(CMAKE_INSTALL_PREFIX /usr/local CACHE PATH "Path for install") -ENDIF() + # Set some options the user may choose + OPTION(USE_COARRAY "Use Coarray Fortran for parallelization of test particles" OFF) + OPTION(USE_OPENMP "Use OpenMP for parallelization" ON) + OPTION(USE_SIMD "Use SIMD vectorization" ON) + OPTION(BUILD_SHARED_LIBS "Build using shared libraries" ON) + + INCLUDE(GNUInstallDirs) + IF (SKBUILD) + SET(INSTALL_BINDIR ${SKBUILD_PLATLIB_DIR}/${SKBUILD_PROJECT_NAME}) + SET(INSTALL_LIBDIR ${SKBUILD_PLATLIB_DIR}/${SKBUILD_PROJECT_NAME}) + SET(INSTALL_INCLUDEDIR ${INSTALL_LIBDIR}) + IF (APPLE) + SET(CMAKE_INSTALL_RPATH "@loader_path") + ELSEIF (LINUX) + SET(CMAKE_INSTALL_RPATH $ORIGIN) + ENDIF () + ELSE () + SET(INSTALL_BINDIR ${CMAKE_INSTALL_BINDIR}) + SET(INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR}) + SET(INSTALL_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR}) + ENDIF () + # Have the .mod files placed in the include folder + SET(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod) + + # Add our local modules to the module ldpath + FILE(TO_CMAKE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules" LOCAL_MODULE_PATH) + LIST(APPEND CMAKE_MODULE_PATH ${LOCAL_MODULE_PATH}) + + IF (CMAKE_Fortran_COMPILER_ID MATCHES "^Intel") + SET(COMPILER_OPTIONS "Intel" CACHE STRING "Compiler identified as Intel") + ELSEIF (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") + SET(COMPILER_OPTIONS "GNU" CACHE STRING "Compiler identified as gfortran") + ELSE () + MESSAGE(FATAL_ERROR "Compiler ${CMAKE_Fortran_COMPILER_ID} not recognized!") + ENDIF () + + # The following section is modified from Numpy f2py documentation + IF(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR) + MESSAGE(FATAL_ERROR "In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there.\n") + ENDIF() + + FIND_PACKAGE(NETCDF_Fortran REQUIRED) + IF (MSVC) + FIND_PACKAGE(HDF5 NAMES hdf5 COMPONENTS C HL REQUIRED CONFIG) + MESSAGE(STATUS "HDF5_FOUND: ${HDF5_FOUND}") + MESSAGE(STATUS "HDF5_VERSION: ${HDF5_VERSION}") + MESSAGE(STATUS "HDF5_LIBRARIES: ${HDF5_LIBRARIES}") + MESSAGE(STATUS "HDF5_INCLUDE_DIRS: ${HDF5_INCLUDE_DIRS}") + ELSE () + FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED) + ENDIF () -# Make sure paths are correct for Unix or Windows style -FILE(TO_CMAKE_PATH ${SRC} SRC) -FILE(TO_CMAKE_PATH ${PY} PY) + # Ensure scikit-build modules + FIND_PACKAGE(Python COMPONENTS Interpreter Development.Module REQUIRED) -# Set the name of the swiftest library -SET(SWIFTEST_LIBRARY ${SKBUILD_PROJECT_NAME}) -# Determine compiler options -IF(NOT CMAKE_Fortran_COMPILER_SUPPORTS_F90) - MESSAGE(FATAL_ERROR "Fortran compiler does not support F90") -ENDIF(NOT CMAKE_Fortran_COMPILER_SUPPORTS_F90) -INCLUDE(SetParallelizationLibrary) + SET(SRC "${CMAKE_SOURCE_DIR}/src") + SET(PY "${CMAKE_SOURCE_DIR}/swiftest") -IF (COMPILER_OPTIONS STREQUAL "Intel" AND NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") - INCLUDE(SetMKL) -ENDIF () -INCLUDE(SetSwiftestFlags) + ##################################### + # Tell how to install this executable + ##################################### + IF(CMAKE_SYSTEM_NAME STREQUAL "Windows") + SET(CMAKE_INSTALL_PREFIX "C:\\Program Files\\swiftest") + FILE(TO_CMAKE_PATH ${CMAKE_INSTALL_PREFIX} CMAKE_INSTALL_PREFIX) + SET(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "Path for install") + ELSE() + SET(CMAKE_INSTALL_PREFIX /usr/local CACHE PATH "Path for install") + ENDIF() -# The source for the SWIFTEST binary and have it placed in the bin folder -ADD_SUBDIRECTORY(${SRC} ${CMAKE_INSTALL_BINDIR}) -ADD_SUBDIRECTORY(${PY}) + # Make sure paths are correct for Unix or Windows style + FILE(TO_CMAKE_PATH ${SRC} SRC) + FILE(TO_CMAKE_PATH ${PY} PY) + + # Set the name of the swiftest library + SET(SWIFTEST_LIBRARY ${SKBUILD_PROJECT_NAME}) + + # Determine compiler options + IF(NOT CMAKE_Fortran_COMPILER_SUPPORTS_F90) + MESSAGE(FATAL_ERROR "Fortran compiler does not support F90") + ENDIF(NOT CMAKE_Fortran_COMPILER_SUPPORTS_F90) + INCLUDE(SetParallelizationLibrary) + + IF (COMPILER_OPTIONS STREQUAL "Intel" AND NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") + INCLUDE(SetMKL) + ENDIF () + INCLUDE(SetSwiftestFlags) + + + + # The source for the SWIFTEST binary and have it placed in the bin folder + ADD_SUBDIRECTORY(${SRC} ${CMAKE_INSTALL_BINDIR}) + ADD_SUBDIRECTORY(${PY}) + +ENDIF() # Add a distclean target to the Makefile ADD_CUSTOM_TARGET(distclean COMMAND ${CMAKE_COMMAND} -P "${CMAKE_SOURCE_DIR}/distclean.cmake" diff --git a/distclean.cmake b/distclean.cmake index d46cbfae5..683a5db35 100644 --- a/distclean.cmake +++ b/distclean.cmake @@ -21,6 +21,7 @@ ELSE() ENDIF() SET(CIBW_DIR "_skbuild" "swiftest.egg-info" "_cmake_test_compile") +SET(DOC_DIR "docs/_build" "docs/_static/fortran_docs") MACRO(GET_PARENT_DIRECTORIES search_string return_list grandparents) FILE(GLOB_RECURSE new_list ${search_string}) @@ -66,6 +67,7 @@ SET(DEL ${TOPDIRECTORIES} ${CMAKETESTING} ${CMAKETESTFILES} ${CIBW_DIR} + ${DOC_DIR} ) # If we are not in the build dir, delete that as well diff --git a/docs/Makefile b/docs/Makefile index d4bb2cbb9..803b51e0e 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,20 +1,254 @@ -# Minimal makefile for Sphinx documentation +# Makefile for Sphinx documentation # -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -SOURCEDIR = . -BUILDDIR = _build +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +SPHINXATUOBUILD = sphinx-autobuild +PAPER = +BUILDDIR = _build +FORTRANDIR = _static/fortran_docs -# Put it first so that "make" without argument is like "make help". +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " rtdhtml Build html using same settings used on ReadtheDocs" + @echo " fortran-doc to make Fortran documentation with FORD" + @echo " livehtml Make standalone HTML files and rebuild the documentation when a change is detected. Also includes a livereload enabled web server" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " applehelp to make an Apple Help Book" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " epub3 to make an epub3" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + @echo " coverage to run coverage check of the documentation (if enabled)" + @echo " dummy to check syntax errors of document sources" + +.PHONY: clean +clean: + rm -rf $(BUILDDIR) + rm -rf $(FORTRANDIR) + rm -rf generated/* + rm -rf auto_gallery/ + +.PHONY: fortran-doc +fortran-doc: + cd .. && ford fortran_docs.md + +.PHONY: html +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +.PHONY: rtdhtml +rtdhtml: + $(SPHINXBUILD) -T -j auto -E -W --keep-going -b html -d $(BUILDDIR)/doctrees -D language=en . $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +.PHONY: livehtml +livehtml: + # @echo "$(SPHINXATUOBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html" + $(SPHINXATUOBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + +.PHONY: dirhtml +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +.PHONY: singlehtml +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +.PHONY: html-noplot +html-noplot: + $(SPHINXBUILD) -D plot_gallery=0 -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +.PHONY: pickle +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +.PHONY: json +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +.PHONY: htmlhelp +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +.PHONY: qthelp +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/xarray.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/xarray.qhc" + +.PHONY: applehelp +applehelp: + $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp + @echo + @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." + @echo "N.B. You won't be able to view it unless you put it in" \ + "~/Library/Documentation/Help or install it in your application" \ + "bundle." + +.PHONY: devhelp +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/xarray" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/xarray" + @echo "# devhelp" + +.PHONY: epub +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +.PHONY: epub3 +epub3: + $(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3 + @echo + @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3." + +.PHONY: latex +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +.PHONY: latexpdf +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +.PHONY: latexpdfja +latexpdfja: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +.PHONY: text +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +.PHONY: man +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +.PHONY: texinfo +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +.PHONY: info +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +.PHONY: gettext +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +.PHONY: changes +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +.PHONY: linkcheck +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +.PHONY: doctest +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." + +.PHONY: coverage +coverage: + $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage + @echo "Testing of coverage in the sources finished, look at the " \ + "results in $(BUILDDIR)/coverage/python.txt." + +.PHONY: xml +xml: + $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml + @echo + @echo "Build finished. The XML files are in $(BUILDDIR)/xml." -.PHONY: help Makefile +.PHONY: pseudoxml +pseudoxml: + $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml + @echo + @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) +.PHONY: dummy +dummy: + $(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy + @echo + @echo "Build finished. Dummy builder generates no files." diff --git a/docs/api.rst b/docs/api.rst index 33b241cbe..0e757b398 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -22,10 +22,190 @@ Creating a Simulation Simulation Running a Simulation -------- +-------------------- .. autosummary:: :toctree: generated/ Simulation.run +Setting Simulation Parameters +-------------------------------------------- + +.. autosummary:: + :toctree: generated/ + + Simulation.set_parameter + Simulation.set_simulation_time + Simulation.set_integrator + Simulation.set_feature + Simulation.set_init_cond_files + Simulation.set_output_files + Simulation.set_unit_system + Simulation.set_distance_range + Simulation.set_ephemeris_date + +Retrieving Simulation Parameters +-------------------------------------------- + +.. autosummary:: + :toctree: generated/ + + Simulation.get_parameter + Simulation.get_simulation_time + Simulation.get_integrator + Simulation.get_feature + Simulation.get_init_cond_files + Simulation.get_output_files + Simulation.get_unit_system + Simulation.get_distance_range + Simulation.get_ephemeris_date + +Adding Bodies to a Simulation +----------------------------- + +.. autosummary:: + :toctree: generated/ + + Simulation.add_body + Simulation.add_solar_system_body + + +File Input and Output +--------------------- + +.. autosummary:: + :toctree: generated/ + + Simulation.read_param + Simulation.write_param + Simulation.read_encounter_file + Simulation.read_collision_file + Simulation.follow + Simulation.save + Simulation.initial_conditions_from_bin + Simulation.convert + Simulation.clean + + +Initial Conditions Generation Functions +======================================= + +.. autosummary:: + :toctree: generated/ + + swiftest.init_cond.solar_system_horizons + swiftest.init_cond.horizons_query + swiftest.init_cond.horizons_get_physical_properties + swiftest.init_cond.vec2xr + + +Input/Output Processing Functions +================================== + +A collection of functions for processing simulation files. + +Reading and writing simulation parameter and initial conditions files +--------------------------------------------------------------------- + +.. autosummary:: + :toctree: generated/ + + swiftest.io.process_netcdf_input + swiftest.io.read_swiftest_param + swiftest.io.read_swifter_param + swiftest.io.read_swift_param + swiftest.io.write_swift_param + swiftest.io.write_labeled_param + swiftest.io.select_active_from_frame + swiftest.io.swiftest_xr2infile + +Tools for fixing differences between NetCDF-Fortran and xarray data structures +------------------------------------------------------------------------------ + +.. autosummary:: + :toctree: generated/ + + swiftest.io.swiftest2xr + swiftest.io.reorder_dims + swiftest.io.fix_types + + +Conversions between legacy integrator formats and Swiftest +---------------------------------------------------------- + +.. autosummary:: + :toctree: generated/ + + swiftest.io.swifter2swiftest + swiftest.io.swifter2xr + swiftest.io.swifter_xr2infile + swiftest.io.swiftest2swifter_param + swiftest.io.swift2swifter + swiftest.io.swift2swiftest + +Tools +===== + +Miscellaneous helper functions + +.. autosummary:: + :toctree: generated/ + + swiftest.tool.magnitude + swiftest.tool.wrap_angle + swiftest.tool.follow_swift + swiftest.tool.danby + swiftest.tool.el2xv_one + swiftest.tool.el2xv_vec + swiftest.tool.xv2el_one + swiftest.tool.xv2el_vec + +Constants +========= + +The `constants` module defines several astronomical and physical constants. Below is a description of each constant: + +.. list-table:: + :widths: 25 75 + :header-rows: 1 + + * - Constant + - Description + * - ``GC`` + - The gravitational constant (G) from Astropy constants, in SI units (m^3 kg^-1 s^-2). + * - ``AU2M`` + - Astronomical Unit in meters, representing the average distance from the Earth to the Sun. + * - ``GMSun`` + - Standard gravitational parameter for the Sun in m^3 s^-2. + * - ``MSun`` + - Mass of the Sun in kilograms. + * - ``RSun`` + - Radius of the Sun in meters. + * - ``MEarth`` + - Mass of the Earth in kilograms. + * - ``REarth`` + - Radius of the Earth in meters. + * - ``GMEarth`` + - Standard gravitational parameter for the Earth in m^3 s^-2. + * - ``JD2S`` + - Number of seconds in a Julian day. + * - ``YR2S`` + - Number of seconds in a Julian year (365.25 days). + * - ``einsteinC`` + - Speed of light in vacuum in meters per second. + * - ``J2Sun`` + - Solar quadrupole moment coefficient (J2), indicating the extent of the Sun's equatorial bulge. + * - ``J4Sun`` + - Higher order coefficient (J4) for the Sun's shape, indicating asymmetry in its mass distribution. + * - ``rotpoleSun`` + - SkyCoord object representing the rotation pole of the Sun in right ascension (ra) and declination (dec), converted to Cartesian coordinates. + * - ``rotSun`` + - Angular velocity of the Sun's rotation in radians per second, considering an average rotational period of 25.05 days. + + +Fortran API Documentation +========================= + +For detailed documentation of the Fortran API, see the `Fortran API <_static/fortran_docs/index.html>`_. + diff --git a/docs/conf.py b/docs/conf.py index 466628445..2aae7ae5b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -7,10 +7,10 @@ import sphinx_autosummary_accessors from sphinx.application import Sphinx from sphinx.util import logging -import os +# Disable import of swiftest._bindings so that we don't have to build the Fortran code when building the docs +autodoc_mock_imports = ['swiftest._bindings'] import swiftest - # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information project = 'Swiftest' @@ -39,8 +39,6 @@ "sphinx_copybutton", "sphinx_design", "sphinx_inline_tabs", - "sphinxfortran.fortran_domain", - "sphinxfortran.fortran_autodoc" ] @@ -175,8 +173,4 @@ def linkcode_resolve(domain, info): def html_page_context(app, pagename, templatename, context, doctree): # Disable edit button for docstring generated pages if "generated" in pagename: - context["theme_use_edit_page_button"] = False - -fortran_src = [os.path.join(os.pardir, "fortran","*/*.f90")] -fortran_ext = ["f90"] -fortran_encoding = "utf-8" \ No newline at end of file + context["theme_use_edit_page_button"] = False \ No newline at end of file diff --git a/docs/requirements.txt b/docs/requirements.txt index ef0ad58ab..17daa313e 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -6,7 +6,6 @@ sphinx-design sphinx-inline-tabs sphinxext-rediraffe sphinxext-opengraph -sphinx-fortran nbsphinx ipython -swiftest \ No newline at end of file +ford \ No newline at end of file diff --git a/fortran_docs.md b/fortran_docs.md new file mode 100644 index 000000000..99288f01f --- /dev/null +++ b/fortran_docs.md @@ -0,0 +1,24 @@ +--- +project: Swiftest +author: David A. Minton +summary: High performance Fortran functions used by the swiftest project via ISO_C_BINDING interfaces and Cython. +project_github: https://github.com/profminton/swiftest +project_download: https://github.com/profminton/swiftest/releases +project_website: https://swiftest.readthedocs.io +github: https://github.com/profminton/ +src_dir: src +output_dir: ./docs/_static/fortran_docs +source: true +graph: true +sort: alpha +print_creation_date: true +extra_mods: iso_c_binding:https://gcc.gnu.org/onlinedocs/gfortran/ISO_005fC_005fBINDING.html + ieee_arithmetic:https://gcc.gnu.org/onlinedocs/gfortran/IEEE-modules.html + ieee_exceptions:https://gcc.gnu.org/onlinedocs/gfortran/IEEE-modules.html + iso_fortran_env:https://gcc.gnu.org/onlinedocs/gfortran/ISO_005fFORTRAN_005fENV.html +creation_date: %Y-%m-%d %H:%M %z +md_extensions: markdown.extensions.toc + markdown.extensions.smarty +--- + +This is the documentation for the Fortran components of Swiftest diff --git a/pyproject.toml b/pyproject.toml index 4460d80d3..ffbdad11f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "swiftest" -version = "2023.12.0" +version = "2023.12.1" authors=[ {name = 'David A. Minton', email='daminton@purdue.edu'}, {name = 'Carlisle Wishard'}, @@ -36,7 +36,7 @@ dependencies = [ 'matplotlib>=3.7', 'astropy>=5.2', 'astroquery>=0.4.6', - 'tqdm>=4.66', + 'tqdm>=4.64.1', 'cython>=3.0.0' ] @@ -50,6 +50,7 @@ requires = [ "cmake", "pyproject_metadata", "pytest", + "pathspec", "sphinx", "sphinx-autosummary-accessors", "sphinx-book-theme >= 0.3.0", @@ -58,7 +59,8 @@ requires = [ "sphinx-inline-tabs", "sphinxext-rediraffe", "sphinxext-opengraph", - "nbsphinx" + "nbsphinx", + "ford" ] build-backend = "scikit_build_core.build" @@ -113,12 +115,7 @@ before-all = [ "LIBS=\"\" buildscripts/build_dependencies.sh -p ${PREFIX} -d ${HOME}/Downloads -m ${MACOSX_DEPLOYMENT_TARGET}" ] -[tool.cibuildwheel.linux] -skip = "cp312-* pp* -manylinux_i686* *-musllinux*" -before-all = [ - "yum install doxygen libxml2-devel libcurl-devel -y", - "buildscripts/build_dependencies.sh -p /usr/local" -] + [tool.cibuildwheel.linux.environment] PREFIX="/usr/local" NCDIR="${PREFIX}" @@ -136,7 +133,14 @@ HDF5_DIR="${HDF5_ROOT}/cmake" PATH="${HDF5_ROOT}/bin:${PATH}" CMAKE_INSTALL_LIBDIR="lib" +[tool.cibuildwheel.linux] +skip = "cp312-* pp* -manylinux_i686* *-musllinux*" +before-all = [ + "yum install doxygen libxml2-devel libcurl-devel -y", + "buildscripts/build_dependencies.sh -p /usr/local" +] + [[tool.scikit-build.generate]] path = "version.txt" location = "source" -template = '''${version}''' \ No newline at end of file +template = '''${version}''' diff --git a/src/base/base_module.f90 b/src/base/base_module.f90 index a056a94b2..f0b2c9839 100644 --- a/src/base/base_module.f90 +++ b/src/base/base_module.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. module base !! author: The Purdue Swiftest Team - David A. Minton, Carlisle A. Wishard, Jennifer L.L. Pouplin, and Jacob R. Elliott diff --git a/src/coarray/coarray_clone.f90 b/src/coarray/coarray_clone.f90 index ea33f8544..3af3b2927 100644 --- a/src/coarray/coarray_clone.f90 +++ b/src/coarray/coarray_clone.f90 @@ -1,11 +1,11 @@ -!! Copyright 2023 - David Minton -!! 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. +! Copyight 2023 - David Minton +! 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. submodule (coarray) s_coarray_clone use swiftest diff --git a/src/coarray/coarray_collect.f90 b/src/coarray/coarray_collect.f90 index 0c27e110d..fbd018c14 100644 --- a/src/coarray/coarray_collect.f90 +++ b/src/coarray/coarray_collect.f90 @@ -1,11 +1,11 @@ -!! Copyright 2023 - David Minton -!! 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. +! Copyight 2023 - David Minton +! 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. submodule (coarray) s_coarray_collect use swiftest diff --git a/src/coarray/coarray_module.f90 b/src/coarray/coarray_module.f90 index 22ce10c55..6d4a89f02 100644 --- a/src/coarray/coarray_module.f90 +++ b/src/coarray/coarray_module.f90 @@ -1,11 +1,11 @@ -!! Copyright 2023 - David Minton -!! 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. +! Copyight 2023 - David Minton +! 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. module coarray !! author: David A. Minton diff --git a/src/collision/collision_check.f90 b/src/collision/collision_check.f90 index ebb4a3671..be11ee9a8 100644 --- a/src/collision/collision_check.f90 +++ b/src/collision/collision_check.f90 @@ -1,12 +1,12 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule (collision) s_collision_check use swiftest diff --git a/src/collision/collision_generate.f90 b/src/collision/collision_generate.f90 index fc3b7ed99..5fc489f86 100644 --- a/src/collision/collision_generate.f90 +++ b/src/collision/collision_generate.f90 @@ -1,12 +1,12 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(collision) s_collision_generate use swiftest diff --git a/src/collision/collision_io.f90 b/src/collision/collision_io.f90 index c1b5015de..ea8675089 100644 --- a/src/collision/collision_io.f90 +++ b/src/collision/collision_io.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(collision) s_collision_io use swiftest diff --git a/src/collision/collision_module.f90 b/src/collision/collision_module.f90 index a06d6d2c1..6b31e770c 100644 --- a/src/collision/collision_module.f90 +++ b/src/collision/collision_module.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. module collision diff --git a/src/collision/collision_regime.f90 b/src/collision/collision_regime.f90 index 0c81eca14..ab88d8973 100644 --- a/src/collision/collision_regime.f90 +++ b/src/collision/collision_regime.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(collision) s_collision_regime use swiftest diff --git a/src/collision/collision_resolve.f90 b/src/collision/collision_resolve.f90 index 72e6ad445..a3daf7122 100644 --- a/src/collision/collision_resolve.f90 +++ b/src/collision/collision_resolve.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule (collision) s_collision_resolve use swiftest diff --git a/src/collision/collision_util.f90 b/src/collision/collision_util.f90 index 75c836b4c..9ce2be434 100644 --- a/src/collision/collision_util.f90 +++ b/src/collision/collision_util.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule (collision) s_collision_util use swiftest diff --git a/src/encounter/encounter_check.f90 b/src/encounter/encounter_check.f90 index deef9bdda..868e20896 100644 --- a/src/encounter/encounter_check.f90 +++ b/src/encounter/encounter_check.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule (encounter) s_encounter_check use swiftest diff --git a/src/encounter/encounter_io.f90 b/src/encounter/encounter_io.f90 index 171191b39..4e13c4b75 100644 --- a/src/encounter/encounter_io.f90 +++ b/src/encounter/encounter_io.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule (encounter) s_encounter_io use swiftest diff --git a/src/encounter/encounter_module.f90 b/src/encounter/encounter_module.f90 index bcae2bd15..0809812b9 100644 --- a/src/encounter/encounter_module.f90 +++ b/src/encounter/encounter_module.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. module encounter !! author: The Purdue Swiftest Team - David A. Minton, Carlisle A. Wishard, Jennifer L.L. Pouplin, and Jacob R. Elliott diff --git a/src/encounter/encounter_util.f90 b/src/encounter/encounter_util.f90 index 7307eb9cb..b61286050 100644 --- a/src/encounter/encounter_util.f90 +++ b/src/encounter/encounter_util.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule (encounter) s_encounter_util use swiftest diff --git a/src/fraggle/fraggle_generate.f90 b/src/fraggle/fraggle_generate.f90 index 746e768d2..a00313abb 100644 --- a/src/fraggle/fraggle_generate.f90 +++ b/src/fraggle/fraggle_generate.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(fraggle) s_fraggle_generate use swiftest diff --git a/src/fraggle/fraggle_module.f90 b/src/fraggle/fraggle_module.f90 index 8d118fbaf..f386ffe56 100644 --- a/src/fraggle/fraggle_module.f90 +++ b/src/fraggle/fraggle_module.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. module fraggle !! author: The Purdue Swiftest Team - David A. Minton, Carlisle A. Wishard, Jennifer L.L. Pouplin, and Jacob R. Elliott diff --git a/src/fraggle/fraggle_util.f90 b/src/fraggle/fraggle_util.f90 index 19752442c..725039a74 100644 --- a/src/fraggle/fraggle_util.f90 +++ b/src/fraggle/fraggle_util.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(fraggle) s_fraggle_util use swiftest diff --git a/src/globals/globals_module.f90 b/src/globals/globals_module.f90 index 8bf98c6cd..03c1ab86a 100644 --- a/src/globals/globals_module.f90 +++ b/src/globals/globals_module.f90 @@ -48,7 +48,7 @@ module globals integer(I4B), parameter :: UPPERCASE_OFFSET = iachar('A') - iachar('a') !! ASCII character set parameter for lower to upper !! conversion - offset between upper and lower - character(*), parameter :: VERSION = "2023.12.0" !! Swiftest version + character(*), parameter :: VERSION = "2023.12.1" !! Swiftest version !> Symbolic name for integrator types character(*), parameter :: UNKNOWN_INTEGRATOR = "UKNOWN INTEGRATOR" diff --git a/src/helio/helio_drift.f90 b/src/helio/helio_drift.f90 index 134421d2b..3978b13b7 100644 --- a/src/helio/helio_drift.f90 +++ b/src/helio/helio_drift.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule (helio) s_helio_drift use swiftest diff --git a/src/helio/helio_gr.f90 b/src/helio/helio_gr.f90 index 6b43714b7..b3b824bbf 100644 --- a/src/helio/helio_gr.f90 +++ b/src/helio/helio_gr.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(helio) s_helio_gr use swiftest diff --git a/src/helio/helio_kick.f90 b/src/helio/helio_kick.f90 index 755a385d9..0552d9168 100644 --- a/src/helio/helio_kick.f90 +++ b/src/helio/helio_kick.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(helio) s_helio_kick use swiftest diff --git a/src/helio/helio_module.f90 b/src/helio/helio_module.f90 index 182512e53..fbbf7324f 100644 --- a/src/helio/helio_module.f90 +++ b/src/helio/helio_module.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. module helio !! author: The Purdue Swiftest Team - David A. Minton, Carlisle A. Wishard, Jennifer L.L. Pouplin, and Jacob R. Elliott diff --git a/src/helio/helio_step.f90 b/src/helio/helio_step.f90 index dd2463246..b575a97a4 100644 --- a/src/helio/helio_step.f90 +++ b/src/helio/helio_step.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(helio) s_helio_step use swiftest diff --git a/src/helio/helio_util.f90 b/src/helio/helio_util.f90 index bb032defb..52b588148 100644 --- a/src/helio/helio_util.f90 +++ b/src/helio/helio_util.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(helio) s_helio_util use swiftest diff --git a/src/main/main.f90 b/src/main/main.f90 index 9f27c7d27..6ece730b6 100644 --- a/src/main/main.f90 +++ b/src/main/main.f90 @@ -1,11 +1,11 @@ -!! Copyright 2023 - David Minton -!! 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. +! Copyight 2023 - David Minton +! 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. program main !! author: David A. Minton diff --git a/src/misc/lambda_function_module.f90 b/src/misc/lambda_function_module.f90 index cea7dea29..da1ded79f 100644 --- a/src/misc/lambda_function_module.f90 +++ b/src/misc/lambda_function_module.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. module lambda_function !! author: David A. Minton diff --git a/src/misc/solver_module.f90 b/src/misc/solver_module.f90 index 81f2cab40..f5f5c7ab5 100644 --- a/src/misc/solver_module.f90 +++ b/src/misc/solver_module.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. module solver !! author: David A. Minton diff --git a/src/netcdf_io/netcdf_io_implementations.f90 b/src/netcdf_io/netcdf_io_implementations.f90 index b4e7f0b12..b49bc00fd 100644 --- a/src/netcdf_io/netcdf_io_implementations.f90 +++ b/src/netcdf_io/netcdf_io_implementations.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule (netcdf_io) s_netcdf_io_implementations use netcdf diff --git a/src/netcdf_io/netcdf_io_module.f90 b/src/netcdf_io/netcdf_io_module.f90 index bb2ddb55b..0fa517986 100644 --- a/src/netcdf_io/netcdf_io_module.f90 +++ b/src/netcdf_io/netcdf_io_module.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. module netcdf_io !! author: The Purdue Swiftest Team - David A. Minton, Carlisle A. Wishard, Jennifer L.L. Pouplin, and Jacob R. Elliott diff --git a/src/operator/operator_cross.f90 b/src/operator/operator_cross.f90 index 3ca3e28cf..c57632f2e 100644 --- a/src/operator/operator_cross.f90 +++ b/src/operator/operator_cross.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(operators) s_operator_cross use, intrinsic :: ieee_exceptions diff --git a/src/operator/operator_mag.f90 b/src/operator/operator_mag.f90 index 5c3d6538e..318eeb2f6 100644 --- a/src/operator/operator_mag.f90 +++ b/src/operator/operator_mag.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(operators) s_operator_mag use, intrinsic :: ieee_exceptions diff --git a/src/operator/operator_module.f90 b/src/operator/operator_module.f90 index 93879117a..af8b7ed8f 100644 --- a/src/operator/operator_module.f90 +++ b/src/operator/operator_module.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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 NDIM 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. +! Copyight 2022 - 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. module operators !! author: David A. Minton diff --git a/src/operator/operator_unit.f90 b/src/operator/operator_unit.f90 index 067df74eb..1e26dd29d 100644 --- a/src/operator/operator_unit.f90 +++ b/src/operator/operator_unit.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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 NDIM 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. +! Copyight 2022 - 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. submodule(operators) s_operator_unit use, intrinsic :: ieee_exceptions diff --git a/src/rmvs/rmvs_coarray.f90 b/src/rmvs/rmvs_coarray.f90 index 3a7508159..fb7094342 100644 --- a/src/rmvs/rmvs_coarray.f90 +++ b/src/rmvs/rmvs_coarray.f90 @@ -1,11 +1,11 @@ -!! Copyright 2023 - David Minton -!! 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. +! Copyight 2023 - David Minton +! 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. submodule (rmvs) s_rmvs_coarray use coarray diff --git a/src/rmvs/rmvs_discard.f90 b/src/rmvs/rmvs_discard.f90 index bb6c3063e..0b8b7d9ba 100644 --- a/src/rmvs/rmvs_discard.f90 +++ b/src/rmvs/rmvs_discard.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(rmvs) s_rmvs_discard use swiftest diff --git a/src/rmvs/rmvs_encounter_check.f90 b/src/rmvs/rmvs_encounter_check.f90 index 0880cb136..8ebbb8644 100644 --- a/src/rmvs/rmvs_encounter_check.f90 +++ b/src/rmvs/rmvs_encounter_check.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule (rmvs) s_rmvs_encounter_check use swiftest diff --git a/src/rmvs/rmvs_kick.f90 b/src/rmvs/rmvs_kick.f90 index 82d19463e..3dfc5e4e8 100644 --- a/src/rmvs/rmvs_kick.f90 +++ b/src/rmvs/rmvs_kick.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(rmvs) s_rmvs_kick use swiftest diff --git a/src/rmvs/rmvs_module.f90 b/src/rmvs/rmvs_module.f90 index b219fd01b..12d171755 100644 --- a/src/rmvs/rmvs_module.f90 +++ b/src/rmvs/rmvs_module.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. module rmvs !! author: David A. Minton diff --git a/src/rmvs/rmvs_step.f90 b/src/rmvs/rmvs_step.f90 index bf8f9cb88..8d89b76d4 100644 --- a/src/rmvs/rmvs_step.f90 +++ b/src/rmvs/rmvs_step.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(rmvs) s_rmvs_step use swiftest diff --git a/src/rmvs/rmvs_util.f90 b/src/rmvs/rmvs_util.f90 index 6b26bf12f..a961ba85e 100644 --- a/src/rmvs/rmvs_util.f90 +++ b/src/rmvs/rmvs_util.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(rmvs) s_rmvs_util use swiftest diff --git a/src/swiftest/swiftest_coarray.f90 b/src/swiftest/swiftest_coarray.f90 index 79b2de50e..c8e4da943 100644 --- a/src/swiftest/swiftest_coarray.f90 +++ b/src/swiftest/swiftest_coarray.f90 @@ -1,11 +1,11 @@ -!! Copyright 2023 - David Minton -!! 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. +! Copyight 2023 - David Minton +! 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. submodule (swiftest) s_swiftest_coarray use coarray diff --git a/src/swiftest/swiftest_discard.f90 b/src/swiftest/swiftest_discard.f90 index dd2f07eab..2d7d2c7a2 100644 --- a/src/swiftest/swiftest_discard.f90 +++ b/src/swiftest/swiftest_discard.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule (swiftest) s_swiftest_discard contains diff --git a/src/swiftest/swiftest_drift.f90 b/src/swiftest/swiftest_drift.f90 index 82239e452..71fe737a6 100644 --- a/src/swiftest/swiftest_drift.f90 +++ b/src/swiftest/swiftest_drift.f90 @@ -1,12 +1,11 @@ -!! Coryright 2022 - 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 cory of the GNU General Public License along with Swiftest. -!! If not, see: https://www.gnu.org/licenses. - +! Copyright 2022 - 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. submodule (swiftest) s_swiftest_drift !> Integration control parameters: real(DP), parameter :: E2MAX = 0.36_DP diff --git a/src/swiftest/swiftest_driver.f90 b/src/swiftest/swiftest_driver.f90 index 870bea9d2..0ed7536e4 100644 --- a/src/swiftest/swiftest_driver.f90 +++ b/src/swiftest/swiftest_driver.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(swiftest) s_swiftest_driver contains diff --git a/src/swiftest/swiftest_gr.f90 b/src/swiftest/swiftest_gr.f90 index 083e5de1b..a24ff2507 100644 --- a/src/swiftest/swiftest_gr.f90 +++ b/src/swiftest/swiftest_gr.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(swiftest) s_swiftest_gr contains diff --git a/src/swiftest/swiftest_io.f90 b/src/swiftest/swiftest_io.f90 index 40a9d286b..132b9fb2f 100644 --- a/src/swiftest/swiftest_io.f90 +++ b/src/swiftest/swiftest_io.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule (swiftest) s_swiftest_io use symba diff --git a/src/swiftest/swiftest_kick.f90 b/src/swiftest/swiftest_kick.f90 index cfd9ef54c..2a503232f 100644 --- a/src/swiftest/swiftest_kick.f90 +++ b/src/swiftest/swiftest_kick.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(swiftest) s_swiftest_kick contains diff --git a/src/swiftest/swiftest_module.f90 b/src/swiftest/swiftest_module.f90 index acddf4d04..52ab45e7a 100644 --- a/src/swiftest/swiftest_module.f90 +++ b/src/swiftest/swiftest_module.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. module swiftest !! author: David A. Minton diff --git a/src/swiftest/swiftest_obl.f90 b/src/swiftest/swiftest_obl.f90 index 21f4363ae..ab7569187 100644 --- a/src/swiftest/swiftest_obl.f90 +++ b/src/swiftest/swiftest_obl.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule (swiftest) s_swiftest_obl contains diff --git a/src/swiftest/swiftest_orbel.f90 b/src/swiftest/swiftest_orbel.f90 index 431d182ab..68d4c061d 100644 --- a/src/swiftest/swiftest_orbel.f90 +++ b/src/swiftest/swiftest_orbel.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule (swiftest) s_swiftest_orbel real(DP), parameter :: TINYVALUE = 4.0e-15_DP !! Tiny value used to prevent floating point errors. Value set based on the Swifter TINY parameter. diff --git a/src/swiftest/swiftest_user.f90 b/src/swiftest/swiftest_user.f90 index 805a500ef..e6c75de8e 100644 --- a/src/swiftest/swiftest_user.f90 +++ b/src/swiftest/swiftest_user.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(swiftest) s_swiftest_user use swiftest diff --git a/src/swiftest/swiftest_util.f90 b/src/swiftest/swiftest_util.f90 index 1881c996d..5f137b8d6 100644 --- a/src/swiftest/swiftest_util.f90 +++ b/src/swiftest/swiftest_util.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule (swiftest) s_swiftest_util use whm diff --git a/src/symba/symba_discard.f90 b/src/symba/symba_discard.f90 index e6b08601e..1d86fb637 100644 --- a/src/symba/symba_discard.f90 +++ b/src/symba/symba_discard.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule (symba) s_symba_discard use swiftest diff --git a/src/symba/symba_drift.f90 b/src/symba/symba_drift.f90 index e6cc0e761..a228538f9 100644 --- a/src/symba/symba_drift.f90 +++ b/src/symba/symba_drift.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule (symba) s_symba_drift use swiftest diff --git a/src/symba/symba_encounter_check.f90 b/src/symba/symba_encounter_check.f90 index e66791409..9dec2072c 100644 --- a/src/symba/symba_encounter_check.f90 +++ b/src/symba/symba_encounter_check.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule (symba) s_symba_encounter_check use swiftest diff --git a/src/symba/symba_gr.f90 b/src/symba/symba_gr.f90 index 65a55c559..94796fb70 100644 --- a/src/symba/symba_gr.f90 +++ b/src/symba/symba_gr.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(symba) s_symba_gr use swiftest diff --git a/src/symba/symba_kick.f90 b/src/symba/symba_kick.f90 index 2db14456c..aa109ac4f 100644 --- a/src/symba/symba_kick.f90 +++ b/src/symba/symba_kick.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(symba) s_symba_kick use swiftest diff --git a/src/symba/symba_module.f90 b/src/symba/symba_module.f90 index 85e5ca3bc..c944477e5 100644 --- a/src/symba/symba_module.f90 +++ b/src/symba/symba_module.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. module symba !! author: The Purdue Swiftest Team - David A. Minton, Carlisle A. Wishard, Jennifer L.L. Pouplin, and Jacob R. Elliott diff --git a/src/symba/symba_step.f90 b/src/symba/symba_step.f90 index 9da52440a..e647e4d37 100644 --- a/src/symba/symba_step.f90 +++ b/src/symba/symba_step.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule (symba) s_symba_step use swiftest diff --git a/src/symba/symba_util.f90 b/src/symba/symba_util.f90 index c7abd79f3..8ed213ba8 100644 --- a/src/symba/symba_util.f90 +++ b/src/symba/symba_util.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(symba) s_symba_util use swiftest diff --git a/src/tides/tides_module.f90 b/src/tides/tides_module.f90 index 828575f76..65ffaf3cd 100644 --- a/src/tides/tides_module.f90 +++ b/src/tides/tides_module.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. module tides !! author: The Purdue Swiftest Team - David A. Minton, Carlisle A. Wishard, Jennifer L.L. Pouplin, and Jacob R. Elliott diff --git a/src/walltime/walltime_implementations.f90 b/src/walltime/walltime_implementations.f90 index 0a9824d78..df182e2b5 100644 --- a/src/walltime/walltime_implementations.f90 +++ b/src/walltime/walltime_implementations.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(walltime) s_walltime use swiftest diff --git a/src/walltime/walltime_module.f90 b/src/walltime/walltime_module.f90 index fa41bae87..61b6b3689 100644 --- a/src/walltime/walltime_module.f90 +++ b/src/walltime/walltime_module.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. module walltime !! author: David A. Minton diff --git a/src/whm/whm_coarray.f90 b/src/whm/whm_coarray.f90 index 5a8de4c32..97d02ca6b 100644 --- a/src/whm/whm_coarray.f90 +++ b/src/whm/whm_coarray.f90 @@ -1,11 +1,11 @@ -!! Copyright 2023 - David Minton -!! 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. +! Copyight 2023 - David Minton +! 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. submodule (whm) s_whm_coarray use coarray diff --git a/src/whm/whm_coord.f90 b/src/whm/whm_coord.f90 index 5ecfeedcc..36479263a 100644 --- a/src/whm/whm_coord.f90 +++ b/src/whm/whm_coord.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule (whm) s_whm_coord use swiftest diff --git a/src/whm/whm_drift.f90 b/src/whm/whm_drift.f90 index fa0dcdd8f..4ef7e44fe 100644 --- a/src/whm/whm_drift.f90 +++ b/src/whm/whm_drift.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(whm) whm_drift use swiftest diff --git a/src/whm/whm_gr.f90 b/src/whm/whm_gr.f90 index 6e23ca21b..c37536f90 100644 --- a/src/whm/whm_gr.f90 +++ b/src/whm/whm_gr.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(whm) s_whm_gr use swiftest diff --git a/src/whm/whm_kick.f90 b/src/whm/whm_kick.f90 index bcddf0de7..66937861f 100644 --- a/src/whm/whm_kick.f90 +++ b/src/whm/whm_kick.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(whm) s_whm_kick use swiftest diff --git a/src/whm/whm_module.f90 b/src/whm/whm_module.f90 index 38e73f190..4af39d964 100644 --- a/src/whm/whm_module.f90 +++ b/src/whm/whm_module.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. module whm !! author: David A. Minton diff --git a/src/whm/whm_step.f90 b/src/whm/whm_step.f90 index 02812b428..df361cfc6 100644 --- a/src/whm/whm_step.f90 +++ b/src/whm/whm_step.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(whm) s_whm_step use swiftest diff --git a/src/whm/whm_util.f90 b/src/whm/whm_util.f90 index 09fa59d76..cb461fb03 100644 --- a/src/whm/whm_util.f90 +++ b/src/whm/whm_util.f90 @@ -1,11 +1,11 @@ -!! Copyright 2022 - 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. +! Copyight 2022 - 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. submodule(whm) s_whm_util use swiftest diff --git a/swiftest/__init__.py b/swiftest/__init__.py index 3b8bf6179..363a34b02 100644 --- a/swiftest/__init__.py +++ b/swiftest/__init__.py @@ -1,12 +1,12 @@ """ - Copyright 2022 - 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. +Copyright 2022 - 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. """ from .constants import * diff --git a/swiftest/constants.py b/swiftest/constants.py index 6fa87c888..44afaa2be 100644 --- a/swiftest/constants.py +++ b/swiftest/constants.py @@ -1,12 +1,12 @@ """ - Copyright 2022 - 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. +Copyright 2022 - 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. """ import numpy as np diff --git a/swiftest/init_cond.py b/swiftest/init_cond.py index 87ebdaa33..cea5912ba 100644 --- a/swiftest/init_cond.py +++ b/swiftest/init_cond.py @@ -1,12 +1,12 @@ """ - Copyright 2022 - 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. +Copyright 2022 - 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. """ from __future__ import annotations @@ -37,7 +37,6 @@ def horizons_get_physical_properties(altid,**kwargs): **kwargs: Any Additional keyword arguments to pass to the query method (see https://astroquery.readthedocs.io/en/latest/jplhorizons/jplhorizons.html) - Returns ------- MSun_over_Mpl : float @@ -184,7 +183,6 @@ def horizons_query(id, ephemerides_start_date, exclude_spacecraft=True, verbose= An astroquery.jplhorizons HorizonsClass object. Or None if no match was found. altid: string list | None A list of alternate ids if more than one object matches the list - """ def get_altid(errstr,exclude_spacecraft=True): @@ -416,6 +414,7 @@ def solar_system_horizons(name: str, return id,name,a,e,inc,capom,omega,capm,rh,vh,Gmass,Rpl,rhill,Ip,rot,J2,J4 + def vec2xr(param: Dict, **kwargs: Any): """ Converts and stores the variables of all bodies in an xarray dataset. @@ -458,9 +457,11 @@ def vec2xr(param: Dict, **kwargs: Any): instead of passing Ip1, Ip2, and Ip3 separately time : array of floats Time at start of simulation + Returns ------- ds : xarray dataset + Dataset containing the variables of all bodies passed in kwargs """ scalar_dims = ['id'] vector_dims = ['id','space'] diff --git a/swiftest/io.py b/swiftest/io.py index 32a10f34d..33fdb1e8f 100644 --- a/swiftest/io.py +++ b/swiftest/io.py @@ -1,12 +1,12 @@ """ - Copyright 2022 - 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. +Copyright 2022 - 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. """ import swiftest @@ -72,7 +72,7 @@ char_varnames = ["space"] int_varnames = ["id", "ntp", "npl", "nplm", "discard_body_id", "collision_id", "status"] -def bool2yesno(boolval): +def _bool2yesno(boolval): """ Converts a boolean into a string of either "YES" or "NO". @@ -83,8 +83,8 @@ def bool2yesno(boolval): Returns ------- - {"YES","NO"} - + str + {"YES","NO"} """ if boolval: return "YES" @@ -92,7 +92,7 @@ def bool2yesno(boolval): return "NO" -def bool2tf(boolval): +def _bool2tf(boolval): """ Converts a boolean into a string of either "T" or "F". @@ -103,7 +103,8 @@ def bool2tf(boolval): Returns ------- - {"T","F"} + str + {"T","F"} """ if boolval: @@ -112,7 +113,7 @@ def bool2tf(boolval): return "F" -def str2bool(input_str): +def _str2bool(input_str): """ Converts a string into an equivalent boolean. @@ -123,7 +124,7 @@ def str2bool(input_str): Returns ------- - {True, False} + bool """ if type(input_str) is bool: @@ -138,7 +139,7 @@ def str2bool(input_str): raise ValueError(f"{input_str} is not recognized as boolean") -def real2float(realstr): +def _real2float(realstr): """ Converts a Fortran-generated ASCII string of a real value into a numpy float type. Handles cases where double precision numbers in exponential notation use 'd' or 'D' instead of 'e' or 'E' @@ -150,7 +151,7 @@ def real2float(realstr): Returns ------- - : float + float The converted floating point value of the input string """ return float(realstr.replace('d', 'E').replace('D', 'E')) @@ -184,8 +185,8 @@ def read_swiftest_param(param_file_name, param, verbose=True): param[key] = fields[1] # Special case of CHK_QMIN_RANGE requires a second input if fields[0].upper() == 'CHK_QMIN_RANGE': - alo = real2float(fields[1]) - ahi = real2float(fields[2]) + alo = _real2float(fields[1]) + ahi = _real2float(fields[2]) param['CHK_QMIN_RANGE'] = f"{alo} {ahi}" for uc in upper_str_param: @@ -198,19 +199,28 @@ def read_swiftest_param(param_file_name, param, verbose=True): for f in float_param: if f in param and type(param[f]) is str: - param[f] = real2float(param[f]) + param[f] = _real2float(param[f]) for b in bool_param: if b in param: - param[b] = str2bool(param[b]) + param[b] = _str2bool(param[b]) except IOError: print(f"{param_file_name} not found.") return param def reorder_dims(ds): - - # Re-order dimension coordinates so that they are in the same order as the Fortran side + """ + Re-order dimension coordinates so that they are in the same order as the Fortran side + + Parameters + ---------- + ds : xarray dataset + + Returns + ------- + ds : xarray dataset with the dimensions re-ordered + """ idx = ds.indexes if "id" in idx: dim_order = ["time", "id", "space"] @@ -231,10 +241,11 @@ def read_swifter_param(param_file_name, verbose=True): ---------- param_file_name : string File name of the input parameter file - + verbose : bool, default True + Print out information about the file being read Returns ------- - param + param : dict A dictionary containing the entries in the user parameter file """ param = { @@ -278,26 +289,26 @@ def read_swifter_param(param_file_name, verbose=True): if (key == fields[0].upper()): param[key] = fields[1] # Special case of CHK_QMIN_RANGE requires a second input if fields[0].upper() == 'CHK_QMIN_RANGE': - alo = real2float(fields[1]) - ahi = real2float(fields[2]) + alo = _real2float(fields[1]) + ahi = _real2float(fields[2]) param['CHK_QMIN_RANGE'] = f"{alo} {ahi}" param['ISTEP_OUT'] = int(param['ISTEP_OUT']) param['ISTEP_DUMP'] = int(param['ISTEP_DUMP']) - param['T0'] = real2float(param['T0']) - param['TSTOP'] = real2float(param['TSTOP']) - param['DT'] = real2float(param['DT']) - param['J2'] = real2float(param['J2']) - param['J4'] = real2float(param['J4']) - param['CHK_RMIN'] = real2float(param['CHK_RMIN']) - param['CHK_RMAX'] = real2float(param['CHK_RMAX']) - param['CHK_EJECT'] = real2float(param['CHK_EJECT']) - param['CHK_QMIN'] = real2float(param['CHK_QMIN']) + param['T0'] = _real2float(param['T0']) + param['TSTOP'] = _real2float(param['TSTOP']) + param['DT'] = _real2float(param['DT']) + param['J2'] = _real2float(param['J2']) + param['J4'] = _real2float(param['J4']) + param['CHK_RMIN'] = _real2float(param['CHK_RMIN']) + param['CHK_RMAX'] = _real2float(param['CHK_RMAX']) + param['CHK_EJECT'] = _real2float(param['CHK_EJECT']) + param['CHK_QMIN'] = _real2float(param['CHK_QMIN']) for b in bool_param: if b in param: - param[b] = str2bool(param[b]) + param[b] = _str2bool(param[b]) if param['C'] != '-1.0': - param['C'] = real2float(param['C']) + param['C'] = _real2float(param['C']) else: param.pop('C', None) except IOError: @@ -314,7 +325,9 @@ def read_swift_param(param_file_name, startfile="swift.in", verbose=True): ---------- param_file_name : string File name of the input parameter file - + startfile : string, default "swift.in" + File name of the input start file + Returns ------- param : dict @@ -360,14 +373,14 @@ def read_swift_param(param_file_name, startfile="swift.in", verbose=True): line = f.readline().split() for i, l in enumerate(line): line[i] = l - param['T0'] = real2float(line[0]) - param['TSTOP'] = real2float(line[1]) - param['DT'] = real2float(line[2]) + param['T0'] = _real2float(line[0]) + param['TSTOP'] = _real2float(line[1]) + param['DT'] = _real2float(line[2]) line = f.readline().split() for i, l in enumerate(line): line[i] = l - param['DTOUT'] = real2float(line[0]) - param['DTDUMP'] = real2float(line[1]) + param['DTOUT'] = _real2float(line[0]) + param['DTDUMP'] = _real2float(line[1]) line = f.readline().split() param['L1'] = line[0].upper() param['L2'] = line[1].upper() @@ -379,10 +392,10 @@ def read_swift_param(param_file_name, startfile="swift.in", verbose=True): line = f.readline().split() for i, l in enumerate(line): line[i] = l - param['RMIN'] = real2float(line[0]) - param['RMAX'] = real2float(line[1]) - param['RMAXU'] = real2float(line[2]) - param['QMIN'] = real2float(line[3]) + param['RMIN'] = _real2float(line[0]) + param['RMAX'] = _real2float(line[1]) + param['RMAXU'] = _real2float(line[2]) + param['QMIN'] = _real2float(line[3]) param['LCLOSE'] = line[4].upper() param['BINARY_OUTPUTFILE'] = f.readline().strip() param['STATUS_FLAG_FOR_OPEN_STATEMENTS'] = f.readline().strip().upper() @@ -405,7 +418,7 @@ def write_swift_param(param, param_file_name): Returns ------- - Prints a text file containing the parameter information. + None """ outfile = open(param_file_name, 'w') print(param['T0'], param['TSTOP'], param['DT'], file=outfile) @@ -431,7 +444,7 @@ def write_labeled_param(param, param_file_name): Returns ------- - Prints a text file containing the parameter information. + None """ outfile = open(param_file_name, 'w') ptmp = param.copy() @@ -440,28 +453,30 @@ def write_labeled_param(param, param_file_name): val = ptmp.pop(key, None) if val is not None: if type(val) is bool: - print(f"{key:<32} {bool2yesno(val)}", file=outfile) + print(f"{key:<32} {_bool2yesno(val)}", file=outfile) else: print(f"{key:<32} {val}", file=outfile) # Print the remaining key/value pairs in whatever order for key, val in ptmp.items(): if val != "": if type(val) is bool: - print(f"{key:<32} {bool2yesno(val)}", file=outfile) + print(f"{key:<32} {_bool2yesno(val)}", file=outfile) else: print(f"{key:<32} {val}", file=outfile) outfile.close() return -def swifter_stream(f, param): +def _swifter_stream(f, param): """ Reads in a Swifter bin.dat file and returns a single frame of data as a datastream Parameters ---------- f : file object + File object of the Swifter bin.dat file param : dict + Swifter parameters Yields ------- @@ -557,6 +572,7 @@ def swifter_stream(f, param): yield t, npl, [plid, elempvec, GMpl, Rpl], plab, \ ntp, [tpid, elemtvec], tlab + def swifter2xr(param, verbose=True): """ Converts a Swifter binary data file into an xarray DataSet. @@ -565,7 +581,8 @@ def swifter2xr(param, verbose=True): ---------- param : dict Swifter parameters - + verbose : bool, default True + Print out information about the file being read Returns ------- xarray dataset @@ -575,7 +592,7 @@ def swifter2xr(param, verbose=True): tp = [] with FortranFile(param['BIN_OUT'], 'r') as f: for t, npl, pvec, plab, \ - ntp, tvec, tlab in swifter_stream(f, param): + ntp, tvec, tlab in _swifter_stream(f, param): sys.stdout.write('\r' + f"Reading in time {t[0]:.3e}") sys.stdout.flush() @@ -628,6 +645,8 @@ def swiftest2xr(param, verbose=True, dask=False): ---------- param : dict Swiftest parameters + verbose : bool, default True + Print out information about the file being read dask : bool, default False Use Dask to lazily load data (useful for very large datasets) @@ -653,13 +672,14 @@ def swiftest2xr(param, verbose=True, dask=False): return ds -def xstrip_nonstr(a): +def _xstrip_nonstr(a): """ Cleans up the string values in the DataSet to remove extra white space Parameters ---------- - a : xarray dataset + a : xarray + Input dataset Returns ------- @@ -669,7 +689,7 @@ def xstrip_nonstr(a): return xr.apply_ufunc(func, a.str.decode(encoding='utf-8'),dask='parallelized') -def xstrip_str(a): +def _xstrip_str(a): """ Cleans up the string values in the DataSet to remove extra white space @@ -685,7 +705,7 @@ def xstrip_str(a): return xr.apply_ufunc(func, a,dask='parallelized') -def string_converter(da): +def _string_converter(da): """ Converts a string to a unicode string @@ -699,12 +719,12 @@ def string_converter(da): """ da = da.astype(' ") - if GMTINY != '' and real2float(GMTINY.strip()) > 0: - swiftest_param['GMTINY'] = real2float(GMTINY.strip()) + if GMTINY != '' and _real2float(GMTINY.strip()) > 0: + swiftest_param['GMTINY'] = _real2float(GMTINY.strip()) # Remove the unneeded parameters if 'C' in swiftest_param: @@ -1623,6 +1588,7 @@ def swiftest2swifter_param(swiftest_param, J2=0.0, J4=0.0): Central body oblateness term. Default spherical. J4 : float Central body oblateness term. Default spherical. + Returns ------- swifter_param : A set of input files for a new Swifter run @@ -1669,6 +1635,7 @@ def swifter2swift_param(swifter_param, J2=0.0, J4=0.0): Central body oblateness term. Default spherical. J4 : float Central body oblateness term. Default spherical. + Returns ------- swift_param : A set of input files for a new Swift run diff --git a/swiftest/simulation_class.py b/swiftest/simulation_class.py index eee68f963..55f4db28b 100644 --- a/swiftest/simulation_class.py +++ b/swiftest/simulation_class.py @@ -1,24 +1,21 @@ """ - Copyright 2022 - 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. +Copyright 2022 - 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. """ + from __future__ import annotations -from swiftest import io -from swiftest import init_cond -from swiftest import tool -from swiftest import constants -from swiftest._bindings import driver -from swiftest import __file__ as _pyfile -import json +from . import io +from . import init_cond +from . import tool +from . import constants import os -from glob import glob from pathlib import Path import datetime import xarray as xr @@ -58,29 +55,32 @@ def __init__(self,read_param: bool = False, dask: bool = False, **kwargs: Any): """ - + Set up a new simulation object with the given parameters. + Parameters for a given Simulation object can be set a number of different ways, including via a parameter input + file, arguments to Simulation, the general `set_parameter` method, or the specific setters for groups of + similar parameters (e.g. set_init_cond_files, set_simulation_time, etc.). Each parameter has a default value + that can be overridden by an argument to Simulation(). Some argument parameters have equivalent values that + are passed to the Swiftest driver Fortran function via a parameter input file. When declaring a new + Simulation object, parameters are chosen in the following way, from highest to lowest priority + + #. Arguments to Simulation() + #. The parameter input file given by `param_file` under the following conditions + + - `read_param` is set to True (default behavior). + - The file given by `param_file` exists. The default file is `param.in` located in the `simdata` directory + inside the current working directory, which can be changed by passing `param_file` as an argument. + - The argument has an equivalent parameter or set of parameters in the parameter input file. + + #. Default values (see below) + Parameters ---------- read_param : bool, default True If true, read in a pre-existing parameter input file given by the argument `param_file` if it exists. Otherwise, create a new parameter file using the arguments passed to Simulation or defaults - - Parameters for a given Simulation object can be set a number of different ways, including via a parameter input - file, arguments to Simulation, the general `set_parameter` method, or the specific setters for groups of - similar parameters (e.g. set_init_cond_files, set_simulation_time, etc.). Each parameter has a default value - that can be overridden by an argument to Simulation(). Some argument parameters have equivalent values that - are passed to the Swiftest driver Fortran function via a parameter input file. When declaring a new - Simulation object, parameters are chosen in the following way, from highest to lowest priority" - 1. Arguments to Simulation() - 2. The parameter input file given by `param_file` under the following conditions: - - `read_param` is set to True (default behavior). - - The file given by `param_file` exists. The default file is `param.in` located in the `simdata` directory - inside the current working directory, which can be changed by passing `param_file` as an argument. - - The argument has an equivalent parameter or set of parameters in the parameter input file. - 3. Default values (see below) read_data : bool, default False If True, read in a pre-existing binary input file given by the argument `output_file_name` if it exists. - Parameter input file equivalent: None + Parameter input file equivalent is None read_collisions : bool, default None If True, read in a pre-existing collision file `collisions.nc`. If None, then it will take the value of `read_data`. read_encounters : bool, default None @@ -88,232 +88,257 @@ def __init__(self,read_param: bool = False, simdir : PathLike, default `"simdir"` Directory where simulation data will be stored, including the parameter file, initial conditions file, output file, dump files, and log files. - - **kwargs : See list of valid parameters and their defaults below - + **kwargs : dict + See list of valid parameters and their defaults below codename : {"Swiftest", "Swifter", "Swift"}, default "Swiftest" Name of the n-body code that will be used. - Parameter input file equivalent: None + Parameter input file equivalent is None integrator : {"symba","rmvs","whm","helio"}, default "symba" Name of the n-body integrator that will be used when executing a run. - Parameter input file equivalent: None + Parameter input file equivalent is None read_param : bool, default False Read the parameter file given by `param_file`. param_file : str, path-like, or file-lke, default "param.in" Name of the parameter input file that will be passed to the integrator. - Parameter input file equivalent: None + Parameter input file equivalent is None t0 : float, default 0.0 The reference time for the start of the simulation. Defaults is 0.0. - Parameter input file equivalent: `T0` + Parameter input file equivalent is `T0` tstart : float, default 0.0 The start time for a restarted simulation. For a new simulation, tstart will be set to t0 automatically. - Parameter input file equivalent: `TSTART` + Parameter input file equivalent is `TSTART` tstop : float, optional The stopping time for a simulation. `tstop` must be greater than `tstart`. - Parameter input file equivalent: `TSTOP` + Parameter input file equivalent is `TSTOP` dt : float, optional The step size of the simulation. `dt` must be less than or equal to `tstop-tstart`. - Parameter input file equivalent: `DT` + Parameter input file equivalent is `DT` istep_out : int, optional - The number of time steps between output saves to file. *Note*: only `istep_out` or `tstep_out` can be set. - Parameter input file equivalent: `ISTEP_OUT` + The number of time steps between output saves to file. Only `istep_out` or `tstep_out` can be set. + Parameter input file equivalent is `ISTEP_OUT` tstep_out : float, optional - The approximate time between when outputs are written to file. Passing this computes - `istep_out = floor(tstep_out/dt)`. *Note*: only `istep_out` or `tstep_out` can be set. `tstep_out` must be less than `tstop` - Parameter input file equivalent: None + The approximate time between when outputs are written to file. + Passing this computes:: + + istep_out = floor(tstep_out/dt) + + Only `istep_out` or `tstep_out` can be set. `tstep_out` must be less than `tstop`. + Parameter input file equivalent is None nstep_out : int, optional - The total number of times that outputs are written to file. Passing this allows for a geometric progression of output steps: - `TSTART, f**0 * TSTEP_OUT, f**1 * TSTEP_OUT, f**2 * TSTEP_OUT, ..., f**(nstep_out-1) * TSTEP_OUT`, - where `f` is a factor that can stretch (or shrink) the time between outputs. Setting `nstep_out = int((tstart - tstop) / (tstep_out))` is - equivalent to the standard linear output (i.e. `f==1`) and is the same as not passing anything for this argument. - *Note*: Passing `nstep_out` requires passing either `istep_out` or `tstep_out` as well. + The total number of times that outputs are written to file. Passing this allows for a geometric progression of output + steps:: + + TSTART, f**0 * TSTEP_OUT, f**1 * TSTEP_OUT, f**2 * TSTEP_OUT, ..., f**(nstep_out-1) * TSTEP_OUT + + where `f` is a factor that can stretch (or shrink) the time between outputs. Setting:: + + nstep_out = int((tstart - tstop) / (tstep_out)) + + is equivalent to the standard linear output (i.e. `f==1`) and is the same as not passing anything for this argument. + Passing `nstep_out` requires passing either `istep_out` or `tstep_out` as well. dump_cadence : int, optional The number of output steps (given by `istep_out`) between when the saved data is dumped to a file. Setting it to 0 is equivalent to only dumping data to file at the end of the simulation. Default value is 10. - Parameter input file equivalent: `DUMP_CADENCE` + Parameter input file equivalent is `DUMP_CADENCE` init_cond_file_type : {"NETCDF_DOUBLE", "NETCDF_FLOAT", "ASCII"}, default "NETCDF_DOUBLE" - The file type containing initial conditions for the simulation: - * NETCDF_DOUBLE: A single initial conditions input file in NetCDF file format of type NETCDF_DOUBLE. - * NETCDF_FLOAT: A single initial conditions input file in NetCDF file format of type NETCDF_FLOAT. - * ASCII : Three initial conditions files in ASCII format. The individual files define the central body, + The file type containing initial conditions for the simulation. + + * "NETCDF_DOUBLE" A single initial conditions input file in NetCDF file format of type NETCDF_DOUBLE. + * "NETCDF_FLOAT" A single initial conditions input file in NetCDF file format of type NETCDF_FLOAT. + * "ASCII" Three initial conditions files in ASCII format. The individual files define the central body, + massive body, and test particle initial conditions. - Parameter input file equivalent: `IN_TYPE` + Parameter input file equivalent is `IN_TYPE` init_cond_file_name : str, path-like, or dict, optional Name of the input initial condition file or files. Whether to pass a single file name or a dictionary - depends on the argument passed to `init_cond_file_type`: If `init_cond_file_type={"NETCDF_DOUBLE","NETCDF_FLOAT"}`, - then this will be a single file name. If `init_cond_file_type="ASCII"` then this must be a dictionary where: - ```init_cond_file_name = { - "CB" : *path to central body initial conditions file* (Swiftest only), - "PL" : *path to massive body initial conditions file*, - "TP" : *path to test particle initial conditions file* - }``` + depends on the argument passed to `init_cond_file_type`. If `init_cond_file_type={"NETCDF_DOUBLE","NETCDF_FLOAT"}`, + then this will be a single file name. If `init_cond_file_type="ASCII"` then this must be a dictionary where:: + + init_cond_file_name = { + "CB" - [path to central body initial conditions file] (Swiftest only), + "PL" - [path to massive body initial conditions file], + "TP" - [path to test particle initial conditions file] } + If no file name is provided then the following default file names will be used. - * NETCDF_DOUBLE, NETCDF_FLOAT: `init_cond_file_name = "init_cond.nc"` - * ASCII: `init_cond_file_name = {"CB" : "cb.in", "PL" : "pl.in", "TP" : "tp.in"}` - Parameter input file equivalent: `NC_IN`, `CB_IN`, `PL_IN`, `TP_IN` + + * "NETCDF_DOUBLE", "NETCDF_FLOAT" `init_cond_file_name = "init_cond.nc"` + * "ASCII" `init_cond_file_name = {"CB" : "cb.in", "PL" : "pl.in", "TP" : "tp.in"}` + + Parameter input file equivalent is `NC_IN`, `CB_IN`, `PL_IN`, `TP_IN` init_cond_format : {"EL", "XV"}, default "EL" Indicates whether the input initial conditions are given as orbital elements or cartesian position and velocity vectors. - > *Note:* If `codename` is "Swift" or "Swifter", EL initial conditions are converted to XV. - Parameter input file equivalent: `IN_FORM` + If `codename` is "Swift" or "Swifter", EL initial conditions are converted to XV. + Parameter input file equivalent is `IN_FORM` output_file_type : {"NETCDF_DOUBLE", "NETCDF_FLOAT","REAL4","REAL8","XDR4","XDR8"}, default "NETCDF_DOUBLE" The file type for the outputs of the simulation. Compatible file types depend on the `codename` argument. - * Swiftest: Only "NETCDF_DOUBLE" or "NETCDF_FLOAT" supported. - * Swifter: Only "REAL4","REAL8","XDR4" or "XDR8" supported. - * Swift: Only "REAL4" supported. - Parameter input file equivalent: `OUT_TYPE` + + * Swiftest - Only "NETCDF_DOUBLE" or "NETCDF_FLOAT" supported. + * Swifter - Only "REAL4","REAL8","XDR4" or "XDR8" supported. + * Swift - Only "REAL4" supported. + + Parameter input file equivalent is `OUT_TYPE` output_file_name : str or path-like, optional Name of output file to generate. If not supplied, then one of the default file names are used, depending on the value passed to `output_file_type`. The default is "data.nc". - Parameter input file equivalent: `BIN_OUT` + Parameter input file equivalent is `BIN_OUT` output_format : {"XV","XVEL"}, default "XVEL" Specifies the format for the data saved to the output file. If "XV" then cartesian position and velocity vectors for all bodies are stored. If "XVEL" then the orbital elements are also stored. - Parameter input file equivalent: `OUT_FORM` + Parameter input file equivalent is `OUT_FORM` MU : str, default "MSUN" - The mass unit system to use. Case-insensitive valid options are: - * "Msun" : Solar mass - * "Mearth" : Earth mass - * "kg" : kilograms - * "g" : grams - Parameter input file equivalent: None + The mass unit system to use. Case-insensitive valid options are + + * "Msun" - Solar mass + * "Mearth" - Earth mass + * "kg" - kilograms + * "g" - grams + + Parameter input file equivalent is None DU : str, optional - The distance unit system to use. Case-insensitive valid options are: - * "AU" : Astronomical Unit - * "Rearth" : Earth radius - * "m" : meter - * "cm" : centimeter - Parameter input file equivalent: None + The distance unit system to use. Case-insensitive valid options are + + * "AU" - Astronomical Unit + * "Rearth" - Earth radius + * "m" - meter + * "cm" - centimeter + + Parameter input file equivalent is None TU : str, optional - The time unit system to use. Case-insensitive valid options are: - * "YR" : Year - * "DAY" : Julian day - * "d" : Julian day - * "JD" : Julian day - * "s" : second - Parameter input file equivalent: None - MU2KG: float, optional + The time unit system to use. Case-insensitive valid options are + + * "YR" - Year + * "DAY" - Julian day + * "d" - Julian day + * "JD" - Julian day + * "s" - second + + Parameter input file equivalent is None + MU2KG : float, optional The conversion factor to multiply by the mass unit that would convert it to kilogram. Setting this overrides MU - Parameter input file equivalent: `MU2KG` + Parameter input file equivalent is `MU2KG` DU2M : float, optional The conversion factor to multiply by the distance unit that would convert it to meter. Setting this overrides DU - Parameter input file equivalent: `DU2M` + Parameter input file equivalent is `DU2M` TU2S : float, optional The conversion factor to multiply by the time unit that would convert it to seconds. Setting this overrides TU - Parameter input file equivalent: `TU2S` + Parameter input file equivalent is `TU2S` MU_name : str, optional The name of the mass unit. When setting one of the standard units via `MU` a name will be automatically set for the unit, so this argument will override the automatic name. - Parameter input file equivalent: None + Parameter input file equivalent is None DU_name : str, optional The name of the distance unit. When setting one of the standard units via `DU` a name will be automatically set for the unit, so this argument will override the automatic name. - Parameter input file equivalent: None + Parameter input file equivalent is None TU_name : str, optional The name of the time unit. When setting one of the standard units via `TU` a name will be automatically set for the unit, so this argument will override the automatic name. - Parameter input file equivalent: None + Parameter input file equivalent is None rmin : float, default value is the radius of the Sun in the unit system defined by the unit input arguments. Minimum distance of the simulation - Parameter input file equivalent: `CHK_QMIN`, `CHK_RMIN`, `CHK_QMIN_RANGE[0]` + Parameter input file equivalent are `CHK_QMIN`, `CHK_RMIN`, `CHK_QMIN_RANGE[0]` rmax : float, default value is 10000 AU in the unit system defined by the unit input arguments. Maximum distance of the simulation (CHK_RMAX, CHK_QMIN_RANGE[1]) - Parameter input file equivalent: `CHK_RMAX`, `CHK_QMIN_RANGE[1]` + Parameter input file equivalent are `CHK_RMAX`, `CHK_QMIN_RANGE[1]` qmin_coord : str, {"HELIO", "BARY"}, default "HELIO" coordinate frame to use for checking the minimum periapsis distance - Parameter input file equivalent: `QMIN_COORD` + Parameter input file equivalent is `QMIN_COORD` mtiny : float, optional The minimum mass of fully interacting bodies. Bodies below this mass interact with the larger bodies, - but not each other (SyMBA only). *Note.* Only mtiny or gmtiny is accepted, not both. - Parameter input file equivalent: None + but not each other (SyMBA only). Only mtiny or gmtiny is accepted, not both. + Parameter input file equivalent is None gmtiny : float, optional The minimum G*mass of fully interacting bodies. Bodies below this mass interact with the larger bodies, - but not each other (SyMBA only). *Note.* Only mtiny or gmtiny is accepted, not both. - Parameter input file equivalent: `GMTINY` + but not each other (SyMBA only). Only mtiny or gmtiny is accepted, not both. + Parameter input file equivalent is `GMTINY` close_encounter_check : bool, default True Check for close encounters between bodies. If set to True, then the radii of massive bodies must be included in initial conditions. - Parameter input file equivalent: `CHK_CLOSE` + Parameter input file equivalent is `CHK_CLOSE` encounter_save : {"NONE","TRAJECTORY","CLOSEST", "BOTH"}, default "NONE" Indicate if and how encounter data should be saved. If set to "TRAJECTORY", the position and velocity vectors of all bodies undergoing close encounters are saved at each intermediate step to the encounter files. If set to "CLOSEST", the position and velocities at the point of closest approach between pairs of bodies are computed and stored to the encounter files. If set to "BOTH", then this stores the values that would be computed in "TRAJECTORY" and "CLOSEST". If set to "NONE" no trajectory information is saved. - *WARNING*: Enabling this feature could lead to very large files. + WARNING - Enabling this feature could lead to very large files. general_relativity : bool, default True - Include the post-Newtonian correction in acceleration calculations. - Parameter input file equivalent: `GR` - collision_model: {"MERGE","BOUNCE","FRAGGLE"}, default "MERGE" - This is used to set the collision/fragmentation model. [TODO: DESCRIBE THESE] - This argument only applies to Swiftest-SyMBA simulations. It will be ignored otherwise. - Parameter input file equivalent: `COLLISION_MODEL` + Include the post-Newtonian correction in acceleration calculations. + Parameter input file equivalent is "GR" + collision_model : {"MERGE","BOUNCE","FRAGGLE"}, default "MERGE" + This is used to set the collision/fragmentation model. + This argument only applies to Swiftest-SyMBA simulations and will be ignored otherwise. + Parameter input file equivalent is "COLLISION_MODEL" minimum_fragment_gmass : float, optional If fragmentation is turned on, this sets the mimimum G*mass of a collisional fragment that can be generated if a fragmentation model is enabled. Ignored otherwise. - *Note.* Only set one of minimum_fragment_gmass or minimum_fragment_mass - Parameter input file equivalent: None + Only set one of minimum_fragment_gmass or minimum_fragment_mass + Parameter input file equivalent is None minimum_fragment_mass : float, optional If fragmentation is turned on, this sets the mimimum mass of a collisional fragment that can be generated. if a fragmentation model is enabled. Ignored otherwise - *Note.* Only set one of minimum_fragment_gmass or minimum_fragment_mass - Parameter input file equivalent: `MIN_GMFRAG` + Only set one of minimum_fragment_gmass or minimum_fragment_mass + Parameter input file equivalent is `MIN_GMFRAG` nfrag_reduction : float, optional If fragmentation is turne don, this is a reduction factor used to limit the number of fragments generated in a collision. For instance, if the SFD of the collision would generated 300 fragments above the `minimum_fragment_mass`, then a value of `nfrag_reduction = 30.0` would reduce it to 10. - *Note.* Currently only used by the Fraggle collision model. + Currently only used by the Fraggle collision model. rotation : bool, default False If set to True, this turns on rotation tracking and radius, rotation vector, and moments of inertia values must be included in the initial conditions. This argument only applies to Swiftest-SyMBA simulations. It will be ignored otherwise. - Parameter input file equivalent: `ROTATION` + Parameter input file equivalent is `ROTATION` compute_conservation_values : bool, default False Turns on the computation of energy, angular momentum, and mass conservation and reports the values every output step of a running simulation. - Parameter input file equivalent: `ENERGY` - extra_force: bool, default False + Parameter input file equivalent is `ENERGY` + extra_force : bool, default False Turns on user-defined force function. - Parameter input file equivalent: `EXTRA_FORCE` - big_discard: bool, default False + Parameter input file equivalent is `EXTRA_FORCE` + big_discard : bool, default False Includes big bodies when performing a discard (Swifter only) - Parameter input file equivalent: `BIG_DISCARD` - rhill_present: bool, default False + Parameter input file equivalent is `BIG_DISCARD` + rhill_present : bool, default False Include the Hill's radius with the input files . - Parameter input file equivalent: `RHILL_PRESENT` + Parameter input file equivalent is `RHILL_PRESENT` restart : bool, default False If true, will restart an old run. The file given by `output_file_name` must exist before the run can execute. If false, will start a new run. If the file given by `output_file_name` exists, it will be replaced when the run is executed. - Parameter input file equivalent: `OUT_STAT` + Parameter input file equivalent is `OUT_STAT` interaction_loops : {"TRIANGULAR","FLAT"}, default "TRIANGULAR" - > *Swiftest Experimental feature* + *Swiftest Experimental feature* Specifies which algorithm to use for the computation of body-body gravitational forces. - * "TRIANGULAR" : Upper-triangular double-loops . - * "FLAT" : Body-body interation pairs are flattened into a 1-D array. - Parameter input file equivalent: `INTERACTION_LOOPS` + + * "TRIANGULAR" - Upper-triangular double-loops. + * "FLAT" - Body-body interation pairs are flattened into a 1-D array. + + Parameter input file equivalent is `INTERACTION_LOOPS` encounter_check_loops : {"TRIANGULAR","SORTSWEEP"}, default "TRIANGULAR" - > *Swiftest Experimental feature* + *Swiftest Experimental feature* Specifies which algorithm to use for checking whether bodies are in a close encounter state or not. - * "TRIANGULAR" : Upper-triangular double-loops. - * "SORTSWEEP" : A Sort-Sweep algorithm is used to reduce the population of potential close encounter bodies. + + * "TRIANGULAR" - Upper-triangular double-loops. + * "SORTSWEEP" - A Sort-Sweep algorithm is used to reduce the population of potential close encounter bodies. This algorithm is still in development, and does not necessarily speed up the encounter checking. Use with caution. - Parameter input file equivalent: `ENCOUNTER_CHECK` + + Parameter input file equivalent is `ENCOUNTER_CHECK` dask : bool, default False Use Dask to lazily load data (useful for very large datasets) coarray : bool, default False If true, will employ Coarrays on test particle structures to run in single program/multiple data parallel mode. - *Note" In order to use this capability, Swiftest must be compiled for Coarray support. Only certain integrators - can use Coarrays: RMVS, WHM, Helio are all compatible, but SyMBA is not, due to the way tp-pl close encounters - are handeled. + In order to use this capability, Swiftest must be compiled for Coarray support. Only certain integrators can use + Coarrays. RMVS, WHM, Helio are all compatible, but SyMBA is not, due to the way tp-pl close encounters are handeled. verbose : bool, default True If set to True, then more information is printed by Simulation methods as they are executed. Setting to False suppresses most messages other than errors. - Parameter input file equivalent: None + Parameter input file equivalent is None """ self._getter_column_width = 32 @@ -388,25 +413,31 @@ def _run_swiftest_driver(self): """ Internal callable function that executes the swiftest_driver run """ + from ._bindings import driver with _cwd(self.simdir): driver(self.integrator,str(self.param_file), "progress") return - def run(self,dask: bool = False, **kwargs): + def run(self, + dask: bool = False, + **kwargs: Any + ) -> None: """ Runs a Swiftest integration. Uses the parameters set by the `param` dictionary unless overridden by keyword arguments. Accepts any keyword arguments that can be passed to `set_parameter`. Parameters ---------- - **kwargs : Any valid keyword arguments accepted by `set_parameter` + dask : bool, default False + If true, will use Dask to lazily load data (useful for very large datasets) + **kwargs : Any + Any valid keyword arguments accepted by `set_parameter` Returns ------- None - """ if len(kwargs) > 0: @@ -434,7 +465,10 @@ def run(self,dask: bool = False, **kwargs): return - def _get_valid_arg_list(self, arg_list: str | List[str] | None = None, valid_var: Dict | None = None): + def _get_valid_arg_list(self, + arg_list: str | List[str] | None = None, + valid_var: Dict | None = None + ) -> Tuple[List[str], Dict]: """ Internal function for getters that extracts subset of arguments that is contained in the dictionary of valid argument/parameter variable pairs. @@ -455,7 +489,6 @@ def _get_valid_arg_list(self, arg_list: str | List[str] | None = None, valid_var param : dict A dictionary that is the subset of the Simulation parameter dictionary corresponding to the arguments listed in arg_list. - """ if arg_list is None: @@ -487,9 +520,11 @@ def set_simulation_time(self, dump_cadence: int | None = None, verbose: bool | None = None, **kwargs: Any - ): + ) -> Dict[str, Any]: """ - + Set the parameters that control how a simulation is run, such as start and stop time, step size, and the cadence of output + to both the screen and to file. Returns a dictionary of the parameters that were set. + Parameters ---------- t0 : float, optional @@ -501,23 +536,31 @@ def set_simulation_time(self, dt : float, optional The step size of the simulation. `dt` must be less than or equal to `tstop-dstart`. istep_out : int, optional - The number of time steps between output saves to file. *Note*: only `istep_out` or `tstep_out` can be set. - Parameter input file equivalent: `ISTEP_OUT` + The number of time steps between output saves to file. Only `istep_out` or `tstep_out` can be set. + Parameter input file equivalent is `ISTEP_OUT` tstep_out : float, optional - The approximate time between when outputs are written to file. Passing this computes - `istep_out = floor(tstep_out/dt)`. *Note*: only `istep_out` or `tstep_out` can be set. - Parameter input file equivalent: None + The approximate time between when outputs are written to file. Passing this computes:: + + `istep_out = floor(tstep_out/dt)`. + + Only `istep_out` or `tstep_out` can be set. + Parameter input file equivalent is None nstep_out : int, optional The total number of times that outputs are written to file. Passing this allows for a geometric progression of output steps: - `TSTART, f**0 * TSTEP_OUT, f**1 * TSTEP_OUT, f**2 * TSTEP_OUT, ..., f**(nstep_out-1) * TSTEP_OUT`, - where `f` is a factor that can stretch (or shrink) the time between outputs. Setting `nstep_out = int((tstart - tstop) / (tstep_out))` is - equivalent to the standard linear output (i.e. `f==1`) and is the same as not passing anything for this argument. - *Note*: Passing `nstep_out` requires passing either `istep_out` or `tstep_out` as well. + + TSTART, f**0 * TSTEP_OUT, f**1 * TSTEP_OUT, f**2 * TSTEP_OUT, ..., f**(nstep_out-1) * TSTEP_OUT + + where `f` is a factor that can stretch (or shrink) the time between outputs. Setting:: + + nstep_out = int((tstart - tstop) / (tstep_out)) + + is equivalent to the standard linear output (i.e. `f==1`) and is the same as not passing anything for this argument. + Passing `nstep_out` requires passing either `istep_out` or `tstep_out` as well. dump_cadence : int, optional The number of output steps (given by `istep_out`) between when the saved data is dumped to a file. Setting it to 0 is equivalent to only dumping data to file at the end of the simulation. Default value is 10. - Parameter input file equivalent: `DUMP_CADENCE` - verbose: bool, optional + Parameter input file equivalent is `DUMP_CADENCE` + verbose : bool,optional If passed, it will override the Simulation object's verbose flag **kwargs A dictionary of additional keyword argument. This allows this method to be called by the more general @@ -527,8 +570,8 @@ def set_simulation_time(self, ------- time_dict : dict A dictionary containing the requested parameters - """ + if t0 is None and tstart is None and tstop is None and dt is None and istep_out is None and \ tstep_out is None and dump_cadence is None: return {} @@ -615,9 +658,12 @@ def set_simulation_time(self, return time_dict - def get_simulation_time(self, arg_list: str | List[str] | None = None, verbose: bool | None = None, **kwargs): + def get_simulation_time(self, + arg_list: str | List[str] | None = None, + verbose: bool | None = None, + **kwargs: Any + ) -> Dict[str, Any]: """ - Returns a subset of the parameter dictionary containing the current simulation time parameters. If the verbose option is set in the Simulation object, then it will also print the values. @@ -627,18 +673,16 @@ def get_simulation_time(self, arg_list: str | List[str] | None = None, verbose: A single string or list of strings containing the names of the simulation time parameters to extract. Default is all of: ["t0", "tstart", "tstop", "dt", "istep_out", "tstep_out", "dump_cadence"] - verbose: bool, optional + verbose : bool,optional If passed, it will override the Simulation object's verbose flag - **kwargs + **kwargs : Any A dictionary of additional keyword argument. This allows this method to be called by the more general get_parameter method, which takes all possible Simulation parameters as arguments, so these are ignored. - Returns ------- time_dict : dict A dictionary containing the requested parameters - """ valid_var = {"t0": "T0", @@ -683,18 +727,26 @@ def get_simulation_time(self, arg_list: str | List[str] | None = None, verbose: return time_dict - def set_parameter(self, verbose: bool = True, **kwargs): + def set_parameter(self, + verbose: bool = True, + **kwargs: Any + ) -> Dict[str, Any]: """ Setter for all possible parameters. This will call each of the specialized setters using keyword arguments. If no arguments are passed, then default values will be used. + Parameters ---------- - **kwargs : Any argument listed listed in the Simulation class definition. + verbose : bool, default True + If set to True, then more information is printed by Simulation methods as they are executed. Setting to False suppresses + most messages other than errors. + **kwargs : Any + Any argument listed listed in the Simulation class definition. Returns ------- - param : A dictionary of all Simulation parameters that changed - + param : dict + A dictionary of all Simulation parameters that changed """ default_arguments = { @@ -780,17 +832,21 @@ def set_parameter(self, verbose: bool = True, **kwargs): return param_dict - def get_parameter(self, **kwargs): + def get_parameter(self, + **kwargs: Any + ) -> Dict[str, Any]: """ Setter for all possible parameters. Calls each of the specialized setters using keyword arguments + Parameters ---------- - **kwargs : Any of the arguments defined in Simulation. If none provided, it returns all arguments. + **kwargs : Any + Any of the arguments defined in Simulation. If none provided, it returns all arguments. Returns ------- - param : A dictionary of all Simulation parameters requested - + param : dict + A dictionary of all Simulation parameters requested """ # Getters returning parameter dictionary values @@ -814,23 +870,26 @@ def set_integrator(self, gmtiny: float | None = None, verbose: bool | None = None, **kwargs: Any - ): + ) -> Dict[str, Any]: """ - + Sets the integrator to be used when running a simulation. Returns a dictionary of the parameters that were set. + Parameters ---------- codename : {"swiftest", "swifter", "swift"}, optional + The name of the code to use. Case-insensitive valid options are swiftest, swifter, and swift. Currently only swiftest is + is supported for excuting runs with the run() method. integrator : {"symba","rmvs","whm","helio"}, optional Name of the n-body integrator that will be used when executing a run. mtiny : float, optional The minimum mass of fully interacting bodies. Bodies below this mass interact with the larger bodies, - but not each other (SyMBA only). *Note.* Only mtiny or gmtiny is accepted, not both. + but not each other (SyMBA only). Only mtiny or gmtiny is accepted, not both. gmtiny : float, optional The minimum G*mass of fully interacting bodies. Bodies below this mass interact with the larger bodies, - but not each other (SyMBA only). *Note.* Only mtiny or gmtiny is accepted, not both. - verbose: bool, optional + but not each other (SyMBA only). Only mtiny or gmtiny is accepted, not both. + verbose : bool,optional If passed, it will override the Simulation object's verbose flag - **kwargs + **kwargs : Any A dictionary of additional keyword argument. This allows this method to be called by the more general set_parameter method, which takes all possible Simulation parameters as arguments, so these are ignored. @@ -840,7 +899,6 @@ def set_integrator(self, A dictionary containing the subset of the parameter dictonary that was updated by this setter """ - # TODO: Improve how it finds the executable binary update_list = [] @@ -891,9 +949,11 @@ def set_integrator(self, return integrator_dict - def get_integrator(self,arg_list: str | List[str] | None = None, verbose: bool | None = None, **kwargs: Any): + def get_integrator(self, + arg_list: str | List[str] | None = None, + verbose: bool | None = None, + **kwargs: Any) -> Dict[str, Any]: """ - Returns a subset of the parameter dictionary containing the current values of the distance range parameters. If the verbose option is set in the Simulation object, then it will also print the values. @@ -902,9 +962,9 @@ def get_integrator(self,arg_list: str | List[str] | None = None, verbose: bool | arg_list: str | List[str], optional A single string or list of strings containing the names of the features to extract. Default is all of: ["integrator"] - verbose: bool, optional + verbose : bool, optional If passed, it will override the Simulation object's verbose flag - **kwargs + **kwargs : Any A dictionary of additional keyword argument. This allows this method to be called by the more general get_parameter method, which takes all possible Simulation parameters as arguments, so these are ignored. @@ -982,7 +1042,7 @@ def set_feature(self, verbose: bool | None = None, simdir: str | os.PathLike = None, **kwargs: Any - ): + ) -> Dict[str, Any]: """ Turns on or off various features of a simulation. @@ -997,28 +1057,27 @@ def set_feature(self, If set to "CLOSEST", the position and velocities at the point of closest approach between pairs of bodies are computed and stored to the encounter files. If set to "BOTH", then this stores the values that would be computed in "TRAJECTORY" and "CLOSEST". If set to "NONE" no trajectory information is saved. - *WARNING*: Enabling this feature could lead to very large files. + WARNING - Enabling this feature could lead to very large files. general_relativity : bool, optional Include the post-Newtonian correction in acceleration calculations. - collision_model: {"MERGE","BOUNCE","FRAGGLE"}, default "MERGE" - This is used to set the collision/fragmentation model. [TODO: DESCRIBE THESE] - This argument only applies to Swiftest-SyMBA simulations. It will be ignored otherwise. - Parameter input file equivalent: `COLLISION_MODEL` + collision_model : {"MERGE","BOUNCE","FRAGGLE"}, default "MERGE" + This is used to set the collision/fragmentation model. This argument only applies to Swiftest-SyMBA simulations. It + will be ignored otherwise. Parameter input file equivalent is `COLLISION_MODEL` minimum_fragment_gmass : float, optional If fragmentation is turned on, this sets the mimimum G*mass of a collisional fragment that can be generated if a fragmentation model is enabled. Ignored otherwise. - *Note.* Only set one of minimum_fragment_gmass or minimum_fragment_mass - Parameter input file equivalent: None + Only set one of minimum_fragment_gmass or minimum_fragment_mass + Parameter input file equivalent is None minimum_fragment_mass : float, optional If fragmentation is turned on, this sets the mimimum mass of a collisional fragment that can be generated. if a fragmentation model is enabled. Ignored otherwise - *Note.* Only set one of minimum_fragment_gmass or minimum_fragment_mass - Parameter input file equivalent: `MIN_GMFRAG` + Only set one of minimum_fragment_gmass or minimum_fragment_mass + Parameter input file equivalent is `MIN_GMFRAG` nfrag_reduction : float, optional If fragmentation is turne don, this is a reduction factor used to limit the number of fragments generated in a collision. For instance, if the SFD of the collision would generated 300 fragments above the `minimum_fragment_mass`, then a value of `nfrag_reduction = 30.0` would reduce it to 10. - *Note.* Currently only used by the Fraggle collision model. + Currently only used by the Fraggle collision model. rotation : bool, optional If set to True, this turns on rotation tracking and radius, rotation vector, and moments of inertia values must be included in the initial conditions. @@ -1026,45 +1085,49 @@ def set_feature(self, compute_conservation_values : bool, optional Turns on the computation of energy, angular momentum, and mass conservation and reports the values every output step of a running simulation. - extra_force: bool, optional + extra_force : bool, optional Turns on user-defined force function. - big_discard: bool, optional + big_discard : bool, optional Includes big bodies when performing a discard (Swifter only) - rhill_present: bool, optional + rhill_present : bool, optional Include the Hill's radius with the input files. interaction_loops : {"TRIANGULAR","FLAT"}, default "TRIANGULAR" *Swiftest Experimental feature* Specifies which algorithm to use for the computation of body-body gravitational forces. + * "TRIANGULAR" : Upper-triangular double-loops . * "FLAT" : Body-body interation pairs are flattened into a 1-D array. + encounter_check_loops : {"TRIANGULAR","SORTSWEEP"}, default "TRIANGULAR" *Swiftest Experimental feature* Specifies which algorithm to use for checking whether bodies are in a close encounter state or not. + * "TRIANGULAR" : Upper-triangular double-loops. * "SORTSWEEP" : A Sort-Sweep algorithm is used to reduce the population of potential close encounter bodies. This algorithm is still in development, and does not necessarily speed up the encounter checking. Use with caution. + coarray : bool, default False If true, will employ Coarrays on test particle structures to run in single program/multiple data parallel mode. - *Note" In order to use this capability, Swiftest must be compiled for Coarray support. Only certain integrators + In order to use this capability, Swiftest must be compiled for Coarray support. Only certain integrators can use Coarrays: RMVS, WHM, Helio are all compatible, but SyMBA is not, due to the way tp-pl close encounters are handeled. - tides: bool, optional + tides : bool, optional Turns on tidal model (IN DEVELOPMENT - IGNORED) - Yarkovsky: bool, optional + Yarkovsky : bool, optional Turns on Yarkovsky model (IN DEVELOPMENT - IGNORED) - YORP: bool, optional + YORP : bool, optional Turns on YORP model (IN DEVELOPMENT - IGNORED) restart : bool, default False If true, will restart an old run. The file given by `output_file_name` must exist before the run can execute. If false, will start a new run. If the file given by `output_file_name` exists, it will be replaced when the run is executed. - simdir: PathLike, optional + simdir : PathLike, optional Directory where simulation data will be stored, including the parameter file, initial conditions file, output file, dump files, and log files. - verbose: bool, optional + verbose : bool,optional If passed, it will override the Simulation object's verbose flag - **kwargs + **kwargs : Any A dictionary of additional keyword argument. This allows this method to be called by the more general set_parameter method, which takes all possible Simulation parameters as arguments, so these are ignored. @@ -1072,7 +1135,6 @@ def set_feature(self, ------- feature_dict : dict A dictionary containing the requested features. - """ update_list = [] @@ -1207,20 +1269,22 @@ def set_feature(self, feature_dict = self.get_feature(update_list, verbose) return feature_dict - def get_feature(self, arg_list: str | List[str] | None = None, verbose: bool | None = None, **kwargs: Any): + def get_feature(self, + arg_list: str | List[str] | None = None, + verbose: bool | None = None, + **kwargs: Any) -> Dict[str, Any]: """ - Returns a subset of the parameter dictionary containing the current value of the feature boolean values. If the verbose option is set in the Simulation object, then it will also print the values. Parameters ---------- - arg_list: str | List[str], optional + arg_list : str | List[str], optional A single string or list of strings containing the names of the features to extract. Default is all of: ["close_encounter_check", "general_relativity", "collision_model", "rotation", "compute_conservation_values"] - verbose: bool, optional - If passed, it will override the Simulation object's verbose flag - **kwargs + verbose : bool, optional + If passed, it will override the Simulation object's verbose flag. + **kwargs : Any A dictionary of additional keyword argument. This allows this method to be called by the more general get_parameter method, which takes all possible Simulation parameters as arguments, so these are ignored. @@ -1228,7 +1292,6 @@ def get_feature(self, arg_list: str | List[str] | None = None, verbose: bool | N ------- feature_dict : dict A dictionary containing the requested features. - """ valid_var = {"close_encounter_check": "CHK_CLOSE", @@ -1275,37 +1338,42 @@ def set_init_cond_files(self, init_cond_format: Literal["EL", "XV"] | None = None, verbose: bool | None = None, **kwargs: Any - ): + ) -> Dict[str, Any]: """ Sets the initial condition file parameters in the parameters dictionary. Parameters ---------- init_cond_file_type : {"NETCDF_DOUBLE", "NETCDF_FLOAT", "ASCII"}, optional - The file type containing initial conditions for the simulation: + The file type containing initial conditions for the simulation + * NETCDF_DOUBLE: A single initial conditions input file in NetCDF file format of type NETCDF_DOUBLE * NETCDF_FLOAT: A single initial conditions input file in NetCDF file format of type NETCDF_FLOAT - * ASCII : Three initial conditions files in ASCII format. The individual files define the central body, - massive body, and test particle initial conditions. + * ASCII : Three initial conditions files in ASCII format. The individual files define the central body, massive body, and test particle initial conditions. + init_cond_file_name : str, path-like, or dict, optional Name of the input initial condition file or files. Whether to pass a single file name or a dictionary depends on the argument passed to `init_cond_file_type`: If `init_cond_file_type={"NETCDF_DOUBLE","NETCDF_FLOAT"}`, - then this will be a single file name. If `init_cond_file_type="ASCII"` then this must be a dictionary where: - ```init_cond_file_name = { - "CB" : *path to central body initial conditions file* (Swiftest only), - "PL" : *path to massive body initial conditions file*, - "TP" : *path to test particle initial conditions file* - }``` + then this will be a single file name. If `init_cond_file_type="ASCII"` then this must be a dictionary where:: + + init_cond_file_name = { + "CB" : *path to central body initial conditions file* (Swiftest only), + "PL" : *path to massive body initial conditions file*, + "TP" : *path to test particle initial conditions file* + } + If no file name is provided then the following default file names will be used. + * NETCDF_DOUBLE, NETCDF_FLOAT: `init_cond_file_name = "init_cond.nc"` * ASCII: `init_cond_file_name = {"CB" : "cb.in", "PL" : "pl.in", "TP" : "tp.in"}` + init_cond_format : {"EL", "XV"} Indicates whether the input initial conditions are given as orbital elements or cartesian position and velocity vectors. - > *Note:* If `codename` is "Swift" or "Swifter", EL initial conditions are converted to XV. - verbose: bool, optional + If `codename` is "Swift" or "Swifter", EL initial conditions are converted to XV. + verbose : bool, optional If passed, it will override the Simulation object's verbose flag - **kwargs + **kwargs : Any A dictionary of additional keyword argument. This allows this method to be called by the more general set_parameter method, which takes all possible Simulation parameters as arguments, so these are ignored. @@ -1313,7 +1381,6 @@ def set_init_cond_files(self, ------- init_cond_file_dict : dict A dictionary containing the requested parameters - """ update_list = [] @@ -1410,9 +1477,11 @@ def ascii_file_input_error_msg(codename): return init_cond_file_dict - def get_init_cond_files(self, arg_list: str | List[str] | None = None, verbose: bool | None = None, **kwargs): + def get_init_cond_files(self, + arg_list: str | List[str] | None = None, + verbose: bool | None = None, + **kwargs: Any) -> Dict[str, Any]: """ - Returns a subset of the parameter dictionary containing the current initial condition file parameters If the verbose option is set in the Simulation object, then it will also print the values. @@ -1422,18 +1491,16 @@ def get_init_cond_files(self, arg_list: str | List[str] | None = None, verbose: A single string or list of strings containing the names of the simulation time parameters to extract. Default is all of: ["init_cond_file_type", "init_cond_file_name", "init_cond_format"] - verbose: bool, optional + verbose : bool, optional If passed, it will override the Simulation object's verbose flag - **kwargs + **kwargs : Any A dictionary of additional keyword argument. This allows this method to be called by the more general get_parameter method, which takes all possible Simulation parameters as arguments, so these are ignored. - Returns ------- init_cond_file_dict : dict A dictionary containing the requested parameters - """ valid_var = {"init_cond_file_type": "IN_TYPE", @@ -1492,7 +1559,7 @@ def set_output_files(self, restart: bool | None = None, verbose: bool | None = None, **kwargs: Any - ): + ) -> Dict[str, Any]: """ Sets the output file parameters in the parameter dictionary. @@ -1500,9 +1567,11 @@ def set_output_files(self, ---------- output_file_type : {"NETCDF_DOUBLE", "NETCDF_FLOAT","REAL4","REAL8","XDR4","XDR8"}, optional The file type for the outputs of the simulation. Compatible file types depend on the `codename` argument. + * Swiftest: Only "NETCDF_DOUBLE" or "NETCDF_FLOAT" supported. * Swifter: Only "REAL4","REAL8","XDR4" or "XDR8" supported. * Swift: Only "REAL4" supported. + output_file_name : str or path-like, optional Name of output file to generate. If not supplied, then one of the default file names are used, depending on the value passed to `output_file_type`. If one of the NetCDF types are used, the default is "data.nc". @@ -1510,11 +1579,11 @@ def set_output_files(self, output_format : {"XV","XVEL"}, optional Specifies the format for the data saved to the output file. If "XV" then cartesian position and velocity vectors for all bodies are stored. If "XVEL" then the orbital elements are also stored. - restart: bool, optional + restart : bool, optional Indicates whether this is a restart of an old run or a new run. - verbose: bool, optional + verbose : bool, optional If passed, it will override the Simulation object's verbose flag - **kwargs + **kwargs : Any A dictionary of additional keyword argument. This allows this method to be called by the more general set_parameter method, which takes all possible Simulation parameters as arguments, so these are ignored. @@ -1522,7 +1591,6 @@ def set_output_files(self, ------- output_file_dict : dict A dictionary containing the requested parameters - """ update_list = [] if output_file_type is not None: @@ -1586,9 +1654,12 @@ def set_output_files(self, return output_file_dict - def get_output_files(self, arg_list: str | List[str] | None = None, verbose: bool | None = None, **kwargs): + def get_output_files(self, + arg_list: str | List[str] | None = None, + verbose: bool | None = None, + **kwargs: Any + ) -> Dict[str, Any]: """ - Returns a subset of the parameter dictionary containing the current output file parameters If the verbose option is set in the Simulation object, then it will also print the values. @@ -1598,13 +1669,12 @@ def get_output_files(self, arg_list: str | List[str] | None = None, verbose: boo A single string or list of strings containing the names of the simulation time parameters to extract. Default is all of: ["output_file_type", "output_file_name", "output_format"] - verbose: bool, optional + verbose : bool,optional If passed, it will override the Simulation object's verbose flag - **kwargs + **kwargs : Any A dictionary of additional keyword argument. This allows this method to be called by the more general get_parameter method, which takes all possible Simulation parameters as arguments, so these are ignored. - Returns ------- output_file_dict : dict @@ -1642,13 +1712,15 @@ def set_unit_system(self, TU_name: str | None = None, recompute_unit_values: bool = True, verbose: bool | None = None, - **kwargs: Any): + **kwargs: Any + ) -> Dict[str, Any]: """ Setter for setting the unit conversion between one of the standard sets. - The units can be set one of two ways: - 1) The user can supply string values to the arguments MU, DU, and TU to select between common systems - 2) The user can supply float values to the arguments MU2KG, DU2M, and TU2S to manually set the conversion + The units can be set one of two ways + + #. The user can supply string values to the arguments MU, DU, and TU to select between common systems + #. The user can supply float values to the arguments MU2KG, DU2M, and TU2S to manually set the conversion factor between the desired unit and the SI unit (kg-m-s). The two sets of arguments are mutually exclusive. Any values passed to MU2KG, DU2M, or TU2S will override any @@ -1657,24 +1729,30 @@ def set_unit_system(self, Parameters ---------- MU : str, optional - The mass unit system to use. Case-insensitive valid options are: - "Msun" : Solar mass - "Mearth" : Earth mass - "kg" : kilograms - "g" : grams + The mass unit system to use. Case-insensitive valid options are + + * "Msun" - Solar mass + * "Mearth" - Earth mass + * "kg" - kilograms + * "g" - grams + DU : str, optional - The distance unit system to use. Case-insensitive valid options are: - "AU" : Astronomical Unit - "Rearth" : Earth radius - "m" : meter - "cm" : centimeter + The distance unit system to use. Case-insensitive valid options are + + * "AU" - Astronomical Unit + * "Rearth" - Earth radius + * "m" - meter + * "cm" - centimeter + TU : str, optional - The time unit system to use. Case-insensitive valid options are: - "YR" : Year - "DAY" : Julian day - "d" : Julian day - "JD" : Julian day - "s" : second + The time unit system to use. Case-insensitive valid options are + + * "YR" - Year + * "DAY" - Julian day + * "d" - Julian day + * "JD" - Julian day + * "s" - second + MU2KG : float, optional The conversion factor to multiply by the mass unit that would convert it to kilogram. Setting this overrides MU @@ -1695,12 +1773,12 @@ def set_unit_system(self, automatically set for the unit, so this argument will override the automatic name. recompute_unit_values : bool, default True Recompute all values into the new unit system. - >*Note:* This is a destructive operation, however if not executed then the values contained in the parameter - > file and input/output data files computed previously may not be consistent with the new unit conversion - > factors. - verbose: bool, optional + This is a destructive operation, however if not executed then the values contained in the parameter + file and input/output data files computed previously may not be consistent with the new unit conversion + factors. + verbose : bool, optional If passed, it will override the Simulation object's verbose flag - **kwargs + **kwargs : Any A dictionary of additional keyword argument. This allows this method to be called by the more general set_parameter method, which takes all possible Simulation parameters as arguments, so these are ignored. @@ -1818,15 +1896,18 @@ def set_unit_system(self, MU2KG_old != self.param['MU2KG'] or \ DU2M_old != self.param['DU2M'] or \ TU2S_old != self.param['TU2S']: - self.update_param_units(MU2KG_old, DU2M_old, TU2S_old) + self._update_param_units(MU2KG_old, DU2M_old, TU2S_old) unit_dict = self.get_unit_system(update_list, verbose) return unit_dict - def get_unit_system(self, arg_list: str | List[str] | None = None, verbose: bool | None = None, **kwargs): + def get_unit_system(self, + arg_list: str | List[str] | None = None, + verbose: bool | None = None, + **kwargs + ) -> Dict[str, Any]: """ - Returns a subset of the parameter dictionary containing the current simulation unit system. If the verbose option is set in the Simulation object, then it will also print the values. @@ -1834,9 +1915,10 @@ def get_unit_system(self, arg_list: str | List[str] | None = None, verbose: bool ---------- arg_list : str | List[str], optional A single string or list of strings containing the names of the simulation unit system - Default is all of: - ["MU", "DU", "TU"] - **kwargs + Default is all of ["MU", "DU", "TU"] + verbose : bool, optional + If passed, it will override the Simulation object's verbose flag + **kwargs : Any A dictionary of additional keyword argument. This allows this method to be called by the more general get_parameter method, which takes all possible Simulation parameters as arguments, so these are ignored. @@ -1890,20 +1972,22 @@ def get_unit_system(self, arg_list: str | List[str] | None = None, verbose: bool return unit_dict - def update_param_units(self, MU2KG_old, DU2M_old, TU2S_old): + def _update_param_units(self, MU2KG_old, DU2M_old, TU2S_old): """ Updates the values of parameters that have units when the units have changed. Parameters ---------- - MU2KG_old : Old value of the mass unit conversion factor - DU2M_old : Old value of the distance unit conversion factor - TU2S_old : Old value of the time unit conversion factor + MU2KG_old : float + Old value of the mass unit conversion factor + DU2M_old : float + Old value of the distance unit conversion factor + TU2S_old : float + Old value of the time unit conversion factor Returns ------- Updates the set of param dictionary values for the new unit system - """ mass_keys = ['GMTINY', 'MIN_GMFRAG'] @@ -1939,7 +2023,8 @@ def set_distance_range(self, rmax: float | None = None, qmin_coord: Literal["HELIO","BARY"] | None = None, verbose: bool | None = None, - **kwargs: Any): + **kwargs: Any + ) -> Dict[str, Any]: """ Sets the minimum and maximum distances of the simulation. @@ -1951,7 +2036,9 @@ def set_distance_range(self, Maximum distance of the simulation (CHK_RMAX, CHK_QMIN_RANGE[1]) qmin_coord : str, {"HELIO", "BARY"} coordinate frame to use for CHK_QMIN - **kwargs + verbose : bool, optional + If passed, it will override the Simulation object's verbose flag + **kwargs : Any A dictionary of additional keyword argument. This allows this method to be called by the more general set_parameter method, which takes all possible Simulation parameters as arguments, so these are ignored. @@ -1959,7 +2046,6 @@ def set_distance_range(self, ------- range_dict : dict A dictionary containing the requested parameters. - """ if rmax is None and rmin is None and qmin_coord is None: return {} @@ -1995,20 +2081,22 @@ def set_distance_range(self, return range_dict - def get_distance_range(self, arg_list: str | List[str] | None = None, verbose: bool | None = None, **kwargs: Any): + def get_distance_range(self, + arg_list: str | List[str] | None = None, + verbose: bool | None = None, + **kwargs: Any + ) -> Dict[str, Any]: """ - Returns a subset of the parameter dictionary containing the current values of the distance range parameters. If the verbose option is set in the Simulation object, then it will also print the values. Parameters ---------- - arg_list: str | List[str], optional - A single string or list of strings containing the names of the features to extract. Default is all of: - ["rmin", "rmax"] - verbose: bool, optional + arg_list : str | List[str], optional + A single string or list of strings containing the names of the features to extract. Default is all of ["rmin", "rmax"] + verbose : bool,optional If passed, it will override the Simulation object's verbose flag - **kwargs + **kwargs : Any A dictionary of additional keyword argument. This allows this method to be called by the more general get_parameter method, which takes all possible Simulation parameters as arguments, so these are ignored. @@ -2016,7 +2104,6 @@ def get_distance_range(self, arg_list: str | List[str] | None = None, verbose: b ------- range_dict : dict A dictionary containing the requested parameters. - """ valid_var = {"rmin": "CHK_RMIN", @@ -2063,7 +2150,8 @@ def add_solar_system_body(self, ephemeris_id: int | List[int] | None = None, date: str | None = None, source: str = "HORIZONS", - **kwargs: Any): + **kwargs: Any + ) -> None: """ Adds a solar system body to an existing simulation Dataset from the JPL Horizons ephemeris service. The JPL Horizons service will be searched for a body matching the string passed by `name`, or alternatively `ephemeris_id` if passed. Bodies will be @@ -2090,9 +2178,10 @@ def add_solar_system_body(self, set by `set_ephemeris_date`. source : str, default "Horizons" The source of the ephemerides. - >*Note.* Currently only the JPL Horizons ephemeris is implemented, so this is ignored. - **kwargs: Any + Currently only the JPL Horizons ephemeris is implemented, so this is ignored. + **kwargs : Any Additional keyword arguments to pass to the query method (i.e. astroquery.Horizons) + Returns ------- None @@ -2187,24 +2276,27 @@ def add_solar_system_body(self, def set_ephemeris_date(self, ephemeris_date: str | None = None, verbose: bool | None = None, - **kwargs: Any): + **kwargs: Any + ) -> str: """ - + Sets the date to use when obtaining the ephemerides. + Parameters ---------- ephemeris_date : str, optional Date to use when obtaining the ephemerides. Valid options are "today", "MBCL", or date in the format YYYY-MM-DD. - verbose: bool, optional + verbose : bool, optional If passed, it will override the Simulation object's verbose flag - **kwargs + **kwargs : Any A dictionary of additional keyword argument. This allows this method to be called by the more general set_parameter method, which takes all possible Simulation parameters as arguments, so these are ignored. Returns ------- - Sets the `ephemeris_date` instance variable. - + ephemeris_date : str + The ISO-formatted date string for the ephemeris computation. + Also Sets the `ephemeris_date` instance variable. """ if ephemeris_date is None: @@ -2235,27 +2327,29 @@ def set_ephemeris_date(self, return ephemeris_date - def get_ephemeris_date(self, arg_list: str | List[str] | None = None, verbose: bool | None = None, **kwargs: Any): + def get_ephemeris_date(self, + arg_list: str | List[str] | None = None, + verbose: bool | None = None, + **kwargs: Any + ) -> str: """ - - Prints the current value of the ephemeris date + Prints the current value of the ephemeris date. Parameters ---------- - arg_list: str | List[str], optional + arg_list : str | List[str], optional A single string or list of strings containing the names of the features to extract. Default is all of: ["integrator"] - verbose: bool, optional + verbose : bool, optional If passed, it will override the Simulation object's verbose flag - **kwargs + **kwargs : Any A dictionary of additional keyword argument. This allows this method to be called by the more general get_parameter method, which takes all possible Simulation parameters as arguments, so these are ignored. Returns ------- - ephemeris_date: str + ephemeris_date : str The ISO-formatted date string for the ephemeris computation - """ try: @@ -2270,27 +2364,30 @@ def get_ephemeris_date(self, arg_list: str | List[str] | None = None, verbose: b return ephemeris_date - def _get_instance_var(self, arg_list: str | List[str], valid_arg: Dict, verbose: bool | None = None, **kwargs: Any): + def _get_instance_var(self, + arg_list: str | List[str], valid_arg: Dict, + verbose: bool | None = None, + **kwargs: Any + ) -> Tuple[Any, ...]: """ - Prints the current value of an instance variable. Parameters ---------- - arg_list: str | List[str] + arg_list : str | List[str] A single string or list of strings containing the names of the the instance variable to get. - valid_arg: dict + valid_arg : dict A dictionary where the key is the parameter argument and the value is the equivalent instance variable value. - verbose: bool, optional + verbose : bool,optional If passed, it will override the Simulation object's verbose flag - **kwargs + **kwargs : Any A dictionary of additional keyword argument. This allows this method to be called by the more general get_parameter method, which takes all possible Simulation parameters as arguments, so these are ignored. Returns ------- - Tuple of instance variable values given by the arg_list - + Tuple[Any, ...] + Instance variable values given by the arg_list """ arg_vals = [] @@ -2324,7 +2421,8 @@ def add_body(self, rot: List[float] | List[npt.NDArray[np.float_]] | npt.NDArray[np.float_] | None=None, Ip: List[float] | npt.NDArray[np.float_] | None=None, J2: float | List[float] | npt.NDArray[np.float_] | None=None, - J4: float | List[float] | npt.NDArray[np.float_] | None=None): + J4: float | List[float] | npt.NDArray[np.float_] | None=None + ) -> None: """ Adds a body (test particle or massive body) to the internal DataSet given a set up 6 vectors (orbital elements or cartesian state vectors, depending on the value of self.param). Input all angles in degress. @@ -2334,44 +2432,43 @@ def add_body(self, Parameters ---------- name : str or array-like of str, optional - Name or names of Bodies. If none passed, name will be "Body" + Name or names of Bodies. If none passed, name will be "Body" id : int or array-like of int, optional - Unique id values. If not passed, an id will be assigned in ascending order starting from the pre-existing - Dataset ids. + Unique id values. If not passed, an id will be assigned in ascending order starting from the pre-existing + Dataset ids. a : float or array-like of float, optional - semimajor axis for param['IN_FORM'] == "EL" + semimajor axis for param['IN_FORM'] == "EL" e : float or array-like of float, optional - eccentricity for param['IN_FORM'] == "EL" + eccentricity for param['IN_FORM'] == "EL" inc : float or array-like of float, optional - inclination for param['IN_FORM'] == "EL" + inclination for param['IN_FORM'] == "EL" capom : float or array-like of float, optional - longitude of ascending node for param['IN_FORM'] == "EL" + longitude of ascending node for param['IN_FORM'] == "EL" omega : float or array-like of float, optional - argument of periapsis for param['IN_FORM'] == "EL" + argument of periapsis for param['IN_FORM'] == "EL" capm : float or array-like of float, optional - mean anomaly for param['IN_FORM'] == "EL" + mean anomaly for param['IN_FORM'] == "EL" rh : (n,3) array-like of float, optional - Position vector array. + Position vector array. vh : (n,3) array-like of float, optional - Velocity vector array. + Velocity vector array. mass : float or array-like of float, optional - mass values if these are massive bodies (only one of mass or Gmass can be passed) + mass values if these are massive bodies (only one of mass or Gmass can be passed) Gmass : float or array-like of float, optional - G*mass values if these are massive bodies (only one of mass or Gmass can be passed) + G*mass values if these are massive bodies (only one of mass or Gmass can be passed) radius : float or array-like of float, optional - Radius values if these are massive bodies + Radius values if these are massive bodies rhill : float or array-like of float, optional - Hill's radius values if these are massive bodies - rot: (3) or (n,3) array-like of float, optional - Rotation rate vectors if these are massive bodies with rotation enabled. - Ip: (3) or (n,3) array-like of float, optional - Principal axes moments of inertia vectors if these are massive bodies with rotation enabled. + Hill's radius values if these are massive bodies + rot : (3) or (n,3) array-like of float, optional + Rotation rate vectors if these are massive bodies with rotation enabled. + Ip : (3) or (n,3) array-like of float, optional + Principal axes moments of inertia vectors if these are massive bodies with rotation enabled. Returns ------- - data : Xarray Dataset - Dasaset containing the body or bodies that were added - + None + Sets the data and init_cond instance variables each with an Xarray Dataset containing the body or bodies that were added """ #convert all inputs to numpy arrays @@ -2489,9 +2586,12 @@ def input_to_array_3d(val,n=None): return - def _combine_and_fix_dsnew(self,dsnew): + def _combine_and_fix_dsnew(self, + dsnew: xr.Dataset + ) -> xr.Dataset: """ Combines the new Dataset with the old one. Also computes the values of ntp and npl and sets the proper types. + Parameters ---------- dsnew : xarray Dataset @@ -2501,8 +2601,8 @@ def _combine_and_fix_dsnew(self,dsnew): ------- dsnew : xarray Dataset Updated Dataset with ntp, npl values and types fixed. - """ + if "id" not in self.data.dims: if len(np.unique(dsnew['name'])) == len(dsnew['name']): dsnew = dsnew.swap_dims({"id" : "name"}) @@ -2553,7 +2653,8 @@ def read_param(self, read_init_cond : bool | None = None, verbose: bool | None = None, dask: bool = False, - **kwargs : Any): + **kwargs : Any + ) -> bool: """ Reads in an input parameter file and stores the values in the param dictionary. @@ -2573,7 +2674,8 @@ def read_param(self, Returns ------- - True if the parameter file exists and is read correctly. False otherwise. + bool + True if the parameter file exists and is read correctly. False otherwise. """ if param_file is None: param_file = self.simdir / self.param_file @@ -2616,7 +2718,8 @@ def write_param(self, codename: Literal["Swiftest", "Swifter", "Swift"] | None = None, param_file: str | os.PathLike | None = None, param: Dict | None = None, - **kwargs: Any): + **kwargs: Any + ) -> None: """ Writes to a param.in file and determines whether the output format needs to be converted between Swift/Swifter/Swiftest. @@ -2627,9 +2730,9 @@ def write_param(self, variable codename param_file : str or path-like, optional Alternative file name of the input parameter file. Defaults to current instance variable self.param_file - param: Dict, optional + param : Dict, optional An alternative parameter dictionary to write out. Defaults to the current instance variable self.param - **kwargs + **kwargs : Any A dictionary of additional keyword argument. These are ignored. Returns @@ -2670,8 +2773,15 @@ def write_param(self, return - def convert(self, param_file, newcodename="Swiftest", plname="pl.swiftest.in", tpname="tp.swiftest.in", - cbname="cb.swiftest.in", conversion_questions={}, dask = False): + def convert(self, + param_file: str, + newcodename: str="Swiftest", + plname: str="pl.swiftest.in", + tpname: str="tp.swiftest.in", + cbname: str="cb.swiftest.in", + conversion_questions: Dict={}, + dask: bool=False + ) -> xr.Dataset: """ Converts simulation input files from one format to another (Swift, Swifter, or Swiftest). @@ -2695,7 +2805,7 @@ def convert(self, param_file, newcodename="Swiftest", plname="pl.swiftest.in", t Returns ------- oldparam : xarray dataset - The old parameter configuration. + The old parameter configuration. """ oldparam = self.param if self.codename == newcodename: @@ -2726,7 +2836,10 @@ def convert(self, param_file, newcodename="Swiftest", plname="pl.swiftest.in", t warnings.warn(f"Conversion from {self.codename} to {newcodename} is not supported.",stacklevel=2) return oldparam - def read_output_file(self,read_init_cond : bool = True, dask : bool = False): + def read_output_file(self, + read_init_cond : bool = True, + dask : bool = False + ) -> None: """ Reads in simulation data from an output file and stores it as an Xarray Dataset in the `data` instance variable. @@ -2736,9 +2849,11 @@ def read_output_file(self,read_init_cond : bool = True, dask : bool = False): Read in an initial conditions file along with the output file. Default is True dask : bool, default False Use Dask to lazily load data (useful for very large datasets) + Returns ------- - self.data : xarray dataset + None + Sets the data instance variable xarray dataset """ # Make a temporary copy of the parameter dictionary so we can supply the absolute path of the binary file @@ -2776,7 +2891,22 @@ def read_output_file(self,read_init_cond : bool = True, dask : bool = False): warnings.warn('Cannot process unknown code type. Call the read_param method with a valid code name. Valid options are "Swiftest", "Swifter", or "Swift".',stacklevel=2) return - def read_encounter_file(self, dask=False): + def read_encounter_file(self, + dask: bool=False + ) -> None: + """ + Reads in an encounter history file and stores it as an Xarray Dataset in the `encounters` instance variable. + + Parameters + ---------- + dask : bool, default False + Use Dask to lazily load data (useful for very large datasets) + + Returns + ------- + None + Sets the encounters instance variable xarray dataset + """ enc_file = self.simdir / "encounters.nc" if not os.path.exists(enc_file): return @@ -2796,7 +2926,22 @@ def read_encounter_file(self, dask=False): return - def read_collision_file(self, dask=False): + def read_collision_file(self, + dask: bool=False + ) -> None: + """ + Reads in a collision history file and stores it as an Xarray Dataset in the `collisions` instance variable. + + Parameters + ---------- + dask : bool, default False + Use Dask to lazily load data (useful for very large datasets) + + Returns + ------- + None + Sets the collisions instance variable xarray dataset + """ col_file = self.simdir / "collisions.nc" if not os.path.exists(col_file): @@ -2814,18 +2959,22 @@ def read_collision_file(self, dask=False): return - def follow(self, codestyle="Swifter", dask=False): + def follow(self, + codestyle: str="Swifter", + dask: bool=False + ) -> xr.Dataset: """ An implementation of the Swift tool_follow algorithm. Under development. Currently only for Swift simulations. Parameters ---------- - codestyle : string - Name of the desired format (Swift/Swifter/Swiftest) + codestyle : str, default "Swifter" + Name of the desired format (Swift/Swifter/Swiftest) Returns ------- - fol : xarray dataset + xarray dataset + Dataset containing the variables retrieved from the follow algorithm """ if self.data is None: self.read_output_file(dask=dask) @@ -2857,7 +3006,8 @@ def save(self, param_file: str | os.PathLike | None = None, param: Dict | None = None, framenum: int = -1, - **kwargs: Any): + **kwargs: Any + ) -> None: """ Saves an xarray dataset to a set of input files. @@ -2868,11 +3018,11 @@ def save(self, variable self.codename param_file : str or path-like, optional Alternative file name of the input parameter file. Defaults to current instance variable self.param_file - param: Dict, optional + param : Dict, optional An alternative parameter dictionary to write out. Defaults to the current instance variable self.param framenum : int Default=-1 Time frame to use to generate the initial conditions. If this argument is not passed, the default is to use the last frame in the dataset. - **kwargs + **kwargs : Any A dictionary of additional keyword argument. These are ignored. Returns @@ -2910,29 +3060,35 @@ def save(self, return - def initial_conditions_from_bin(self, framenum=-1, new_param=None, new_param_file="param.new.in", - new_initial_conditions_file="bin_in.nc", restart=False, codename="Swiftest"): + def initial_conditions_from_bin(self, + framenum: int=-1, + new_param: os.PathLike=None, + new_param_file: os.PathLike="param.new.in", + new_initial_conditions_file: os.PathLike="bin_in.nc", + restart: bool=False, + codename: str="Swiftest" + ) -> xr.Dataset: """ Generates a set of input files from a old output file. Parameters ---------- - framenum : integer (default=-1) - Time frame to use to generate the initial conditions. If this argument is not passed, the default is to use the last frame in the dataset. - new_param : string - File to copy parameters from. Default is the old parameter file. - new_param_file : string - Name of the new parameter file. - new_initial_conditions_file : string - Name of the new NetCDF file containing the new initial conditions. - restart : True or False - If True, overwrite the old output file. If False, generate a new output file. - codename : string - Name of the desired format (Swift/Swifter/Swiftest) + framenum : int (default=-1) + Time frame to use to generate the initial conditions. If this argument is not passed, the default is to use the last frame in the dataset. + new_param : PathLike, optional + File to copy parameters from. Default is the old parameter file. + new_param_file : PathLike, default "param.new.in" + Name of the new parameter file. + new_initial_conditions_file : PathLike, default "bin_in.nc" + Name of the new NetCDF file containing the new initial conditions. + restart : bool, default False + If True, overwrite the old output file. If False, generate a new output file. + codename : str, default "Swiftest" + Name of the desired format (Swift/Swifter/Swiftest) Returns ------- - frame : NetCDF dataset + xarray dataset A dataset containing the extracted initial condition data. """ @@ -2978,6 +3134,14 @@ def initial_conditions_from_bin(self, framenum=-1, new_param=None, new_param_fil def clean(self): """ Cleans up simulation directory by deleting old files (dump, logs, and output files). + + Parameters + ---------- + None + + Returns + ------- + None """ old_files = [self.simdir / self.param['BIN_OUT'], self.simdir / "fraggle.log", diff --git a/swiftest/tool.py b/swiftest/tool.py index e81194d37..083945dd3 100644 --- a/swiftest/tool.py +++ b/swiftest/tool.py @@ -1,25 +1,33 @@ """ - Copyright 2022 - 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. +Copyright 2022 - 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. """ import numpy as np import xarray as xr -""" -Functions that recreate the Swift/Swifter tool programs -""" def magnitude(ds,x): + """ + Computes the magnitude of a vector quantity from a Dataset. + + Parameters + ---------- + ds : Xarray Dataset + Dataset containing the vector quantity + x : str + Name of the vector quantity variable in the Dataset, which must have a "space" dimension (x,y,z coordinates) + """ dim = "space" ord = None return xr.apply_ufunc( np.linalg.norm, ds[x].where(~np.isnan(ds[x])), input_core_dims=[[dim]], kwargs={"ord": ord, "axis": -1}, dask="allowed" ) + def wrap_angle(angle): """ @@ -40,22 +48,28 @@ def wrap_angle(angle): angle[angle < 0.0] += 360.0 return angle + def follow_swift(ds, ifol=None, nskp=None): """ Emulates the Swift version of tool_follow.f - - + It will generate a file called follow.out containing 10 columns (angles are all in degrees):: + + 1 2 3 4 5 6 7 8 9 10 + t,a,e,inc,capom,omega,capm,peri,apo,obar + Parameters ---------- - ds : Dataset containing orbital elements + ds : Xarray Dataset + Dataset containing orbital elements + ifol : int, optional + Particle number to follow. The default is None, in which case the user is prompted to enter a particle number. + nskp : int, optional + Print frequency. The default is None, in which case the user is prompted to enter a print frequency. Returns ------- - fol : Dataset containing only the followed body with angles converted to degrees - - Generates a file called follow.out containing 10 columns (angles are all in degrees): - 1 2 3 4 5 6 7 8 9 10 - t,a,e,inc,capom,omega,capm,peri,apo,obar + fol : Xarray Dataset + Dataset containing only the followed body with angles converted to degrees """ fol = None @@ -105,9 +119,10 @@ def follow_swift(ds, ifol=None, nskp=None): return fol + def danby(M, ecc, accuracy=1e-14): """ - Danby's method to solve Kepler's equation. + Danby's method to solve Kepler's equation. See [1]_ and [2]_ for details. Parameters ---------- @@ -125,14 +140,25 @@ def danby(M, ecc, accuracy=1e-14): References __________ - Danby, J.M.A. 1988. Fundamentals of celestial mechanics. Richmond, Va., U.S.A., Willmann-Bell, 1988. 2nd ed. - Murray, C.D., Dermott, S.F., 1999. Solar system dynamics, New York, New York. ed, Cambridge University Press. + .. [1] Danby, J.M.A. 1988. Fundamentals of celestial mechanics. Richmond, Va., U.S.A., Willmann-Bell, 1988. 2nd ed. + .. [2] Murray, C.D., Dermott, S.F., 1999. Solar system dynamics, New York, New York. ed, Cambridge University Press. """ def kepler_root(E, ecc, M, deriv): """ - The Kepler equation root function. + The Kepler equation root function. The returned value depends on the value of `deriv`, where:: + + deriv = 0 : + E - e * np.sin(E) - M + deriv = 1 : + 1 - e * np.cos(E) + deriv = 2 : + e * np.sin(E) + deriv = 3 : + e * np.cos(E) + + The function will return 0 when E is correct for a given e and M Parameters ---------- @@ -147,12 +173,8 @@ def kepler_root(E, ecc, M, deriv): Returns ---------- - deriv = 0: E - e * np.sin(E) - M - deriv = 1: 1 - e * np.cos(E) - deriv = 2: e * np.sin(E) - deriv = 3: e * np.cos(E) - - Note: The function will return 0 when E is correct for a given e and M + float + The value of the Kepler equation root function """ if deriv == 0: @@ -184,8 +206,8 @@ def delta_ij(E, ecc, M, j): Returns ---------- - delta_ij value used in Danby's iterative Kepler equation solver - + float: + delta_ij value used in Danby's iterative Kepler equation solver """ if j == 1: return -kepler_root(E, ecc, M, 0) / kepler_root(E, ecc, M, 1) @@ -217,16 +239,14 @@ def delta_ij(E, ecc, M, j): raise RuntimeError("The danby function did not converge on a solution.") - def el2xv_one(mu, a, ecc, inc, Omega, omega, M): """ - Compute osculating orbital elements from relative Cartesian position and velocity + Compute osculating orbital elements from relative Cartesian position and velocity. All angular measures are returned in radians - If inclination < TINY, longitude of the ascending node is arbitrarily set to 0 + If inclination < TINY, longitude of the ascending node is arbitrarily set to 0 + If eccentricity < sqrt(TINY), argument of pericenter is arbitrarily set to 0 - If eccentricity < sqrt(TINY), argument of pericenter is arbitrarily set to 0 - - ALGORITHM: See Fitzpatrick "Principles of Cel. Mech." + ALGORITHM - See Fitzpatrick "Principles of Cel. Mech." Adapted from Martin Duncan's el2xv.f @@ -249,13 +269,10 @@ def el2xv_one(mu, a, ecc, inc, Omega, omega, M): Returns ---------- - rvec, vvec : tuple of float vectors - rvec : (3) float vector Cartesian position vector vvec : (3) float vector Cartesian velocity vector - """ if ecc < 0.0: @@ -282,12 +299,15 @@ def scget(angle): Parameters ---------- - angle : input angle + angle : float + input angle in radians Returns ------- - sx : sin of angle - cx : cos of angle + sx : float + sin of angle + cx : float + cos of angle """ TWOPI = 2 * np.pi @@ -343,8 +363,8 @@ def scget(angle): def el2xv_vec(mu, a, ecc, inc, Omega, omega, M): """ - Vectorized call to el2xv_one + Parameters ---------- mu : float @@ -364,9 +384,7 @@ def el2xv_vec(mu, a, ecc, inc, Omega, omega, M): Returns ---------- - rvec, vvec : tuple of float vectors - - rvec : (n,3) float rray + rvec : (n,3) float array Cartesian position vector vvec : (n,3) float array Cartesian velocity vector @@ -374,6 +392,7 @@ def el2xv_vec(mu, a, ecc, inc, Omega, omega, M): vecfunc = np.vectorize(el2xv_one, signature='(),(),(),(),(),(),()->(3),(3)') return vecfunc(mu, a, ecc, inc, Omega, omega, M) + def xv2el_one(mu,rvec,vvec): """ Converts from cartesian position and velocity values to orbital elements @@ -389,8 +408,6 @@ def xv2el_one(mu,rvec,vvec): Returns ---------- - a, ecc, inc, Omega, omega, M, varpi, f, lam : tuple of floats - a : float semimajor axis ecc : float @@ -409,7 +426,6 @@ def xv2el_one(mu,rvec,vvec): true anomaly (degrees) lam : float mean longitude (degrees) - """ rmag = np.linalg.norm(rvec) @@ -454,6 +470,7 @@ def xv2el_one(mu,rvec,vvec): return a, ecc, np.rad2deg(inc), np.rad2deg(Omega), np.rad2deg(omega), np.rad2deg(M), np.rad2deg(varpi), np.rad2deg(f), np.rad2deg(lam) + def xv2el_vec(mu, rvec, vvec): """ Vectorized call to xv2el_one. @@ -469,8 +486,6 @@ def xv2el_vec(mu, rvec, vvec): Returns ---------- - a, ecc, inc, Omega, omega, M, varpi, f, lam : tuple of float arrays - a : (n) float array semimajor axis ecc : (n) float array @@ -489,7 +504,6 @@ def xv2el_vec(mu, rvec, vvec): true anomaly (degrees) lam : (n) float array mean longitude (degrees) - """ vecfunc = np.vectorize(xv2el_one, signature='(),(3),(3)->(),(),(),(),(),(),(),(),()') diff --git a/swiftest/visualize.py b/swiftest/visualize.py index bf095fc2f..de6bed342 100644 --- a/swiftest/visualize.py +++ b/swiftest/visualize.py @@ -1,12 +1,12 @@ """ - Copyright 2023 - David Minton, - 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. +Copyright 2023 - David Minton, +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. """ import matplotlib.pyplot as plt import numpy as np diff --git a/version.txt b/version.txt index aa240b72d..5f73c59e9 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -2023.12.0 \ No newline at end of file +2023.12.1 \ No newline at end of file