From 8c7885d168bff1d0e62cc3ebecc699f5fc369405 Mon Sep 17 00:00:00 2001 From: Aldana Grichener Date: Fri, 4 Sep 2026 18:07:46 -0700 Subject: [PATCH 01/10] CBD module CBD module --- .../preprocessing/compasConfigDefault.yaml | 22 +- .../pages/Getting started/getting-started.rst | 358 +- ...-specifications-BSE-circumbinary-disks.rst | 20 + ...logfiles-default-record-specifications.rst | 69 +- ...d-logfiles-record-specification-binary.rst | 137 + ...-logfiles-record-specification-options.rst | 4433 +++++++------- ...standard-logfiles-record-specification.rst | 273 +- ...es-record-types-bse-circumbinary-disks.rst | 7 + .../standard-logfiles-record-types.rst | 137 +- .../COMPAS output/standard-logfiles.rst | 122 +- .../program-options-list-defaults.rst | 76 +- online-docs/whats-new.rst | 551 ++ src/BaseBinaryStar.cpp | 688 ++- src/BaseBinaryStar.h | 70 + src/CircumbinaryDisk.h | 160 + src/CircumbinaryDiskEvolutionSpindler.cpp | 815 +++ src/CircumbinaryDiskEvolutionUnavailable.cpp | 24 + src/CircumbinaryDiskFormation.cpp | 224 + src/Log.cpp | 18 + src/Log.h | 6 + src/LogTypedefs.h | 5342 +++++++++-------- src/Makefile | 61 +- src/Options.cpp | 148 + src/Options.h | 57 +- src/changelog.h | 22 +- src/typedefs.h | 34 + src/yaml.h | 20 + 27 files changed, 8671 insertions(+), 5223 deletions(-) create mode 100644 online-docs/pages/User guide/COMPAS output/standard-logfiles-default-record-specifications-BSE-circumbinary-disks.rst create mode 100644 online-docs/pages/User guide/COMPAS output/standard-logfiles-record-types-bse-circumbinary-disks.rst create mode 100644 online-docs/whats-new.rst create mode 100644 src/CircumbinaryDisk.h create mode 100644 src/CircumbinaryDiskEvolutionSpindler.cpp create mode 100644 src/CircumbinaryDiskEvolutionUnavailable.cpp create mode 100644 src/CircumbinaryDiskFormation.cpp diff --git a/compas_python_utils/preprocessing/compasConfigDefault.yaml b/compas_python_utils/preprocessing/compasConfigDefault.yaml index f01e21860..855676dc5 100644 --- a/compas_python_utils/preprocessing/compasConfigDefault.yaml +++ b/compas_python_utils/preprocessing/compasConfigDefault.yaml @@ -1,5 +1,5 @@ ##~!!~## COMPAS option values -##~!!~## File Created Mon Feb 2 10:03:24 2026 by COMPAS v03.29.00 +##~!!~## File Created Tue Jul 7 13:45:05 2026 by COMPAS v03.29.04 ##~!!~## ##~!!~## The default COMPAS YAML file (``compasConfigDefault.yaml``), as distributed, has ##~!!~## all COMPAS option entries commented so that the COMPAS default value for the @@ -53,6 +53,10 @@ booleanChoices: # --common-envelope-lambda-nanjing-use-rejuvenated-mass: False # Default: False # --revised-energy-formalism-nandez-ivanova: False # Default: False + ### CIRCUMBINARY DISK +# --circumbinary-disk: False # Default: False +# --circumbinary-disk-use-synchronized-envelope-angular-momentum: False # Default: False + ### SUPERNOVAE, KICKS AND REMNANTS # --allow-non-stripped-ECSN: False # Default: False # --pair-instability-supernovae: True # Default: True @@ -169,6 +173,17 @@ numericalChoices: # --common-envelope-second-stage-beta: 0.000000 # Default: 0.000000 # --common-envelope-slope-kruckow: -0.833333 # Default: -0.833333 # --maximum-mass-donor-nandez-ivanova: 2.000000 # Default: 2.000000 +# --post-common-envelope-eccentricity-cap: 0.100000 # Default: 0.100000 +# --post-common-envelope-eccentricity-fraction: 0.100000 # Default: 0.100000 + + ### CIRCUMBINARY DISK +# --circumbinary-disk-beta: 3.000000 # Default: 3.000000 +# --circumbinary-disk-eddington-cap-factor: 1.000000 # Default: 1.000000 +# --circumbinary-disk-eddington-ge23-factor: 0.666667 # Default: 0.666667 +# --circumbinary-disk-envelope-mass-fraction-supplied: 0.050000 # Default: 0.050000 +# --circumbinary-disk-inner-radius-over-separation: 2.500000 # Default: 2.500000 +# --circumbinary-disk-lifetime: 100000.00 # Default: 100000.00 +# --circumbinary-disk-structure-factor: 4.000000 # Default: 4.000000 ### SUPERNOVAE, KICKS AND REMNANTS # --eddington-accretion-factor: 1.000000 # Default: 1.000000 # multiplication Factor for eddington accretion onto NS&BH @@ -275,6 +290,11 @@ stringChoices: # --common-envelope-lambda-prescription: 'LAMBDA_NANJING' # Default: 'LAMBDA_NANJING' # Options: ['LAMBDA_DEWI','LAMBDA_KRUCKOW','LAMBDA_NANJING','LAMBDA_LOVERIDGE','LAMBDA_FIXED'] # Xu & Li 2010 # --common-envelope-mass-accretion-prescription: 'ZERO' # Default: 'ZERO' # Options: ['CHEVALIER','MACLEOD','UNIFORM','CONSTANT','ZERO'] # --common-envelope-second-stage-gamma-prescription: 'ISOTROPIC' # Default: 'ISOTROPIC' # Options: ['ARBITRARY','KLENCKI_LINEAR','MACLEOD_LINEAR','CIRCUMBINARY','ISOTROPIC','JEANS'] +# --post-common-envelope-eccentricity-prescription: 'CIRCULAR' # Default: 'CIRCULAR' # Options: ['PRE_RLOF_FRACTION','PRE_RLOF_CAP','CIRCULAR'] + + ### CIRCUMBINARY DISK +# --circumbinary-disk-eddington-mode: 'GE23' # Default: 'GE23' # Options: ['TM23','GE23','CAP'] +# --circumbinary-disk-evolution-mode: 'INSTANTANEOUS' # Default: 'INSTANTANEOUS' # Options: ['TIMESTEPPED','INSTANTANEOUS'] ### TIDES # --tides-prescription: 'NONE' # Default: 'NONE' # Options: ['ZAHN1977','KAPIL2026','PERFECT','NONE'] diff --git a/online-docs/pages/Getting started/getting-started.rst b/online-docs/pages/Getting started/getting-started.rst index f2cc6de8f..59a9ab673 100644 --- a/online-docs/pages/Getting started/getting-started.rst +++ b/online-docs/pages/Getting started/getting-started.rst @@ -1,173 +1,173 @@ -Getting started -=============== - -To start using COMPAS, `git clone` the code, install dependencies and build COMPAS: - -:: - - git clone https://github.com/TeamCOMPAS/COMPAS - - -Install dependencies --------------------- - -COMPAS requires a ``C++`` compiler, and the ``gsl``, ``boost``, and ``hdf5`` libraries. ``Python`` is required for the COMPAS post-processing tools. - - -.. tabs:: - - .. tab:: Linux - - For Ubuntu, type:: - - sudo apt-get install g++ libboost-all-dev libgsl-dev libhdf5-serial-dev - - For Fedora:: - - sudo dnf install gcc boost-devel gsl gsl-devel hdf5-devel - - For RHEL or CentOS:: - - sudo yum install gcc boost-devel gsl gsl-devel hdf5-devel - - - .. tab:: MacOS - - It is strongly recommended to update to the latest version of macOS through the App Store. You can find what macOS version you are - using by clicking on the Apple symbol on the top left of your screen and clicking "About This Mac". - - The next step is to install or update Xcode. You can find it directly in the App Store or at `Xcode `__\ . - Note: Xcode installation requires around 20 GB of disk space. If you are low on disk space, you may consider installing a ``C++`` - compiler directly. - - Once Xcode is installed, open a Terminal, and execute the following command to install the required command line developer tools:: - - xcode-select --install - - Next, you need to install several extra libraries and python modules. Popular ways of installing them are via package managers MacPorts and Homebrew. - We give instructions for installing ``gsl``, ``boost``, and ``hdf5`` with Homebrew. To install Homebrew, run:: - - /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - - If the installation was successful, the following should run without error:: - - brew --version - - Now install ``gsl``, ``boost``, and ``hdf5`` using Homebrew by running:: - - brew install gsl - brew install boost - brew install hdf5 - - -Building COMPAS ---------------- - -We first need to define an environment variable for the root directory of COMPAS in your shell start-up file for COMPAS to run properly. For example, -if you use bash as your shell, open `~/.bashrc` with a text editor and put in the following:: - - export COMPAS_ROOT_DIR=~/codes/COMPAS - -where `~/codes` should be replaced with the path to the directory where you cloned the COMPAS repository. For this to take effect, either restart your -bash session or run:: - - source ~/.bashrc - -If your shell is ``zsh`` (which is the default of macOS 10.15), set the environment variable as above in `~/.zshrc` instead of `~/.bashrc`. If your shell -is ``csh``, set the environment variable in `~/.cshrc` using:: - - setenv COMPAS_ROOT_DIR ~/codes/COMPAS - -Tip: you can check whether you have correctly defined the environment variable and whether its been active by typing into your terminal the command:: - - ECHO $COMPAS_ROOT_DIR - -This should return the directory location of the COMPAS folder (i.e. "~/codes/COMPAS"). - - - -Now go to the COMPAS source code directory:: - - cd $COMPAS_ROOT_DIR/src - -In this directory you will find the file ``Makefile``, which includes the following text to inform the compiler of the location of header files, and -the linker of the location of library files, for each of the dependencies ``gsl``, ``boost``, and ``hdf5``: - -:: - - # gsl directories - GSLINCDIR := /include - GSLLIBDIR := /lib - - # boost directories - BOOSTINCDIR := /include - BOOSTLIBDIR := /lib - - # hdf5 directories - HDF5INCDIR := /usr/include/hdf5/serial - HDF5LIBDIR := /usr/lib/x86_64-linux-gnu/hdf5/serial - -The locations given in ``Makefile`` may not match the locations of the files on your system. - - -If you installed the packages with Homebrew, the package files are likely to be found in /usr/local/opt (in directories gsl, boost, and hdf5 respectively), -but if they are not found there you will need to use Homebrew, or some other method, to locate the files. e.g. for ``boost`` using Homebrew:: - - brew info boost - boost: stable 1.72.0 (bottled), HEAD - Collection of portable C++ source libraries - https://www.boost.org/ - /usr/local/Cellar/boost/1.72.0 (14,466 files, 648.5MB) * - ... - -Note the path, which in this case is `/usr/local/Cellar/boost/1.72.0` - you will use it when you build the COMPAS executable. Repeat this for ``gsl`` and -``hdf5``, ensuring you locate the paths to the header files and library files. - -Assuming here that the locations of the header and library files in ``Makefile`` for ``gsl`` and ``hdf5`` are correct for your system, but the locations for -``boost`` are not, build the COMPAS executable (compile and link) by typing:: - - make -f Makefile BOOSTINCDIR=/usr/local/Cellar/boost/1.72.0/include BOOSTLIBDIR=/usr/local/Cellar/boost/1.72.0/lib - -The build process will run much faster if multiple processors/cores are available. To build the COMPAS executable using (e.g.) 4 cores, type:: - - make -j 4 -f Makefile BOOSTINCDIR=/usr/local/Cellar/boost/1.72.0/include BOOSTLIBDIR=/usr/local/Cellar/boost/1.72.0/lib - -Note that both ``make`` commands shown above will conduct incremental builds: they will only compile source files that have changed. To ensure a clean build -in which all source files are compiled, type:: - - make clean - make -j 4 -f Makefile BOOSTINCDIR=/usr/local/Cellar/boost/1.72.0/include BOOSTLIBDIR=/usr/local/Cellar/boost/1.72.0/lib - -The `clean` option instructs ``make`` to remove all existing object files (.o), and the COMPAS executable. A subsequent ``make`` is then forced to compile -all source files and link the resultant object files (and external libraries) into a new executable. - -Note that rather than type the ``make`` command each time you want to build COMPAS, you could create a file containing the ``make`` command, and execute that -file to build COMPAS. - -Once built, the executable can be tested with, e.g.:: - - ./COMPAS -v - -which will display the code version. - -See :doc:`../Developer guide/Developer build/COMPAS-local-build` for a detailed description of ``Makefile`` functionality. - - -:bolditalictext:`A note for Mac users:` - -If you are using MacOS and running into linking issues with the boost libraries, try:: - - make clean - make CPP=clang++ -j$(sysctl -n hw.ncpu) - -In some Mac installations, the GNU C++ compiler is not installed how we might expect, so trying to compile and link with ``clang++`` might help. - - +Getting started +=============== + +To start using COMPAS, `git clone` the code, install dependencies and build COMPAS: + +:: + + git clone https://github.com/TeamCOMPAS/COMPAS + + +Install dependencies +-------------------- + +COMPAS requires a ``C++`` compiler, and the ``gsl``, ``boost``, and ``hdf5`` libraries. ``Python`` is required for the COMPAS post-processing tools. Use of the circumbinary disk module requires installing `spindler-c `_. + + +.. tabs:: + + .. tab:: Linux + + For Ubuntu, type:: + + sudo apt-get install g++ libboost-all-dev libgsl-dev libhdf5-serial-dev + + For Fedora:: + + sudo dnf install gcc boost-devel gsl gsl-devel hdf5-devel + + For RHEL or CentOS:: + + sudo yum install gcc boost-devel gsl gsl-devel hdf5-devel + + + .. tab:: MacOS + + It is strongly recommended to update to the latest version of macOS through the App Store. You can find what macOS version you are + using by clicking on the Apple symbol on the top left of your screen and clicking "About This Mac". + + The next step is to install or update Xcode. You can find it directly in the App Store or at `Xcode `__\ . + Note: Xcode installation requires around 20 GB of disk space. If you are low on disk space, you may consider installing a ``C++`` + compiler directly. + + Once Xcode is installed, open a Terminal, and execute the following command to install the required command line developer tools:: + + xcode-select --install + + Next, you need to install several extra libraries and python modules. Popular ways of installing them are via package managers MacPorts and Homebrew. + We give instructions for installing ``gsl``, ``boost``, and ``hdf5`` with Homebrew. To install Homebrew, run:: + + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + + If the installation was successful, the following should run without error:: + + brew --version + + Now install ``gsl``, ``boost``, and ``hdf5`` using Homebrew by running:: + + brew install gsl + brew install boost + brew install hdf5 + + +Building COMPAS +--------------- + +We first need to define an environment variable for the root directory of COMPAS in your shell start-up file for COMPAS to run properly. For example, +if you use bash as your shell, open `~/.bashrc` with a text editor and put in the following:: + + export COMPAS_ROOT_DIR=~/codes/COMPAS + +where `~/codes` should be replaced with the path to the directory where you cloned the COMPAS repository. For this to take effect, either restart your +bash session or run:: + + source ~/.bashrc + +If your shell is ``zsh`` (which is the default of macOS 10.15), set the environment variable as above in `~/.zshrc` instead of `~/.bashrc`. If your shell +is ``csh``, set the environment variable in `~/.cshrc` using:: + + setenv COMPAS_ROOT_DIR ~/codes/COMPAS + +Tip: you can check whether you have correctly defined the environment variable and whether its been active by typing into your terminal the command:: + + ECHO $COMPAS_ROOT_DIR + +This should return the directory location of the COMPAS folder (i.e. "~/codes/COMPAS"). + + + +Now go to the COMPAS source code directory:: + + cd $COMPAS_ROOT_DIR/src + +In this directory you will find the file ``Makefile``, which includes the following text to inform the compiler of the location of header files, and +the linker of the location of library files, for each of the dependencies ``gsl``, ``boost``, and ``hdf5``: + +:: + + # gsl directories + GSLINCDIR := /include + GSLLIBDIR := /lib + + # boost directories + BOOSTINCDIR := /include + BOOSTLIBDIR := /lib + + # hdf5 directories + HDF5INCDIR := /usr/include/hdf5/serial + HDF5LIBDIR := /usr/lib/x86_64-linux-gnu/hdf5/serial + +The locations given in ``Makefile`` may not match the locations of the files on your system. + + +If you installed the packages with Homebrew, the package files are likely to be found in /usr/local/opt (in directories gsl, boost, and hdf5 respectively), +but if they are not found there you will need to use Homebrew, or some other method, to locate the files. e.g. for ``boost`` using Homebrew:: + + brew info boost + boost: stable 1.72.0 (bottled), HEAD + Collection of portable C++ source libraries + https://www.boost.org/ + /usr/local/Cellar/boost/1.72.0 (14,466 files, 648.5MB) * + ... + +Note the path, which in this case is `/usr/local/Cellar/boost/1.72.0` - you will use it when you build the COMPAS executable. Repeat this for ``gsl`` and +``hdf5``, ensuring you locate the paths to the header files and library files. + +Assuming here that the locations of the header and library files in ``Makefile`` for ``gsl`` and ``hdf5`` are correct for your system, but the locations for +``boost`` are not, build the COMPAS executable (compile and link) by typing:: + + make -f Makefile BOOSTINCDIR=/usr/local/Cellar/boost/1.72.0/include BOOSTLIBDIR=/usr/local/Cellar/boost/1.72.0/lib + +The build process will run much faster if multiple processors/cores are available. To build the COMPAS executable using (e.g.) 4 cores, type:: + + make -j 4 -f Makefile BOOSTINCDIR=/usr/local/Cellar/boost/1.72.0/include BOOSTLIBDIR=/usr/local/Cellar/boost/1.72.0/lib + +Note that both ``make`` commands shown above will conduct incremental builds: they will only compile source files that have changed. To ensure a clean build +in which all source files are compiled, type:: + + make clean + make -j 4 -f Makefile BOOSTINCDIR=/usr/local/Cellar/boost/1.72.0/include BOOSTLIBDIR=/usr/local/Cellar/boost/1.72.0/lib + +The `clean` option instructs ``make`` to remove all existing object files (.o), and the COMPAS executable. A subsequent ``make`` is then forced to compile +all source files and link the resultant object files (and external libraries) into a new executable. + +Note that rather than type the ``make`` command each time you want to build COMPAS, you could create a file containing the ``make`` command, and execute that +file to build COMPAS. + +Once built, the executable can be tested with, e.g.:: + + ./COMPAS -v + +which will display the code version. + +See :doc:`../Developer guide/Developer build/COMPAS-local-build` for a detailed description of ``Makefile`` functionality. + + +:bolditalictext:`A note for Mac users:` + +If you are using MacOS and running into linking issues with the boost libraries, try:: + + make clean + make CPP=clang++ -j$(sysctl -n hw.ncpu) + +In some Mac installations, the GNU C++ compiler is not installed how we might expect, so trying to compile and link with ``clang++`` might help. + + Installing python utilities --------------------------- You can use pip to install the `compas_python_utils` - + :: pip install . @@ -182,16 +182,16 @@ executable and the commonly used Python analysis dependencies. Use `-e .[dev]` to install in development mode (i.e. editable mode) and include the development dependencies. - -:: - - pip install -e .[dev] - - - -Next steps ----------- -Once you have completed the steps shown above, you're ready to run COMPAS. The :doc:`COMPAS User Guide <../User guide/user-guide>` -explains in detail how to run COMPAS, but to check that COMPAS is installed correctly, and to get a taste of what running COMPAS looks -like, you could try the :doc:`COMPAS Tutorial <../User guide/Running COMPAS/running-compas>`. - + +:: + + pip install -e .[dev] + + + +Next steps +---------- +Once you have completed the steps shown above, you're ready to run COMPAS. The :doc:`COMPAS User Guide <../User guide/user-guide>` +explains in detail how to run COMPAS, but to check that COMPAS is installed correctly, and to get a taste of what running COMPAS looks +like, you could try the :doc:`COMPAS Tutorial <../User guide/Running COMPAS/running-compas>`. + diff --git a/online-docs/pages/User guide/COMPAS output/standard-logfiles-default-record-specifications-BSE-circumbinary-disks.rst b/online-docs/pages/User guide/COMPAS output/standard-logfiles-default-record-specifications-BSE-circumbinary-disks.rst new file mode 100644 index 000000000..63df8e910 --- /dev/null +++ b/online-docs/pages/User guide/COMPAS output/standard-logfiles-default-record-specifications-BSE-circumbinary-disks.rst @@ -0,0 +1,20 @@ +BSE circumbinary disks +====================== + +Default record definition for the BSE Circumbinary Disks log file:: + + const ANY_PROPERTY_VECTOR BSE_CIRCUMBINARY_DISKS_REC = { + BINARY_PROPERTY::RANDOM_SEED, + BINARY_PROPERTY::TIME, + BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_SUPPLIED, + BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_1, + BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_2, + BINARY_PROPERTY::CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_PRE, + BINARY_PROPERTY::CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_POST, + BINARY_PROPERTY::CIRCUMBINARY_DISK_ECCENTRICITY_PRE, + BINARY_PROPERTY::CIRCUMBINARY_DISK_ECCENTRICITY_POST, + STAR_1_PROPERTY::MASS, + STAR_1_PROPERTY::STELLAR_TYPE, + STAR_2_PROPERTY::MASS, + STAR_2_PROPERTY::STELLAR_TYPE + }; \ No newline at end of file diff --git a/online-docs/pages/User guide/COMPAS output/standard-logfiles-default-record-specifications.rst b/online-docs/pages/User guide/COMPAS output/standard-logfiles-default-record-specifications.rst index 786733766..ab1975569 100644 --- a/online-docs/pages/User guide/COMPAS output/standard-logfiles-default-record-specifications.rst +++ b/online-docs/pages/User guide/COMPAS output/standard-logfiles-default-record-specifications.rst @@ -1,34 +1,35 @@ -Default log file record specifications -====================================== - -Following are the default log file record specifications for each of the standard log files. These specifications -can be overridden by the use of a log file specifications file via the ``logfile-definitions`` program option. - -For Single Star Evolution (SSE): - -.. toctree:: - :maxdepth: 1 - - standard-logfiles-default-record-specifications-SSE-system-snapshot - standard-logfiles-default-record-specifications-SSE-sysparms - standard-logfiles-default-record-specifications-SSE-detailed-output - standard-logfiles-default-record-specifications-SSE-supernovae - standard-logfiles-default-record-specifications-SSE-pulsars - standard-logfiles-default-record-specifications-SSE-switchlog - -For Binary Star Evolution (BSE): - -.. toctree:: - :maxdepth: 1 - - standard-logfiles-default-record-specifications-BSE-system-snapshot - standard-logfiles-default-record-specifications-BSE-sysparms - standard-logfiles-default-record-specifications-BSE-detailed-output - standard-logfiles-default-record-specifications-BSE-supernovae - standard-logfiles-default-record-specifications-BSE-dco - standard-logfiles-default-record-specifications-BSE-ce - standard-logfiles-default-record-specifications-BSE-pulsars - standard-logfiles-default-record-specifications-BSE-rlof - standard-logfiles-default-record-specifications-BSE-switchlog - - +Default log file record specifications +====================================== + +Following are the default log file record specifications for each of the standard log files. These specifications +can be overridden by the use of a log file specifications file via the ``logfile-definitions`` program option. + +For Single Star Evolution (SSE): + +.. toctree:: + :maxdepth: 1 + + standard-logfiles-default-record-specifications-SSE-system-snapshot + standard-logfiles-default-record-specifications-SSE-sysparms + standard-logfiles-default-record-specifications-SSE-detailed-output + standard-logfiles-default-record-specifications-SSE-supernovae + standard-logfiles-default-record-specifications-SSE-pulsars + standard-logfiles-default-record-specifications-SSE-switchlog + +For Binary Star Evolution (BSE): + +.. toctree:: + :maxdepth: 1 + + standard-logfiles-default-record-specifications-BSE-system-snapshot + standard-logfiles-default-record-specifications-BSE-sysparms + standard-logfiles-default-record-specifications-BSE-detailed-output + standard-logfiles-default-record-specifications-BSE-supernovae + standard-logfiles-default-record-specifications-BSE-dco + standard-logfiles-default-record-specifications-BSE-ce + standard-logfiles-default-record-specifications-BSE-circumbinary-disks + standard-logfiles-default-record-specifications-BSE-pulsars + standard-logfiles-default-record-specifications-BSE-rlof + standard-logfiles-default-record-specifications-BSE-switchlog + + diff --git a/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-binary.rst b/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-binary.rst index bd7cf724a..cb815ca45 100644 --- a/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-binary.rst +++ b/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-binary.rst @@ -49,6 +49,143 @@ Binary Properties * - Header String: - Tau_Circ + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_FORMED** + - + * - Data type: + - BOOL + * - COMPAS variable: + - BaseBinaryStar::m_CircumbinaryDiskDetails.formed + * - Description: + - Flag to indicate if a post-common-envelope circumbinary disk formed and was evolved. + * - Header String: + - CBD + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_MASS_SUPPLIED** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - BaseBinaryStar::m_CircumbinaryDiskDetails.massSupplied + * - Description: + - Mass supplied to the binary through the circumbinary disk (\ :math:`M_\odot`). + * - Header String: + - CBD_Mass_Supplied + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_MASS_RETAINED_1** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - BaseBinaryStar::m_CircumbinaryDiskDetails.massRetained1 + * - Description: + - Mass retained by star 1 during circumbinary disk accretion (\ :math:`M_\odot`). + * - Header String: + - CBD_Mass_Retained(1) + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_MASS_RETAINED_2** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - BaseBinaryStar::m_CircumbinaryDiskDetails.massRetained2 + * - Description: + - Mass retained by star 2 during circumbinary disk accretion (\ :math:`M_\odot`). + * - Header String: + - CBD_Mass_Retained(2) + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_PRE** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - BaseBinaryStar::m_CircumbinaryDiskDetails.semiMajorAxisPre + * - Description: + - Semi-major axis before circumbinary disk evolution (\ :math:`R_\odot`). + * - Header String: + - SemiMajorAxisCBD + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_ECCENTRICITY_PRE** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - BaseBinaryStar::m_CircumbinaryDiskDetails.eccentricityPre + * - Description: + - Eccentricity before circumbinary disk evolution. + * - Header String: + - EccentricityCBD + + .. flat-table:: :widths: 25 75 1 1 :header-rows: 0 diff --git a/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-options.rst b/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-options.rst index cdb25945a..936122092 100644 --- a/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-options.rst +++ b/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-options.rst @@ -1,2098 +1,2335 @@ -Program option properties -========================= - -When specifying known properties in a log file record specification record, the property name must be prefixed with -the property type. Currently there is a single binary property type available for use: PROGRAM_OPTION. - -For example, to specify the program option property ``RANDOM_SEED``, use:: - - PROGRAM OPTION::RANDOM_SEED - - -.. _spec-options-props-top: - -Following is an alphabetical list of program option properties available for inclusion in log file record specifiers. - -**Jump to** -:ref:`A ` :ref:`B ` :ref:`C ` :ref:`D ` -:ref:`E ` :ref:`F ` :ref:`G ` :ref:`H ` -:ref:`I ` :ref:`J ` :ref:`K ` :ref:`L ` -:ref:`M ` :ref:`N ` :ref:`O ` :ref:`P ` -:ref:`Q ` :ref:`R ` :ref:`S ` :ref:`T ` -:ref:`U ` :ref:`V ` :ref:`W ` :ref:`X ` -:ref:`Y ` :ref:`Z ` - -.. _spec-options-props-A: - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ADD_OPTIONS_TO_SYSPARMS** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_AddOptionsToSysParms - * - Description: - - Value of program option ``--add-options-to-sysparms`` - * - Header String: - - PO_Add_Options_To_SysParms - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ALLOW_MS_STAR_TO_SURVIVE_COMMON_ENVELOPE** - - - * - Data type: - - BOOL - * - COMPAS variable: - - Options::m_AllowMainSequenceStarToSurviveCommonEnvelope - * - Description: - - Value of program option ``--common-envelope-allow-main-sequence-survive`` - * - Header String: - - PO_Allow_MS_To_Survive_CE - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ALLOW_RLOF_AT_BIRTH** - - - * - Data type: - - BOOL - * - COMPAS variable: - - Options::m_AllowRLOFAtBirth - * - Description: - - Value of program option ``--allow-rlof-at-birth`` - * - Header String: - - PO_Allow_RLOF@\ Birth - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ALLOW_TOUCHING_AT_BIRTH** - - - * - Data type: - - BOOL - * - COMPAS variable: - - Options::m_AllowTouchingAtBirth - * - Description: - - Value of program option ``--allow-touching-at-birth`` - * - Header String: - - PO_Allow_Touching@\ Birth - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ANG_MOM_CONSERVATION_DURING_CIRCULARISATION** - - - * - Data type: - - BOOL - * - COMPAS variable: - - Options::m_AngularMomentumConservationDuringCircularisation - * - Description: - - Value of program option ``--angular-momentum-conservation-during-circularisation`` - * - Header String: - - PO_Conserve_AngMom@\ Circ - -.. _spec-options-props-B: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **BLACK_HOLE_KICKS** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_BlackHoleKicks - * - Description: - - Value of program option ``--black-hole-kicks`` |br| - * - Header String: - - PO_BH_Kicks - -DEPRECATION NOTICE: property ``BLACK_HOLE_KICKS`` has been deprecated and will soon be removed. Please use ``BLACK_HOLE_KICKS_MODE`` in future. - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **BLACK_HOLE_KICKS_MODE** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_BlackHoleKicks - * - Description: - - Value of program option ``--black-hole-kicks-mode`` |br| - * - Header String: - - PO_BH_Kicks - -.. _spec-options-props-C: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **CASE_BB_STABILITY_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_CaseBBStabilityPrescription - * - Description: - - Value of program option ``--case-BB-stability-prescription`` - * - Header String: - - PO_BB_Mass_xFer_Stblty_Prscrptn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **CHE_MODE** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_CheMode - * - Description: - - Value of program option ``--chemically-homogeneous-evolution`` - * - Header String: - - PO_CHE_Mode - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **CIRCULARISE_BINARY_DURING_MT** - - - * - Data type: - - BOOL - * - COMPAS variable: - - Options::m_CirculariseBinaryDuringMassTransfer - * - Description: - - Value of program option ``--circularise-binary-during-mass-transfer`` - * - Header String: - - PO_Circularise@\ MT - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **COMMON_ENVELOPE_ALPHA** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CommonEnvelopeAlpha - * - Description: - - Value of program option ``--common-envelope-alpha`` - * - Header String: - - PO_CE_Alpha - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **COMMON_ENVELOPE_ALPHA_THERMAL** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CommonEnvelopeAlphaThermal - * - Description: - - Value of program option ``--common-envelope-alpha-thermal`` - * - Header String: - - PO_CE_Alpha_Thermal - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **COMMON_ENVELOPE_LAMBDA** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CommonEnvelopeLambda - * - Description: - - Value of program option ``--common-envelope-lambda`` - * - Header String: - - PO_CE_Lambda - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **COMMON_ENVELOPE_LAMBDA_MULTIPLIER** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CommonEnvelopeLambdaMultiplier - * - Description: - - Value of program option ``--common-envelope-lambda-multiplier`` - * - Header String: - - PO_CE_Lambda_Multiplier - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **COMMON_ENVELOPE_LAMBDA_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_CommonEnvelopeLambdaPrescription - * - Description: - - Value of program option ``--common-envelope-lambda-prescription`` - * - Header String: - - PO_CE_Lambda_Prscrptn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **COMMON_ENVELOPE_MASS_ACCRETION_CONSTANT** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CommonEnvelopeMassAccretionConstant - * - Description: - - Value of program option ``--common-envelope-mass-accretion-constant`` - * - Header String: - - PO_CE_Mass_Accr_Constant - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **COMMON_ENVELOPE_MASS_ACCRETION_MAX** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CommonEnvelopeMassAccretionMax - * - Description: - - Value of program option ``--common-envelope-mass-accretion-max`` - * - Header String: - - PO_CE_Mass_Accr_Max - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **COMMON_ENVELOPE_MASS_ACCRETION_MIN** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CommonEnvelopeMassAccretionMin - * - Description: - - Value of program option ``--common-envelope-mass-accretion-min`` - * - Header String: - - PO_CE_Mass_Accr_Min - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **COMMON_ENVELOPE_MASS_ACCRETION_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_CommonEnvelopeMassAccretionPrescription - * - Description: - - Value of program option ``--common-envelope-mass-accretion-prescription`` - * - Header String: - - PO_CE_Mass_Accr_Prscrptn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **COMMON_ENVELOPE_RECOMBINATION_ENERGY_DENSITY** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CommonEnvelopeRecombinationEnergyDensity - * - Description: - - Value of program option ``--common-envelope-recombination-energy-density`` - * - Header String: - - PO_CE_Recomb_Enrgy_Dnsty - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **COMMON_ENVELOPE_SLOPE_KRUCKOW** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CommonEnvelopeSlopeKruckow - * - Description: - - Value of program option ``--common-envelope-slope-kruckow`` - * - Header String: - - PO_CE_Slope_Kruckow - -.. _spec-options-props-D: - -.. _spec-options-props-E: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ECCENTRICITY** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_Eccentricity - * - Description: - - Value of program option ``--eccentricity`` - * - Header String: - - PO_Eccentricity - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ECCENTRICITY_DISTRIBUTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_EccentricityDistribution - * - Description: - - Value of program option ``--eccentricity-distribution`` - * - Header String: - - PO_Eccentricity_Dstrbtn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ECCENTRICITY_DISTRIBUTION_MAX** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_EccentricityDistributionMax - * - Description: - - Value of program option ``--eccentricity-max`` - * - Header String: - - PO_Eccentricity_Dstrbtn_Max - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ECCENTRICITY_DISTRIBUTION_MIN** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_EccentricityDistributionMin - * - Description: - - Value of program option ``--eccentricity-min`` - * - Header String: - - PO_Eccentricity_Dstrbtn_Min - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **EDDINGTON_ACCRETION_FACTOR** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_EddingtonAccretionFactor - * - Description: - - Value of program option ``--eddington-accretion-factor`` - * - Header String: - - PO_Eddington_Accr_Factor - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ENVELOPE_STATE_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_EnvelopeStatePrescription - * - Description: - - Value of program option ``--envelope-state-prescription`` - * - Header String: - - PO_Envelope_State_Prscrptn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ENABLE_ROTATIONALLY_ENHANCED_MASS_LOSS** - - - * - Data type: - - BOOL - * - COMPAS variable: - - Options::m_EnableRotationallyEnhancedMassLoss - * - Description: - - Value of program option ``--enable-rotationally-enhanced-mass-loss`` - * - Header String: - - PO_Enable_Rotationally_Enhanced_Mass_Loss - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ENHANCE_CHE_LIFETIMES_LUMINOSITIES** - - - * - Data type: - - BOOL - * - COMPAS variable: - - Options::m_EnhanceCHELifetimesLuminosities - * - Description: - - Value of program option ``--enhance-CHE-lifetimes-luminosities`` - * - Header String: - - PO_Enhance_CHE_lifetimes_luminosities - -.. _spec-options-props-F: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **FRYER_SUPERNOVA_ENGINE** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_FryerSupernovaEngine - * - Description: - - Value of program option ``--fryer-supernova-engine`` - * - Header String: - - PO_Fryer_SN_Engine - -.. _spec-options-props-G: - -.. _spec-options-props-H: - -.. _spec-options-props-I: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **INITIAL_MASS** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_InitialMass - * - Description: - - Value of program option ``--initial-mass`` - * - Header String: - - PO_Initial_Mass - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **INITIAL_MASS_1** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_InitialMass1 - * - Description: - - Value of program option ``--initial-mass-1`` - * - Header String: - - PO_Initial_Mass(1) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **INITIAL_MASS_2** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_InitialMass2 - * - Description: - - Value of program option ``--initial-mass-2`` - * - Header String: - - PO_Initial_Mass(2) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **INITIAL_MASS_FUNCTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_InitialMassFunction - * - Description: - - Value of program option ``--initial-mass-function`` - * - Header String: - - PO_Initial_Mass_Function - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **INITIAL_MASS_FUNCTION_MAX** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_InitialMassFunctionMax - * - Description: - - Value of program option ``--initial-mass-function-max`` - * - Header String: - - PO_Initial_Mass_Func_Max - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **INITIAL_MASS_FUNCTION_MIN** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_InitialMassFunctionMin - * - Description: - - Value of program option ``--initial-mass-function-min`` - * - Header String: - - PO_Initial_Mass_Func_Min - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **INITIAL_MASS_FUNCTION_POWER** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_InitialMassFunctionPower - * - Description: - - Value of program option ``--initial-mass-power`` - * - Header String: - - PO_Initial_Mass_Func_Power - -.. _spec-options-props-J: - -.. _spec-options-props-K: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_DIRECTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_KickDirectionDistribution - * - Description: - - Value of program option ``--kick-direction`` - * - Header String: - - PO_Kick_Direction_Dstrbtn - -DEPRECATION NOTICE: property ``KICK_DIRECTION`` has been deprecated and will soon be removed. Please use ``KICK_DIRECTION_DISTRIBUTION`` in future. - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_DIRECTION_DISTRIBUTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_KickDirectionDistribution - * - Description: - - Value of program option ``--kick-direction-distribution`` - * - Header String: - - PO_Kick_Direction_Dstrbtn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_DIRECTION_POWER** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickDirectionPower - * - Description: - - Value of program option ``--kick-direction-power`` - * - Header String: - - PO_Kick_Direction_Power - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_SCALING_FACTOR** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickScalingFactor - * - Description: - - Value of program option ``--kick-scaling-factor`` - * - Header String: - - PO_Kick_Scaling_Factor - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MAGNITUDE** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickMagnitude - * - Description: - - Value of program option ``--kick-magnitude`` - * - Header String: - - PO_Kick_Magnitude - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MAGNITUDE_1** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickMagnitude1 - * - Description: - - Value of program option ``--kick-magnitude-1`` - * - Header String: - - PO_Kick_Magnitude(1) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MAGNITUDE_2** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickMagnitude2 - * - Description: - - Value of program option ``--kick-magnitude-2`` - * - Header String: - - PO_Kick_Magnitude(2) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MAGNITUDE_DISTRIBUTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_KickMagnitudeDistribution - * - Description: - - Value of program option ``--kick-magnitude-distribution`` - * - Header String: - - PO_Kick_Magnitude_Dstrbtn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MAGNITUDE_DISTRIBUTION_MAXIMUM** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickMagnitudeDistributionMaximum - * - Description: - - Value of program option ``--kick-magnitude-max`` - * - Header String: - - PO_Kick_Magnitude_Dstrbtn_Max - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_kickMagnitudeDistributionSigmaCCSN BH - * - Description: - - Value of program option ``--kick-magnitude-sigma-CCSN-BH`` - * - Header String: - - PO_Sigma_Kick_CCSN_BH - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_kickMagnitudeDistributionSigmaCCSN NS - * - Description: - - Value of program option ``--kick-magnitude-sigma-CCSN-NS`` - * - Header String: - - PO_Sigma_Kick_CCSN_NS - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_kickMagnitudeDistributionSigmaForECSN - * - Description: - - Value of program option ``--kick-magnitude-sigma-ECSN`` - * - Header String: - - PO_Sigma_Kick_ECSN - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_kickMagnitudeDistributionSigmaForUSSN - * - Description: - - Value of program option ``--kick-magnitude-sigma-USSN`` - * - Header String: - - PO_Sigma_Kick_USSN - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MEAN_ANOMALY_1** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickMeanAnomaly1 - * - Description: - - Value of program option ``--kick-mean-anomaly-1`` - * - Header String: - - PO_Kick_Mean_Anomaly(1) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MEAN_ANOMALY_2** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickMeanAnomaly2 - * - Description: - - Value of program option ``--kick-mean-anomaly-2`` - * - Header String: - - PO_Kick_Mean_Anomaly(2) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MAGNITUDE_RANDOM** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickMagnitudeRandom - * - Description: - - Value of program option ``--kick-magnitude-random`` - * - Header String: - - PO_Kick_Magnitude_Random - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MAGNITUDE_RANDOM_1** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickMagnitudeRandom1 - * - Description: - - Value of program option ``--kick-magnitude-random-1`` - * - Header String: - - PO_Kick_Magnitude_Random(1) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MAGNITUDE_RANDOM_2** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickMagnitudeRandom2 - * - Description: - - Value of program option ``--kick-magnitude-random-2`` - * - Header String: - - PO_Kick_Magnitude_Random(2) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_PHI_1** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickPhi1 - * - Description: - - Value of program option ``--kick-phi-1`` - * - Header String: - - PO_Kick_Mean_Phi(1) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_PHI_2** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickPhi2 - * - Description: - - Value of program option ``--kick-phi-2`` - * - Header String: - - PO_Kick_Mean_Phi(2) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_THETA_1** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickTheta1 - * - Description: - - Value of program option ``--kick-theta-1`` - * - Header String: - - PO_Kick_Mean_Theta(1) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_THETA_2** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickTheta2 - * - Description: - - Value of program option ``--kick-theta-2`` - * - Header String: - - PO_Kick_Mean_Theta(2) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **LBV_FACTOR** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_LuminousBlueVariableFactor - * - Description: - - Value of program option ``--luminous-blue-variable-multiplier`` - * - Header String: - - PO_LBV_Factor - -.. _spec-options-props-L: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **LBV_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_LuminousBlueVariablePrescription - * - Description: - - Value of program option ``--luminous-blue-variable-prescription`` - * - Header String: - - PO_LBV_Mass_Loss_Prscrptn - -DEPRECATION NOTICE: property ``LBV_PRESCRIPTION`` has been deprecated and will soon be removed. Please use ``LBV_MASS_LOSS_PRESCRIPTION`` in future. - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **LBV_MASS_LOSS_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_LuminousBlueVariablePrescription - * - Description: - - Value of program option ``--LBV-mass-loss-prescription`` - * - Header String: - - PO_LBV_Mass_Loss_Prscrptn - -:ref:`Back to Top ` - -.. _spec-options-props-M: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MASS_LOSS_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_MassLossPrescription - * - Description: - - Value of program option ``--mass-loss-prescription`` - * - Header String: - - PO_Mass_Loss_Prscrptn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MASS_RATIO** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MassRatio - * - Description: - - Value of program option ``-``-mass-ratio`` - * - Header String: - - PO_Mass_Ratio - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MASS_RATIO_DISTRIBUTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_MassRatioDistribution - * - Description: - - Value of program option ``--mass-ratio-distribution`` - * - Header String: - - PO_Mass_Ratio_Dstrbtn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MASS_RATIO_DISTRIBUTION_MAX** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MassRatioDistributionMax - * - Description: - - Value of program option ``--mass-ratio-max`` - * - Header String: - - PO_Mass_Ratio_Dstrbtn_Max - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MASS_RATIO_DISTRIBUTION_MIN** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MassRatioDistributionMin - * - Description: - - Value of program option ``--mass-ratio-min`` - * - Header String: - - PO_Mass_Ratio_Dstrbtn_Min - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MAXIMUM_EVOLUTION_TIME** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MaxEvolutionTime - * - Description: - - Value of program option ``--maximum-evolution-time`` - * - Header String: - - PO_Max_Evolution_Time - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MAXIMUM_DONOR_MASS** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MaximumMassDonorNandezIvanova - * - Description: - - Value of program option ``--maximum-mass-donor-nandez-ivanova`` - * - Header String: - - PO_Max_Donor_Mass - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MAXIMUM_NEUTRON_STAR_MASS** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MaximumNeutronStarMass - * - Description: - - Value of program option ``--maximum-neutron-star-mass`` - * - Header String: - - PO_Max_NS_Mass - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MAXIMUM_TIMESTEPS** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_MaxNumberOfTimestepIterations - * - Description: - - Value of program option ``--maximum-number-timestep-iterations`` - * - Header String: - - PO_Max_Timesteps - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MCBUR1** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_mCBUR1 - * - Description: - - Value of program option ``--mcbur1`` - * - Header String: - - PO_MCBUR1 - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **METALLICITY** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_Metallicity - * - Description: - - Value of program option ``--metallicity`` - * - Header String: - - PO_Metallicity - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **METALLICITY_DISTRIBUTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_MetallicityDistribution - * - Description: - - Value of program option ``--metallicity-distribution`` - * - Header String: - - PO_Metallicity_Dstrbtn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **METALLICITY_DISTRIBUTION_MAX** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MetallicityDistributionMax - * - Description: - - Value of program option ``--metallicity-max`` - * - Header String: - - PO_Metallicity_Dstrbtn_Max - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **METALLICITY_DISTRIBUTION_MIN** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MetallicityDistributionMin - * - Description: - - Value of program option ``--metallicity-min`` - * - Header String: - - PO_Metallicity_Dstrbtn_Min - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MINIMUM_SAMPLED_SECONDARY_MASS** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MinimumSampledSecondaryMass - * - Description: - - Value of program option ``--minimum-sampled-secondary-mass`` - * - Header String: - - PO_Min_Secondary_Mass - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MT_ACCRETION_EFFICIENCY_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_MassTransferAccretionEfficiencyPrescription - * - Description: - - Value of program option ``--mass-transfer-accretion-efficiency-prescription`` - * - Header String: - - PO_MT_Acc_Efficiency_Prscrptn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MT_ANG_MOM_LOSS_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_MassTransferAngularMomentumLossPrescription - * - Description: - - Value of program option ``--mass-transfer-angular-momentum-loss-prescription`` - * - Header String: - - PO_MT_AngMom_Loss_Prscrptn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MT_FRACTION_ACCRETED** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MassTransferFractionAccreted - * - Description: - - Value of program option ``--mass-transfer-fa`` - * - Header String: - - PO_MT_Fraction_Accreted - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MT_JLOSS** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MassTransferJloss - * - Description: - - Value of program option ``--mass-transfer-jloss`` - * - Header String: - - PO_MT_JLoss - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MT_THERMAL_LIMIT_C** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MassTransferCParameter - * - Description: - - Value of program option ``--mass-transfer-thermal-limit-C`` - * - Header String: - - PO_MT_Thermal_Limit_C - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MT_REJUVENATION_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_MassTransferRejuvenationPrescription - * - Description: - - Value of program option ``--mass-transfer-rejuvenation-prescription`` - * - Header String: - - PO_MT_Rejuvenation_Prscrptn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MT_THERMALLY_LIMITED_VARIATION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_MassTransferThermallyLimitedVariation - * - Description: - - Value of program option ``--mass-transfer-thermal-limit-accretor`` - * - Header String: - - PO_MT_Thermally_Lmtd_Variation - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MULLER_MANDEL_KICK_MULTIPLIER_BH** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MullerMandelKickBH - * - Description: - - Value of program option ``--muller-mandel-kick-multiplier-BH`` - * - Header String: - - PO_MM_Kick_Multiplier_BH - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MULLER_MANDEL_KICK_MULTIPLIER_NS** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MullerMandelKickNS - * - Description: - - Value of program option ``--muller-mandel-kick-multiplier-NS`` - * - Header String: - - PO_MM_Kick_Multiplier_NS - -.. _spec-options-props-N: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **NEUTRINO_MASS_LOSS_ASSUMPTION_BH** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_NeutrinoMassLossAssumptionBH - * - Description: - - Value of program option ``--neutrino-mass-loss-BH-formation`` - * - Header String: - - PO_Neutrino_Mass_Loss_Assmptn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **NEUTRINO_MASS_LOSS_VALUE_BH** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_NeutrinoMassLossValueBH - * - Description: - - Value of program option ``--neutrino-mass-loss-BH-formation-value`` - * - Header String: - - PO_Neutrino_Mass_Loss_Value - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **NOTES** - - - * - Data type: - - STRING - * - COMPAS variable: - - Options::m_Notes - * - Description: - - Value of program option ``--notes`` - * - Header String: - - as specified by program option ``--Notes-Hdrs`` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **NS_EOS** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_NeutronStarEquationOfState - * - Description: - - Value of program option ``--neutron-star-equation-of-state`` - * - Header String: - - PO_NS_EOS - -.. _spec-options-props-O: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ORBITAL_PERIOD** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_OrbitalPeriod - * - Description: - - Value of program option ``--orbital-period`` - * - Header String: - - PO_Orbital_Period - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ORBITAL_PERIOD_DISTRIBUTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_OrbitalPeriodDistribution - * - Description: - - Value of program option ``--orbital-period-distribution`` - * - Header String: - - PO_Orbital_Period_Dstrbtn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ORBITAL_PERIOD_DISTRIBUTION_MAX** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_OrbitalPeriodDistributionMax - * - Description: - - Value of program option ``--orbital-period-max`` - * - Header String: - - PO_Orbital_Period_Max - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ORBITAL_PERIOD_DISTRIBUTION_MIN** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_OrbitalPeriodDistributionMin - * - Description: - - Value of program option ``--orbital-period-min`` - * - Header String: - - PO_Orbital_Period_Min - -.. _spec-options-props-P: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PISN_LOWER_LIMIT** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_PairInstabilityLowerLimit - * - Description: - - Value of program option ``--PISN-lower-limit`` - * - Header String: - - PO_PISN_Lower_Limit - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PISN_UPPER_LIMIT** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_PairInstabilityUpperLimit - * - Description: - - Value of program option ``--PISN-upper-limit`` - * - Header String: - - PO_PISN_Upper_Limit - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PPI_CO_CORE_SHIFT_HENDRIKS** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_PulsationalPairInstabilityCOCoreShiftHendriks - * - Description: - - Value of program option ``--PPI-CO-Core-Shift-Hendriks`` - * - Header String: - - PO_PPI_CO_CORE_SHIFT_HENDRIKS - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PPI_LOWER_LIMIT** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_PulsationalPairInstabilityLowerLimit - * - Description: - - Value of program option ``--PPI-lower-limit`` - * - Header String: - - PO_PPI_Lower_Limit - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PPI_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_PulsationalPairInstabilityPrescription - * - Description: - - Value of program option ``--pulsational-pair-instability-prescription`` - * - Header String: - - PO_PPI_Prscrptn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PPI_UPPER_LIMIT** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_PulsationalPairInstabilityUpperLimit - * - Description: - - Value of program option ``--PPI-upper-limit`` - * - Header String: - - PO_PPI_Upper_Limit - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PULSAR_MAGNETIC_FIELD_DISTRIBUTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_PulsarBirthMagneticFieldDistribution - * - Description: - - Value of program option ``--pulsar-birth-magnetic-field-distribution`` - * - Header String: - - PO_Pulsar_Mag_Field_Dstrbtn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MAX** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_PulsarBirthMagneticFieldDistributionMax - * - Description: - - Value of program option ``--pulsar-birth-magnetic-field-distribution-max`` - * - Header String: - - PO_Pulsar_Mag_Field_Dstrbtn_Max - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MIN** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_PulsarBirthMagneticFieldDistributionMin - * - Description: - - Value of program option ``--pulsar-birth-magnetic-field-distribution-min`` - * - Header String: - - PO_Pulsar_Mag_Field_Dstrbtn_Min - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_PulsarBirthSpinPeriodDistribution - * - Description: - - Value of program option ``--pulsar-birth-spin-period-distribution`` - * - Header String: - - PO_Pulsar_Spin_Period_Dstrbtn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PULSAR_BIRTH_SPIN_DISTRIBUTION_MAX** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_PulsarBirthSpinPeriodDistributionMax - * - Description: - - Value of program option ``--pulsar-birth-spin-period-distribution-max`` - * - Header String: - - PO_Pulsar_Spin_Period_Dstrbtn_Max - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PULSAR_BIRTH_SPIN_DISTRIBUTION_MIN** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_PulsarBirthSpinPeriodDistributionMin - * - Description: - - Value of program option ``--pulsar-birth-spin-period-distribution-min`` - * - Header String: - - PO_Pulsar_Spin_Period_Dstrbtn_Min - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PULSAR_MAGNETIC_FIELD_DECAY_MASS_SCALE** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options:m_PulsarMagneticFieldDecayMassscale - * - Description: - - Value of program option ``--pulsar-magnetic-field-decay-massscale`` - * - Header String: - - PO_Pulsar_Mag_Field_Decay_mScale - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PULSAR_MAGNETIC_FIELD_DECAY_TIME_SCALE** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options:m_PulsarMagneticFieldDecayTimescale - * - Description: - - Value of program option ``--pulsar-magnetic-field-decay-timescale`` - * - Header String: - - PO_Pulsar_Mag_Field_Decay_tScale - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PULSAR_MINIMUM_MAGNETIC_FIELD** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_PulsarLog10MinimumMagneticField - * - Description: - - Value of program option ``--pulsar-minimum-magnetic-field`` - * - Header String: - - PO_Pulsar_Minimum_Mag_Field - -.. _spec-options-props-Q: - -.. _spec-options-props-R: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **RANDOM_SEED** - - - * - Data type: - - UNSIGNED LONG INT - * - COMPAS variable: - - Options::m_RandomSeed - * - Description: - - Value of program option ``--random-seed`` - * - Header String: - - PO_SEED(OPTION) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **RANDOM_SEED_CMDLINE** - - - * - Data type: - - UNSIGNED LONG INT - * - COMPAS variable: - - Options::m_FixedRandomSeed - * - Description: - - Value of program option ``--random-seed`` (specified on the commandline) - * - Header String: - - PO_SEED(CMDLINE) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **REMNANT_MASS_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_RemnantMassPrescription - * - Description: - - Value of program option ``--remnant-mass-prescription`` - * - Header String: - - PO_Remnant_Mass_Prscrptn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ROTATIONAL_VELOCITY_DISTRIBUTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_RotationalVelocityDistribution - * - Description: - - Value of program option ``--rotational-velocity-distribution`` - * - Header String: - - PO_Rotational_Velocity_Dstrbtn - -.. _spec-options-props-S: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **SCALE_CHE_MASS_LOSS_SURF_HE_ABUNDANCE** - - - * - Data type: - - BOOL - * - COMPAS variable: - - Options::m_ScaleCHEMassLossWithSurfaceHeliumAbundance - * - Description: - - Value of program option ``--scale-CHE-mass-loss-with-surface-helium-abundance`` - * - Header String: - - PO_Scale_CHE_Mass_Loss_Surf_He_Abundance - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **SCALE_TERMINAL_WIND_VEL_METALLICITY_POWER** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_ScaleTerminalWindVelocityWithMetallicityPower - * - Description: - - Value of program option ``--scale-terminal-wind-velocity-with-metallicity-power`` - * - Header String: - - PO_Scale_Terminal_Wind_Vel_Metallicity_Power - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **SEMI_MAJOR_AXIS** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_SemiMajorAxis - * - Description: - - Value of program option ``--semi-major-axis`` - * - Header String: - - PO_Semi-Major_Axis - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **SEMI_MAJOR_AXIS_DISTRIBUTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_SemiMajorAxisDistribution - * - Description: - - Value of program option ``--semi-major-axis-distribution`` - * - Header String: - - PO_Semi-Major_Axis_Dstrbtn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **SEMI_MAJOR_AXIS_DISTRIBUTION_MAX** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_SemiMajorAxisDistributionMax - * - Description: - - Value of program option ``--semi-major-axis-max`` - * - Header String: - - PO_Semi-Major_Axis_Dstrbtn_Max - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **SEMI_MAJOR_AXIS_DISTRIBUTION_MIN** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_SemiMajorAxisDistributionMin - * - Description: - - Value of program option ``--semi-major-axis-min`` - * - Header String: - - PO_Semi-Major_Axis_Dstrbtn_Min - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **STELLAR_ZETA_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_StellarZetaPrescription - * - Description: - - Value of program option ``--stellar-zeta-prescription`` - * - Header String: - - PO_Stellar_Zeta_Prscrptn - -.. _spec-options-props-T: - -.. _spec-options-props-U: - -.. _spec-options-props-V: - -.. _spec-options-props-W: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **WR_FACTOR** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_WolfRayetFactor - * - Description: - - Value of program option ``--wolf-rayet-multiplier`` - * - Header String: - - PO_WR_Factor - -.. _spec-options-props-X: - -.. _spec-options-props-Y: - -.. _spec-options-props-Z: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ZETA_ADIABATIC_ARBITRARY** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_ZetaAdiabaticArbitrary - * - Description: - - Value of program option ``--zeta-adiabatic-arbitrary`` - * - Header String: - - PO_Zeta_Adiabatic_Arbitrary - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ZETA_MS** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_ZetaMainSequence - * - Description: - - Value of program option ``--zeta-main-sequence`` - * - Header String: - - PO_Zeta_Main_Sequence_Giant - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ZETA_RADIATIVE_ENVELOPE_GIANT** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_ZetaRadiativeEnvelopeGiant - * - Description: - - Value of program option ``--zeta-radiative-envelope-giant`` - * - Header String: - - PO_Zeta_Radiative_Envelope_Giant - +Program option properties +========================= + +When specifying known properties in a log file record specification record, the property name must be prefixed with +the property type. Currently there is a single binary property type available for use: PROGRAM_OPTION. + +For example, to specify the program option property ``RANDOM_SEED``, use:: + + PROGRAM OPTION::RANDOM_SEED + + +.. _spec-options-props-top: + +Following is an alphabetical list of program option properties available for inclusion in log file record specifiers. + +**Jump to** +:ref:`A ` :ref:`B ` :ref:`C ` :ref:`D ` +:ref:`E ` :ref:`F ` :ref:`G ` :ref:`H ` +:ref:`I ` :ref:`J ` :ref:`K ` :ref:`L ` +:ref:`M ` :ref:`N ` :ref:`O ` :ref:`P ` +:ref:`Q ` :ref:`R ` :ref:`S ` :ref:`T ` +:ref:`U ` :ref:`V ` :ref:`W ` :ref:`X ` +:ref:`Y ` :ref:`Z ` + +.. _spec-options-props-A: + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ADD_OPTIONS_TO_SYSPARMS** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_AddOptionsToSysParms + * - Description: + - Value of program option ``--add-options-to-sysparms`` + * - Header String: + - PO_Add_Options_To_SysParms + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ALLOW_MS_STAR_TO_SURVIVE_COMMON_ENVELOPE** + - + * - Data type: + - BOOL + * - COMPAS variable: + - Options::m_AllowMainSequenceStarToSurviveCommonEnvelope + * - Description: + - Value of program option ``--common-envelope-allow-main-sequence-survive`` + * - Header String: + - PO_Allow_MS_To_Survive_CE + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ALLOW_RLOF_AT_BIRTH** + - + * - Data type: + - BOOL + * - COMPAS variable: + - Options::m_AllowRLOFAtBirth + * - Description: + - Value of program option ``--allow-rlof-at-birth`` + * - Header String: + - PO_Allow_RLOF@\ Birth + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ALLOW_TOUCHING_AT_BIRTH** + - + * - Data type: + - BOOL + * - COMPAS variable: + - Options::m_AllowTouchingAtBirth + * - Description: + - Value of program option ``--allow-touching-at-birth`` + * - Header String: + - PO_Allow_Touching@\ Birth + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ANG_MOM_CONSERVATION_DURING_CIRCULARISATION** + - + * - Data type: + - BOOL + * - COMPAS variable: + - Options::m_AngularMomentumConservationDuringCircularisation + * - Description: + - Value of program option ``--angular-momentum-conservation-during-circularisation`` + * - Header String: + - PO_Conserve_AngMom@\ Circ + +.. _spec-options-props-B: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **BLACK_HOLE_KICKS** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_BlackHoleKicks + * - Description: + - Value of program option ``--black-hole-kicks`` |br| + * - Header String: + - PO_BH_Kicks + +DEPRECATION NOTICE: property ``BLACK_HOLE_KICKS`` has been deprecated and will soon be removed. Please use ``BLACK_HOLE_KICKS_MODE`` in future. + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **BLACK_HOLE_KICKS_MODE** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_BlackHoleKicks + * - Description: + - Value of program option ``--black-hole-kicks-mode`` |br| + * - Header String: + - PO_BH_Kicks + +.. _spec-options-props-C: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CASE_BB_STABILITY_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_CaseBBStabilityPrescription + * - Description: + - Value of program option ``--case-BB-stability-prescription`` + * - Header String: + - PO_BB_Mass_xFer_Stblty_Prscrptn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CHE_MODE** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_CheMode + * - Description: + - Value of program option ``--chemically-homogeneous-evolution`` + * - Header String: + - PO_CHE_Mode + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCULARISE_BINARY_DURING_MT** + - + * - Data type: + - BOOL + * - COMPAS variable: + - Options::m_CirculariseBinaryDuringMassTransfer + * - Description: + - Value of program option ``--circularise-binary-during-mass-transfer`` + * - Header String: + - PO_Circularise@\ MT + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK** + - + * - Data type: + - BOOL + * - COMPAS variable: + - Options::m_CircumbinaryDisk + * - Description: + - Value of program option ``--circumbinary-disk`` + * - Header String: + - PO_CBD + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_BETA** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CircumbinaryDiskBeta + * - Description: + - Value of program option ``--circumbinary-disk-beta`` + * - Header String: + - PO_CBD_Beta + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_ENVELOPE_MASS_FRACTION_SUPPLIED** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CircumbinaryDiskEnvelopeMassFractionSupplied + * - Description: + - Value of program option ``--circumbinary-disk-envelope-mass-fraction-supplied`` + * - Header String: + - PO_CBD_Envelope_Mass_Fraction_Supplied + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_INNER_RADIUS_OVER_SEPARATION** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CircumbinaryDiskInnerRadiusOverSeparation + * - Description: + - Value of program option ``--circumbinary-disk-inner-radius-over-separation`` + * - Header String: + - PO_CBD_Inner_Radius_Over_Separation + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_LIFETIME** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CircumbinaryDiskLifetime + * - Description: + - Value of program option ``--circumbinary-disk-lifetime`` + * - Header String: + - PO_CBD_Lifetime + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_STRUCTURE_FACTOR** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CircumbinaryDiskStructureFactor + * - Description: + - Value of program option ``--circumbinary-disk-structure-factor`` + * - Header String: + - PO_CBD_Structure_Factor + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_EDDINGTON_MODE** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_CircumbinaryDiskEddingtonMode + * - Description: + - Value of program option ``--circumbinary-disk-eddington-mode`` + * - Header String: + - PO_CBD_Eddington_Mode + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_EDDINGTON_CAP_FACTOR** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CircumbinaryDiskEddingtonCapFactor + * - Description: + - Value of program option ``--circumbinary-disk-eddington-cap-factor`` + * - Header String: + - PO_CBD_Eddington_Cap_Factor + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_EDDINGTON_GE23_FACTOR** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CircumbinaryDiskEddingtonGe23Factor + * - Description: + - Value of program option ``--circumbinary-disk-eddington-ge23-factor`` + * - Header String: + - PO_CBD_Eddington_GE23_Factor + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_EVOLUTION_MODE** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_CircumbinaryDiskEvolutionMode + * - Description: + - Value of program option ``--circumbinary-disk-evolution-mode`` + * - Header String: + - PO_CBD_Evolution_Mode + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_USE_SYNCHRONIZED_ENVELOPE_ANGULAR_MOMENTUM** + - + * - Data type: + - BOOL + * - COMPAS variable: + - Options::m_CircumbinaryDiskUseSynchronizedEnvelopeAngularMomentum + * - Description: + - Value of program option ``--circumbinary-disk-use-synchronized-envelope-angular-momentum`` + * - Header String: + - PO_CBD_Use_Synchronized_Envelope_AM + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **COMMON_ENVELOPE_ALPHA** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CommonEnvelopeAlpha + * - Description: + - Value of program option ``--common-envelope-alpha`` + * - Header String: + - PO_CE_Alpha + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **COMMON_ENVELOPE_ALPHA_THERMAL** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CommonEnvelopeAlphaThermal + * - Description: + - Value of program option ``--common-envelope-alpha-thermal`` + * - Header String: + - PO_CE_Alpha_Thermal + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **COMMON_ENVELOPE_LAMBDA** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CommonEnvelopeLambda + * - Description: + - Value of program option ``--common-envelope-lambda`` + * - Header String: + - PO_CE_Lambda + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **COMMON_ENVELOPE_LAMBDA_MULTIPLIER** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CommonEnvelopeLambdaMultiplier + * - Description: + - Value of program option ``--common-envelope-lambda-multiplier`` + * - Header String: + - PO_CE_Lambda_Multiplier + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **COMMON_ENVELOPE_LAMBDA_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_CommonEnvelopeLambdaPrescription + * - Description: + - Value of program option ``--common-envelope-lambda-prescription`` + * - Header String: + - PO_CE_Lambda_Prscrptn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **COMMON_ENVELOPE_MASS_ACCRETION_CONSTANT** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CommonEnvelopeMassAccretionConstant + * - Description: + - Value of program option ``--common-envelope-mass-accretion-constant`` + * - Header String: + - PO_CE_Mass_Accr_Constant + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **COMMON_ENVELOPE_MASS_ACCRETION_MAX** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CommonEnvelopeMassAccretionMax + * - Description: + - Value of program option ``--common-envelope-mass-accretion-max`` + * - Header String: + - PO_CE_Mass_Accr_Max + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **COMMON_ENVELOPE_MASS_ACCRETION_MIN** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CommonEnvelopeMassAccretionMin + * - Description: + - Value of program option ``--common-envelope-mass-accretion-min`` + * - Header String: + - PO_CE_Mass_Accr_Min + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **COMMON_ENVELOPE_MASS_ACCRETION_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_CommonEnvelopeMassAccretionPrescription + * - Description: + - Value of program option ``--common-envelope-mass-accretion-prescription`` + * - Header String: + - PO_CE_Mass_Accr_Prscrptn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **COMMON_ENVELOPE_RECOMBINATION_ENERGY_DENSITY** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CommonEnvelopeRecombinationEnergyDensity + * - Description: + - Value of program option ``--common-envelope-recombination-energy-density`` + * - Header String: + - PO_CE_Recomb_Enrgy_Dnsty + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **COMMON_ENVELOPE_SLOPE_KRUCKOW** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CommonEnvelopeSlopeKruckow + * - Description: + - Value of program option ``--common-envelope-slope-kruckow`` + * - Header String: + - PO_CE_Slope_Kruckow + +.. _spec-options-props-D: + +.. _spec-options-props-E: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ECCENTRICITY** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_Eccentricity + * - Description: + - Value of program option ``--eccentricity`` + * - Header String: + - PO_Eccentricity + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ECCENTRICITY_DISTRIBUTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_EccentricityDistribution + * - Description: + - Value of program option ``--eccentricity-distribution`` + * - Header String: + - PO_Eccentricity_Dstrbtn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ECCENTRICITY_DISTRIBUTION_MAX** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_EccentricityDistributionMax + * - Description: + - Value of program option ``--eccentricity-max`` + * - Header String: + - PO_Eccentricity_Dstrbtn_Max + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ECCENTRICITY_DISTRIBUTION_MIN** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_EccentricityDistributionMin + * - Description: + - Value of program option ``--eccentricity-min`` + * - Header String: + - PO_Eccentricity_Dstrbtn_Min + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **EDDINGTON_ACCRETION_FACTOR** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_EddingtonAccretionFactor + * - Description: + - Value of program option ``--eddington-accretion-factor`` + * - Header String: + - PO_Eddington_Accr_Factor + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ENVELOPE_STATE_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_EnvelopeStatePrescription + * - Description: + - Value of program option ``--envelope-state-prescription`` + * - Header String: + - PO_Envelope_State_Prscrptn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ENABLE_ROTATIONALLY_ENHANCED_MASS_LOSS** + - + * - Data type: + - BOOL + * - COMPAS variable: + - Options::m_EnableRotationallyEnhancedMassLoss + * - Description: + - Value of program option ``--enable-rotationally-enhanced-mass-loss`` + * - Header String: + - PO_Enable_Rotationally_Enhanced_Mass_Loss + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ENHANCE_CHE_LIFETIMES_LUMINOSITIES** + - + * - Data type: + - BOOL + * - COMPAS variable: + - Options::m_EnhanceCHELifetimesLuminosities + * - Description: + - Value of program option ``--enhance-CHE-lifetimes-luminosities`` + * - Header String: + - PO_Enhance_CHE_lifetimes_luminosities + +.. _spec-options-props-F: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **FRYER_SUPERNOVA_ENGINE** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_FryerSupernovaEngine + * - Description: + - Value of program option ``--fryer-supernova-engine`` + * - Header String: + - PO_Fryer_SN_Engine + +.. _spec-options-props-G: + +.. _spec-options-props-H: + +.. _spec-options-props-I: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **INITIAL_MASS** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_InitialMass + * - Description: + - Value of program option ``--initial-mass`` + * - Header String: + - PO_Initial_Mass + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **INITIAL_MASS_1** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_InitialMass1 + * - Description: + - Value of program option ``--initial-mass-1`` + * - Header String: + - PO_Initial_Mass(1) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **INITIAL_MASS_2** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_InitialMass2 + * - Description: + - Value of program option ``--initial-mass-2`` + * - Header String: + - PO_Initial_Mass(2) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **INITIAL_MASS_FUNCTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_InitialMassFunction + * - Description: + - Value of program option ``--initial-mass-function`` + * - Header String: + - PO_Initial_Mass_Function + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **INITIAL_MASS_FUNCTION_MAX** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_InitialMassFunctionMax + * - Description: + - Value of program option ``--initial-mass-function-max`` + * - Header String: + - PO_Initial_Mass_Func_Max + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **INITIAL_MASS_FUNCTION_MIN** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_InitialMassFunctionMin + * - Description: + - Value of program option ``--initial-mass-function-min`` + * - Header String: + - PO_Initial_Mass_Func_Min + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **INITIAL_MASS_FUNCTION_POWER** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_InitialMassFunctionPower + * - Description: + - Value of program option ``--initial-mass-power`` + * - Header String: + - PO_Initial_Mass_Func_Power + +.. _spec-options-props-J: + +.. _spec-options-props-K: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_DIRECTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_KickDirectionDistribution + * - Description: + - Value of program option ``--kick-direction`` + * - Header String: + - PO_Kick_Direction_Dstrbtn + +DEPRECATION NOTICE: property ``KICK_DIRECTION`` has been deprecated and will soon be removed. Please use ``KICK_DIRECTION_DISTRIBUTION`` in future. + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_DIRECTION_DISTRIBUTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_KickDirectionDistribution + * - Description: + - Value of program option ``--kick-direction-distribution`` + * - Header String: + - PO_Kick_Direction_Dstrbtn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_DIRECTION_POWER** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickDirectionPower + * - Description: + - Value of program option ``--kick-direction-power`` + * - Header String: + - PO_Kick_Direction_Power + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_SCALING_FACTOR** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickScalingFactor + * - Description: + - Value of program option ``--kick-scaling-factor`` + * - Header String: + - PO_Kick_Scaling_Factor + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MAGNITUDE** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickMagnitude + * - Description: + - Value of program option ``--kick-magnitude`` + * - Header String: + - PO_Kick_Magnitude + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MAGNITUDE_1** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickMagnitude1 + * - Description: + - Value of program option ``--kick-magnitude-1`` + * - Header String: + - PO_Kick_Magnitude(1) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MAGNITUDE_2** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickMagnitude2 + * - Description: + - Value of program option ``--kick-magnitude-2`` + * - Header String: + - PO_Kick_Magnitude(2) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MAGNITUDE_DISTRIBUTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_KickMagnitudeDistribution + * - Description: + - Value of program option ``--kick-magnitude-distribution`` + * - Header String: + - PO_Kick_Magnitude_Dstrbtn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MAGNITUDE_DISTRIBUTION_MAXIMUM** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickMagnitudeDistributionMaximum + * - Description: + - Value of program option ``--kick-magnitude-max`` + * - Header String: + - PO_Kick_Magnitude_Dstrbtn_Max + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_kickMagnitudeDistributionSigmaCCSN BH + * - Description: + - Value of program option ``--kick-magnitude-sigma-CCSN-BH`` + * - Header String: + - PO_Sigma_Kick_CCSN_BH + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_kickMagnitudeDistributionSigmaCCSN NS + * - Description: + - Value of program option ``--kick-magnitude-sigma-CCSN-NS`` + * - Header String: + - PO_Sigma_Kick_CCSN_NS + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_kickMagnitudeDistributionSigmaForECSN + * - Description: + - Value of program option ``--kick-magnitude-sigma-ECSN`` + * - Header String: + - PO_Sigma_Kick_ECSN + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_kickMagnitudeDistributionSigmaForUSSN + * - Description: + - Value of program option ``--kick-magnitude-sigma-USSN`` + * - Header String: + - PO_Sigma_Kick_USSN + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MEAN_ANOMALY_1** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickMeanAnomaly1 + * - Description: + - Value of program option ``--kick-mean-anomaly-1`` + * - Header String: + - PO_Kick_Mean_Anomaly(1) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MEAN_ANOMALY_2** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickMeanAnomaly2 + * - Description: + - Value of program option ``--kick-mean-anomaly-2`` + * - Header String: + - PO_Kick_Mean_Anomaly(2) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MAGNITUDE_RANDOM** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickMagnitudeRandom + * - Description: + - Value of program option ``--kick-magnitude-random`` + * - Header String: + - PO_Kick_Magnitude_Random + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MAGNITUDE_RANDOM_1** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickMagnitudeRandom1 + * - Description: + - Value of program option ``--kick-magnitude-random-1`` + * - Header String: + - PO_Kick_Magnitude_Random(1) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MAGNITUDE_RANDOM_2** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickMagnitudeRandom2 + * - Description: + - Value of program option ``--kick-magnitude-random-2`` + * - Header String: + - PO_Kick_Magnitude_Random(2) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_PHI_1** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickPhi1 + * - Description: + - Value of program option ``--kick-phi-1`` + * - Header String: + - PO_Kick_Mean_Phi(1) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_PHI_2** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickPhi2 + * - Description: + - Value of program option ``--kick-phi-2`` + * - Header String: + - PO_Kick_Mean_Phi(2) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_THETA_1** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickTheta1 + * - Description: + - Value of program option ``--kick-theta-1`` + * - Header String: + - PO_Kick_Mean_Theta(1) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_THETA_2** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickTheta2 + * - Description: + - Value of program option ``--kick-theta-2`` + * - Header String: + - PO_Kick_Mean_Theta(2) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **LBV_FACTOR** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_LuminousBlueVariableFactor + * - Description: + - Value of program option ``--luminous-blue-variable-multiplier`` + * - Header String: + - PO_LBV_Factor + +.. _spec-options-props-L: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **LBV_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_LuminousBlueVariablePrescription + * - Description: + - Value of program option ``--luminous-blue-variable-prescription`` + * - Header String: + - PO_LBV_Mass_Loss_Prscrptn + +DEPRECATION NOTICE: property ``LBV_PRESCRIPTION`` has been deprecated and will soon be removed. Please use ``LBV_MASS_LOSS_PRESCRIPTION`` in future. + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **LBV_MASS_LOSS_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_LuminousBlueVariablePrescription + * - Description: + - Value of program option ``--LBV-mass-loss-prescription`` + * - Header String: + - PO_LBV_Mass_Loss_Prscrptn + +:ref:`Back to Top ` + +.. _spec-options-props-M: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MASS_LOSS_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_MassLossPrescription + * - Description: + - Value of program option ``--mass-loss-prescription`` + * - Header String: + - PO_Mass_Loss_Prscrptn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MASS_RATIO** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MassRatio + * - Description: + - Value of program option ``-``-mass-ratio`` + * - Header String: + - PO_Mass_Ratio + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MASS_RATIO_DISTRIBUTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_MassRatioDistribution + * - Description: + - Value of program option ``--mass-ratio-distribution`` + * - Header String: + - PO_Mass_Ratio_Dstrbtn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MASS_RATIO_DISTRIBUTION_MAX** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MassRatioDistributionMax + * - Description: + - Value of program option ``--mass-ratio-max`` + * - Header String: + - PO_Mass_Ratio_Dstrbtn_Max + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MASS_RATIO_DISTRIBUTION_MIN** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MassRatioDistributionMin + * - Description: + - Value of program option ``--mass-ratio-min`` + * - Header String: + - PO_Mass_Ratio_Dstrbtn_Min + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MAXIMUM_EVOLUTION_TIME** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MaxEvolutionTime + * - Description: + - Value of program option ``--maximum-evolution-time`` + * - Header String: + - PO_Max_Evolution_Time + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MAXIMUM_DONOR_MASS** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MaximumMassDonorNandezIvanova + * - Description: + - Value of program option ``--maximum-mass-donor-nandez-ivanova`` + * - Header String: + - PO_Max_Donor_Mass + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MAXIMUM_NEUTRON_STAR_MASS** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MaximumNeutronStarMass + * - Description: + - Value of program option ``--maximum-neutron-star-mass`` + * - Header String: + - PO_Max_NS_Mass + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MAXIMUM_TIMESTEPS** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_MaxNumberOfTimestepIterations + * - Description: + - Value of program option ``--maximum-number-timestep-iterations`` + * - Header String: + - PO_Max_Timesteps + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MCBUR1** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_mCBUR1 + * - Description: + - Value of program option ``--mcbur1`` + * - Header String: + - PO_MCBUR1 + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **METALLICITY** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_Metallicity + * - Description: + - Value of program option ``--metallicity`` + * - Header String: + - PO_Metallicity + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **METALLICITY_DISTRIBUTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_MetallicityDistribution + * - Description: + - Value of program option ``--metallicity-distribution`` + * - Header String: + - PO_Metallicity_Dstrbtn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **METALLICITY_DISTRIBUTION_MAX** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MetallicityDistributionMax + * - Description: + - Value of program option ``--metallicity-max`` + * - Header String: + - PO_Metallicity_Dstrbtn_Max + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **METALLICITY_DISTRIBUTION_MIN** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MetallicityDistributionMin + * - Description: + - Value of program option ``--metallicity-min`` + * - Header String: + - PO_Metallicity_Dstrbtn_Min + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MINIMUM_SAMPLED_SECONDARY_MASS** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MinimumSampledSecondaryMass + * - Description: + - Value of program option ``--minimum-sampled-secondary-mass`` + * - Header String: + - PO_Min_Secondary_Mass + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MT_ACCRETION_EFFICIENCY_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_MassTransferAccretionEfficiencyPrescription + * - Description: + - Value of program option ``--mass-transfer-accretion-efficiency-prescription`` + * - Header String: + - PO_MT_Acc_Efficiency_Prscrptn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MT_ANG_MOM_LOSS_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_MassTransferAngularMomentumLossPrescription + * - Description: + - Value of program option ``--mass-transfer-angular-momentum-loss-prescription`` + * - Header String: + - PO_MT_AngMom_Loss_Prscrptn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MT_FRACTION_ACCRETED** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MassTransferFractionAccreted + * - Description: + - Value of program option ``--mass-transfer-fa`` + * - Header String: + - PO_MT_Fraction_Accreted + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MT_JLOSS** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MassTransferJloss + * - Description: + - Value of program option ``--mass-transfer-jloss`` + * - Header String: + - PO_MT_JLoss + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MT_THERMAL_LIMIT_C** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MassTransferCParameter + * - Description: + - Value of program option ``--mass-transfer-thermal-limit-C`` + * - Header String: + - PO_MT_Thermal_Limit_C + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MT_REJUVENATION_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_MassTransferRejuvenationPrescription + * - Description: + - Value of program option ``--mass-transfer-rejuvenation-prescription`` + * - Header String: + - PO_MT_Rejuvenation_Prscrptn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MT_THERMALLY_LIMITED_VARIATION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_MassTransferThermallyLimitedVariation + * - Description: + - Value of program option ``--mass-transfer-thermal-limit-accretor`` + * - Header String: + - PO_MT_Thermally_Lmtd_Variation + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MULLER_MANDEL_KICK_MULTIPLIER_BH** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MullerMandelKickBH + * - Description: + - Value of program option ``--muller-mandel-kick-multiplier-BH`` + * - Header String: + - PO_MM_Kick_Multiplier_BH + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MULLER_MANDEL_KICK_MULTIPLIER_NS** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MullerMandelKickNS + * - Description: + - Value of program option ``--muller-mandel-kick-multiplier-NS`` + * - Header String: + - PO_MM_Kick_Multiplier_NS + +.. _spec-options-props-N: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **NEUTRINO_MASS_LOSS_ASSUMPTION_BH** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_NeutrinoMassLossAssumptionBH + * - Description: + - Value of program option ``--neutrino-mass-loss-BH-formation`` + * - Header String: + - PO_Neutrino_Mass_Loss_Assmptn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **NEUTRINO_MASS_LOSS_VALUE_BH** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_NeutrinoMassLossValueBH + * - Description: + - Value of program option ``--neutrino-mass-loss-BH-formation-value`` + * - Header String: + - PO_Neutrino_Mass_Loss_Value + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **NOTES** + - + * - Data type: + - STRING + * - COMPAS variable: + - Options::m_Notes + * - Description: + - Value of program option ``--notes`` + * - Header String: + - as specified by program option ``--Notes-Hdrs`` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **NS_EOS** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_NeutronStarEquationOfState + * - Description: + - Value of program option ``--neutron-star-equation-of-state`` + * - Header String: + - PO_NS_EOS + +.. _spec-options-props-O: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ORBITAL_PERIOD** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_OrbitalPeriod + * - Description: + - Value of program option ``--orbital-period`` + * - Header String: + - PO_Orbital_Period + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ORBITAL_PERIOD_DISTRIBUTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_OrbitalPeriodDistribution + * - Description: + - Value of program option ``--orbital-period-distribution`` + * - Header String: + - PO_Orbital_Period_Dstrbtn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ORBITAL_PERIOD_DISTRIBUTION_MAX** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_OrbitalPeriodDistributionMax + * - Description: + - Value of program option ``--orbital-period-max`` + * - Header String: + - PO_Orbital_Period_Max + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ORBITAL_PERIOD_DISTRIBUTION_MIN** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_OrbitalPeriodDistributionMin + * - Description: + - Value of program option ``--orbital-period-min`` + * - Header String: + - PO_Orbital_Period_Min + +.. _spec-options-props-P: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PISN_LOWER_LIMIT** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_PairInstabilityLowerLimit + * - Description: + - Value of program option ``--PISN-lower-limit`` + * - Header String: + - PO_PISN_Lower_Limit + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PISN_UPPER_LIMIT** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_PairInstabilityUpperLimit + * - Description: + - Value of program option ``--PISN-upper-limit`` + * - Header String: + - PO_PISN_Upper_Limit + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_PostCommonEnvelopeEccentricityPrescription + * - Description: + - Value of program option ``--post-common-envelope-eccentricity-prescription`` + * - Header String: + - PO_Post_CE_Eccentricity_Prescription + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **POST_COMMON_ENVELOPE_ECCENTRICITY_CAP** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_PostCommonEnvelopeEccentricityCap + * - Description: + - Value of program option ``--post-common-envelope-eccentricity-cap`` + * - Header String: + - PO_Post_CE_Eccentricity_Cap + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **POST_COMMON_ENVELOPE_ECCENTRICITY_FRACTION** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_PostCommonEnvelopeEccentricityFraction + * - Description: + - Value of program option ``--post-common-envelope-eccentricity-fraction`` + * - Header String: + - PO_Post_CE_Eccentricity_Fraction + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PPI_CO_CORE_SHIFT_HENDRIKS** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_PulsationalPairInstabilityCOCoreShiftHendriks + * - Description: + - Value of program option ``--PPI-CO-Core-Shift-Hendriks`` + * - Header String: + - PO_PPI_CO_CORE_SHIFT_HENDRIKS + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PPI_LOWER_LIMIT** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_PulsationalPairInstabilityLowerLimit + * - Description: + - Value of program option ``--PPI-lower-limit`` + * - Header String: + - PO_PPI_Lower_Limit + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PPI_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_PulsationalPairInstabilityPrescription + * - Description: + - Value of program option ``--pulsational-pair-instability-prescription`` + * - Header String: + - PO_PPI_Prscrptn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PPI_UPPER_LIMIT** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_PulsationalPairInstabilityUpperLimit + * - Description: + - Value of program option ``--PPI-upper-limit`` + * - Header String: + - PO_PPI_Upper_Limit + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PULSAR_MAGNETIC_FIELD_DISTRIBUTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_PulsarBirthMagneticFieldDistribution + * - Description: + - Value of program option ``--pulsar-birth-magnetic-field-distribution`` + * - Header String: + - PO_Pulsar_Mag_Field_Dstrbtn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MAX** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_PulsarBirthMagneticFieldDistributionMax + * - Description: + - Value of program option ``--pulsar-birth-magnetic-field-distribution-max`` + * - Header String: + - PO_Pulsar_Mag_Field_Dstrbtn_Max + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MIN** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_PulsarBirthMagneticFieldDistributionMin + * - Description: + - Value of program option ``--pulsar-birth-magnetic-field-distribution-min`` + * - Header String: + - PO_Pulsar_Mag_Field_Dstrbtn_Min + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_PulsarBirthSpinPeriodDistribution + * - Description: + - Value of program option ``--pulsar-birth-spin-period-distribution`` + * - Header String: + - PO_Pulsar_Spin_Period_Dstrbtn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PULSAR_BIRTH_SPIN_DISTRIBUTION_MAX** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_PulsarBirthSpinPeriodDistributionMax + * - Description: + - Value of program option ``--pulsar-birth-spin-period-distribution-max`` + * - Header String: + - PO_Pulsar_Spin_Period_Dstrbtn_Max + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PULSAR_BIRTH_SPIN_DISTRIBUTION_MIN** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_PulsarBirthSpinPeriodDistributionMin + * - Description: + - Value of program option ``--pulsar-birth-spin-period-distribution-min`` + * - Header String: + - PO_Pulsar_Spin_Period_Dstrbtn_Min + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PULSAR_MAGNETIC_FIELD_DECAY_MASS_SCALE** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options:m_PulsarMagneticFieldDecayMassscale + * - Description: + - Value of program option ``--pulsar-magnetic-field-decay-massscale`` + * - Header String: + - PO_Pulsar_Mag_Field_Decay_mScale + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PULSAR_MAGNETIC_FIELD_DECAY_TIME_SCALE** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options:m_PulsarMagneticFieldDecayTimescale + * - Description: + - Value of program option ``--pulsar-magnetic-field-decay-timescale`` + * - Header String: + - PO_Pulsar_Mag_Field_Decay_tScale + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PULSAR_MINIMUM_MAGNETIC_FIELD** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_PulsarLog10MinimumMagneticField + * - Description: + - Value of program option ``--pulsar-minimum-magnetic-field`` + * - Header String: + - PO_Pulsar_Minimum_Mag_Field + +.. _spec-options-props-Q: + +.. _spec-options-props-R: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **RANDOM_SEED** + - + * - Data type: + - UNSIGNED LONG INT + * - COMPAS variable: + - Options::m_RandomSeed + * - Description: + - Value of program option ``--random-seed`` + * - Header String: + - PO_SEED(OPTION) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **RANDOM_SEED_CMDLINE** + - + * - Data type: + - UNSIGNED LONG INT + * - COMPAS variable: + - Options::m_FixedRandomSeed + * - Description: + - Value of program option ``--random-seed`` (specified on the commandline) + * - Header String: + - PO_SEED(CMDLINE) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **REMNANT_MASS_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_RemnantMassPrescription + * - Description: + - Value of program option ``--remnant-mass-prescription`` + * - Header String: + - PO_Remnant_Mass_Prscrptn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ROTATIONAL_VELOCITY_DISTRIBUTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_RotationalVelocityDistribution + * - Description: + - Value of program option ``--rotational-velocity-distribution`` + * - Header String: + - PO_Rotational_Velocity_Dstrbtn + +.. _spec-options-props-S: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **SCALE_CHE_MASS_LOSS_SURF_HE_ABUNDANCE** + - + * - Data type: + - BOOL + * - COMPAS variable: + - Options::m_ScaleCHEMassLossWithSurfaceHeliumAbundance + * - Description: + - Value of program option ``--scale-CHE-mass-loss-with-surface-helium-abundance`` + * - Header String: + - PO_Scale_CHE_Mass_Loss_Surf_He_Abundance + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **SCALE_TERMINAL_WIND_VEL_METALLICITY_POWER** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_ScaleTerminalWindVelocityWithMetallicityPower + * - Description: + - Value of program option ``--scale-terminal-wind-velocity-with-metallicity-power`` + * - Header String: + - PO_Scale_Terminal_Wind_Vel_Metallicity_Power + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **SEMI_MAJOR_AXIS** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_SemiMajorAxis + * - Description: + - Value of program option ``--semi-major-axis`` + * - Header String: + - PO_Semi-Major_Axis + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **SEMI_MAJOR_AXIS_DISTRIBUTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_SemiMajorAxisDistribution + * - Description: + - Value of program option ``--semi-major-axis-distribution`` + * - Header String: + - PO_Semi-Major_Axis_Dstrbtn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **SEMI_MAJOR_AXIS_DISTRIBUTION_MAX** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_SemiMajorAxisDistributionMax + * - Description: + - Value of program option ``--semi-major-axis-max`` + * - Header String: + - PO_Semi-Major_Axis_Dstrbtn_Max + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **SEMI_MAJOR_AXIS_DISTRIBUTION_MIN** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_SemiMajorAxisDistributionMin + * - Description: + - Value of program option ``--semi-major-axis-min`` + * - Header String: + - PO_Semi-Major_Axis_Dstrbtn_Min + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **STELLAR_ZETA_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_StellarZetaPrescription + * - Description: + - Value of program option ``--stellar-zeta-prescription`` + * - Header String: + - PO_Stellar_Zeta_Prscrptn + +.. _spec-options-props-T: + +.. _spec-options-props-U: + +.. _spec-options-props-V: + +.. _spec-options-props-W: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **WR_FACTOR** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_WolfRayetFactor + * - Description: + - Value of program option ``--wolf-rayet-multiplier`` + * - Header String: + - PO_WR_Factor + +.. _spec-options-props-X: + +.. _spec-options-props-Y: + +.. _spec-options-props-Z: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ZETA_ADIABATIC_ARBITRARY** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_ZetaAdiabaticArbitrary + * - Description: + - Value of program option ``--zeta-adiabatic-arbitrary`` + * - Header String: + - PO_Zeta_Adiabatic_Arbitrary + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ZETA_MS** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_ZetaMainSequence + * - Description: + - Value of program option ``--zeta-main-sequence`` + * - Header String: + - PO_Zeta_Main_Sequence_Giant + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ZETA_RADIATIVE_ENVELOPE_GIANT** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_ZetaRadiativeEnvelopeGiant + * - Description: + - Value of program option ``--zeta-radiative-envelope-giant`` + * - Header String: + - PO_Zeta_Radiative_Envelope_Giant + diff --git a/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification.rst b/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification.rst index d5742f7b0..d4e257e83 100644 --- a/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification.rst +++ b/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification.rst @@ -1,136 +1,137 @@ -Standard log file record specification -====================================== - -The standard log file record specifiers can be changed at run-time by supplying a log file definitions file via the ``--logfile-definitions`` -program option. This allows users to change what appears in any of the standard COMPAS log files without the need to change the source code -or rebuild the COMPAS executable. - -The syntax of the definitions file is fairly simple. The definitions file is expected to contain zero or more log file record specifications, as -explained below. - -Complete lists of available properties selectable for inclusion (or exclusion) from COMPAS log file are available: - - -.. toctree:: - :maxdepth: 1 - - standard-logfiles-record-specification-stellar - standard-logfiles-record-specification-binary - standard-logfiles-record-specification-options - - -For the following specification:: - - ::= means `expands to` or `is defined as` - { x } means (possible) repetition: x may appear zero or more times - [ x ] means x is optional: x may appear, or not - is a term (expression) - "abc" means literal string "abc" - n means integer number - | means `OR` - # indicates the start of a comment - - -Log file definitions file specification ---------------------------------------- - -:: - - ::= {} - - ::= "{" { [ ] } "}" - - ::= "SSE_SYSPARMS_REC" | # SSE only - "SSE_DETAILED_REC" | # SSE only - "SSE_SYS_SNAPSHOT_REC" | # SSE only - "SSE_SNE_REC" | # SSE only - "SSE_SWITCH_REC" | # SSE only - "BSE_SYSPARMS_REC" | # BSE only - "BSE_SWITCH_REC" | # BSE only - "BSE_DCO_REC" | # BSE only - "BSE_SNE_REC" | # BSE only - "BSE_CEE_REC" | # BSE only - "BSE_PULSARS_REC" | # BSE only - "BSE_RLOF_REC" | # BSE only - "BSE_DETAILED_REC" | # BSE only - "BSE_SYS_SNAPSHOT_REC" | # BSE only - - ::= "=" | "+=" | "-=" - - ::= [ ] - - ::= "::" [ ] - - ::= "::" | "EOL" - - ::= "," | - - ::= "STAR_PROPERTY" | # SSE only - "STAR1_PROPERTY" | # BSE only - "STAR2_PROPERTY" | # BSE only - "SUPERNOVA_PROPERTY" | # BSE only - "COMPANION_PROPERTY" | # BSE only - "BINARY_PROPERTY" | # BSE only - "PROGRAM_OPTION" | # SSE_or BSE - - ::= "[" n "]" - - ::= valid property name for specified property type (see definitions in constants.h) - - -The log file definitions may contain comments. Comments are denoted by the hash/pound character ("#"). The hash/pound character and any -text following it on the line in which the hash character appears is ignored by the parser. The hash/pound character can appear anywhere -on a line - if it is the first character then the entire line is a comment and ignored by the parser, or it can follow valid symbols on -a line, in which case the symbols before the hash/pound character are parsed and interpreted by the parser. - -A log file specification record is initially set to its default value (see :doc:`standard-logfiles-default-record-specifications`). -The log file definitions file informs COMPAS as to the modifications to the default values the user wants. This means that the log file -definitions log file is not mandatory, and if the log file definitions file is not present, or contains no valid record specifiers, the log -file record definitions will remain at their default values. - -The assignment operator given in a record specification (```` in the specification above) can be one of "=", "+=", and "-=". The meanings of -these are: - - "=" means the record specifier should be assigned the list of properties specified in the braced-list following the "=" operator. The value of the record specifier prior to the assignment is discarded, and the new value set as described. - - "+=" means the list of properties specified in the braced-list following the "+=" operator should be appended to the existing value of the record specifier. Note that the new properties are appended to the existing list, so will appear at the end of the list (properties are printed in the order they appear in the list). - - "-=" means the list of properties specified in the braced-list following the "-=" operator should be subtracted from the existing value of the record specifier. - -The `prop-index` qualifier may only be used for vector program options. - - -Example definitions file entries --------------------------------- - -Some example log file definitions file entries are:: - - SSE_SYSPARMS_REC = { STAR_PROPERTY::RANDOM_SEED, STAR_PROPERTY::RADIUS, - STAR_PROPERTY::MASS, - STAR_PROPERTY::LUMINOSITY - } - - BSE_PULSARS_REC += { STAR_1_PROPERTY::LUMINOSITY, STAR_2_PROPERTY::CORE_MASS, - BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, COMPANION PROPERTY::RADIUS - } - - BSE_PULSARS_REC -= { SUPERNOVA_PROPERTY::TEMPERATURE } - - BSE_PULSARS_REC += { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS, - BINARY_PROPERTY::ORBITAL_VELOCITY - } - - BSE_SYSPARMS_REC -= { PROGRAM_OPTION::NOTES } - BSE_SYSPARMS_REC += { PROGRAM_OPTION::NOTES[1], PROGRAM_OPTION::NOTES[3] } - -A full example log file record specifications file is shown in :doc:`standard-logfiles-example-definitions-file`. - -The record specifications in the definitions file are processed individually in the sequence they appear in the file, and are cumulative: -for record specifications pertaining to the same record name, the output of earlier specifications is input to later specifications. - -For each record specification: - -- Properties requested to be added to an existing record specification that already exist in that record specification are ignored. Properties will not appear in a record specification twice. -- Properties requested to be subtracted from an existing record specification that do not exist in that record specification are ignored. - -Note that neither of those circumstances will cause a parse error for the definitions file – in both cases the user’s intent is satisfied. +Standard log file record specification +====================================== + +The standard log file record specifiers can be changed at run-time by supplying a log file definitions file via the ``--logfile-definitions`` +program option. This allows users to change what appears in any of the standard COMPAS log files without the need to change the source code +or rebuild the COMPAS executable. + +The syntax of the definitions file is fairly simple. The definitions file is expected to contain zero or more log file record specifications, as +explained below. + +Complete lists of available properties selectable for inclusion (or exclusion) from COMPAS log file are available: + + +.. toctree:: + :maxdepth: 1 + + standard-logfiles-record-specification-stellar + standard-logfiles-record-specification-binary + standard-logfiles-record-specification-options + + +For the following specification:: + + ::= means `expands to` or `is defined as` + { x } means (possible) repetition: x may appear zero or more times + [ x ] means x is optional: x may appear, or not + is a term (expression) + "abc" means literal string "abc" + n means integer number + | means `OR` + # indicates the start of a comment + + +Log file definitions file specification +--------------------------------------- + +:: + + ::= {} + + ::= "{" { [ ] } "}" + + ::= "SSE_SYSPARMS_REC" | # SSE only + "SSE_DETAILED_REC" | # SSE only + "SSE_SYS_SNAPSHOT_REC" | # SSE only + "SSE_SNE_REC" | # SSE only + "SSE_SWITCH_REC" | # SSE only + "BSE_SYSPARMS_REC" | # BSE only + "BSE_SWITCH_REC" | # BSE only + "BSE_DCO_REC" | # BSE only + "BSE_SNE_REC" | # BSE only + "BSE_CEE_REC" | # BSE only + "BSE_CBD_REC" | # BSE only + "BSE_PULSARS_REC" | # BSE only + "BSE_RLOF_REC" | # BSE only + "BSE_DETAILED_REC" | # BSE only + "BSE_SYS_SNAPSHOT_REC" | # BSE only + + ::= "=" | "+=" | "-=" + + ::= [ ] + + ::= "::" [ ] + + ::= "::" | "EOL" + + ::= "," | + + ::= "STAR_PROPERTY" | # SSE only + "STAR1_PROPERTY" | # BSE only + "STAR2_PROPERTY" | # BSE only + "SUPERNOVA_PROPERTY" | # BSE only + "COMPANION_PROPERTY" | # BSE only + "BINARY_PROPERTY" | # BSE only + "PROGRAM_OPTION" | # SSE_or BSE + + ::= "[" n "]" + + ::= valid property name for specified property type (see definitions in constants.h) + + +The log file definitions may contain comments. Comments are denoted by the hash/pound character ("#"). The hash/pound character and any +text following it on the line in which the hash character appears is ignored by the parser. The hash/pound character can appear anywhere +on a line - if it is the first character then the entire line is a comment and ignored by the parser, or it can follow valid symbols on +a line, in which case the symbols before the hash/pound character are parsed and interpreted by the parser. + +A log file specification record is initially set to its default value (see :doc:`standard-logfiles-default-record-specifications`). +The log file definitions file informs COMPAS as to the modifications to the default values the user wants. This means that the log file +definitions log file is not mandatory, and if the log file definitions file is not present, or contains no valid record specifiers, the log +file record definitions will remain at their default values. + +The assignment operator given in a record specification (```` in the specification above) can be one of "=", "+=", and "-=". The meanings of +these are: + + "=" means the record specifier should be assigned the list of properties specified in the braced-list following the "=" operator. The value of the record specifier prior to the assignment is discarded, and the new value set as described. + + "+=" means the list of properties specified in the braced-list following the "+=" operator should be appended to the existing value of the record specifier. Note that the new properties are appended to the existing list, so will appear at the end of the list (properties are printed in the order they appear in the list). + + "-=" means the list of properties specified in the braced-list following the "-=" operator should be subtracted from the existing value of the record specifier. + +The `prop-index` qualifier may only be used for vector program options. + + +Example definitions file entries +-------------------------------- + +Some example log file definitions file entries are:: + + SSE_SYSPARMS_REC = { STAR_PROPERTY::RANDOM_SEED, STAR_PROPERTY::RADIUS, + STAR_PROPERTY::MASS, + STAR_PROPERTY::LUMINOSITY + } + + BSE_PULSARS_REC += { STAR_1_PROPERTY::LUMINOSITY, STAR_2_PROPERTY::CORE_MASS, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, COMPANION PROPERTY::RADIUS + } + + BSE_PULSARS_REC -= { SUPERNOVA_PROPERTY::TEMPERATURE } + + BSE_PULSARS_REC += { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS, + BINARY_PROPERTY::ORBITAL_VELOCITY + } + + BSE_SYSPARMS_REC -= { PROGRAM_OPTION::NOTES } + BSE_SYSPARMS_REC += { PROGRAM_OPTION::NOTES[1], PROGRAM_OPTION::NOTES[3] } + +A full example log file record specifications file is shown in :doc:`standard-logfiles-example-definitions-file`. + +The record specifications in the definitions file are processed individually in the sequence they appear in the file, and are cumulative: +for record specifications pertaining to the same record name, the output of earlier specifications is input to later specifications. + +For each record specification: + +- Properties requested to be added to an existing record specification that already exist in that record specification are ignored. Properties will not appear in a record specification twice. +- Properties requested to be subtracted from an existing record specification that do not exist in that record specification are ignored. + +Note that neither of those circumstances will cause a parse error for the definitions file – in both cases the user’s intent is satisfied. diff --git a/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-types-bse-circumbinary-disks.rst b/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-types-bse-circumbinary-disks.rst new file mode 100644 index 000000000..db1538bed --- /dev/null +++ b/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-types-bse-circumbinary-disks.rst @@ -0,0 +1,7 @@ +BSE circumbinary disks file record types +======================================== + +Following is a list of the BSE Circumbinary Disks file record type numbers and corresponding symbolic names, and their meaning: + +1. DEFAULT |BR| + Default BSE_CIRCUMBINARY_DISKS file record type. \ No newline at end of file diff --git a/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-types.rst b/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-types.rst index 249e2d7b9..30bfbb2bb 100644 --- a/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-types.rst +++ b/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-types.rst @@ -1,68 +1,69 @@ -Standard log file record types -============================== - -All standard COMPAS logfiles, except the switch log files, have a record type property (column). The record type property -is an unsigned integer that can take any value in the range :math:`0..4294967295`. - -The record type is used to differentiate records within a standard log file. The functionality was introduced primarily to -support different types of records in the detailed output files (BSE and SSE), but has been extended to all other log files -(except the switch log files). - -The use case for the detailed output log files is to differentiate between records written to the file when the star or binary -and constituent stars are known to be in self-consistent states (that is, the attributes of the star or binary and constituent -stars have been correctly and completely updated), and records written to the file, perhaps mid-timestep, when the star or -binary and/or constituent stars may not be self-consistent. Since the record type property can take any value in the range -:math:`0..4294967295` there is scope to identify many different events or situations, in any of the standard log files. We may, -for example, use different record types to indicate that a detailed output record was written immediately prior to, or immediately -following, a particular event or calculation. Or we may want to indicate that a supernovae record was written to the supernovae -file prior to the SN event, and another record following the SN event. Or for the RLOF file we may want to differentiate between -records written pre-MT and post_MT - the possibilities are (almost) limitless. - -Each standard log file has its own set of record types - select a file below to see the available record types for that file. - -.. toctree:: - :maxdepth: 1 - - standard-logfiles-record-types-sse-system-parameters - standard-logfiles-record-types-sse-supernovae - standard-logfiles-record-types-sse-pulsar-evolution - standard-logfiles-record-types-sse-detailed-output - standard-logfiles-record-types-sse-system-snapshot - - standard-logfiles-record-types-bse-system-parameters - standard-logfiles-record-types-bse-supernovae - standard-logfiles-record-types-bse-rlof - standard-logfiles-record-types-bse-pulsar-evolution - standard-logfiles-record-types-bse-double-compact-objects - standard-logfiles-record-types-bse-common-envelopes - standard-logfiles-record-types-bse-detailed-output - standard-logfiles-record-types-bse-system-snapshot - -Since the record type property is an unsigned integer, filtering the output files by record type is very simple. Even so, users may -want to disable the logging of some record types - perhaps to limit the size of the log files produced. For this reason, program options -are provided to enable/disable the logging of different record types for log files that have a record type property. These options are: - - - --logfile-system-parameters-record-types - - --logfile-supernovae-record-types - - --logfile-detailed-output-record-types - - --logfile-common-envelopes-record-types - - --logfile-rlof-parameters-record-types - - --logfile-double-compact-objects-record-types - - --logfile-pulsar-evolution-record-types - -For these options, the record types to be enabled are specified as a bitmap, with each bit corresponding to a record type. To construct -the bitmap, for each record type to be enabled, raise 2 to the power of (record type - 1), then sum the results - the sum is the bitmap, -and the integer value to be entered for this option. - -Example: - -To enable record types :math:`1`, :math:`4`, and :math:`9`, the option value should be - -.. math:: - - 2^{(1 - 1)} + 2^{(4 - 1)} + 2^{(9 - 1)} = 2^0 + 2^3 + 2^8 = 1 + 8 + 256 = 265 - -:math:`265`` as a binary number is written as 0100001001, with the 1st, 4th, and 9th bits enabled (counting 1-based from the least-significant -bit being the right-most), corresponding to the record types :math:`1`, :math:`4`, and :math:`9` being enabled, and all other record types disabled. - -A value of -1 for the bitmap is shorthand for all bits enabled - all record types enabled. +Standard log file record types +============================== + +All standard COMPAS logfiles, except the switch log files, have a record type property (column). The record type property +is an unsigned integer that can take any value in the range :math:`0..4294967295`. + +The record type is used to differentiate records within a standard log file. The functionality was introduced primarily to +support different types of records in the detailed output files (BSE and SSE), but has been extended to all other log files +(except the switch log files). + +The use case for the detailed output log files is to differentiate between records written to the file when the star or binary +and constituent stars are known to be in self-consistent states (that is, the attributes of the star or binary and constituent +stars have been correctly and completely updated), and records written to the file, perhaps mid-timestep, when the star or +binary and/or constituent stars may not be self-consistent. Since the record type property can take any value in the range +:math:`0..4294967295` there is scope to identify many different events or situations, in any of the standard log files. We may, +for example, use different record types to indicate that a detailed output record was written immediately prior to, or immediately +following, a particular event or calculation. Or we may want to indicate that a supernovae record was written to the supernovae +file prior to the SN event, and another record following the SN event. Or for the RLOF file we may want to differentiate between +records written pre-MT and post_MT - the possibilities are (almost) limitless. + +Each standard log file has its own set of record types - select a file below to see the available record types for that file. + +.. toctree:: + :maxdepth: 1 + + standard-logfiles-record-types-sse-system-parameters + standard-logfiles-record-types-sse-supernovae + standard-logfiles-record-types-sse-pulsar-evolution + standard-logfiles-record-types-sse-detailed-output + standard-logfiles-record-types-sse-system-snapshot + + standard-logfiles-record-types-bse-system-parameters + standard-logfiles-record-types-bse-supernovae + standard-logfiles-record-types-bse-rlof + standard-logfiles-record-types-bse-pulsar-evolution + standard-logfiles-record-types-bse-double-compact-objects + standard-logfiles-record-types-bse-common-envelopes + standard-logfiles-record-types-bse-circumbinary-disks + standard-logfiles-record-types-bse-detailed-output + standard-logfiles-record-types-bse-system-snapshot + +Since the record type property is an unsigned integer, filtering the output files by record type is very simple. Even so, users may +want to disable the logging of some record types - perhaps to limit the size of the log files produced. For this reason, program options +are provided to enable/disable the logging of different record types for log files that have a record type property. These options are: + + - --logfile-system-parameters-record-types + - --logfile-supernovae-record-types + - --logfile-detailed-output-record-types + - --logfile-common-envelopes-record-types + - --logfile-rlof-parameters-record-types + - --logfile-double-compact-objects-record-types + - --logfile-pulsar-evolution-record-types + +For these options, the record types to be enabled are specified as a bitmap, with each bit corresponding to a record type. To construct +the bitmap, for each record type to be enabled, raise 2 to the power of (record type - 1), then sum the results - the sum is the bitmap, +and the integer value to be entered for this option. + +Example: + +To enable record types :math:`1`, :math:`4`, and :math:`9`, the option value should be + +.. math:: + + 2^{(1 - 1)} + 2^{(4 - 1)} + 2^{(9 - 1)} = 2^0 + 2^3 + 2^8 = 1 + 8 + 256 = 265 + +:math:`265`` as a binary number is written as 0100001001, with the 1st, 4th, and 9th bits enabled (counting 1-based from the least-significant +bit being the right-most), corresponding to the record types :math:`1`, :math:`4`, and :math:`9` being enabled, and all other record types disabled. + +A value of -1 for the bitmap is shorthand for all bits enabled - all record types enabled. diff --git a/online-docs/pages/User guide/COMPAS output/standard-logfiles.rst b/online-docs/pages/User guide/COMPAS output/standard-logfiles.rst index e04efdbda..256d9d0ba 100644 --- a/online-docs/pages/User guide/COMPAS output/standard-logfiles.rst +++ b/online-docs/pages/User guide/COMPAS output/standard-logfiles.rst @@ -1,58 +1,64 @@ -Standard log files -================== - -COMPAS defines several standard log files that may be produced depending upon the simulation mode (Single Star Evolution (SSE), -or Binary Star Evolution (BSE), see the ``--mode`` program option), and the value of various program options. - -The standard log files are: - - .. list-table:: - :widths: 32 68 - :header-rows: 0 - :class: aligned-text - - * - System Parameters - - Records summary information for all stars, or binary stars, during evolution. - * - - - - * - Supernovae - - Records summary information for all stars that experience a SN event during evolution. - * - - - - * - System Snapshot Log - - Records detailed system information during evolution. - * - - - Enable with program option ``--system-snapshot-age-thresholds`` and/or ``--system-snapshot-time-thresholds``. - * - - - - * - BSE/SSE Detailed Output - - Records detailed information for a star, or binary star, during evolution. - * - - - Enable with program option ``--detailed-output``. - * - - - - * - SwitchLog - - Records detailed information for all stars, or binary stars, at the time of each stellar type switch during evolution. - * - - - Enable with program option ``--switch-log``. - * - - - - * - Double Compact Objects - - Records summary information for all binary systems that form DCOs during BSE. - * - - - - * - Common Envelopes - - Records summary information for all binary systems that experience CEEs during BSE. - * - - - - * - Pulsar Evolution - - Records detailed Pulsar evolution information during SSE/BSE. - * - - - Enable with program option ``--evolve-pulsars``. - * - - - - * - RLOF - - Records detailed information RLOF events during BSE. - * - - - Enable with program option ``--rlof-printing``. - +Standard log files +================== + +COMPAS defines several standard log files that may be produced depending upon the simulation mode (Single Star Evolution (SSE), +or Binary Star Evolution (BSE), see the ``--mode`` program option), and the value of various program options. + +The standard log files are: + + .. list-table:: + :widths: 32 68 + :header-rows: 0 + :class: aligned-text + + * - System Parameters + - Records summary information for all stars, or binary stars, during evolution. + * - + - + * - Supernovae + - Records summary information for all stars that experience a SN event during evolution. + * - + - + * - System Snapshot Log + - Records detailed system information during evolution. + * - + - Enable with program option ``--system-snapshot-age-thresholds`` and/or ``--system-snapshot-time-thresholds``. + * - + - + * - BSE/SSE Detailed Output + - Records detailed information for a star, or binary star, during evolution. + * - + - Enable with program option ``--detailed-output``. + * - + - + * - SwitchLog + - Records detailed information for all stars, or binary stars, at the time of each stellar type switch during evolution. + * - + - Enable with program option ``--switch-log``. + * - + - + * - Double Compact Objects + - Records summary information for all binary systems that form DCOs during BSE. + * - + - + * - Common Envelopes + - Records summary information for all binary systems that experience CEEs during BSE. + * - + - + * - Circumbinary Disks + - Records summary information for each post-common-envelope circumbinary disk that forms during BSE. + * - + - Enable with program option ``--circumbinary-disk``. + * - + - + * - Pulsar Evolution + - Records detailed Pulsar evolution information during SSE/BSE. + * - + - Enable with program option ``--evolve-pulsars``. + * - + - + * - RLOF + - Records detailed information RLOF events during BSE. + * - + - Enable with program option ``--rlof-printing``. + diff --git a/online-docs/pages/User guide/Program options/program-options-list-defaults.rst b/online-docs/pages/User guide/Program options/program-options-list-defaults.rst index b624a849f..c7f061558 100644 --- a/online-docs/pages/User guide/Program options/program-options-list-defaults.rst +++ b/online-docs/pages/User guide/Program options/program-options-list-defaults.rst @@ -124,6 +124,58 @@ Default = PESSIMISTIC |br| Circularise binary when it enters a Mass Transfer episode. |br| Default = TRUE +**--circumbinary-disk** |br| +Enable post-common-envelope circumbinary disk formation and evolution. +|br| Default = FALSE + +**--circumbinary-disk-beta** |br| +Ratio between the fraction of the binary angular momentum and the fraction of the common-envelope mass available for circumbinary disk formation. +|br| Default = 3.0 + +**--circumbinary-disk-envelope-mass-fraction-supplied** |br| +Fraction of the common-envelope mass supplied to the post-common-envelope binary through a circumbinary disk. +|br| Default = 0.05 + +**--circumbinary-disk-inner-radius-over-separation** |br| +Inner radius of the circumbinary disk in units of the post-common-envelope binary separation. +|br| Default = 2.5 + +**--circumbinary-disk-lifetime** |br| +Duration, in yr, over which the supplied circumbinary disk mass is delivered to the binary. +|br| Default = :math:`10^{5}` + +**--circumbinary-disk-structure-factor** |br| +Disk structure factor multiplying the circumbinary disk angular-momentum threshold. +|br| Default = 4.0 + +**--circumbinary-disk-eddington-mode** |br| +Eddington-limited accretion prescription used during circumbinary disk evolution. +|br| Options: { CAP, GE23, TM23 } +|br| ``CAP`` limits the accretion to ``--circumbinary-disk-eddington-cap-factor`` times the Eddingtom accretion rate. +|br| ``GE23`` reduces the supplied mass rate by a factor of ``--circumbinary-disk-eddington-cap-factor``, following Ghodla & Eldrigde 2023. +|br| ``TM23`` applies the Tuna & Metzger 2023 compact-object accretion prescription. +|br| Default = GE23 + +**--circumbinary-disk-eddington-cap-factor** |br| +Multiplier applied to the Eddington accretion rate in ``CAP`` mode. +|br| Default = 1.0 + +**--circumbinary-disk-eddington-ge23-factor** |br| +Retained fraction of the requested super-Eddington accretion rate in ``GE23`` mode. +|br| Default = :math:`2 / 3` + +**--circumbinary-disk-evolution-mode** |br| +Circumbinary disk evolution mode. +|br| Options: { INSTANTANEOUS, TIMESTEPPED } +|br| ``INSTANTANEOUS`` applies the full disk interaction immediately after common-envelope evolution. +|br| ``TIMESTEPPED`` stores an active disk reservoir and evolves it over later COMPAS timesteps. +|br| Default = INSTANTANEOUS + +**--circumbinary-disk-use-synchronized-envelope-angular-momentum** |br| +Use the synchronized-envelope angular-momentum estimate in the circumbinary disk formation criterion instead of the COMPAS total angular momentum. +|br| This is a legacy option for compatibility with Unger et al. 2026. +|br| Default = FALSE + **--common-envelope-allow-immediate-RLOF-post-CE-survive** |br| Allow binaries that experience Roche lobe overflow immediately at the end of the CE phase to survive. |br| Default = FALSE @@ -1127,6 +1179,24 @@ Default = 135.0 Print details of population. |br| Default = FALSE +**--post-common-envelope-eccentricity-prescription** |br| +Prescription for setting the eccentricity immediately after common-envelope evolution. +|br| Options: { CIRCULAR, PRE_RLOF_CAP, PRE_RLOF_FRACTION } +|br| ``CIRCULAR`` assigns :math:`e_{\rm postCE} = 0`. +|br| ``PRE_RLOF_CAP`` assigns :math:`e_{\rm postCE} = \min(e_{\rm preRLOF}, e_{\rm CE,max})`, where :math:`e_{\rm CE,max}` is set by ``--post-common-envelope-eccentricity-cap``. +|br| ``PRE_RLOF_FRACTION`` assigns :math:`e_{\rm postCE} = f_e e_{\rm preRLOF}`, where :math:`f_e` is set by ``--post-common-envelope-eccentricity-fraction``. +|br| Default = CIRCULAR + +**--post-common-envelope-eccentricity-cap** |br| +Upper cap on the post-common-envelope eccentricity when ``--post-common-envelope-eccentricity-prescription`` is ``PRE_RLOF_CAP``. +|br| In this mode, :math:`e_{\rm postCE} = \min(e_{\rm preRLOF}, e_{\rm CE,max})`. +|br| Default = 0.1 + +**--post-common-envelope-eccentricity-fraction** |br| +Fraction of the pre-RLOF eccentricity retained after common-envelope evolution when ``--post-common-envelope-eccentricity-prescription`` is ``PRE_RLOF_FRACTION``. +|br| In this mode, :math:`e_{\rm postCE} = f_e e_{\rm preRLOF}`. +|br| Default = 0.1 + **--PPI-CO-Core-Shift-Hendriks** |br| Shift in CO core mass for PPI (in Msol) for the Hendriks+23 PPI prescription Default = 0.0 @@ -1571,7 +1641,11 @@ Go to :ref:`the top of this page ` for the full alphabetical --common-envelope-lambda-nanjing-use_rejuvenated-mass, --common-envelope-allow-main-sequence-survive, --common-envelope-allow-radiative-envelope-survive, --common-envelope-allow-immediate-RLOF-post-CE-survive, --common-envelope-mass-accretion-prescription, --common-envelope-mass-accretion-constant, --common-envelope-mass-accretion-min, --common-envelope-mass-accretion-max, --common-envelope-recombination-energy-density, --maximum-mass-donor-nandez-ivanova, ---revised-energy-formalism-nandez-ivanova +--revised-energy-formalism-nandez-ivanova, --post-common-envelope-eccentricity-prescription, --post-common-envelope-eccentricity-cap, --post-common-envelope-eccentricity-fraction + +--circumbinary-disk, --circumbinary-disk-beta, --circumbinary-disk-envelope-mass-fraction-supplied, --circumbinary-disk-inner-radius-over-separation, --circumbinary-disk-lifetime, +--circumbinary-disk-structure-factor, --circumbinary-disk-eddington-mode, --circumbinary-disk-eddington-cap-factor, --circumbinary-disk-eddington-ge23-factor, +--circumbinary-disk-evolution-mode, --circumbinary-disk-use-synchronized-envelope-angular-momentum :ref:`Back to Top ` diff --git a/online-docs/whats-new.rst b/online-docs/whats-new.rst new file mode 100644 index 000000000..8ab90a0ad --- /dev/null +++ b/online-docs/whats-new.rst @@ -0,0 +1,551 @@ +What's new +========== + +Following is a brief list of important updates to the COMPAS code. A complete record of changes can be found in the file ``changelog.h``. + +**XX.XX.XX June 5, 2026** + +* Added post-common-envelope circumbinary disk formation and evolution following Grichener et al. (2026), including new CBD program options and the ``BSE_Circumbinary_Disks`` logfile. + +**03.29.00 January 30, 2026** +* Added new tidal prescription based on Zahn (1977) and Hurley et. al (2002), called ``ZAHN1977``. +* Renamed the ``KAPIL2025`` tides prescription to ``KAPIL2026`` to match paper date. + +**03.28.00 January 28, 2026** + +* Updated the default values for the Mandel-Müller kick prescription to a magnitude of 630 km/s and a sigma of 0.45, as calibrated by Disberg et al. (2026) to the results of Disberg & Mandel (2025). + +**03.27.02 December 16, 2025** + +* Fixed a bug in the assignment of kick direction angles +* Undid replacement of --scale-CHE-mass-loss-with-surface-helium-abundance with the more general --scale-mass-loss-with-surface-helium-abundance (see 03.26.02) + +**03.26.02 October 27, 2025** + +* Added option --USSN-kicks-override-mandel-muller ; if set to true, use user-defined USSN kicks (as a fixed value) in lieu of the Mandel & Muller kick prescription for USSNe +* Replaced --scale-CHE-mass-loss-with-surface-helium-abundance with the more general --scale-mass-loss-with-surface-helium-abundance (applies to all MS stars, not just CHE stars) + +**03.26.00 September 2, 2025** + +* Added HAMSTARS mass transfer efficiency prescription + +**03.25.00 August 19, 2025** + +* Added KLENCKI_LINEAR AM loss, which is linear in the specific AM gamma instead of the orbital separation (as in MACLEOD_LINEAR). + +This is based on the variations explored in Klencki+ 2025, and is very similar in construction to the MACLEOD_LINEAR option, +with both requiring an interpolation fraction f set by the user. Therefore, the following options are deprecated: + + * ``--mass-transfer-jloss-macleod-linear-fraction-degen`` in favor of ``--mass-transfer-jloss-linear-fraction-degen`` + * ``--mass-transfer-jloss-macleod-linear-fraction-non-degen`` in favor of ``--mass-transfer-jloss-linear-fraction-non-degen`` + +and the replacement options apply for both MACLEOD_LINEAR and KLENCKI_LINEAR. + +**03.24.00 August 19, 2025** + +* Updated Maltsev remnant mass prescription to include the 3 variants described in Willcox+ 2025 (bimodality paper). +* New related options `--maltsev-fallback` which takes a float between 0 and 1 to specify the fallback fraction, and + `--maltsev-mode` with choices `'OPTIMISTIC','PESSIMISTIC','BALANCED'` for the extrapolation prescription (see Willcox+ 2025b) + +**03.23.00 August 09, 2025** + +* The following option is now deprecated, and will be removed in 1 year: + + * ``--use-mass-loss`` in favour of ``--mass-loss-prescription`` + +Instead of using ``--use-mass-loss`` or ``--use-mass-loss true`` to enable mass loss, then specifying the mass loss prescription to be used with +``--mass-loss-prescription``, mass loss can be enabled using ``--mass-loss-prescription`` with any valid prescription (that is not ``zero``), and +disabled with ``--mass-loss-prescription zero`` instead of ``use-mass-loss false``. + +**03.22.02 August 08, 2025** + +* The following options are now deprecated, and will be removed in 1 year: + + * ``--initial-mass-min`` in favour of ``--initial-mass-function-min`` + * ``--initial-mass-max`` in favour of ``--initial-mass-function-max`` + * ``--initial-mass-power`` in favour of ``--initial-mass-function-power`` + * ``--minimum-mass-secondary`` in favour of ``--minimum-sampled-secondary-mass`` + +* The user supplied value for ``--minimum-sampled-secondary-mass`` now checked against the COMPAS values for minimum initial mass (0.00007 :math:`M_\odot`) and maximum initial mass (150.0 :math:`M_\odot`) +* The secondary mass (for BSE), whether input by user, sampled, or calculated from the primary mass and mass ratio, now checked against the COMPAS value for minimum initial mass (0.00007 :math:`M_\odot`) +* The default record types written to the SSE and BSE detailed output files now include only record types 1, 4, & 5 (INITIAL_STATE, TIMESTEP_COMPLETED, and FINAL_STATE) +* The default record types written to the SSE and BSE pulsar evolution files now includes only record type 3 ((Pulsar) TIMESTEP_COMPLETED) + +**03.22.00 July 18, 2025** + +* Changed default values of --enhance-CHE-lifetimes-luminosities and --scale-CHE-mass-loss-with-surface-helium-abundance to true +* Added options to set beta and gamma prescription for second stage of 2-stage CE (``--common-envelope-second-stage-beta``, ``--common-envelope-second-stage-gamma-prescription``) +* Fixed a bug in the calculation of zeta_equilibrium, which impacts when mass transfer is declared to proceed on a nuclear timescale (and hence how conservative it is) +* Fixed the calculation of Mandel & Muller kicks; split ``--muller-mandel-sigma-kick`` into ``--muller-mandel-sigma-kick-NS`` and ``--muller-mandel-sigma-kick-BH`` + +**03.21.00 July 17, 2025** + +* Deprecated mass loss prescription MERRITT2024 in favour of MERRITT2025 +* Added version strings for gsl, boost, and HDF5 to COMPAS splashscreen + +**03.20.06 June 25, 2025** + +* The MAXWELLIAN NS CCSN kick changed from the Hobbs value of 265 km/s to 217 km/s based on 48 younger than 10 Myr pulsars with proper motions from Disberg & Mandel (2025) sample; corrects Hobbs+ 2005 missing Jacobian +* Implemented a LOGNORMAL NS CCSN kick magnitude distribution based on Disberg & Mandel, 2025 + +**03.20.03 June 18, 2025** + +* Resolved an issue that appeared in 03.10.02 with some TPAGB stars in the ECSN range (but not satisfying ECSN conditions) exploding as core-collapse supernovae + +**03.20.01 May 26, 2025** + +* Updates to mass accretion for massive ONe WD +* Changed white dwarf mass-radius relation to use expression from Eggleton 1986, suitable for extremely low-mass white dwarfs. + +**03.20.00 May 25, 2025** + +* Replaced the name of the ``KAPIL2024`` tides prescription with ``KAPIL2025``. +* Updated the equilibrium and dynamical tides equations to match the paper. +* New outputs for BSE_DETAILED_OUTPUT from tidal evolution, including ``CIRCULARIZATION_TIMESCALE``, ``SYNCHRONIZATION_TIMESCALE_1``, ``SYNCHRONIZATION_TIMESCALE_2``, ``TIDAL_POTENTIAL_LOVE_NUMBER_22_1``, ``TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_1``, and ``TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_2`` + +**03.19.00 May 22, 2025** + +* Added functionality to create new System Snapshot logfile |br| + Writing to the System Snapshot logfile is triggered by system age and/or simulation time passing thresholds set by new program options (see below). |br| + New program options added: |br| + ``--logfile-system-snapshot-log``: specifies the name of the System Snapshot logfile (default is "[BSE/SSE]_System_Snapshot_Log") |br| + ``--logfile-system-snapshot-log-record-types``: specifies the enabled record types for System Snapshot logfile (default is all types) |br| + ``--system-snapshot-age-thresholds``: specifies the age thresholds for System Snapshot logfile |br| + ``--system-snapshot-time-thresholds``: specifies the time thresholds for System Snapshot logfile + +**03.18.02 May 1, 2025** + +* Changed default for Nanjing lambdas to use enhanced lambdas and interpolate in mass and metallicity + +**03.18.00 Apr 14, 2025** + +New command line option: + +* ``--timestep-multipliers`` to enable more granular, phase-dependent, timestep multipliers + +**03.17.03 Apr 14, 2025** + +* Neutron stars are now labelled as ``RecycledNS`` when undergoing mass transfer through common envelope (when ``--neutron-star-accretion-in-ce`` is not set to ``ZERO``). +* Removed output option ``RLOF_ONTO_NS`` as it can be retrieved from existing RLOF output info. + +**03.17.00 Mar 22, 2025** + +* Added ``ENVELOPE_STATE_PRESCRIPTION::CONVECTIVE_MASS_FRACTION`` (default threshold of convective envelope by mass to label envelope convective is 0.1, can be set with ``--convective-envelope-mass-threshold``) +* Stable mass transfer now conserves angular momentum after accounting for the rotational angular momentum lost or gained by the stars +* Imposed Keplerian rotation limit on mass-gaining stars: response depends on the new ``--response-to-spin-up`` option, with possible values: + * ``TRANSFER_TO_ORBIT`` (default) allows the star to accrete, but excess angular momentum is deposited in the orbit + * ``KEPLERIAN_LIMIT`` forces mass transfer to become non-conservative once star (approximately) reaches super-critical rotation + * ``NO_LIMIT`` allows arbitrary super-critical accretion, to match legacy choices + +**03.16.02 Mar 19, 2025** + +New output options for supernova, which allow for full characterization of the binary orientation post-SN: + +* ORBITAL_ANGULAR_MOMENTUM_VECTOR_X +* ORBITAL_ANGULAR_MOMENTUM_VECTOR_Y +* ORBITAL_ANGULAR_MOMENTUM_VECTOR_Z +* SYSTEMIC_VELOCITY_X +* SYSTEMIC_VELOCITY_Y +* SYSTEMIC_VELOCITY_Z + +**03.15.00 Mar 5, 2025** + +Changes to the treatment of Neutron Star evolution. + +New command line options: + +* ``--neutron-star-accretion-in-ce`` to determine how a NS accretes mass in a common envelope +* ``--pulsar-birth-magnetic-field-distribution-mean`` and ``--pulsar-birth-magnetic-field-distribution-sigma`` to determine the birth distribution of the pulsar magnetic field (only relevant when the ``--pulsar-birth-magnetic-field-distribution`` option value is ``NORMAL`` or ``LOGNORMAL``) +* ``--pulsar-birth-spin-period-distribution-mean`` and ``--pulsar-birth-spin-period-distribution-sigma`` to determine the birth distribution of the pulsar period (only relevant when the ``--pulsar-birth-spin-period-distribution`` option value is ```NORMAL`` or ``LOGNORMAL``) + +Changed command line option values and defaults: + +* ``--pulsar-birth-spin-period-distribution`` option value ``ZERO`` is now deprecated. +* ``--pulsar-birth-magnetic-field-distribution`` option value ``ZERO`` is now deprecated. +* ``--pulsar-birth-spin-period-distribution`` default option value is now ``NORMAL`` (was ``ZERO``) +* ``--pulsar-birth-magnetic-field-distribution`` default option value is now ``LOGNORMAL`` (was ``ZERO``) + +Changes to the NS-related values in log files: + +* The pulsar magnetic field strength is now recorded in ``Gauss`` (was ``Tesla``) +* The pulsar spin down rate now tracks the pulsar spin period derivative (was spin frequency derivative). +* The SSE/BSE_Pulsar_Evolution file default record now includes the pulsar spin period (s) instead of spin frequency. Spin frequency is still tracked and can be added using the ``logfile-definitions`` option +* The period of non-spinning neutron stars is now reported as infinity instead of zero + +**03.14.00 Mar 3, 2025** + +* Updates to improve convergence without sacrificing computational speed, including updates to default mass and radial change fractions per time step and their usage +* Capped total wind mass loss rate at MAXIMUM_WIND_MASS_LOSS_RATE (set to 0.1 Msol/yr) for all prescriptions +* Changed order of calls in SSE evolution to better match BSE evolution + +**03.13.02 Feb 19, 2025** + +* Replaced name of ``SHIKAUCHI`` main sequence core mass prescription with ``BRCEK``. + +**03.13.01 Feb 13, 2025** + +* Enabled nuclear timescale mass transfer from evolved donors + +**03.13.00 Feb 13, 2025** + +* Added pulsar evolution and output (SSE_Pulsar_Evolution) for SSE mode +* Changed stopping condition for single stars to continue evolving pulsars if ``--evolve-pulsars`` is ``TRUE`` +* Updated documentation for new output + +**03.12.04 Feb 8, 2025** + +* Replaced name of ``COMPAS`` PPISN prescription with ``WOOSLEY``; ``COMPAS`` is now deprecated + +**03.12.00 Jan 16, 2025** + +* Added convective core mass prescription for main sequence stars from Shikauchi+ (2024), describing how the core mass evolves under mass loss and mass gain. +* New command line option ``--main-sequence-core-mass-prescription`` with arguments ``SHIKAUCHI`` (new prescription), ``MANDEL`` (replaces the functionality of ``--retain-core-mass-during-caseA-mass-transfer``), and ``ZERO`` (core mass set to zero, no treatment). +* Updated stellar tracks with added luminosity prescription for main sequence stars from Shikauchi+ (2024). +* Added treatment for rejuvenation of main sequence accretors when the new prescription is used. + +**03.10.00 Nov 29, 2024** + +Added functionality to log stellar mergers in the BSE switchlog file. +Switchlog merger records come in pairs (one for each star) so that the stellar type of each star is recorded. + +**03.09.00 Nov 28, 2024** + +Improved nuclear timescale mass transfer: the nuclear timescale mass transfer rate is now set by the requirement that the star +ends the time step just filling its Roche lobe. +Fixed several significant mass-transfer issues, such as accretors not gaining mass appropriately and failures +in the root solver for fitting the star into the Roche lobe that were leading to artificial common envelopes and mergers. + +**03.08.02 Nov 18, 2024** + +Updated implementation of the mass transfer stability critical mass ratio tables from the team of Hongwei Ge. +We now use all the most up to do date tables they've produced (public or otherwise) from Papers I-V, including +variations for adiabatic and isentropic treatments, variable accretion efficiency, and two different metallicities, +as well as for He stars (albeit only for adiabatic, fully conservative, solar metallicity stars). + +**03.08.00 Nov 18, 2024** + +Improved the treatment of stellar rotation (with further corrections in 03.08.01): + +* Assume rigid body rotation +* Keep the angular moment of a star constant when there is no mass loss +* When a star with radius r and angular frequency omega loses mass dm through winds or mass transfer, it loses angular momentum dL = (2/3) dm r^2 omega +* (However, angular momentum never drops below zero) +* When a star loses its envelope, the remaining core is assumed to rotate with the same rotation rate as the preceding star +* When a star of mass m and radius r gains mass dm through accretion, it gain angular momentum dL = dm \sqrt{G m r} +* If initial binary rotation is fast enough for a star to be CHE, it is set to that rotation frequency without regard for the tidal prescription; CHE stars remain tidally locked if the tidal prescription is NONE + +**03.07.01 Oct 23, 2024** + +Resolved (and reverted) performance degradation introduced in v03.00.00. + +**03.07.00 Oct 16, 2024** + +Added new critical mass ratio tables from Ge et al. 2024. + +**03.06.00 Oct 14, 2024** + +Incorporated the Maltsev+ (2024) prescription for supernova remnant masses. + +**03.03.00 Sep 24, 2024** + +Added new functionality to improve modelling of chemically homogeneous evolution (CHE). The default behaviour remains unchanged. + +* New command line option `--enable-rotationally-enhanced-mass-loss` to enable rotationally enhanced mass loss following Langer (1998) +* New command line option `--enhance-CHE-lifetimes-luminosities` to enhance CHE lifetimes and luminosities following detailed models from Szecsi et al. (2015) +* New command line option `--scale-CHE-mass-loss-with-surface-helium-abundance` to switch from OB to WR mass loss for CH stars towards the end of the main sequence +* New command line option `--scale-terminal-wind-velocity-with-metallicity-power` to scale the terminal wind velocity with the metallicity + +**03.02.00 Sep 19, 2024** + +Added recording of ``MASS_TRANSFER_TIMESCALE (NONE, NUCLEAR, THERMAL, CE)``. +Now continuing evolution on mergers at birth (stars touching) if ``--resolve-main-sequence-merger``. +Changed Sabhahit+ 2023 VMS winds to default to current OB wind prescription if Gamma threshold is not met +Correct the behaviour of the second stage of 2-stage CE to first transfer mass from the star that initiated RLOF; +now ensuring that the accretor's mass is correctly adjusted +Update the fits for the convective envelope mass and radial extent to ensure smooth behaviour +Updated treatment of 2-stage common envelope for intermediate mass stars, to smoothly reduce from Hirai & Mandel above 8 solar masses +to classical "full envelope" removal for stars below 2 solar masses. + +**03.01.06 Aug 30, 2024** + +Added functionality to allow users to specify if WD-binaries should be included in the BSE DCO file via new option ``--include-WD-binaries-as-DCO``. +When enabled, ``--include-WD-binaries-as-DCO`` changes the definition of "Double Compact Object" from a binary comprised of any two of +{Neutron Star, Black Hole} to a binary star comprised of any two of {Helium White Dwarf, Carbon-Oxygen White Dwarf, Oxygen-Neon White Dwarf, Neutron Star, Black Hole}. + +The default value for the new option is FALSE. + +**03.01.04 Aug 28, 2024** + +* New option `'HENDRIKS'` for `--pulsational-pair-instability-prescription` implementing the prescription for pulsational pair instability mass-loss from Hendricks et al. 2023 (https://arxiv.org/abs/2309.09339). +* New command line option `--PPI-CO-Core-Shift-Hendriks` for use with the above prescription (see Hendriks+ for an explanation) + +**03.01.00 Aug 24, 2024** + +* New option to emit gravitational radiation at each timestep of binary evolution: ``--emit-gravitational-radiation``. The effects of radiation are approximated by the change in semimajor axis and eccentricity from Peters 1964 equations 5.6 and 5.7. Reduce timestep if required to keep orbital separation change per step due to GW radiation within ~ 1%. + +**03.00.00 Jul 26, 2024** + +This is a major release of COMPAS. There are some significant changes in COMPAS operation and functionality in this release. The major change, and the impetus for +the release, is the implementation of a new, coherent, robust, error handling strategy. + +Early versions of COMPAS (versions prior to v03.00.00) did not have a coherent, robust, error-handling strategy. In those versions, errors were typically displayed +as either errors or warnings (depending on the severity) as they occurred, and evolution of the star (SSE mode) or binary (BSE mode) continued - users were expected +to check errors or warnings displayed and use results with appropriate caution. This was not ideal. + +In addition, earlier versions of COMPAS did not handle floating-point errors (divide-by-zero, invalid-parameters (e.g. :math:`\sqrt{-2.0}`), etc.) well - in fact the +code effectively ignored these errors (for a detailed explanation of why this was so, refer to the Error Handling documentation in the Developer Guide +(See :ref:`developer-guide-fp-errors`). + +In COMPAS version 03.00.00 the error handling philosophy has changed, and more coherent and robust error-handling code implemented. The new error-handling philosophy +is to stop evolution of a star or binary if an error occurs (including, optionally by a program option, floating-point errors), and record in the (SSE/BSE) system +parameters file the fact that an error occurred, and an error number identifying the error that occurred. This way users can check the system parameters file +at the completion of a run for the disposition of a star or binary and, if the evolution of that star or binary was stopped because an error occurred, the +actual error that occurred. + +Users should refer to the Error Handling documentation in the User Guide (See :doc:`./User guide/Handling errors/handling-errors`). +Developers should refer to the Error Handling documentation in the Developer Guide (See :doc:`./Developer guide/Services/services-error-handling`). + +In addition to the new error handling strategy, a number of program options have been deprecated and replaced by new program options that are more consistent with the +naming convention we are trying to maintain. The program options deprecated, and their replacements, are: + +1. `--mass-transfer` , replaced by `--use-mass-transfer` (to be consistent with `--use-mass-loss`) +#. `--luminous-blue-variable-prescription` , replaced by `--LBV-mass-loss-prescription` (to be consistent with other 'prescription'-type options) +#. `--OB-mass-loss` , replaced by `--OB-mass-loss-prescription` (to be consistent with other 'prescription'-type options) +#. `--RSG-mass-loss` , replaced by `--RSG-mass-loss-prescription` (to be consistent with other 'prescription'- type options) +#. `--VMS-mass-loss` , replaced by `--VMS-mass-loss-prescription` (to be consistent with other 'prescription'- type options) +#. `--WR-mass-loss` , replaced by `--WR-mass-loss-prescription` (to be consistent with other 'prescription'- type options) +#. `--kick-direction` , replaced by `--kick-direction-distribution` (to be consistent with other 'distribution'-type options) +#. `--mass-transfer-thermal-limit-accretor`, replaced by `--mass-transfer-thermal-limit-accretor-multiplier` (for consistency and to better describe the option) +#. `--black-hole-kicks` , replaced by `--black-hole-kicks-mode` (for consistency and to better describe the option) +#. `--chemically-homogeneous-evolution` , replaced by `--chemically-homogeneous-evolution-mode` (for consistency and to better describe the option) + +Deprecated program options will still be available, in tandem with their replacements, for some time (at least six months from the release date of v03.00.00), +after which time the deprecated options will be removed and only their replacements will be valid options. Appropriate warning messages will be displayed in +the period of deprecation if deprecated program options are used. + +As well as deprecating some program options, some program option values have been deprecated and replaced by new values that are more consistent with the +naming convention we are trying to maintain. The program option value deprecated, and their replacements, are: + +1. `--LBV-mass-loss-prescription` , value `NONE` replaced by `ZERO` +#. `--luminous-blue-variable-prescription`, value `NONE` replaced by `ZERO` +#. `--OB-mass-loss` , value `NONE` replaced by `ZERO` +#. `--OB-mass-loss-prescription` , value `NONE` replaced by `ZERO` +#. `--RSG-mass-loss` , value `NONE` replaced by `ZERO` +#. `--RSG-mass-loss-prescription` , value `NONE` replaced by `ZERO` +#. `--VMS-mass-loss` , value `NONE` replaced by `ZERO` +#. `--VMS-mass-loss-prescription` , value `NONE` replaced by `ZERO` +#. `--WR-mass-loss` , value `NONE` replaced by `ZERO` +#. `--WR-mass-loss-prescription` , value `NONE` replaced by `ZERO` + +Deprecated program option values will still be available, in tandem with their replacements, for some time (at least six months from the release date of v03.00.00), +after which time the deprecated option values will be removed and only their replacements will be valid option values. Appropriate warning messages will be displayed +in the period of deprecation if deprecated program option values are used. + +Finally, for program option `--mt-rejuvenation-prescription`, the value `NONE` was replaced by `HURLEY` + + +**02.48.01 May 24, 2024** + +* changed functionality of ``--output-path`` option so that missing directories in the specified path are created. +* Added "Quick Links" to online documentation. + +**02.48.00 May 22, 2024** + +* added options ``--mass-transfer-jloss-macleod-linear-fraction-degen`` and ``--mass-transfer-jloss-macleod-linear-fraction-non-degen`` to allow for different accretor AM response for degenerate and non-degenerate companions. +* removed option ``--mass-transfer-jloss-macleod-linear-fraction`` (no longer required - see above). + +**02.46.00 May 13, 2024** + +* added options ``--radial-change-fraction`` and ``--mass-change-fraction``, as approximate desired fractional changes in stellar radius and mass on phase when setting SSE and BSE timesteps +* the recommended values for both parameters are 0.005, but the default remains 0, which reproduces previous timestep choices +* mass transfer from main sequence donors (including HeMS) can now proceed on nuclear timescales -- approximated as the radial expansion timescales -- if equilibrium zetas are greater than Roche lobe zetas + +**02.45.00 Apr 09, 2024** + +* Changed compiler standard in Makefile from ``c++11`` to ``c++17``. This is required for ``boost v1.82`` and above. ``c++11`` can still be used if boost version is below ``v1.82``, but moving to ``c++17`` and boost ``v1.8x`` is preferred (and will eventually be mandatory). Tested with ``Ubuntu v20.04, g++ v11.04, and boost v1.74``; and ``macOS v14.1.1, clang v15.0.0, and boost v1.85``. + +**02.44.00 Apr 04, 2024** + +* Added 'realistic' tides option, which implements dynamical and equilibrium tides using the formalism described in Kapil et al. (2024). +* Functionality enabled with new option ``--tides-prescription KAPIL2024`` (default is ``NONE``). +* Removed old option ``--enable-tides``, which can now be enabled by setting ``--tides-prescription PERFECT``. + + +**02.43.00 Mar 29, 2024** + +* Implementation of the neutrino rocket kick. + +**02.42.00 Jan 04, 2023** + +* Timesteps are now quantised to an integral multiple of 1e-12Myr. +* New option provided to allow user-defined timesteps: ``--timesteps-filename`` (See :doc:`./User guide/timestep-files`). +* Code changes to make SSE and BSE evolution more consistent (See `PR 1052 `_). + +**02.41.03 Dec 28, 2023** + +* The functions ``BaseBinaryStar::CalculateAngularMomentum()``, ``BaseBinaryStar::CalculateTotalEnergy()``, and ``BaseStar::AngularMomentum()`` changed to use moment of inertia instead of gyration radius. +* Changed CalculateMomentOfInertia() to properly implement Hurley et al., 2000 eq 109. +* This change may change DCO yields slightly when compared to previous versions of the code. + +**02.41.00 Nov 02, 2023** + +* Added a naive tides implementation. +* Added program option ``enable-tides`` to enable the tides implementation (default is ``false``). + +**02.40.00 Oct 20, 2023** + +* Added ``FLEXIBLE2023`` as a new default, and ``BELCZYNSKI2010`` as a replacement for the previous ``VINK`` mass loss prescription. The following new sub-wrappers are overridden when selecting ``BELCZYNSKI2010``: +* Added ``--OB-mass-loss`` program option, applying to main sequence stars, with default ``VINK2021``, and options ``NONE``, ``VINK2001`` (previous default), ``BJORKLUND2022``, and ``KRTICKA2018``. +* Added ``--RSG-mass-loss`` program option, applying to stars below 8kK in giant branch stellar types, with default ``DECIN2023``, and options ``NONE``, ``VINISABHAHIT2023``, ``BEASOR2020``, ``YANG2023``, ``KEE2021``, ``NJ90`` (previous default). +* Added ``--VMS-mass-loss`` program option, applying to stars over 100 Msol, with default ``SABHAHIT2023``, and options ``NONE``, ``VINK2011``, and ``BESTENLEHNER2020``. +* Added ``--WR-mass-loss`` program option, with default ``SANDERVINK2023``, and options ``BELCZYNSKI2010``, and ``SHENAR2019``. +* Changed default value for option ``--wolf-rayet-multiplier`` from 0.1 to 1.0 + +**02.39.00 Jul 4, 2023** + +* Added 'Evolution_Status' columns to both SSE and BSE default system parameters records - records final status of evolution (reason evolution stopped). + +**02.38.03 Apr 20, 2023** + +* Changed some of the default options, see issue # 957 and PR # 961 for explanations + +**02.37.00 Mar 26, 2023** + +* Added functionality for WDs to accrete in different regimes. +* New supernova types: SNIA (Type Ia), and HeSD (Helium shell detonation). + +**02.36.00 Mar 15, 2023** + +* Added functionality to automatically create COMPAS YAML file - adds two new options: ``--create-YAML-file`` and ``YAML-template``. See documentation for details. + + **Note:** From this release, the default COMPAS YAML file (``compasConfigDefault.yaml``), as distributed, has all COMPAS option entries commented so that the COMPAS default value for the option is used by default. To use a value other than the COMPAS default value, users must uncomment the entry and change the option value to the desired value. + +**02.35.03 Feb 27, 2023** + +Added mass accretion prescription during CE ``CHEVALIER`` for option ``--common-envelope-mass-accretion-prescription``, following model 2 from van Son + 2020 + +**02.35.02 Feb 19, 2023** + +* Changed ``BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1`` and ``BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2`` to be the Roche lobe radius as computed at periapsis, in units of :math:`R_\odot`. +* Changed header string for ``BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1`` from ``'RocheLobe(1)|a'`` to ``'RocheLobe(1)'`` - same change made for ``BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2``. +* Removed ``BINARY_PROPERTY::STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1`` (header string ``'Radius(1)|RL'``) and ``BINARY_PROPERTY::STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2`` (header string ``'Radius(2)|RL'``) from ``BSE_DETAILED_OUTPUT_REC`` (BSE detailed output file default record). Note that both variables are still selectable for output via the logfile-definitions file. + + **Note:** These changes will affect post-processing code that consumes the affected variables - users should check their post-processing code. + +**02.35.00 Dec 8, 2022** + +* Added critical mass ratios from Ge+ 2020 for determining if MT is unstable. + +**02.34.01 Dec 7, 2022** + +* Fixed TimeMT. + +**02.33.00 Aug 28, 2022** + +* Added simplified (constant per stellar type) critical mass ratios from Claeys+ 2014 for determining if MT is unstable + +**02.32.00 Aug 27, 2022** + +* Added 'record type' functionality to all standard log files. **Note:** This changes default behaviour: only Detailed Output log files affected in this release +* Added/rationalised Detailed Output records printed for binary systems +* Added new program option for each standard log file to allow specification of which record types to print. See e.g. ``--logfile-detailed-output-record-types`` +* Changed case on column header strings for switch log files (SSE and BSE. ``SWITCHING_FROM``, ``SWITCHING_TO``, and ``STAR_SWITCHING`` are now ``Switching_From``, ``Switching_To``, and ``Star_Switching`` respectively). **Note:** This could affect post-processig code that consumes the switch log files - users should check that their code will recognise the new header strings. +* Added new section to online documentation: 'What's new' + +**02.31.10 Aug 12, 2022** + +* Added option to set the Temperature boundary between convective/radiative giant envelopes + +**02.31.09 Aug 9, 2022** + +* Max evolution time and max number of timesteps now read in from gridline as well as commandline + +**02.31.08 Aug 3, 2022** + +* Added Accretion Induced Collapse (AIC) of ONeWD as another type of SN + +**02.31.07 Aug 1, 2022** + +* Added print to DetailedOutput after merger, addresses https://github.com/TeamCOMPAS/COMPAS/issues/825 +* Ensure no ONeWDs are formed with masses above Chandrasekhar mass + +**02.31.06 Aug 2, 2022** + +* Added stellar merger to default BSE_RLOF output + +**02.31.05 July 25, 2022** + +* Renamed program option ``--allow-H-rich-ECSN`` to ``allow-non-stripped-ECSN`` +* Fixed check for non-interacting ECSN progenitors to consider MT history instead of H-richness + +**02.31.04 Jun 10, 2022** + +* Changed MT_TRACKER values to be clearer and complementary to each other +* Updated the relevant section in the detailed plotter that uses MT_TRACKER values +* Removed end states from detailed plotter (Merger, DCO, Unbound) so that they don't over compress the rest + +**02.31.03 May 20, 2022** + +* Fixed MS+MS unstable MT not getting flagged as a CEE + +**02.31.00 May 14, 2022** + +* Added new program option ``--retain-core-mass-during-caseA-mass-transfer`` to preserve a larger donor core mass following case A MT, set equal to the expected core mass of a newly formed HG star with mass equal to that of the donor, scaled by the fraction of its MS lifetime + +**02.30.00 May 8, 2022** + +* Added MACLEOD_LINEAR specific angular momentum gamma loss prescription for stable mass transfer (see ``--mass-transfer-angular-momentum-loss-prescription``) + +**02.29.00 May 5, 2022** + +* Added new program option to allow for H-rich ECSN (``--allow-H-rich-ECSN``, defaults to FALSE). When the option is TRUE, non-interacting ECSN progenitors do not contribute to the single pulsar population. Addresses issue https://github.com/TeamCOMPAS/COMPAS/issues/596 + +**02.28.00 May 11, 2022** + +* Added new remnant mass prescription: Fryer+ 2022 +* Added new program options ``--fryer-22-fmix`` and ``--fryer-22-mcrit`` + +**02.27.09 Apr 25, 2022** + +* Added new program option ``--muller-mandel-sigma-kick`` + +**02.27.08 Apr 12, 2022** + +* Fix for issue https://github.com/TeamCOMPAS/COMPAS/issues/783 + +**02.27.07 Apr 5, 2022** + +* Fix for issue https://github.com/TeamCOMPAS/COMPAS/issues/773 + +**02.27.06 Apr 5, 2022** + +* Fixed StarTrack PPISN prescription: previously it was doing the same thing as the COMPAS PPISN prescription + +**02.27.05 Feb 17, 2022** + +* Added new program option ``--hmxr-binaries``, which tells COMPAS to store high-mass x-ray binaries in BSE_RLOF output file +* Added columns for pre- and post-timestep ratio of stars to Roche Lobe radius to BSE_RLOF output file (addressing issue https://github.com/TeamCOMPAS/COMPAS/issues/746) + +**02.27.04 Feb 15, 2022** + +* Fix for issue https://github.com/TeamCOMPAS/COMPAS/issues/761 + +**02.27.03 Feb 8, 2022** + +* Fix for issue https://github.com/TeamCOMPAS/COMPAS/issues/745 + +**v02.27.02 Feb 3, 2022** + +* Fixed mass change on forced envelope loss in response to issue https://github.com/TeamCOMPAS/COMPAS/issues/743 + +**v02.27.01 Feb 3, 2022** + +* Fixed condition for envelope type when using ENVELOPE_STATE_PRESCRIPTION::FIXED_TEMPERATURE (previously, almost all envelopes were incorrectly declared radiative) + +**v02.27.00 Jan 12, 2022** + +* Added enhanced Nanjing lambda option that continuously extrapolates beyond radial range +* Added Nanjing lambda option to switch between calculation using rejuvenated mass and true birth mass +* Added Nanjing lambda mass and metallicity interpolation options +* No change in default behaviour + diff --git a/src/BaseBinaryStar.cpp b/src/BaseBinaryStar.cpp index 83b551bf2..27541e67e 100644 --- a/src/BaseBinaryStar.cpp +++ b/src/BaseBinaryStar.cpp @@ -1,12 +1,14 @@ #include "BaseBinaryStar.h" +#include "CircumbinaryDisk.h" #include +#include #include "vector3d.h" + // gsl includes #include - /* Constructor * * Parameter p_Seed is the seed for the random number generator - see main.cpp for an @@ -268,6 +270,8 @@ void BaseBinaryStar::SetRemainingValues() { // Initialise other parameters m_SemiMajorAxisPrev = m_SemiMajorAxis; m_EccentricityPrev = m_Eccentricity; + m_SemiMajorAxisPreRLOF = m_SemiMajorAxis; + m_EccentricityPreRLOF = m_Eccentricity; // initial binary parameters - kept constant as a record of the initial parameters of the binary m_SemiMajorAxisInitial = m_SemiMajorAxis; @@ -282,12 +286,15 @@ void BaseBinaryStar::SetRemainingValues() { m_SemiMajorAxisAtDCOFormation = DEFAULT_INITIAL_DOUBLE_VALUE; m_EccentricityAtDCOFormation = DEFAULT_INITIAL_DOUBLE_VALUE; + m_RestartTimestepAfterImmediateEvent = false; + double momentOfInertia1 = m_Star1->CalculateMomentOfInertiaAU(); double momentOfInertia2 = m_Star2->CalculateMomentOfInertiaAU(); m_TotalEnergy = CalculateTotalEnergy(m_SemiMajorAxis, m_Star1->Mass(), m_Star2->Mass(), m_Star1->Omega(), m_Star2->Omega(), momentOfInertia1, momentOfInertia2); m_TotalAngularMomentum = CalculateAngularMomentum(m_SemiMajorAxis, m_Eccentricity, m_Star1->Mass(), m_Star2->Mass(), m_Star1->Omega(), m_Star2->Omega(), momentOfInertia1, momentOfInertia2); + m_TotalAngularMomentumPreRLOF = m_TotalAngularMomentum; m_TotalAngularMomentumPrev = m_TotalAngularMomentum; if (OPTIONS->CHEMode() != CHE_MODE::NONE) { // CHE enabled? @@ -524,6 +531,15 @@ COMPAS_VARIABLE BaseBinaryStar::BinaryPropertyValue(const T_ANY_PROPERTY p_Prope switch (property) { // which property? case BINARY_PROPERTY::CIRCULARIZATION_TIMESCALE: value = CircularizationTimescale(); break; + case BINARY_PROPERTY::CIRCUMBINARY_DISK_FORMED: value = CircumbinaryDiskFormed(); break; + case BINARY_PROPERTY::CIRCUMBINARY_DISK_INITIAL_MASS: value = CircumbinaryDiskInitialMass(); break; + case BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_1: value = CircumbinaryDiskMassRetained1(); break; + case BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_2: value = CircumbinaryDiskMassRetained2(); break; + case BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_SUPPLIED: value = CircumbinaryDiskMassSupplied(); break; + case BINARY_PROPERTY::CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_PRE: value = CircumbinaryDiskSemiMajorAxisPre(); break; + case BINARY_PROPERTY::CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_POST: value = CircumbinaryDiskSemiMajorAxisPost(); break; + case BINARY_PROPERTY::CIRCUMBINARY_DISK_ECCENTRICITY_PRE: value = CircumbinaryDiskEccentricityPre(); break; + case BINARY_PROPERTY::CIRCUMBINARY_DISK_ECCENTRICITY_POST: value = CircumbinaryDiskEccentricityPost(); break; case BINARY_PROPERTY::COMMON_ENVELOPE_AT_LEAST_ONCE: value = CEAtLeastOnce(); break; case BINARY_PROPERTY::COMMON_ENVELOPE_EVENT_COUNT: value = CommonEnvelopeEventCount(); break; case BINARY_PROPERTY::UNBOUND: value = Unbound(); break; @@ -987,10 +1003,9 @@ void BaseBinaryStar::SetPostCEEValues(const double p_SemiMajorAxis, m_CEDetails.postCEE.rocheLobe1to2 = p_RocheLobe1to2; m_CEDetails.postCEE.rocheLobe2to1 = p_RocheLobe2to1; - if (utils::Compare(m_Star1->RadiusPostCEE(), m_CEDetails.postCEE.rocheLobe1to2) >= 0 || // Check for RLOF immediately after the CEE - utils::Compare(m_Star2->RadiusPostCEE(), m_CEDetails.postCEE.rocheLobe2to1) >= 0) { - m_RLOFDetails.immediateRLOFPostCEE = true; - } + m_RLOFDetails.immediateRLOFPostCEE = + utils::Compare(m_Star1->RadiusPostCEE(), m_CEDetails.postCEE.rocheLobe1to2) >= 0 || // Check for RLOF immediately after the CEE + utils::Compare(m_Star2->RadiusPostCEE(), m_CEDetails.postCEE.rocheLobe2to1) >= 0; } @@ -1527,6 +1542,503 @@ void BaseBinaryStar::EvaluateSupernovae() { } +/* + * Update values set by SetPostCEEValues() to account for binary-CBD interaction + * + * void SetPostCBDValues(const double p_SemiMajorAxisAU, + * const double p_EccentricityAfterCBD, + * const double p_Mass1AfterCBD, + * const double p_Mass2AfterCBD) + * + * @param [IN] p_SemiMajorAxisAU Post-CBD semi-major axis (AU) + * @param [IN] p_EccentricityAfterCBD Post-CBD eccentricity + * @param [IN] p_Mass1AfterCBD Post-CBD mass of star 1 (Msol) + * @param [IN] p_Mass2AfterCBD Post-CBD mass of star 2 (Msol) + */ +void BaseBinaryStar::SetPostCBDValues(const double p_SemiMajorAxisAU, + const double p_EccentricityAfterCBD, + const double p_Mass1AfterCBD, + const double p_Mass2AfterCBD) { + + m_SemiMajorAxis = p_SemiMajorAxisAU; + m_Eccentricity = p_EccentricityAfterCBD; + + const double postCBDPeriastronAU = m_SemiMajorAxis * (1.0 - p_EccentricityAfterCBD); + const double rocheLobe1AU = postCBDPeriastronAU * CalculateRocheLobeRadius_Static(p_Mass1AfterCBD, p_Mass2AfterCBD); + const double rocheLobe2AU = postCBDPeriastronAU * CalculateRocheLobeRadius_Static(p_Mass2AfterCBD, p_Mass1AfterCBD); + const double rocheLobe1Rsol = rocheLobe1AU * AU_TO_RSOL; + const double rocheLobe2Rsol = rocheLobe2AU * AU_TO_RSOL; + + SetPostCEEValues( + m_SemiMajorAxis * AU_TO_RSOL, + m_CEDetails.postCEE.semiMajorAxisAfterStage1, + p_EccentricityAfterCBD, + rocheLobe1Rsol, + rocheLobe2Rsol + ); +} + + +/* + * Apply optional post-CE circumbinary disk evolution, following the steps below: + * + * 1. Disk formation. The CircumbinaryDisk module assigns a fraction of the total + * binary mass lost during CE and a fraction of the binary's pre-RLOF + * total angular momentum to the disk, then checks whether that angular + * momentum is large enough for the material to orbit outside the adopted + * inner disk radius. If not, COMPAS continues with the ordinary post-CE state. + * + * 2. Disk evolution. The CBD orbital evolution in response to accreted mass + * is calculated using spindler-c (based on Valli+2024), modified to account for Eddington-limited accretion. + * Mass that is not accreted due to the Eddington limit is assumed to be ejected + * from the vicinity of the accretor, carrying its component-specific orbital + * angular momentum. The Spindler formalism assumes that the initial CBD + * reservoir is much smaller than the post-CE binary mass. + * + * INSTANTANEOUS applies the complete CBD interaction here. TIMESTEPPED stores + * the active reservoir and returns; later timesteps process the reservoir before + * ordinary event checks, and the CBD row is logged only when the active disk is + * exhausted or truncated. + * + * This method translates COMPAS state to CBD inputs, applies the returned + * masses/orbit, handles possible AIC state mutation, and logs the event. + * + * void ApplyCircumbinaryDiskAfterCommonEnvelope(const STELLAR_TYPE p_StellarType1PreCE, + * const STELLAR_TYPE p_StellarType2PreCE, + * const double p_Mass1PreCE, + * const double p_Mass2PreCE, + * const double p_Radius1PreCERsol, + * const double p_Radius2PreCERsol, + * const bool p_EnvelopeFlag1, + * const bool p_EnvelopeFlag2) + * + * @param [IN] p_StellarType1PreCE Stellar type of star 1 immediately before CE + * @param [IN] p_StellarType2PreCE Stellar type of star 2 immediately before CE + * @param [IN] p_Mass1PreCE Mass of star 1 immediately before CE (Msol) + * @param [IN] p_Mass2PreCE Mass of star 2 immediately before CE (Msol) + * @param [IN] p_Radius1PreCERsol Radius of star 1 immediately before CE (Rsol) + * @param [IN] p_Radius2PreCERsol Radius of star 2 immediately before CE (Rsol) + * @param [IN] p_EnvelopeFlag1 Whether star 1 had an envelope immediately before CE + * @param [IN] p_EnvelopeFlag2 Whether star 2 had an envelope immediately before CE + */ +void BaseBinaryStar::ApplyCircumbinaryDiskAfterCommonEnvelope(const STELLAR_TYPE p_StellarType1PreCE, + const STELLAR_TYPE p_StellarType2PreCE, + const double p_Mass1PreCE, + const double p_Mass2PreCE, + const double p_Radius1PreCERsol, + const double p_Radius2PreCERsol, + const bool p_EnvelopeFlag1, + const bool p_EnvelopeFlag2) { + + const CircumbinaryDisk::CommonEnvelopeChannel channel{CircumbinaryDisk::MakeCommonEnvelopeChannel( + p_StellarType1PreCE, + p_StellarType2PreCE, + p_Mass1PreCE, + p_Mass2PreCE, + p_Radius1PreCERsol, + p_Radius2PreCERsol, + p_EnvelopeFlag1, + p_EnvelopeFlag2 + )}; + + if (!channel.supported) { + return; + } + + const double circumbinaryDiskLifetime = OPTIONS->CircumbinaryDiskLifetime(); + const CircumbinaryDisk::FormationOptions formationOptions{CircumbinaryDisk::MakeFormationOptionsFromCompasOptions()}; + + const double mass1PostCE = m_Star1->Mass(); + const double mass2PostCE = m_Star2->Mass(); + const double semiMajorAxisPostCERsol = m_SemiMajorAxis * AU_TO_RSOL; + // The formation test uses the pre-RLOF orbit as the basis for the angular-momentum + // reservoir estimate. The post-CE separation is used only to define + // the inner CBD radius. + const CircumbinaryDisk::FormationInput circumbinaryDiskFormationInput{ + channel, + p_Mass1PreCE + p_Mass2PreCE, + mass1PostCE + mass2PostCE, + m_SemiMajorAxisPreRLOF * AU_TO_RSOL, + semiMajorAxisPostCERsol, + m_EccentricityPreRLOF, + m_TotalAngularMomentumPreRLOF, + formationOptions + }; + + const CircumbinaryDisk::FormationResult formationResult{CircumbinaryDisk::EvaluateFormation(circumbinaryDiskFormationInput)}; + if (!formationResult.forms) { + return; + } + + // The formation step defines the intended CBD reservoir. In TIMESTEPPED + // mode the mass actually supplied can be smaller if another binary event + // truncates the disk before that reservoir is exhausted. + const double suppliedMassMsol = formationResult.suppliedMassMsol; + + m_CircumbinaryDiskDetails.formed = true; + m_CircumbinaryDiskDetails.initialMass = suppliedMassMsol; + m_CircumbinaryDiskDetails.massSupplied = 0.0; + m_CircumbinaryDiskDetails.massRetained1 = 0.0; + m_CircumbinaryDiskDetails.massRetained2 = 0.0; + m_CircumbinaryDiskDetails.semiMajorAxisPre = semiMajorAxisPostCERsol; + m_CircumbinaryDiskDetails.semiMajorAxisPost = semiMajorAxisPostCERsol; + m_CircumbinaryDiskDetails.eccentricityPre = m_Eccentricity; + m_CircumbinaryDiskDetails.eccentricityPost = m_Eccentricity; + + if (OPTIONS->CircumbinaryDiskEvolutionMode() == CIRCUMBINARY_DISK_EVOLUTION_MODE::TIMESTEPPED) { + // Finite-lifetime mode: store the reservoir and let future COMPAS + // timesteps consume it. This avoids freezing stellar radii/types and + // Eddington limits for the entire CBD lifetime at the CE event. + m_ActiveCircumbinaryDisk.active = true; + m_ActiveCircumbinaryDisk.totalSuppliedMass = suppliedMassMsol; + m_ActiveCircumbinaryDisk.remainingSuppliedMass = suppliedMassMsol; + m_ActiveCircumbinaryDisk.supplyRate = suppliedMassMsol / circumbinaryDiskLifetime; + m_ActiveCircumbinaryDisk.remainingDuration = circumbinaryDiskLifetime; + m_RestartTimestepAfterImmediateEvent = true; + return; + } + + (void)PrintDetailedOutput(m_Id, BSE_DETAILED_RECORD_TYPE::POST_CEE); + + const double radius1PostCE = m_Star1->Radius(); + const double radius2PostCE = m_Star2->Radius(); + const STELLAR_TYPE stellarType1PostCE = m_Star1->StellarType(); + const STELLAR_TYPE stellarType2PostCE = m_Star2->StellarType(); + const CircumbinaryDisk::EvolutionOptions evolutionOptions{CircumbinaryDisk::MakeEvolutionOptionsFromCompasOptions()}; + + double retainedMass1 = 0.0; + double retainedMass2 = 0.0; + // AIC can occur if either post-CE component is an ONe WD and CBD accretion + // pushes it to the Chandrasekhar-mass threshold. The CBD integrator stops + // at that mass so the ordinary COMPAS AIC/SN machinery can handle + // the stellar-type and mass changes before any remaining CBD + // reservoir is evolved. + const CircumbinaryDisk::StarLabel aicTargetStar = stellarType1PostCE == STELLAR_TYPE::OXYGEN_NEON_WHITE_DWARF + ? CircumbinaryDisk::StarLabel::STAR_1 + : stellarType2PostCE == STELLAR_TYPE::OXYGEN_NEON_WHITE_DWARF + ? CircumbinaryDisk::StarLabel::STAR_2 + : CircumbinaryDisk::StarLabel::NONE; + const CircumbinaryDisk::EvolutionInput initialEvolutionInput{ + mass1PostCE, + mass2PostCE, + radius1PostCE, + radius2PostCE, + stellarType1PostCE, + stellarType2PostCE, + m_Eccentricity, + suppliedMassMsol, + circumbinaryDiskLifetime, + aicTargetStar, + evolutionOptions + }; + + const CircumbinaryDisk::EvolutionTrack initialTrack{CircumbinaryDisk::EvolveTrack(initialEvolutionInput)}; + double finalMass1 = 0.0; + double finalMass2 = 0.0; + + if (initialTrack.aicOccurred) { + const double semiMajorAxisAtAICFactor = initialTrack.semiMajorAxisFactor; + const double eccentricityAtAIC = initialTrack.eccentricity; + const double mass1AtAIC = initialTrack.mass1Msol; + const double mass2AtAIC = initialTrack.mass2Msol; + + retainedMass1 += mass1AtAIC - mass1PostCE; + retainedMass2 += mass2AtAIC - mass2PostCE; + // Move the binary to the CBD state at the instant of AIC. The + // post-AIC continuation below starts from the live COMPAS state after + // EvaluateSupernovae() has resolved the event. + SetPostCBDValues( + m_SemiMajorAxis * semiMajorAxisAtAICFactor, + eccentricityAtAIC, + mass1AtAIC, + mass2AtAIC + ); + + ApplyCircumbinaryDiskMassChange(m_Star1, mass1AtAIC); + ApplyCircumbinaryDiskMassChange(m_Star2, mass2AtAIC); + + EvaluateSupernovae(); + + (void)PrintDetailedOutput(m_Id, BSE_DETAILED_RECORD_TYPE::POST_SN); + + const double remainingDurationPostAIC = std::max( + circumbinaryDiskLifetime - initialTrack.elapsedTimeYears, + 0.0 + ); + const double remainingSuppliedMassPostAIC = std::max( + suppliedMassMsol - initialTrack.suppliedMassMsol, + 0.0 + ); + + const double mass1PostAIC = m_Star1->Mass(); + const double mass2PostAIC = m_Star2->Mass(); + + if (utils::Compare(remainingDurationPostAIC, 0.0) > 0 && utils::Compare(remainingSuppliedMassPostAIC, 0.0) > 0) { + // Continue the same physical disk after the AIC, but with the new + // compact-object type/mass/radius returned by COMPAS. This matters + // because the Eddington limit depends on the accretor type. + const CircumbinaryDisk::EvolutionInput postAICEvolutionInput{ + mass1PostAIC, + mass2PostAIC, + m_Star1->Radius(), + m_Star2->Radius(), + m_Star1->StellarType(), + m_Star2->StellarType(), + m_Eccentricity, + remainingSuppliedMassPostAIC, + remainingDurationPostAIC, + CircumbinaryDisk::StarLabel::NONE, + evolutionOptions + }; + + const CircumbinaryDisk::EvolutionTrack postAICTrack{CircumbinaryDisk::EvolveTrack(postAICEvolutionInput)}; + finalMass1 = postAICTrack.mass1Msol; + finalMass2 = postAICTrack.mass2Msol; + + retainedMass1 += finalMass1 - mass1PostAIC; + retainedMass2 += finalMass2 - mass2PostAIC; + + SetPostCBDValues( + m_SemiMajorAxis * postAICTrack.semiMajorAxisFactor, + postAICTrack.eccentricity, + finalMass1, + finalMass2 + ); + } + else { + finalMass1 = mass1PostAIC; + finalMass2 = mass2PostAIC; + } + } + else { + finalMass1 = initialTrack.mass1Msol; + finalMass2 = initialTrack.mass2Msol; + retainedMass1 = finalMass1 - mass1PostCE; + retainedMass2 = finalMass2 - mass2PostCE; + + SetPostCBDValues( + m_SemiMajorAxis * initialTrack.semiMajorAxisFactor, + initialTrack.eccentricity, + finalMass1, + finalMass2 + ); + } + + m_CircumbinaryDiskDetails.massSupplied = suppliedMassMsol; + m_CircumbinaryDiskDetails.massRetained1 = retainedMass1; + m_CircumbinaryDiskDetails.massRetained2 = retainedMass2; + m_CircumbinaryDiskDetails.semiMajorAxisPost = m_SemiMajorAxis * AU_TO_RSOL; + m_CircumbinaryDiskDetails.eccentricityPost = m_Eccentricity; + + ApplyCircumbinaryDiskMassChange(m_Star1, finalMass1); + ApplyCircumbinaryDiskMassChange(m_Star2, finalMass2); + + (void)PrintCircumbinaryDisk(); + +} + + +/* + * Apply a CBD-driven stellar mass change through the normal COMPAS update path + * + * Non-compact accretors also have their effective initial mass, age, and + * rejuvenation state remapped after gaining mass. + * + * void ApplyCircumbinaryDiskMassChange(BinaryConstituentStar *p_Star, + * const double p_FinalMass) + * + * @param [IN] p_Star Star whose mass is to be updated + * @param [IN] p_FinalMass Final stellar mass after CBD accretion (Msol) + */ +void BaseBinaryStar::ApplyCircumbinaryDiskMassChange(BinaryConstituentStar *p_Star, const double p_FinalMass) { + + const double deltaMass = p_FinalMass - p_Star->Mass(); + if (utils::Compare(deltaMass, 0.0) == 0) return; + + const bool remapEffectiveInitialMass = utils::Compare(deltaMass, 0.0) > 0 && !p_Star->IsOneOf(COMPACT_OBJECTS); + + (void)p_Star->UpdateAttributes(deltaMass, 0.0, false); + + if (remapEffectiveInitialMass) { + p_Star->UpdateInitialMass(); + p_Star->UpdateAgeAfterMassLoss(); + p_Star->ApplyMassTransferRejuvenationFactor(); + p_Star->UpdateAttributes(0.0, 0.0, true); + } +} + + +/* + * FinaliseActiveCircumbinaryDisk() + * + * Deactivate the active finite-duration CBD and print the event record. + * Instantaneous CBD evolution continues to print from + * ApplyCircumbinaryDiskAfterCommonEnvelope(); this helper is used only by the + * opt-in TIMESTEPPED mode. + * + * The post-CBD orbital fields are deliberately not sampled here from the + * current binary state. They are cached immediately after each CBD increment + * in EvolveActiveCircumbinaryDiskOneTimestep(). This distinction matters when + * a later immediate event, such as a disruptive SN, terminates the disk: the CBD + * row should report the last state produced by CBD evolution, not the post-SN + * orbit. + * + * void FinaliseActiveCircumbinaryDisk() + */ +void BaseBinaryStar::FinaliseActiveCircumbinaryDisk() { + + const double totalSuppliedMass = std::max(m_ActiveCircumbinaryDisk.totalSuppliedMass, 0.0); + const double completionTolerance = std::max(1.0e-12, 1.0e-10 * std::max(totalSuppliedMass, 1.0)); + + const bool completedByMass = + utils::Compare(totalSuppliedMass, 0.0) > 0 && + utils::Compare(m_ActiveCircumbinaryDisk.remainingSuppliedMass, 0.0, completionTolerance) <= 0; + + const bool completedByDuration = + utils::Compare(totalSuppliedMass, 0.0) > 0 && + utils::Compare(m_ActiveCircumbinaryDisk.supplyRate, 0.0) > 0 && + utils::Compare(m_ActiveCircumbinaryDisk.remainingDuration, 0.0) <= 0; + + const bool completed = completedByMass || completedByDuration; + + if (completed) { + // Under the constant-supply-rate prescription, exhausting the adopted + // lifetime and exhausting the intended reservoir are the same physical + // completion condition. Clamp away numerical residuals so the logged + // supplied mass exactly matches the initial reservoir. + m_ActiveCircumbinaryDisk.remainingSuppliedMass = 0.0; + m_ActiveCircumbinaryDisk.remainingDuration = 0.0; + } + + m_CircumbinaryDiskDetails.massSupplied = completed + ? totalSuppliedMass + : std::max(totalSuppliedMass - m_ActiveCircumbinaryDisk.remainingSuppliedMass, 0.0); + m_ActiveCircumbinaryDisk.active = false; + + (void)PrintCircumbinaryDisk(); +} + + +/* + * EvolveActiveCircumbinaryDiskOneTimestep() + * + * Apply one finite-duration CBD increment during the current COMPAS timestep. + * This allows the stellar clock, wind mass loss, stellar radii/types, and + * Eddington limits to update between CBD increments instead of freezing those + * quantities for the full CBD lifetime at the CE event. The binary's orbital parameters + * can also change due to winds and tides. + * + * The disk mass supplied in this call is the smaller of supplyRate * dt and the + * remaining reservoir. If CBD accretion triggers an AIC, the ordinary + * post-increment supernova check in EvaluateBinary() handles it. + * + * void EvolveActiveCircumbinaryDiskOneTimestep(const double p_Dt) + * + * @param [IN] p_Dt Current COMPAS timestep (Myr) + */ +void BaseBinaryStar::EvolveActiveCircumbinaryDiskOneTimestep(const double p_Dt) { + + if (!m_ActiveCircumbinaryDisk.active) return; + + const double dtYears = std::min(p_Dt * MYR_TO_YEAR, m_ActiveCircumbinaryDisk.remainingDuration); + const double totalSuppliedMass = std::max(m_ActiveCircumbinaryDisk.totalSuppliedMass, 0.0); + const double completionTolerance = std::max(1.0e-12, 1.0e-10 * std::max(totalSuppliedMass, 1.0)); + + const bool reservoirExhausted = utils::Compare(m_ActiveCircumbinaryDisk.remainingSuppliedMass, 0.0, completionTolerance) <= 0; + if (utils::Compare(dtYears, 0.0) <= 0 || reservoirExhausted) { + FinaliseActiveCircumbinaryDisk(); + return; + } + + const double suppliedThisStep = std::min( + m_ActiveCircumbinaryDisk.supplyRate * dtYears, + m_ActiveCircumbinaryDisk.remainingSuppliedMass + ); + + if (utils::Compare(suppliedThisStep, 0.0) <= 0) { + FinaliseActiveCircumbinaryDisk(); + return; + } + + const double mass1BeforeCBD = m_Star1->Mass(); + const double mass2BeforeCBD = m_Star2->Mass(); + const CircumbinaryDisk::EvolutionOptions evolutionOptions{CircumbinaryDisk::MakeEvolutionOptionsFromCompasOptions()}; + + const CircumbinaryDisk::EvolutionInput evolutionInput{ + mass1BeforeCBD, + mass2BeforeCBD, + m_Star1->Radius(), + m_Star2->Radius(), + m_Star1->StellarType(), + m_Star2->StellarType(), + m_Eccentricity, + suppliedThisStep, + dtYears, + CircumbinaryDisk::StarLabel::NONE, + evolutionOptions + }; + + const CircumbinaryDisk::EvolutionTrack track{CircumbinaryDisk::EvolveTrack(evolutionInput)}; + + const double finalMass1 = track.mass1Msol; + const double finalMass2 = track.mass2Msol; + + m_CircumbinaryDiskDetails.massRetained1 += finalMass1 - mass1BeforeCBD; + m_CircumbinaryDiskDetails.massRetained2 += finalMass2 - mass2BeforeCBD; + + m_SemiMajorAxis = m_SemiMajorAxis * track.semiMajorAxisFactor; + m_Eccentricity = track.eccentricity; + + ApplyCircumbinaryDiskMassChange(m_Star1, finalMass1); + ApplyCircumbinaryDiskMassChange(m_Star2, finalMass2); + + m_ActiveCircumbinaryDisk.remainingDuration = std::max(m_ActiveCircumbinaryDisk.remainingDuration - dtYears, 0.0); + m_ActiveCircumbinaryDisk.remainingSuppliedMass = std::max(m_ActiveCircumbinaryDisk.remainingSuppliedMass - suppliedThisStep, 0.0); + + const bool completedByMass = utils::Compare(m_ActiveCircumbinaryDisk.remainingSuppliedMass, 0.0, completionTolerance) <= 0; + const bool completedByDuration = utils::Compare(m_ActiveCircumbinaryDisk.remainingDuration, 0.0) <= 0; + + m_CircumbinaryDiskDetails.massSupplied = std::max( + m_ActiveCircumbinaryDisk.totalSuppliedMass - m_ActiveCircumbinaryDisk.remainingSuppliedMass, + 0.0 + ); + m_CircumbinaryDiskDetails.semiMajorAxisPost = m_SemiMajorAxis * AU_TO_RSOL; + m_CircumbinaryDiskDetails.eccentricityPost = m_Eccentricity; + + if (completedByMass || completedByDuration) { + FinaliseActiveCircumbinaryDisk(); + } +} + + + +/* + * Calculate post-common-envelope eccentricity from user prescription + * + * double CalculatePostCommonEnvelopeEccentricity() + * + * @return Eccentricity to assign immediately after common envelope evolution + */ +double BaseBinaryStar::CalculatePostCommonEnvelopeEccentricity() const { + + // The PRE_RLOF_CAP and PRE_RLOF_FRACTION prescriptions use the eccentricity + // stored at first RLOF contact, before any RLOF circularisation. See InitialiseMassTransfer(). + switch (OPTIONS->PostCommonEnvelopeEccentricityPrescription()) { + case POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION::PRE_RLOF_CAP: { + return std::min(m_EccentricityPreRLOF, OPTIONS->PostCommonEnvelopeEccentricityCap()); + } + case POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION::PRE_RLOF_FRACTION: { + return OPTIONS->PostCommonEnvelopeEccentricityFraction() * m_EccentricityPreRLOF; + } + case POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION::CIRCULAR: { + return 0.0; + } + } + + return 0.0; +} + + /* * Resolve a Common Envelope Event * @@ -1543,6 +2055,11 @@ void BaseBinaryStar::EvaluateSupernovae() { */ void BaseBinaryStar::ResolveCommonEnvelopeEvent() { + if (m_ActiveCircumbinaryDisk.active) { + // A new common-envelope event interrupts the finite-duration CBD. + FinaliseActiveCircumbinaryDisk(); + } + double alphaCE = OPTIONS->CommonEnvelopeAlpha(); // CE efficiency parameter double eccentricity = Eccentricity(); // current eccentricity (before CEE) @@ -1554,6 +2071,19 @@ void BaseBinaryStar::ResolveCommonEnvelopeEvent() { double omegaSpin2_pre_CE = m_Star2->Omega(); // star2 spin (before CEE) double semiMajorAxisAfterStage1 = 0.0; // semi-major axis after stage 1 (to remain zero unless using 2-stage CE formalism) + const STELLAR_TYPE stellarType1PreCE = m_Star1->StellarType(); // state before the CE/CBD update + const STELLAR_TYPE stellarType2PreCE = m_Star2->StellarType(); + const double mass1PreCE = m_Star1->Mass(); + const double mass2PreCE = m_Star2->Mass(); + const double radius1PreCERsol = m_Star1->Radius(); + const double radius2PreCERsol = m_Star2->Radius(); + + // Clear stale CBD event state at the start of a fresh CE. TIMESTEPPED + // active-disk bookkeeping is preserved; this flag is only used here to + // tell EvaluateBinary() whether this CE produced an instantaneous CBD. + if (!m_ActiveCircumbinaryDisk.active) { + m_CircumbinaryDiskDetails.formed = false; + } bool isDonorMS = false; // check for main sequence donor if (OPTIONS->AllowMainSequenceStarToSurviveCommonEnvelope()) { // allow main sequence stars to survive CEE? @@ -1694,11 +2224,12 @@ void BaseBinaryStar::ResolveCommonEnvelopeEvent() { THROW_ERROR(ERROR::UNKNOWN_CE_FORMALISM); // throw error } - double rRLdfin1 = m_SemiMajorAxis * CalculateRocheLobeRadius_Static(m_Mass1Final, m_Mass2Final); // Roche-lobe radius in AU after CEE, seen by star1 - double rRLdfin2 = m_SemiMajorAxis * CalculateRocheLobeRadius_Static(m_Mass2Final, m_Mass1Final); // Roche-lobe radius in AU after CEE, seen by star2 + m_Eccentricity = CalculatePostCommonEnvelopeEccentricity(); // assign post-CE eccentricity according to user prescription + double postCEPeriastronAU = m_SemiMajorAxis * (1.0 - m_Eccentricity); // Roche lobes should be checked at periastron + double rRLdfin1 = postCEPeriastronAU * CalculateRocheLobeRadius_Static(m_Mass1Final, m_Mass2Final); // Roche-lobe radius in AU after CEE, seen by star1 + double rRLdfin2 = postCEPeriastronAU * CalculateRocheLobeRadius_Static(m_Mass2Final, m_Mass1Final); // Roche-lobe radius in AU after CEE, seen by star2 double rRLdfin1Rsol = rRLdfin1 * AU_TO_RSOL; // Roche-lobe radius in Rsol after CEE, seen by star1 double rRLdfin2Rsol = rRLdfin2 * AU_TO_RSOL; // Roche-lobe radius in Rsol after CEE, seen by star2 - m_Eccentricity = 0.0; // we assume that a common envelope event (CEE) circularises the binary m_Star1->ResolveCommonEnvelopeAccretion(m_Mass1Final); // update star1's mass after CE accretion m_Star2->ResolveCommonEnvelopeAccretion(m_Mass2Final); // update star2's mass after CE accretion @@ -1754,10 +2285,20 @@ void BaseBinaryStar::ResolveCommonEnvelopeEvent() { m_Star2->SetPostCEEValues(); // squirrel away post CEE stellar values for star 2 SetPostCEEValues(m_SemiMajorAxis * AU_TO_RSOL, semiMajorAxisAfterStage1 * AU_TO_RSOL, m_Eccentricity, rRLdfin1Rsol, rRLdfin2Rsol); // squirrel away post CEE binary values (checks for post-CE RLOF, so should be done at end) - if (m_RLOFDetails.immediateRLOFPostCEE == true && !OPTIONS->AllowImmediateRLOFpostCEToSurviveCommonEnvelope()) {// is there immediate post-CE RLOF which is not allowed? + const bool allowImmediateRLOFPostCE = OPTIONS->AllowImmediateRLOFpostCEToSurviveCommonEnvelope(); + if ((!m_RLOFDetails.immediateRLOFPostCEE || allowImmediateRLOFPostCE) && OPTIONS->CircumbinaryDisk()) { // only evolve CBDs for CE survivors + // The CBD framework is a post-CE process. It is applied only after + // the ordinary CE calculation has produced a detached survivor; if + // the CBD then changes the orbit enough to create immediate RLOF, + // the same post-CE RLOF survival rule is checked again below. + ApplyCircumbinaryDiskAfterCommonEnvelope(stellarType1PreCE, stellarType2PreCE, mass1PreCE, mass2PreCE, radius1PreCERsol, radius2PreCERsol, envelopeFlag1, envelopeFlag2); + } + + if (m_RLOFDetails.immediateRLOFPostCEE && !allowImmediateRLOFPostCE) { m_MassTransferTrackerHistory = MT_TRACKING::MERGER; m_Flags.stellarMerger = true; } + } (void)PrintCommonEnvelope(); // print (log) common envelope details @@ -2199,6 +2740,14 @@ void BaseBinaryStar::CalculateMassTransfer(const double p_Dt) { // no m_MassTransferTrackerHistory = m_Donor == m_Star1 ? MT_TRACKING::STABLE_1_TO_2_SURV : MT_TRACKING::STABLE_2_TO_1_SURV; // record what happened - for later printing + if (m_ActiveCircumbinaryDisk.active && m_MassTransferTimescale == MT_TIMESCALE::THERMAL) { + // The CBD prescription is not coupled to the large discrete + // binary transformation represented by thermal-timescale stable + // MT. Nuclear-timescale stable MT may continue alongside the + // active CBD. + FinaliseActiveCircumbinaryDisk(); + } + double massGainAccretor = -massDiffDonor * m_FractionAccreted; // set accretor mass gain to mass loss * conservativeness double omegaDonor_pre_MT = m_Donor->Omega(); // used if full donor envelope is removed @@ -2359,10 +2908,27 @@ void BaseBinaryStar::InitialiseMassTransfer() { m_MassTransferTimescale = MT_TIMESCALE::NONE; m_MassLossRateInRLOF = 0.0; + // Store the binary state before this call can circularise the orbit, so + // post-CE eccentricity prescriptions can reference the pre-RLOF state. + const bool wasRLOF = m_RLOFDetails.isRLOF; + const double eccentricityAtRLOFCheck = m_Eccentricity; + const double semiMajorAxisAtRLOFCheck = m_SemiMajorAxis; + const double angularMomentumAtRLOFCheck = CalculateAngularMomentum(); + m_Star1->InitialiseMassTransfer(m_CEDetails.CEEnow, m_SemiMajorAxis, m_Eccentricity); // initialise mass transfer for star1 m_Star2->InitialiseMassTransfer(m_CEDetails.CEEnow, m_SemiMajorAxis, m_Eccentricity); // initialise mass transfer for star2 - if (m_Star1->IsRLOF() || m_Star2->IsRLOF()) { // either star overflowing its Roche Lobe? + const bool isRLOF = m_Star1->IsRLOF() || m_Star2->IsRLOF(); + + if (isRLOF && !wasRLOF) { + m_EccentricityPreRLOF = eccentricityAtRLOFCheck; // store eccentricity before any RLOF circularisation + m_SemiMajorAxisPreRLOF = semiMajorAxisAtRLOFCheck; // store semi-major axis before any RLOF circularisation + m_TotalAngularMomentumPreRLOF = angularMomentumAtRLOFCheck; + } + + m_RLOFDetails.isRLOF = isRLOF; + + if (isRLOF) { // either star overflowing its Roche Lobe? // yes - mass transfer if not both CH if (OPTIONS->CHEMode() != CHE_MODE::NONE && HasTwoOf({STELLAR_TYPE::CHEMICALLY_HOMOGENEOUS})) { // CHE enabled and both stars CH? // yes @@ -3251,8 +3817,16 @@ double BaseBinaryStar::ChooseTimestep(const double p_Factor) { } dt *= OPTIONS->TimestepMultiplier() * p_Factor; + dt = std::max(std::round(dt / TIMESTEP_QUANTUM) * TIMESTEP_QUANTUM, TIDES_MINIMUM_FRACTIONAL_NUCLEAR_TIME * NUCLEAR_MINIMUM_TIMESTEP); // quantised and not less than minimum + + if (m_ActiveCircumbinaryDisk.active) { + dt = std::min(dt, m_ActiveCircumbinaryDisk.remainingDuration * YEAR_TO_MYR); + if (utils::Compare(m_ActiveCircumbinaryDisk.supplyRate, 0.0) > 0) { + dt = std::min(dt, CircumbinaryDisk::MAXIMUM_SUPPLIED_MASS_PER_TIMESTEP_MSOL / m_ActiveCircumbinaryDisk.supplyRate * YEAR_TO_MYR); + } + } - return std::max(std::round(dt / TIMESTEP_QUANTUM) * TIMESTEP_QUANTUM, TIDES_MINIMUM_FRACTIONAL_NUCLEAR_TIME * NUCLEAR_MINIMUM_TIMESTEP); // quantised and not less than minimum + return dt; } @@ -3275,6 +3849,19 @@ double BaseBinaryStar::ChooseTimestep(const double p_Factor) { */ void BaseBinaryStar::EvaluateBinary(const double p_Dt) { + // Finite-duration CBD evolution is applied before ordinary mass-transfer + // checks in each timestep. This lets a disk-driven orbital change affect + // whether ordinary COMPAS event checks, such as RLOF/SN handling, occur in + // that timestep. + if (m_ActiveCircumbinaryDisk.active && !m_RestartTimestepAfterImmediateEvent) { + EvolveActiveCircumbinaryDiskOneTimestep(p_Dt); + + if (m_RestartTimestepAfterImmediateEvent) return; + + m_SemiMajorAxisPrev = m_SemiMajorAxis; + m_EccentricityPrev = m_Eccentricity; + } + CalculateMassTransfer(p_Dt); // calculate mass transfer if necessary (void)PrintDetailedOutput(m_Id, BSE_DETAILED_RECORD_TYPE::POST_MT); // print (log) detailed output @@ -3288,14 +3875,24 @@ void BaseBinaryStar::EvaluateBinary(const double p_Dt) { && !HasOneOf({STELLAR_TYPE::MASSLESS_REMNANT}) ) { // yes - avoid CEE if CH+CH or one star is a massless remnant ResolveCommonEnvelopeEvent(); // resolve CEE - immediate event - (void)PrintDetailedOutput(m_Id, BSE_DETAILED_RECORD_TYPE::POST_CEE); // print (log) detailed output + const bool instantaneousCBDEvolved = // did this CE run a full instantaneous CBD? + OPTIONS->CircumbinaryDiskEvolutionMode() == CIRCUMBINARY_DISK_EVOLUTION_MODE::INSTANTANEOUS && + m_CircumbinaryDiskDetails.formed; + (void)PrintDetailedOutput(m_Id, instantaneousCBDEvolved ? BSE_DETAILED_RECORD_TYPE::POST_CBD : BSE_DETAILED_RECORD_TYPE::POST_CEE); // print (log) detailed output } else if (m_Star1->IsSNevent() || m_Star2->IsSNevent()) { + const SN_EVENT supernovaEvents = // stash current SN types before EvaluateSupernovae() clears them + (m_Star1->IsSNevent() ? m_Star1->SN_Type() : SN_EVENT::NONE) | + (m_Star2->IsSNevent() ? m_Star2->SN_Type() : SN_EVENT::NONE); EvaluateSupernovae(); // evaluate supernovae (both stars) - immediate event (void)PrintDetailedOutput(m_Id, BSE_DETAILED_RECORD_TYPE::POST_SN); // print (log) detailed output if (HasOneOf({ STELLAR_TYPE::NEUTRON_STAR })) { (void)PrintPulsarEvolutionParameters(BSE_PULSAR_RECORD_TYPE::POST_SN); // print (log) pulsar evolution parameters } + if (m_ActiveCircumbinaryDisk.active && // a live CBD survives non-disrupting bound events such as AIC + (CircumbinaryDisk::SupernovaEventsDisruptDisk(supernovaEvents) || IsUnbound())) { + FinaliseActiveCircumbinaryDisk(); // finalise and log the truncated CBD + } } else { ResolveMassChanges(); // apply mass loss and mass transfer as necessary @@ -3314,21 +3911,30 @@ void BaseBinaryStar::EvaluateBinary(const double p_Dt) { if (!StellarMerger() || (HasOneOf({ STELLAR_TYPE::MASSLESS_REMNANT }) && OPTIONS->EvolveMainSequenceMergers())) { // check stellar merger or evolving MS mergers // continue evolution if ((m_Star1->IsSNevent() || m_Star2->IsSNevent())) { + const SN_EVENT supernovaEvents = // stash current SN types before EvaluateSupernovae() clears them + (m_Star1->IsSNevent() ? m_Star1->SN_Type() : SN_EVENT::NONE) | + (m_Star2->IsSNevent() ? m_Star2->SN_Type() : SN_EVENT::NONE); EvaluateSupernovae(); // evaluate supernovae (both stars) if mass changes are responsible for a supernova (void)PrintDetailedOutput(m_Id, BSE_DETAILED_RECORD_TYPE::POST_SN); // print (log) detailed output if (HasOneOf({ STELLAR_TYPE::NEUTRON_STAR })) { (void)PrintPulsarEvolutionParameters(BSE_PULSAR_RECORD_TYPE::POST_SN); // print (log) pulsar evolution parameters } + if (m_ActiveCircumbinaryDisk.active && // a live CBD survives non-disrupting bound events such as AIC + (CircumbinaryDisk::SupernovaEventsDisruptDisk(supernovaEvents) || IsUnbound())) { + FinaliseActiveCircumbinaryDisk(); // finalise and log the truncated CBD + } } - CalculateEnergyAndAngularMomentum(); // perform energy and angular momentum calculations - ProcessTides(p_Dt); // process tides if required - // assign new values to "previous" values, for following timestep - m_EccentricityPrev = m_Eccentricity; - m_SemiMajorAxisPrev = m_SemiMajorAxis; + if (!m_RestartTimestepAfterImmediateEvent) { // if an immediate event ended the timestep, do not process tides/spin with the old timestep + CalculateEnergyAndAngularMomentum(); // perform energy and angular momentum calculations + ProcessTides(p_Dt); // process tides if required + // assign new values to "previous" values, for following timestep + m_EccentricityPrev = m_Eccentricity; + m_SemiMajorAxisPrev = m_SemiMajorAxis; - m_Star1->UpdateMagneticFieldAndSpin(m_CEDetails.CEEnow, m_Dt * MYR_TO_YEAR * SECONDS_IN_YEAR, EPSILON_PULSAR); // update pulsar parameters for star1 - m_Star2->UpdateMagneticFieldAndSpin(m_CEDetails.CEEnow, m_Dt * MYR_TO_YEAR * SECONDS_IN_YEAR, EPSILON_PULSAR); // update pulsar parameters for star2 + m_Star1->UpdateMagneticFieldAndSpin(m_CEDetails.CEEnow, m_Dt * MYR_TO_YEAR * SECONDS_IN_YEAR, EPSILON_PULSAR); // update pulsar parameters for star1 + m_Star2->UpdateMagneticFieldAndSpin(m_CEDetails.CEEnow, m_Dt * MYR_TO_YEAR * SECONDS_IN_YEAR, EPSILON_PULSAR); // update pulsar parameters for star2 + } } } @@ -3516,6 +4122,10 @@ EVOLUTION_STATUS BaseBinaryStar::Evolve() { else if (IsUnbound()) { // binary is unbound? m_Flags.mergesInHubbleTime = false; // yes - won't merge in a Hubble time + if (m_ActiveCircumbinaryDisk.active) { // unbound binaries cannot retain an active CBD + FinaliseActiveCircumbinaryDisk(); // finalise and log the truncated CBD + } + if (IsDCO()) { // DCO (has two COs)? if (m_DCOFormationTime == DEFAULT_INITIAL_DOUBLE_VALUE) { // DCO not yet evaluated m_DCOFormationTime = m_Time; // set the DCO formation time @@ -3533,7 +4143,10 @@ EVOLUTION_STATUS BaseBinaryStar::Evolve() { (void)PrintPulsarEvolutionParameters(BSE_PULSAR_RECORD_TYPE::POST_BINARY_TIMESTEP); // print (log) pulsar evolution parameters } - if (IsDCO() && !IsUnbound()) { // bound double compact object? + // DCO formation is not, by itself, a CBD-disrupting event. A bound DCO produced by a + // non-disrupting event (currently AIC) keeps the same disk, so defer DCO coalescence + // bookkeeping and the usual DCO stopping condition until the CBD has drained. + if (IsDCO() && !IsUnbound() && !m_ActiveCircumbinaryDisk.active) { // bound DCO with no active CBD? if (m_DCOFormationTime == DEFAULT_INITIAL_DOUBLE_VALUE) { // DCO not yet evaluated -- to ensure that the coalescence is only resolved once ResolveCoalescence(); // yes - resolve coalescence m_DCOFormationTime = m_Time; // set the DCO formation time @@ -3549,13 +4162,18 @@ EVOLUTION_STATUS BaseBinaryStar::Evolve() { if (evolutionStatus == EVOLUTION_STATUS::CONTINUE) { // continue evolution? // yes // check for other reasons to stop evolution - if (IsDCO() && m_Time > (m_DCOFormationTime + m_TimeToCoalescence) && !IsUnbound()) { // evolution time exceeds DCO merger time? + if (IsDCO() && + !m_ActiveCircumbinaryDisk.active && + m_DCOFormationTime != DEFAULT_INITIAL_DOUBLE_VALUE && + m_Time > (m_DCOFormationTime + m_TimeToCoalescence) && + !IsUnbound()) { // evolution time exceeds DCO merger time? evolutionStatus = EVOLUTION_STATUS::DCO_MERGER_TIME; // yes - stop evolution } else if (m_Time > OPTIONS->MaxEvolutionTime()) { // evolution time exceeds maximum? evolutionStatus = EVOLUTION_STATUS::TIMES_UP; // yes - stop evolution } - else if (!OPTIONS->EvolveDoubleWhiteDwarfs() && IsWDandWD()) { // double WD and their evolution is not enabled? + else if (!m_ActiveCircumbinaryDisk.active && // allow a live finite-duration CBD to drain before stopping + !OPTIONS->EvolveDoubleWhiteDwarfs() && IsWDandWD()) { // double WD and their evolution is not enabled? evolutionStatus = EVOLUTION_STATUS::WD_WD; // yes - do not evolve double WD systems } else if ((HasOneOf({ STELLAR_TYPE::MASSLESS_REMNANT }) && !OPTIONS->EvolveMainSequenceMergers()) || @@ -3570,6 +4188,32 @@ EVOLUTION_STATUS BaseBinaryStar::Evolve() { } } + if (evolutionStatus != EVOLUTION_STATUS::CONTINUE && m_ActiveCircumbinaryDisk.active) { // stop evolution with a truncated active CBD? + FinaliseActiveCircumbinaryDisk(); // yes - finalise and log the CBD before stopping + } + + if (evolutionStatus == EVOLUTION_STATUS::CONTINUE && m_RestartTimestepAfterImmediateEvent) { // immediate event changed the binary: choose a fresh timestep before aging stars + m_RestartTimestepAfterImmediateEvent = false; + + m_Star2->UpdatePreviousTimestepDuration(); + m_Star1->UpdatePreviousTimestepDuration(); + + if (usingProvidedTimesteps) { + if (stepNum >= timesteps.size()) { + evolutionStatus = EVOLUTION_STATUS::TIMESTEPS_EXHAUSTED; + SHOW_WARN(ERROR::TIMESTEPS_EXHAUSTED); + } + else { + dt = timesteps[stepNum]; + stepNum++; + } + } + else { + if (OPTIONS->EmitGravitationalRadiation()) CalculateGravitationalRadiation(); + dt = ChooseTimestep(); + } + } + if (evolutionStatus == EVOLUTION_STATUS::CONTINUE) { // continue evolution? // yes (void)PrintDetailedOutput(m_Id, BSE_DETAILED_RECORD_TYPE::PRE_STELLAR_TIMESTEP); // print (log) detailed output diff --git a/src/BaseBinaryStar.h b/src/BaseBinaryStar.h index d6a416351..01d2b3308 100644 --- a/src/BaseBinaryStar.h +++ b/src/BaseBinaryStar.h @@ -44,6 +44,9 @@ class BaseBinaryStar { m_CircularizationTimescale = p_Star.m_CircularizationTimescale; m_CEDetails = p_Star.m_CEDetails; + m_CircumbinaryDiskDetails = p_Star.m_CircumbinaryDiskDetails; + m_ActiveCircumbinaryDisk = p_Star.m_ActiveCircumbinaryDisk; + m_RestartTimestepAfterImmediateEvent = p_Star.m_RestartTimestepAfterImmediateEvent; m_Unbound = p_Star.m_Unbound; @@ -55,6 +58,7 @@ class BaseBinaryStar { m_EccentricityAtDCOFormation = p_Star.m_EccentricityAtDCOFormation; m_EccentricityInitial = p_Star.m_EccentricityInitial; m_EccentricityPreSN = p_Star.m_EccentricityPreSN; + m_EccentricityPreRLOF = p_Star.m_EccentricityPreRLOF; m_EccentricityPrev = p_Star.m_EccentricityPrev; m_Flags = p_Star.m_Flags; @@ -93,6 +97,7 @@ class BaseBinaryStar { m_SemiMajorAxisAtDCOFormation = p_Star.m_SemiMajorAxisAtDCOFormation; m_SemiMajorAxisInitial = p_Star.m_SemiMajorAxisInitial; m_SemiMajorAxisPreSN = p_Star.m_SemiMajorAxisPreSN; + m_SemiMajorAxisPreRLOF = p_Star.m_SemiMajorAxisPreRLOF; m_SemiMajorAxisPrev = p_Star.m_SemiMajorAxisPrev; m_SupernovaState = p_Star.m_SupernovaState; @@ -112,6 +117,7 @@ class BaseBinaryStar { m_TotalAngularMomentumPrev = p_Star.m_TotalAngularMomentumPrev; m_TotalAngularMomentum = p_Star.m_TotalAngularMomentum; + m_TotalAngularMomentumPreRLOF = p_Star.m_TotalAngularMomentumPreRLOF; m_TotalEnergy = p_Star.m_TotalEnergy; @@ -162,6 +168,15 @@ class BaseBinaryStar { bool CEAtLeastOnce() const { return m_CEDetails.CEEcount > 0; } unsigned int CEEventCount() const { return m_CEDetails.CEEcount; } double CircularizationTimescale() const { return m_CircularizationTimescale; } + bool CircumbinaryDiskFormed() const { return m_CircumbinaryDiskDetails.formed; } + double CircumbinaryDiskInitialMass() const { return m_CircumbinaryDiskDetails.initialMass; } + double CircumbinaryDiskMassSupplied() const { return m_CircumbinaryDiskDetails.massSupplied; } + double CircumbinaryDiskMassRetained1() const { return m_CircumbinaryDiskDetails.massRetained1; } + double CircumbinaryDiskMassRetained2() const { return m_CircumbinaryDiskDetails.massRetained2; } + double CircumbinaryDiskSemiMajorAxisPre() const { return m_CircumbinaryDiskDetails.semiMajorAxisPre; } + double CircumbinaryDiskSemiMajorAxisPost() const { return m_CircumbinaryDiskDetails.semiMajorAxisPost; } + double CircumbinaryDiskEccentricityPre() const { return m_CircumbinaryDiskDetails.eccentricityPre; } + double CircumbinaryDiskEccentricityPost() const { return m_CircumbinaryDiskDetails.eccentricityPost; } unsigned int CommonEnvelopeEventCount() const { return m_CEDetails.CEEcount; } bool Unbound() const { return m_Unbound; } bool DoubleCoreCE() const { return m_CEDetails.doubleCoreCE; } @@ -309,6 +324,31 @@ class BaseBinaryStar { BinaryCEDetailsT m_CEDetails; // Common Event details + // Cached initial and final quantities written to one CBD event record. + struct CircumbinaryDiskDetailsT { + bool formed = false; // A post-CE circumbinary disk formed and was evolved + double initialMass = DEFAULT_INITIAL_DOUBLE_VALUE; // Initial CBD reservoir intended to be supplied (Msol) + double massSupplied = DEFAULT_INITIAL_DOUBLE_VALUE; // Mass actually supplied to the binary through the CBD (Msol) + double massRetained1 = DEFAULT_INITIAL_DOUBLE_VALUE; // Mass retained by star 1 during CBD accretion (Msol) + double massRetained2 = DEFAULT_INITIAL_DOUBLE_VALUE; // Mass retained by star 2 during CBD accretion (Msol) + double semiMajorAxisPre = DEFAULT_INITIAL_DOUBLE_VALUE; // Semi-major axis before CBD evolution (Rsol) + double semiMajorAxisPost = DEFAULT_INITIAL_DOUBLE_VALUE; // Semi-major axis after CBD evolution (Rsol) + double eccentricityPre = DEFAULT_INITIAL_DOUBLE_VALUE; // Eccentricity before CBD evolution + double eccentricityPost = DEFAULT_INITIAL_DOUBLE_VALUE; // Eccentricity after CBD evolution + } m_CircumbinaryDiskDetails{}; + + // Persistent reservoir and delivery state for a TIMESTEPPED CBD that is + // still being evolved alongside ordinary COMPAS timesteps. + struct ActiveCircumbinaryDiskT { + bool active = false; // CBD is currently draining over ordinary COMPAS timesteps + double totalSuppliedMass = 0.0; // Total CBD-supplied mass at formation (Msol) + double remainingSuppliedMass = 0.0; // Supplied mass still to be processed by the CBD (Msol) + double supplyRate = 0.0; // Uniform CBD supply rate (Msol yr^-1) + double remainingDuration = 0.0; // CBD lifetime still to be evolved (yr) + } m_ActiveCircumbinaryDisk{}; + + bool m_RestartTimestepAfterImmediateEvent; // Restart the timestep before aging stars after an instantaneous event + double m_CircularizationTimescale; bool m_Unbound; // Binary unbound? @@ -319,6 +359,7 @@ class BaseBinaryStar { double m_EccentricityAtDCOFormation; // Eccentricity at DCO formation double m_EccentricityInitial; // Record initial eccentricity double m_EccentricityPreSN; // Eccentricity prior to supernova + double m_EccentricityPreRLOF; // Eccentricity immediately before first RLOF in the current episode double m_EccentricityPrev; // Eccentricity at previous timestep struct FLAGS { // Miscellaneous flags @@ -365,6 +406,7 @@ class BaseBinaryStar { double m_SemiMajorAxisAtDCOFormation; // Semi-major axis at DCO formation double m_SemiMajorAxisInitial; // Record initial semi-major axis double m_SemiMajorAxisPreSN; // Semi-major axis prior to supernova + double m_SemiMajorAxisPreRLOF; // Semi-major axis immediately before first RLOF in the current episode double m_SemiMajorAxisPrev; // Semi-major axis at previous timestep SN_STATE m_SupernovaState; // Indicates which star (or stars) are undergoing / have undergone a supernova event @@ -384,6 +426,7 @@ class BaseBinaryStar { double m_DCOFormationTime; // Time of DCO formation double m_TotalAngularMomentum; + double m_TotalAngularMomentumPreRLOF; double m_TotalAngularMomentumPrev; double m_TotalEnergy; @@ -493,6 +536,28 @@ class BaseBinaryStar { void EvaluateSupernovae(); + // CE/CBD helper functions. The CBD physics lives in the CircumbinaryDisk* implementation files; + // these helpers keep ResolveCommonEnvelopeEvent() focused on the CE flow + // while handling COMPAS-specific state mutation, immediate-RLOF checks, + // AIC state changes, and CBD event logging. + double CalculatePostCommonEnvelopeEccentricity() const; + void ApplyCircumbinaryDiskAfterCommonEnvelope(const STELLAR_TYPE p_StellarType1PreCE, + const STELLAR_TYPE p_StellarType2PreCE, + const double p_Mass1PreCE, + const double p_Mass2PreCE, + const double p_Radius1PreCERsol, + const double p_Radius2PreCERsol, + const bool p_EnvelopeFlag1, + const bool p_EnvelopeFlag2); + void EvolveActiveCircumbinaryDiskOneTimestep(const double p_Dt); + void FinaliseActiveCircumbinaryDisk(); + void SetPostCBDValues(const double p_SemiMajorAxisAU, + const double p_EccentricityAfterCBD, + const double p_Mass1AfterCBD, + const double p_Mass2AfterCBD); + void ApplyCircumbinaryDiskMassChange(BinaryConstituentStar *p_Star, + const double p_FinalMass); + ERROR EvolveOneTimestep(const double p_Dt); void EvolveOneTimestepPreamble(const double p_Dt); @@ -563,6 +628,11 @@ class BaseBinaryStar { bool PrintCommonEnvelope(const CE_RECORD_TYPE p_RecordType = CE_RECORD_TYPE::DEFAULT) const { return LOGGING->LogCommonEnvelope(this, p_RecordType); } + + // Write the current CBD event through the standard BSE CBD logfile. + bool PrintCircumbinaryDisk() const { + return LOGGING->LogCircumbinaryDisk(this); + } bool PrintPulsarEvolutionParameters(const BSE_PULSAR_RECORD_TYPE p_RecordType) const { return OPTIONS->EvolvePulsars() ? LOGGING->LogBSEPulsarEvolutionParameters(this, p_RecordType) : true; diff --git a/src/CircumbinaryDisk.h b/src/CircumbinaryDisk.h new file mode 100644 index 000000000..f7efb9ab5 --- /dev/null +++ b/src/CircumbinaryDisk.h @@ -0,0 +1,160 @@ +#ifndef __CircumbinaryDisk_h__ +#define __CircumbinaryDisk_h__ + +#include "constants.h" +#include "typedefs.h" + +namespace CircumbinaryDisk { + +enum class StarLabel : int { NONE, STAR_1, STAR_2 }; + +// Numerical control for TIMESTEPPED mode: limit each active-CBD substep by +// the amount of supplied mass processed, since the Spindler derivatives are +// applied per unit supplied mass. This is not a physical model parameter. +constexpr double MAXIMUM_SUPPLIED_MASS_PER_TIMESTEP_MSOL = 0.01; + +// Identifies whether a pre-CE binary matches the currently supported +// compact-object + envelope-donor channel and stores the pre-CE quantities +// needed by the optional synchronized-envelope angular-momentum estimate. +struct CommonEnvelopeChannel { + bool supported = false; + double reducedMassPreCEMsol = 0.0; + double envelopeDonorRadiusPreCERsol = 0.0; +}; + +// Public API for the post-CE circumbinary-disk model. +// +// BaseBinaryStar owns COMPAS state, event ordering, logging, and mutation of +// stars/binaries. This module receives explicit physical inputs, evaluates the +// CBD formation/reservoir model, and returns CBD-driven binary changes without +// mutating COMPAS state. +// +// Validity domain: the Spindler-based evolution treats the CBD as a +// perturbative reservoir whose mass is dynamically negligible compared with +// the central binary. The formalism therefore assumes m_CBD << M_binary. +// Here m_CBD is the initial intended reservoir (FormationResult::suppliedMassMsol +// and the logged Initial_CBD_Mass), M_binary is the post-CE central-binary mass. The code +// does not impose a hard numerical cutoff on this asymptotic assumption, so +// parameter choices outside this regime are extrapolations. +// +// Public structs use COMPAS star labels: star 1 and star 2 are never reordered +// at the module boundary. Internally, the implementation handles the ordered +// q <= 1 convention required by the Siwek/Spindler tables and converts results +// back to COMPAS labels before returning them. +// +// Unit convention at the public boundary: +// masses : Msol +// radii : Rsol +// separations : Rsol, except semiMajorAxisFactor which is dimensionless +// durations : yr +// eccentricity : dimensionless + +// User/model parameters for the formation criterion. These are populated +// from COMPAS options by MakeFormationOptionsFromCompasOptions(); this struct +// intentionally carries no physical defaults. +struct FormationOptions { + bool useSynchronizedEnvelopeAngularMomentum; + double circumbinaryDiskBeta; + double envelopeMassFractionSupplied; // Assumed to yield initial m_CBD << post-CE M_binary + double diskStructureAngularMomentumFactor; + double innerDiskRadiusOverSeparation; +}; + +// User/model parameters for the CBD evolution step. These are populated +// from COMPAS options by MakeEvolutionOptionsFromCompasOptions(). +struct EvolutionOptions { + CIRCUMBINARY_DISK_EDDINGTON_MODE eddingtonMode; + double eddingtonCapFactor; + double eddingtonGe23Factor; + double aicMassThresholdMsol; +}; + +// Complete physical state needed for the CBD formation criterion. +// The caller identifies the compact-object companion and the envelope donor +// from the pre-CE COMPAS star labels and supplies their physical properties. +// beta is fJ/fM, where fJ is the fraction of the pre-CE binary angular momentum +// assigned to the CBD reservoir and fM is the supplied fraction of the total +// binary mass lost during CE. Thus J_CBD = beta * fM * J_available. The +// formation criterion is evaluated as a total angular-momentum comparison in +// COMPAS physical units. The available mass is calculated from the decrease +// in total binary mass across CE. The resulting supplied mass is assumed to +// be much smaller than the post-CE binary mass in the subsequent Spindler evolution. +struct FormationInput { + CommonEnvelopeChannel channel{}; // Pre-CE properties used by the synchronized-envelope option + double binaryMassPreCEMsol; + double binaryMassPostCEMsol; + double semiMajorAxisPreRLOFRsol; + double semiMajorAxisPostCERsol; + double eccentricityPreRLOF; + double totalAngularMomentumPreRLOF; + FormationOptions options{}; +}; + +// Outcome of the local CBD formation calculation, including the initial +// intended reservoir when the angular-momentum criterion is satisfied. +struct FormationResult { + bool forms = false; + double suppliedMassMsol = 0.0; // Initial CBD reservoir; assumed to be << post-CE binary mass +}; + +// Complete physical state needed for one Spindler/CBD evolution step after a +// CBD has formed. The supplied mass is the "bare" mass passed through the +// disk model; Eddington limiting determines how much of it is retained by each +// star. +struct EvolutionInput { + double mass1Msol; + double mass2Msol; + double radius1Rsol; + double radius2Rsol; + STELLAR_TYPE stellarType1; + STELLAR_TYPE stellarType2; + double eccentricity; + double suppliedMassMsol; + double durationYears; + + // Optional event target. Use NONE to disable; otherwise use a COMPAS star label. + // The current caller uses this to stop the CBD integration when an ONeWD + // reaches the Chandrasekhar mass and should undergo AIC. + StarLabel aicTargetStar; + EvolutionOptions options{}; +}; + +// COMPAS-labelled binary state and progress returned after evolving one +// requested CBD segment. semiMajorAxisFactor multiplies the input separation; +// the remaining fields report the final orbit, masses, elapsed time, supplied +// mass processed, and whether evolution stopped at the requested AIC threshold. +struct EvolutionTrack { + double semiMajorAxisFactor = 1.0; + double eccentricity = 0.0; + double mass1Msol = 0.0; + double mass2Msol = 0.0; + + // If evolution stops at the requested AIC threshold, the orbital and mass + // fields above already describe the state at the crossing. These fields + // report how much of the requested segment was completed. + bool aicOccurred = false; + double elapsedTimeYears = 0.0; + double suppliedMassMsol = 0.0; +}; + +bool SupernovaEventsDisruptDisk(const SN_EVENT p_Events); + +CommonEnvelopeChannel MakeCommonEnvelopeChannel(const STELLAR_TYPE p_StellarType1PreCE, + const STELLAR_TYPE p_StellarType2PreCE, + const double p_Mass1PreCE, + const double p_Mass2PreCE, + const double p_Radius1PreCERsol, + const double p_Radius2PreCERsol, + const bool p_EnvelopeFlag1, + const bool p_EnvelopeFlag2); + +FormationOptions MakeFormationOptionsFromCompasOptions(); +EvolutionOptions MakeEvolutionOptionsFromCompasOptions(); + +FormationResult EvaluateFormation(const FormationInput& p_Input); + +EvolutionTrack EvolveTrack(const EvolutionInput& p_Input); + +} // namespace CircumbinaryDisk + +#endif // __CircumbinaryDisk_h__ diff --git a/src/CircumbinaryDiskEvolutionSpindler.cpp b/src/CircumbinaryDiskEvolutionSpindler.cpp new file mode 100644 index 000000000..36afb9c76 --- /dev/null +++ b/src/CircumbinaryDiskEvolutionSpindler.cpp @@ -0,0 +1,815 @@ +#include "CircumbinaryDisk.h" + +#include "constants.h" +#include "utils.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +// spindler-c is a C library. Its public header currently does not wrap the +// declarations in extern "C", so we do it here for C++/COMPAS builds. +extern "C" { +#include "spindler.h" +} + +namespace odeint = boost::numeric::odeint; + +// Physics scope of this module: +// * Disk formation is handled in CircumbinaryDiskFormation.cpp. This file +// assumes a CBD reservoir has already formed and evolves the binary using +// the Siwek/Spindler tabulated derivatives for circumbinary-disk interaction. +// * The supplied reservoir is delivered at a constant rate over the chosen +// disk lifetime. Each component accretes the table-implied fraction unless +// limited by the selected Eddington prescription; unretained mass removes +// angular momentum from the binary using the accretor's specific angular momentum. + +namespace { + +enum class OrderedComponent { NONE, PRIMARY, SECONDARY }; + +// Physical and dimensionless inputs used by the internal Spindler integration. +// suppliedMassFraction is the total mass supplied by the CBD in units of the +// initial post-CE binary mass and is assumed to be much smaller than unity; a +// small TIMESTEPPED increment does not by itself make an initially large +// reservoir consistent with that assumption. q0 follows the ordered +// Spindler convention q = M2/M1 <= 1, not necessarily the original COMPAS +// star-2/star-1 label ratio. initialTotalMass converts between physical Msol +// units and the dimensionless ODE variables. +struct SpindlerEvolutionParams { + double suppliedMassFraction; + double q0; + double e0; + double initialTotalMass; + double durationYears; + + STELLAR_TYPE stellarType1 = STELLAR_TYPE::NONE; + STELLAR_TYPE stellarType2 = STELLAR_TYPE::NONE; + double radius1 = 0.0; + double radius2 = 0.0; + + CircumbinaryDisk::EvolutionOptions options{}; + + // Optional stop condition for event-style AIC handling. The component + // label is in the ordered Spindler convention; the threshold comes from + // options.aicMassThresholdMsol. + OrderedComponent stopComponent; +}; + +// Final dimensionless state and integration progress produced by the internal +// Spindler solver before component ordering is converted back to COMPAS labels. +struct SpindlerEvolutionResult { + double semiMajorAxisFactor = 1.0; + double mass1 = 0.5; + double mass2 = 0.5; + double eccentricity = 0.0; + double elapsedTimeYears = 0.0; + double suppliedMassFractionUsed = 0.0; + bool stoppedAtMassThreshold = false; +}; + +// Owns one initialized spindler-c table set and evaluates CBD-driven binary +// evolution with COMPAS Eddington-limit and angular-momentum-loss extensions. +class SpindlerBackend { +public: + explicit SpindlerBackend(const std::string& p_ModelName = "Siwek23"); + ~SpindlerBackend(); + + // The backend uniquely owns spindler-c table data, so copying and moving are disabled. + SpindlerBackend(const SpindlerBackend&) = delete; + SpindlerBackend& operator=(const SpindlerBackend&) = delete; + SpindlerBackend(SpindlerBackend&&) = delete; + SpindlerBackend& operator=(SpindlerBackend&&) = delete; + // Evolve with Eddington-limited, non-conservative accretion. + SpindlerEvolutionResult Evolve(const SpindlerEvolutionParams& p_Params); + +private: + // Spindler logarithmic orbital and mass-ratio derivatives returned for one + // labelled binary state. + struct Derivatives { + double Da; + double Dq; + double De; + }; + + Derivatives DerivativesForLabeledQ(double p_QLabeled, double p_Eccentricity) const; + std::pair ComponentMassFractions(double p_QLabeled, double p_Eccentricity) const; + double ComputeEddingtonRate( + const STELLAR_TYPE p_StellarType, + double p_MassSpindlerUnits, + double p_InitialTotalMass, + double p_Radius + ) const; + + static double ApplyEddingtonLimit( + double p_RequestedRate, + double p_EddingtonRate, + CIRCUMBINARY_DISK_EDDINGTON_MODE p_Mode, + double p_CapFactor, + double p_Ge23Factor + ); + + // Dimensionless Spindler-internal orbital angular momentum: G = 1, a0 = 1, and Mtot0 = 1. + static double SpindlerOrbitalAngularMomentum(double p_Mass1, double p_Mass2, double p_Eccentricity, double p_SemiMajorAxis); + + struct spindler_data_t m_SpindlerData{}; +}; + +#ifndef SPINDLER_C_ROOT +#define SPINDLER_C_ROOT "" +#endif + +// Range of the Siwek23/Spindler tables used by spindler-c. Systems outside +// the table domain are evolved using the nearest tabulated boundary value, +// while the raw q/e values are retained in the derivative normalisations so the +// evolution remains continuous at the table edges. +constexpr double SIWEK23_Q_MIN = 0.1; +constexpr double SIWEK23_Q_MAX = 1.0; +constexpr double SIWEK23_E_MIN = 0.0; +constexpr double SIWEK23_E_MAX = 0.8; +constexpr double NS_REFERENCE_RADIUS_RSUN = 1.4374e-5; +constexpr double WD_EDDINGTON_RATE_PER_RADIUS = 2.08e-3 / 1.7; +constexpr double SPINDLER_ODE_RTOL = 1.0e-4; +constexpr double SPINDLER_ODE_ATOL = 1.0e-5; +constexpr double TINY = std::numeric_limits::min(); + +/* + * Validate the ordered initial mass ratio and eccentricity before constructing the ODE state + * + * void ValidateCommonInputs(const double p_Q0, const double p_E0) + * + * @param [IN] p_Q0 Initial ordered mass ratio, M2/M1 <= 1 + * @param [IN] p_E0 Initial eccentricity + */ +void ValidateCommonInputs(const double p_Q0, const double p_E0) { + if (utils::Compare(p_Q0, 0.0) <= 0 || !std::isfinite(p_Q0)) { + throw std::invalid_argument("q0 must be positive and finite"); + } + if (!std::isfinite(p_E0) || utils::Compare(p_E0, 0.0) < 0 || utils::Compare(p_E0, 1.0) >= 0) { + throw std::invalid_argument("e0 must satisfy 0 <= e0 < 1"); + } +} + +/* + * Convert the dimensionless ODE state into the internal Spindler result + * + * SpindlerEvolutionResult MakeResultFromState(const std::vector& p_State, + * const double p_ElapsedTimeYears, + * const double p_DurationYears, + * const double p_SuppliedMassFraction, + * const bool p_StoppedAtMassThreshold) + * + * @param [IN] p_State ODE state [a/a0, M1/M0, M2/M0, e] + * @param [IN] p_ElapsedTimeYears Time evolved from the start of this CBD segment (yr) + * @param [IN] p_DurationYears Requested duration of this CBD segment (yr) + * @param [IN] p_SuppliedMassFraction Total supplied mass divided by the initial binary mass + * @param [IN] p_StoppedAtMassThreshold Whether integration stopped at the requested mass threshold + * @return Internal evolution result at p_ElapsedTimeYears + */ +SpindlerEvolutionResult MakeResultFromState( + const std::vector& p_State, + const double p_ElapsedTimeYears, + const double p_DurationYears, + const double p_SuppliedMassFraction, + const bool p_StoppedAtMassThreshold +) { + SpindlerEvolutionResult result{}; + result.semiMajorAxisFactor = p_State[0]; + result.mass1 = p_State[1]; + result.mass2 = p_State[2]; + result.eccentricity = p_State[3]; + result.elapsedTimeYears = p_ElapsedTimeYears; + result.suppliedMassFractionUsed = p_SuppliedMassFraction * p_ElapsedTimeYears / p_DurationYears; + result.stoppedAtMassThreshold = p_StoppedAtMassThreshold; + return result; +} + +/* + * Read the selected ordered-component mass from the ODE state + * + * double SelectedComponentMass(const std::vector& p_State, + * const OrderedComponent p_Component) + * + * @param [IN] p_State ODE state [a/a0, M1/M0, M2/M0, e] + * @param [IN] p_Component Ordered component to read, or NONE when no event target is active + * @return Selected dimensionless component mass; zero for NONE + */ +double SelectedComponentMass(const std::vector& p_State, const OrderedComponent p_Component) { + switch (p_Component) { + case OrderedComponent::PRIMARY: return p_State[1]; + case OrderedComponent::SECONDARY: return p_State[2]; + case OrderedComponent::NONE: return 0.0; + } + + return 0.0; +} + +std::mutex spindlerInitMutex; + +// spindler_init() resolves its table paths relative to the process working +// directory. This RAII guard temporarily switches to the spindler-c root and +// guarantees that COMPAS's original working directory is restored on exit. +class ScopedWorkingDirectory { +public: + /* + * Temporarily change the process working directory + * + * explicit ScopedWorkingDirectory(const std::string& p_NewDirectory) + * + * @param [IN] p_NewDirectory Directory required while spindler_init() resolves table paths + */ + explicit ScopedWorkingDirectory(const std::string& p_NewDirectory) { + if (p_NewDirectory.empty()) return; + + char* cwd = getcwd(nullptr, 0); + if (cwd == nullptr) { + std::ostringstream msg; + msg << "getcwd failed before spindler_init: " << std::strerror(errno); + throw std::runtime_error(msg.str()); + } + m_OldDirectory = cwd; + std::free(cwd); + + if (chdir(p_NewDirectory.c_str()) != 0) { + std::ostringstream msg; + msg << "Could not chdir to SPINDLER_C_ROOT='" << p_NewDirectory + << "' before spindler_init: " << std::strerror(errno); + throw std::runtime_error(msg.str()); + } + m_Changed = true; + } + + /* + * Restore the process working directory saved by the constructor + * + * ~ScopedWorkingDirectory() + */ + ~ScopedWorkingDirectory() { + if (m_Changed) { + (void)chdir(m_OldDirectory.c_str()); + } + } + + // Keep directory-restoration ownership unique to a single scope guard. + ScopedWorkingDirectory(const ScopedWorkingDirectory&) = delete; + ScopedWorkingDirectory& operator=(const ScopedWorkingDirectory&) = delete; + +private: + std::string m_OldDirectory; + bool m_Changed = false; +}; + +/* + * Initialise one spindler-c table backend + * + * SpindlerBackend(const std::string& p_ModelName) + * + * @param [IN] p_ModelName Name of the spindler-c table model to load + */ +SpindlerBackend::SpindlerBackend(const std::string& p_ModelName) { + std::vector modelNameCString(p_ModelName.begin(), p_ModelName.end()); + modelNameCString.push_back('\0'); + + // If enabled, the Makefile defines SPINDLER_C_ROOT to the user-supplied + // spindler-c root. spindler-c currently looks for tables//... + // relative to the current working directory during spindler_init(), so we + // temporarily initialize from that directory and then restore COMPAS's + // original working directory. + + std::lock_guard initLock(spindlerInitMutex); + ScopedWorkingDirectory cwdGuard{SPINDLER_C_ROOT}; + + const int err = spindler_init(modelNameCString.data(), &m_SpindlerData); + if (err != SPINDLER_NO_ERROR) { + std::ostringstream msg; + msg << "spindler_init failed for model '" << p_ModelName + << "' with error code " << err + << ". Check SPINDLER_C_ROOT='" << SPINDLER_C_ROOT + << "' and verify that tables/" << p_ModelName << " exists there."; + throw std::runtime_error(msg.str()); + } +} + +/* + * Release the table data allocated by spindler_init() + * + * ~SpindlerBackend() + */ +SpindlerBackend::~SpindlerBackend() { + spindler_free_data(&m_SpindlerData); +} + +/* + * Query the tabulated logarithmic orbital derivatives + * + * Derivatives DerivativesForLabeledQ(double p_QLabeled, double p_Eccentricity) const + * + * @param [IN] p_QLabeled Mass ratio in the caller's current component labels + * @param [IN] p_Eccentricity Current eccentricity + * @return Da, Dq, and De mapped back to the caller's labels + */ +SpindlerBackend::Derivatives SpindlerBackend::DerivativesForLabeledQ(double p_QLabeled, double p_Eccentricity) const { + if (utils::Compare(p_QLabeled, 0.0) <= 0 || !std::isfinite(p_QLabeled)) { + throw std::runtime_error("Encountered non-positive or non-finite mass ratio during Spindler integration"); + } + + const bool swapped = utils::Compare(p_QLabeled, 1.0) > 0; + const double qOrderedRaw = swapped ? 1.0 / p_QLabeled : p_QLabeled; + const double eccentricityRaw = std::max(p_Eccentricity, 0.0); + + // The table coefficients are logarithmic responses of the binary to CBD + // accretion/torques. Da multiplies a, De multiplies e, and Dq describes the + // evolution of the ordered mass ratio. If COMPAS's labelled mass ratio is + // inverted relative to q <= 1, the sign of the q derivative must be inverted + // before returning to the caller's labels. + const double qLookup = std::clamp(qOrderedRaw, SIWEK23_Q_MIN, SIWEK23_Q_MAX); + const double eccentricityLookup = std::clamp(eccentricityRaw, SIWEK23_E_MIN, SIWEK23_E_MAX); + + Derivatives d{}; + d.Da = spindler_get_Da(qLookup, eccentricityLookup, const_cast(&m_SpindlerData)); + + const double DeLookup = spindler_get_De(qLookup, eccentricityLookup, const_cast(&m_SpindlerData)); + d.De = utils::Compare(eccentricityRaw, 0.0) > 0 ? DeLookup * eccentricityLookup / eccentricityRaw : 0.0; + + const double DqLookup = spindler_get_Dq(qLookup, eccentricityLookup, const_cast(&m_SpindlerData)); + const double DqOrdered = DqLookup * qLookup / qOrderedRaw; + d.Dq = swapped ? -DqOrdered : DqOrdered; + return d; +} + +/* + * Infer the component shares of the supplied CBD mass + * + * std::pair ComponentMassFractions(double p_QLabeled, double p_Eccentricity) const + * + * @param [IN] p_QLabeled Mass ratio in the caller's current component labels + * @param [IN] p_Eccentricity Current eccentricity + * @return Fractions of supplied mass assigned to components 1 and 2 + */ +std::pair SpindlerBackend::ComponentMassFractions(double p_QLabeled, double p_Eccentricity) const { + if (utils::Compare(p_QLabeled, 0.0) <= 0 || !std::isfinite(p_QLabeled)) { + throw std::runtime_error("Encountered non-positive or non-finite mass ratio while computing accretion split"); + } + + const bool swapped = utils::Compare(p_QLabeled, 1.0) > 0; + const double qOrderedRaw = swapped ? 1.0 / p_QLabeled : p_QLabeled; + const double eccentricityRaw = std::max(p_Eccentricity, 0.0); + const double qLookup = std::clamp(qOrderedRaw, SIWEK23_Q_MIN, SIWEK23_Q_MAX); + const double eccentricityLookup = std::clamp(eccentricityRaw, SIWEK23_E_MIN, SIWEK23_E_MAX); + + const double DqLookup = spindler_get_Dq(qLookup, eccentricityLookup, const_cast(&m_SpindlerData)); + const double DqOrdered = DqLookup * qLookup / qOrderedRaw; + + // Infer how the supplied CBD mass is split between the two components from + // the tabulated q evolution. This keeps the mass growth consistent with the + // same table derivative that drives the orbital response instead of imposing + // an independent accretion-ratio prescription. + double fracSecondaryLookup = qOrderedRaw * (DqOrdered + 1.0 + qOrderedRaw) / std::pow(1.0 + qOrderedRaw, 2.0); + fracSecondaryLookup = std::clamp(fracSecondaryLookup, 0.0, 1.0); + const double fracPrimaryLookup = 1.0 - fracSecondaryLookup; + + if (swapped) { + return {fracSecondaryLookup, fracPrimaryLookup}; + } + return {fracPrimaryLookup, fracSecondaryLookup}; +} + +/* + * Calculate the Eddington accretion rate for one component + * + * double ComputeEddingtonRate(const STELLAR_TYPE p_StellarType, + * double p_MassSpindlerUnits, + * double p_InitialTotalMass, + * double p_Radius) const + * + * @param [IN] p_StellarType Current stellar type of the component + * @param [IN] p_MassSpindlerUnits Component mass divided by the initial binary mass + * @param [IN] p_InitialTotalMass Initial binary mass used for ODE normalisation (Msol) + * @param [IN] p_Radius Current component radius (Rsol) + * @return Eddington rate in dimensionless Spindler mass units per year + */ +double SpindlerBackend::ComputeEddingtonRate( + const STELLAR_TYPE p_StellarType, + double p_MassSpindlerUnits, + double p_InitialTotalMass, + double p_Radius +) const { + if (p_StellarType == STELLAR_TYPE::BLACK_HOLE) { + // Black-hole Eddington mass accretion rate = 4.42e-7 * (M_phys / 10) Msol/yr. Because the ODE masses + // are normalised by the initial binary mass, this is returned in + // dimensionless Spindler mass units per year. + return 4.42e-7 * (p_MassSpindlerUnits / 10.0); + } + + const bool isWhiteDwarf = p_StellarType == STELLAR_TYPE::HELIUM_WHITE_DWARF || + p_StellarType == STELLAR_TYPE::CARBON_OXYGEN_WHITE_DWARF || + p_StellarType == STELLAR_TYPE::OXYGEN_NEON_WHITE_DWARF; + + if (p_StellarType == STELLAR_TYPE::NEUTRON_STAR || isWhiteDwarf) { + if (utils::Compare(p_Radius, 0.0) <= 0 || !std::isfinite(p_Radius)) { + throw std::invalid_argument("radius must be positive and finite for radius-scaled Eddington limits"); + } + if (utils::Compare(p_InitialTotalMass, 0.0) <= 0 || !std::isfinite(p_InitialTotalMass)) { + throw std::invalid_argument("initialTotalMass must be positive for radius-scaled Eddington limits"); + } + + // COMPAS uses a radius-scaled Eddington rate for white dwarfs and other + // non-BH accretors. Preserve the existing CBD neutron-star normalisation + // while applying the standard COMPAS/Hurley coefficient to white dwarfs. + const double mdotEddPhys = p_StellarType == STELLAR_TYPE::NEUTRON_STAR + ? 3.0e-8 * (p_Radius / NS_REFERENCE_RADIUS_RSUN) + : WD_EDDINGTON_RATE_PER_RADIUS * p_Radius; + return mdotEddPhys / p_InitialTotalMass; + } + + // The Eddington limit is assumed to be irrelevant for non-compact accretors. + return std::numeric_limits::infinity(); +} + +/* + * Apply the selected Eddington-limited retention prescription + * + * CAP imposes a hard multiple of the Eddington rate, TM23 reduces the + * super-Eddington rate following Tuna & Metzger (2023), and GE23 retains a + * fixed fraction of the requested super-Eddington rate. + * + * double ApplyEddingtonLimit(double p_RequestedRate, + * double p_EddingtonRate, + * CIRCUMBINARY_DISK_EDDINGTON_MODE p_Mode, + * double p_CapFactor, + * double p_Ge23Factor) + * + * @param [IN] p_RequestedRate Accretion rate requested by the Spindler mass split + * @param [IN] p_EddingtonRate Eddington accretion rate in matching units + * @param [IN] p_Mode Eddington-limiting prescription + * @param [IN] p_CapFactor Multiple of the Eddington rate allowed in CAP mode + * @param [IN] p_Ge23Factor Retained fraction above Eddington in GE23 mode + * @return Retained accretion rate + */ +double SpindlerBackend::ApplyEddingtonLimit( + double p_RequestedRate, + double p_EddingtonRate, + CIRCUMBINARY_DISK_EDDINGTON_MODE p_Mode, + double p_CapFactor, + double p_Ge23Factor +) { + switch (p_Mode) { + case CIRCUMBINARY_DISK_EDDINGTON_MODE::CAP: { + return std::min(p_RequestedRate, p_CapFactor * p_EddingtonRate); + } + + case CIRCUMBINARY_DISK_EDDINGTON_MODE::TM23: { + if (std::isfinite(p_EddingtonRate) && utils::Compare(p_EddingtonRate, 0.0) > 0 && utils::Compare(p_RequestedRate, p_EddingtonRate) > 0) { + const double ratio = p_RequestedRate / p_EddingtonRate; + const double fTM23 = std::min(1.0, std::pow(0.6 / ratio, 0.6)); + return p_RequestedRate * fTM23; + } + return p_RequestedRate; + } + + case CIRCUMBINARY_DISK_EDDINGTON_MODE::GE23: { + return utils::Compare(p_RequestedRate, p_EddingtonRate) > 0 ? p_RequestedRate * p_Ge23Factor : p_RequestedRate; + } + } + + throw std::invalid_argument("eddingtonMode must be 'cap', 'ge23', or 'tm23'"); +} + +/* + * Calculate dimensionless orbital angular momentum in the Spindler normalisation + * + * double SpindlerOrbitalAngularMomentum(double p_Mass1, + * double p_Mass2, + * double p_Eccentricity, + * double p_SemiMajorAxis) + * + * @param [IN] p_Mass1 Ordered primary mass in Spindler units + * @param [IN] p_Mass2 Ordered secondary mass in Spindler units + * @param [IN] p_Eccentricity Current eccentricity + * @param [IN] p_SemiMajorAxis Current semi-major axis divided by its initial value + * @return Orbital angular momentum for G = Mtot,0 = a0 = 1 + */ +double SpindlerBackend::SpindlerOrbitalAngularMomentum(double p_Mass1, double p_Mass2, double p_Eccentricity, double p_SemiMajorAxis) { + const double totalMass = p_Mass1 + p_Mass2; + const double reducedMass = p_Mass1 * p_Mass2 / totalMass; + const double oneMinusE2 = std::max(1.0 - p_Eccentricity * p_Eccentricity, TINY); + return reducedMass * std::sqrt(totalMass * p_SemiMajorAxis * oneMinusE2); +} + +/* + * Evolve the Spindler system with Eddington-limited accretion + * + * State vector: [a/a0, M1/M0, M2/M0, e] in the ordered Spindler labels. The + * independent variable is time in years. The supplied CBD mass is spread + * uniformly over p_Params.durationYears, then split between the two stars using + * the Spindler qdot-derived accretion fractions. The encompassing CBD model assumes the initial + * reservoir, Initial_CBD_Mass, satisfies m_CBD << M_binary. + * + * The orbital terms have two pieces: + * - CBD torque/accretion response from the Spindler Da and De tables. + * - Extra non-conservative widening/shrinking from angular momentum carried + * away by material that was supplied but ejected due to Eddington limits. + * + * The table torques scale with the supplied mass flux. Eccentricity is evolved + * only through the tabulated CBD response; the simple wind-loss term affects a + * through Jdot but does not add an independent de/dt prescription. + * + * SpindlerEvolutionResult Evolve(const SpindlerEvolutionParams& p_Params) + * + * @param [IN] p_Params Ordered, dimensionless initial state and model parameters + * @return State reached at the requested duration or mass-threshold crossing + */ +SpindlerEvolutionResult SpindlerBackend::Evolve(const SpindlerEvolutionParams& p_Params) { + ValidateCommonInputs(p_Params.q0, p_Params.e0); + + if (utils::Compare(p_Params.suppliedMassFraction, 0.0) < 0 || !std::isfinite(p_Params.suppliedMassFraction)) { + throw std::invalid_argument("suppliedMassFraction must be non-negative and finite"); + } + if (utils::Compare(p_Params.initialTotalMass, 0.0) <= 0 || !std::isfinite(p_Params.initialTotalMass)) { + throw std::invalid_argument("initialTotalMass must be positive and finite"); + } + if (utils::Compare(p_Params.durationYears, 0.0) <= 0 || !std::isfinite(p_Params.durationYears)) { + throw std::invalid_argument("duration must be positive and finite"); + } + if (utils::Compare(p_Params.options.eddingtonCapFactor, 0.0) <= 0 || !std::isfinite(p_Params.options.eddingtonCapFactor)) { + throw std::invalid_argument("eddingtonCapFactor must be positive and finite"); + } + if (!(utils::Compare(p_Params.options.eddingtonGe23Factor, 0.0) > 0 && utils::Compare(p_Params.options.eddingtonGe23Factor, 1.0) <= 0) || + !std::isfinite(p_Params.options.eddingtonGe23Factor)) { + throw std::invalid_argument("eddingtonGe23Factor must satisfy 0 < f <= 1"); + } + + if (p_Params.stopComponent != OrderedComponent::NONE && utils::Compare(p_Params.options.aicMassThresholdMsol, 0.0) <= 0) { + throw std::invalid_argument("aicMassThresholdMsol must be positive when stopComponent is set"); + } + + const double stopMassThreshold = p_Params.stopComponent == OrderedComponent::NONE + ? 0.0 + : p_Params.options.aicMassThresholdMsol / p_Params.initialTotalMass; + + using StateType = std::vector; + StateType state = {1.0, 1.0 / (1.0 + p_Params.q0), p_Params.q0 / (1.0 + p_Params.q0), p_Params.e0}; + + if (utils::Compare(p_Params.suppliedMassFraction, 0.0) == 0) { + return MakeResultFromState(state, 0.0, p_Params.durationYears, p_Params.suppliedMassFraction, false); + } + + const double mdotSupply = p_Params.suppliedMassFraction / p_Params.durationYears; + + // Define the ODE derivatives for orbital size, component masses, and + // eccentricity under CBD torques plus non-conservative mass loss. + auto system = [this, &p_Params, mdotSupply](const StateType& p_XState, StateType& p_DxDt, const double /*p_Time*/) { + p_DxDt.resize(4); + const double aState = p_XState[0]; + const double mass1 = p_XState[1]; + const double mass2 = p_XState[2]; + const double eState = p_XState[3]; + + if (utils::Compare(aState, 0.0) <= 0 || utils::Compare(mass1, 0.0) <= 0 || utils::Compare(mass2, 0.0) <= 0) { + throw std::runtime_error("Non-positive a, M1, or M2 encountered during Spindler integration"); + } + + const double totalMass = mass1 + mass2; + const double qState = mass2 / mass1; + const double orbitalAngularMomentum = SpindlerOrbitalAngularMomentum(mass1, mass2, eState, aState); + + const double mdotEdd1 = ComputeEddingtonRate( + p_Params.stellarType1, mass1, p_Params.initialTotalMass, p_Params.radius1 + ); + const double mdotEdd2 = ComputeEddingtonRate( + p_Params.stellarType2, mass2, p_Params.initialTotalMass, p_Params.radius2 + ); + + const auto fractions = ComponentMassFractions(qState, eState); + const double mdotReq1 = fractions.first * mdotSupply; + const double mdotReq2 = fractions.second * mdotSupply; + + const double mdotAcc1 = ApplyEddingtonLimit( + mdotReq1, + mdotEdd1, + p_Params.options.eddingtonMode, + p_Params.options.eddingtonCapFactor, + p_Params.options.eddingtonGe23Factor + ); + const double mdotAcc2 = ApplyEddingtonLimit( + mdotReq2, + mdotEdd2, + p_Params.options.eddingtonMode, + p_Params.options.eddingtonCapFactor, + p_Params.options.eddingtonGe23Factor + ); + const double mdotLost1 = std::max(mdotReq1 - mdotAcc1, 0.0); + const double mdotLost2 = std::max(mdotReq2 - mdotAcc2, 0.0); + + // The Spindler tables give the CBD-driven response per unit supplied mass + // through the disk/binary interaction. + const auto d = DerivativesForLabeledQ(qState, eState); + const double dadtDisk = d.Da * aState * mdotSupply / totalMass; + const double dedt = d.De * eState * mdotSupply / totalMass; + + const double jBinary = orbitalAngularMomentum / totalMass; + const double j1 = qState * jBinary; + const double j2 = jBinary / qState; + const double dJdtWind = -(j1 * mdotLost1 + j2 * mdotLost2); + const double dadtWind = utils::Compare(orbitalAngularMomentum, 0.0) > 0 ? 2.0 * aState * dJdtWind / orbitalAngularMomentum : 0.0; + + p_DxDt[0] = dadtDisk + dadtWind; + p_DxDt[1] = mdotAcc1; + p_DxDt[2] = mdotAcc2; + p_DxDt[3] = dedt; + }; + + auto stepper = odeint::make_controlled( + SPINDLER_ODE_ATOL, + SPINDLER_ODE_RTOL, + odeint::runge_kutta_cash_karp54() + ); + + double time = 0.0; + double dt = std::max(p_Params.durationYears / 1000.0, 1.0e-8); + + const bool stopOnMassThreshold = p_Params.stopComponent != OrderedComponent::NONE; + const double initialTargetMass = SelectedComponentMass(state, p_Params.stopComponent); + if (stopOnMassThreshold && utils::Compare(initialTargetMass, stopMassThreshold) >= 0) { + return MakeResultFromState(state, 0.0, p_Params.durationYears, p_Params.suppliedMassFraction, true); + } + + // Deliberately use strict comparisons here rather than utils::Compare(): + // the ODE controller must advance to, and clip exactly at, the requested + // endpoint instead of treating a nearby time as equivalent. + while (time < p_Params.durationYears) { + if (time + dt > p_Params.durationYears) { + dt = p_Params.durationYears - time; + } + + const StateType stateBeforeStep = state; + const double timeBeforeStep = time; + const double targetBeforeStep = SelectedComponentMass(stateBeforeStep, p_Params.stopComponent); + + boost::numeric::odeint::controlled_step_result stepResult; + do { + stepResult = stepper.try_step(system, state, time, dt); + } while (stepResult == boost::numeric::odeint::fail); + + if (stopOnMassThreshold) { + const double targetAfterStep = SelectedComponentMass(state, p_Params.stopComponent); + // Deliberately use strict comparisons here rather than utils::Compare(): + // this is a sign-change bracket for interpolation to the AIC mass + // crossing; tolerance-based equality can erase the bracket. + if (targetBeforeStep < stopMassThreshold && targetAfterStep >= stopMassThreshold) { + // Event-style AIC handling: do a refined integration to the + // mass-threshold crossing and return that intermediate state to + // COMPAS, rather than evolving past the stellar-type change. + const double fraction = (stopMassThreshold - targetBeforeStep) / (targetAfterStep - targetBeforeStep); + const double crossingTime = timeBeforeStep + fraction * (time - timeBeforeStep); + StateType crossingState = stateBeforeStep; + double crossingIntegrationTime = timeBeforeStep; + double crossingDt = std::max((crossingTime - timeBeforeStep) / 10.0, 1.0e-10); + auto crossingStepper = odeint::make_controlled( + SPINDLER_ODE_ATOL, + SPINDLER_ODE_RTOL, + odeint::runge_kutta_cash_karp54() + ); + odeint::integrate_adaptive( + crossingStepper, + system, + crossingState, + crossingIntegrationTime, + crossingTime, + crossingDt + ); + return MakeResultFromState( + crossingState, + crossingTime, + p_Params.durationYears, + p_Params.suppliedMassFraction, + true + ); + } + } + } + + return MakeResultFromState(state, p_Params.durationYears, p_Params.durationYears, p_Params.suppliedMassFraction, false); +} + +/* + * Map a COMPAS-labelled AIC target onto the ordered Spindler component label + * + * Spindler orders the components by initial mass so that q = M2/M1 <= 1, + * whereas the public CBD interface preserves the original COMPAS star labels. + * The mass ordering matters here only because it determines whether those labels + * were swapped during translation; the AIC criterion itself is not mass-order dependent. + * + * OrderedComponent AicTargetStarToOrderedComponent(const CircumbinaryDisk::StarLabel p_AicTargetStar, + * const bool p_ComponentsSwapped) + * + * @param [IN] p_AicTargetStar COMPAS-labelled component to monitor for AIC + * @param [IN] p_ComponentsSwapped Whether COMPAS star labels were swapped to obtain Spindler ordering + * @return Ordered component monitored by the ODE, or NONE + */ +OrderedComponent AicTargetStarToOrderedComponent( + const CircumbinaryDisk::StarLabel p_AicTargetStar, + const bool p_ComponentsSwapped +) { + switch (p_AicTargetStar) { + case CircumbinaryDisk::StarLabel::NONE: + return OrderedComponent::NONE; + case CircumbinaryDisk::StarLabel::STAR_1: + return p_ComponentsSwapped ? OrderedComponent::SECONDARY : OrderedComponent::PRIMARY; + case CircumbinaryDisk::StarLabel::STAR_2: + return p_ComponentsSwapped ? OrderedComponent::PRIMARY : OrderedComponent::SECONDARY; + } + + return OrderedComponent::NONE; +} + +/* + * Translate COMPAS-labelled input to Spindler variables, evolve it, and translate the result back + * + * CircumbinaryDisk::EvolutionTrack EvolveTrackWithBackend(const CircumbinaryDisk::EvolutionInput& p_Input, + * SpindlerBackend& p_Spindler) + * + * @param [IN] p_Input COMPAS-labelled physical input for one binary-CBD interaction segment + * @param [IN] p_Spindler Initialised Spindler table backend + * @return Final COMPAS-labelled state and optional AIC-stop metadata + */ +CircumbinaryDisk::EvolutionTrack EvolveTrackWithBackend( + const CircumbinaryDisk::EvolutionInput& p_Input, + SpindlerBackend& p_Spindler +) { + const double binaryMass = p_Input.mass1Msol + p_Input.mass2Msol; + const bool componentsSwapped = utils::Compare(p_Input.mass1Msol, p_Input.mass2Msol) < 0; + const double primaryMass = componentsSwapped ? p_Input.mass2Msol : p_Input.mass1Msol; + const double secondaryMass = componentsSwapped ? p_Input.mass1Msol : p_Input.mass2Msol; + + // Convert the public COMPAS-labelled, physical-unit input into the ordered, + // dimensionless variables expected by the Spindler ODE. componentsSwapped + // records whether this translation exchanged the COMPAS labels; it is used + // both to map the AIC target into ODE coordinates and to restore output labels. + SpindlerEvolutionParams params{}; + params.suppliedMassFraction = p_Input.suppliedMassMsol / binaryMass; + params.q0 = secondaryMass / primaryMass; + params.e0 = p_Input.eccentricity; + params.initialTotalMass = binaryMass; + params.durationYears = p_Input.durationYears; + params.stellarType1 = componentsSwapped ? p_Input.stellarType2 : p_Input.stellarType1; + params.stellarType2 = componentsSwapped ? p_Input.stellarType1 : p_Input.stellarType2; + params.radius1 = componentsSwapped ? p_Input.radius2Rsol : p_Input.radius1Rsol; + params.radius2 = componentsSwapped ? p_Input.radius1Rsol : p_Input.radius2Rsol; + params.options = p_Input.options; + params.stopComponent = AicTargetStarToOrderedComponent(p_Input.aicTargetStar, componentsSwapped); + + const SpindlerEvolutionResult spindlerResult{p_Spindler.Evolve(params)}; + + CircumbinaryDisk::EvolutionTrack track{}; + track.semiMajorAxisFactor = spindlerResult.semiMajorAxisFactor; + track.eccentricity = spindlerResult.eccentricity; + track.mass1Msol = (componentsSwapped ? spindlerResult.mass2 : spindlerResult.mass1) * binaryMass; + track.mass2Msol = (componentsSwapped ? spindlerResult.mass1 : spindlerResult.mass2) * binaryMass; + + if (spindlerResult.stoppedAtMassThreshold) { + track.aicOccurred = true; + track.elapsedTimeYears = spindlerResult.elapsedTimeYears; + track.suppliedMassMsol = spindlerResult.suppliedMassFractionUsed * binaryMass; + } + + return track; +} + +} // namespace + +namespace CircumbinaryDisk { + +/* + * Evolve a formed CBD and return COMPAS-labelled final state + * + * spindler-c is initialized lazily on the first CBD call in a COMPAS process + * and then reused for all subsequent binaries in that process. Spindler evolves + * a/a0, so the returned semi-major-axis value is a multiplicative factor that + * the caller applies to its current binary separation. + * + * EvolutionTrack EvolveTrack(const EvolutionInput& p_Input) + * + * @param [IN] p_Input COMPAS-labelled physical input; per-call supplied mass is assumed to be << binary mass + * @return Final COMPAS-labelled state and optional AIC-stop metadata + */ +EvolutionTrack EvolveTrack(const EvolutionInput& p_Input) { + static SpindlerBackend spindler{"Siwek23"}; + return EvolveTrackWithBackend(p_Input, spindler); +} + + +} // namespace CircumbinaryDisk diff --git a/src/CircumbinaryDiskEvolutionUnavailable.cpp b/src/CircumbinaryDiskEvolutionUnavailable.cpp new file mode 100644 index 000000000..657e73073 --- /dev/null +++ b/src/CircumbinaryDiskEvolutionUnavailable.cpp @@ -0,0 +1,24 @@ +#include "CircumbinaryDisk.h" + +// Stub implementation used when COMPAS is built without spindler-c support. + +#include + +namespace CircumbinaryDisk { + +/* + * Reject CBD evolution when COMPAS was built without the spindler-c backend + * + * EvolutionTrack EvolveTrack(const EvolutionInput&) + * + * @return This function does not return; it throws a runtime error + */ +EvolutionTrack EvolveTrack(const EvolutionInput&) { + throw std::runtime_error( + "Circumbinary-disk evolution was requested, but this COMPAS executable " + "was built without spindler-c support. Rebuild with SPINDLER_C_ROOT " + "set to the spindler-c build tree." + ); +} + +} // namespace CircumbinaryDisk diff --git a/src/CircumbinaryDiskFormation.cpp b/src/CircumbinaryDiskFormation.cpp new file mode 100644 index 000000000..9fca4fad0 --- /dev/null +++ b/src/CircumbinaryDiskFormation.cpp @@ -0,0 +1,224 @@ +#include "CircumbinaryDisk.h" + +#include "constants.h" +#include "Options.h" +#include "utils.h" + +#include + +namespace { + +// File-local helpers for the Spindler-independent CBD formation criterion. +// These are deliberately kept out of the public CircumbinaryDisk namespace: +// the rest of COMPAS should see only the explicit input/result structs and +// EvaluateFormation(), not the implementation details of the available-AM +// estimate or the legacy synchronized-envelope comparison path. + +constexpr double SYNCHRONIZED_ENVELOPE_INERTIA_COEFFICIENT = 0.2; + +/* + * Calculate the legacy synchronized-envelope estimate of the available angular momentum + * + * The estimate assumes the donor envelope is synchronized with the pre-RLOF + * orbit and adds the envelope spin angular momentum to the pre-RLOF orbital + * angular momentum. The default formation path instead uses COMPAS's stored + * total pre-RLOF binary angular momentum. + * + * double SynchronizedEnvelopeAngularMomentumEstimate(const CircumbinaryDisk::FormationInput& p_Input, + * const double p_AvailableMassMsol) + * + * @param [IN] p_Input Physical state and model options for the formation criterion + * @param [IN] p_AvailableMassMsol Total binary mass lost during CE and available to the CBD model (Msol) + * @return Available angular momentum (Msol AU^2 yr^-1) + */ +double SynchronizedEnvelopeAngularMomentumEstimate(const CircumbinaryDisk::FormationInput& p_Input, const double p_AvailableMassMsol) { + const double totalMassPreRLOF = p_Input.binaryMassPreCEMsol; + const double reducedMassPreRLOF = p_Input.channel.reducedMassPreCEMsol; + const double semiMajorAxisPreRLOFAU = p_Input.semiMajorAxisPreRLOFRsol * RSOL_TO_AU; + const double envelopeDonorRadiusPreCEAU = p_Input.channel.envelopeDonorRadiusPreCERsol * RSOL_TO_AU; + const double angularVelocityPreRLOF = std::sqrt(G_AU_Msol_yr * totalMassPreRLOF / + std::pow(semiMajorAxisPreRLOFAU, 3)); + const double envelopeMomentOfInertia = SYNCHRONIZED_ENVELOPE_INERTIA_COEFFICIENT * + p_AvailableMassMsol * + envelopeDonorRadiusPreCEAU * + envelopeDonorRadiusPreCEAU; + const double envelopeSpinAngularMomentum = angularVelocityPreRLOF * envelopeMomentOfInertia; + const double orbitalAngularMomentumPreRLOF = reducedMassPreRLOF * + std::sqrt(G_AU_Msol_yr * + totalMassPreRLOF * + semiMajorAxisPreRLOFAU * + (1.0 - p_Input.eccentricityPreRLOF * p_Input.eccentricityPreRLOF)); + + return orbitalAngularMomentumPreRLOF + envelopeSpinAngularMomentum; +} + +} // namespace + +namespace CircumbinaryDisk { + + +/* + * Copy the current global COMPAS options needed by the CBD formation model + * + * FormationOptions MakeFormationOptionsFromCompasOptions() + * + * @return CBD formation options + */ +FormationOptions MakeFormationOptionsFromCompasOptions() { + return { + OPTIONS->CircumbinaryDiskUseSynchronizedEnvelopeAngularMomentum(), + OPTIONS->CircumbinaryDiskBeta(), + OPTIONS->CircumbinaryDiskEnvelopeMassFractionSupplied(), + OPTIONS->CircumbinaryDiskStructureFactor(), + OPTIONS->CircumbinaryDiskInnerRadiusOverSeparation() + }; +} + +/* + * Copy the current global COMPAS options needed by the CBD evolution model + * + * EvolutionOptions MakeEvolutionOptionsFromCompasOptions() + * + * @return CBD evolution options + */ +EvolutionOptions MakeEvolutionOptionsFromCompasOptions() { + return { + OPTIONS->CircumbinaryDiskEddingtonMode(), + OPTIONS->CircumbinaryDiskEddingtonCapFactor(), + OPTIONS->CircumbinaryDiskEddingtonGe23Factor(), + MCH + }; +} + +/* + * Determine whether a set of supernova-like events destroys an active CBD + * + * AIC is treated as a change to the live COMPAS stellar state, so a bound + * system continues evolving through the same physical disk. + * + * bool SupernovaEventsDisruptDisk(const SN_EVENT p_Events) + * + * @param [IN] p_Events Supernova-event bitmask generated during the current event + * @return true for any non-AIC supernova event; false otherwise + */ +bool SupernovaEventsDisruptDisk(const SN_EVENT p_Events) { + return p_Events != SN_EVENT::NONE && p_Events != SN_EVENT::AIC; +} + +/* + * Determine whether a CE has the supported compact-object plus envelope-donor geometry + * + * CommonEnvelopeChannel MakeCommonEnvelopeChannel(const STELLAR_TYPE p_StellarType1PreCE, + * const STELLAR_TYPE p_StellarType2PreCE, + * const double p_Mass1PreCE, + * const double p_Mass2PreCE, + * const double p_Radius1PreCERsol, + * const double p_Radius2PreCERsol, + * const bool p_EnvelopeFlag1, + * const bool p_EnvelopeFlag2) + * + * @param [IN] p_StellarType1PreCE Stellar type of star 1 immediately before CE + * @param [IN] p_StellarType2PreCE Stellar type of star 2 immediately before CE + * @param [IN] p_Mass1PreCE Mass of star 1 immediately before CE (Msol) + * @param [IN] p_Mass2PreCE Mass of star 2 immediately before CE (Msol) + * @param [IN] p_Radius1PreCERsol Radius of star 1 immediately before CE (Rsol) + * @param [IN] p_Radius2PreCERsol Radius of star 2 immediately before CE (Rsol) + * @param [IN] p_EnvelopeFlag1 Whether star 1 has an envelope immediately before CE + * @param [IN] p_EnvelopeFlag2 Whether star 2 has an envelope immediately before CE + * @return Current channel support, pre-CE reduced mass, and donor radius for the synchronized-envelope option + */ +CommonEnvelopeChannel MakeCommonEnvelopeChannel(const STELLAR_TYPE p_StellarType1PreCE, + const STELLAR_TYPE p_StellarType2PreCE, + const double p_Mass1PreCE, + const double p_Mass2PreCE, + const double p_Radius1PreCERsol, + const double p_Radius2PreCERsol, + const bool p_EnvelopeFlag1, + const bool p_EnvelopeFlag2) { + CommonEnvelopeChannel channel{}; + + const STELLAR_TYPE_LIST supportedCompactObjects = { + STELLAR_TYPE::HELIUM_WHITE_DWARF, + STELLAR_TYPE::CARBON_OXYGEN_WHITE_DWARF, + STELLAR_TYPE::OXYGEN_NEON_WHITE_DWARF, + STELLAR_TYPE::NEUTRON_STAR, + STELLAR_TYPE::BLACK_HOLE + }; + const bool star1IsCompactObject = utils::IsOneOf(p_StellarType1PreCE, supportedCompactObjects); + const bool star2IsCompactObject = utils::IsOneOf(p_StellarType2PreCE, supportedCompactObjects); + + if (star1IsCompactObject && p_EnvelopeFlag2 && !p_EnvelopeFlag1) { + channel.envelopeDonorRadiusPreCERsol = p_Radius2PreCERsol; + } + else if (star2IsCompactObject && p_EnvelopeFlag1 && !p_EnvelopeFlag2) { + channel.envelopeDonorRadiusPreCERsol = p_Radius1PreCERsol; + } + else { + return channel; + } + + const double binaryMassPreCEMsol = p_Mass1PreCE + p_Mass2PreCE; + if (utils::Compare(binaryMassPreCEMsol, 0.0) <= 0) { + return channel; + } + + channel.supported = true; + channel.reducedMassPreCEMsol = (p_Mass1PreCE * p_Mass2PreCE) / binaryMassPreCEMsol; + return channel; +} + +/* + * Evaluate CBD formation criterion + * + * The mass supplied to the potential CBD is a fraction f_M of the decrease in total binary mass + * across CE: (M1 + M2)_pre-CE - (M1 + M2)_post-CE. The resulting initial CBD + * reservoir is assumed to satisfy m_CBD << M_binary during the evolution; formation does not + * check this assumption. + * + * The criterion compares the total angular momentum assigned to the + * CBD reservoir against the total angular momentum required for + * supporting the CBD, given by the Keplerian AM at the adopted CBD inner radius times a disk structure factor. + * + * FormationResult EvaluateFormation(const FormationInput& p_Input) + * + * @param [IN] p_Input Physical state and model options for the formation criterion + * @return Formation outcome and supplied mass + */ +FormationResult EvaluateFormation(const FormationInput& p_Input) { + FormationResult result{}; + + const double availableMassMsol = p_Input.binaryMassPreCEMsol - p_Input.binaryMassPostCEMsol; + if (utils::Compare(availableMassMsol, 0.0) <= 0 || utils::Compare(p_Input.semiMajorAxisPreRLOFRsol, 0.0) <= 0) { + return result; + } + + result.suppliedMassMsol = p_Input.options.envelopeMassFractionSupplied * availableMassMsol; + if (utils::Compare(result.suppliedMassMsol, 0.0) <= 0) { + return result; + } + + const double availableAngularMomentum = p_Input.options.useSynchronizedEnvelopeAngularMomentum + ? SynchronizedEnvelopeAngularMomentumEstimate(p_Input, availableMassMsol) + : p_Input.totalAngularMomentumPreRLOF; + // beta = fJ/fM, so the angular momentum assigned to the supplied CBD + // reservoir is J_CBD = beta * fM * J_available. + const double diskAngularMomentum = p_Input.options.circumbinaryDiskBeta * + p_Input.options.envelopeMassFractionSupplied * + availableAngularMomentum; + + // The adopted inner CBD radius scales with the post-CE separation because + // the disk is assumed to orbit the post-CE binary, not the + // larger pre-CE orbit. Formation is allowed when the assigned angular + // momentum meets or exceeds the threshold. + const double innerDiskRadiusAU = p_Input.options.innerDiskRadiusOverSeparation * p_Input.semiMajorAxisPostCERsol * RSOL_TO_AU; + const double thresholdAngularMomentum = result.suppliedMassMsol * + p_Input.options.diskStructureAngularMomentumFactor * + std::sqrt(G_AU_Msol_yr * + p_Input.binaryMassPostCEMsol * + innerDiskRadiusAU); + + result.forms = utils::Compare(diskAngularMomentum, thresholdAngularMomentum) >= 0; + return result; +} + +} // namespace CircumbinaryDisk diff --git a/src/Log.cpp b/src/Log.cpp index ca4e3824c..a751586bf 100644 --- a/src/Log.cpp +++ b/src/Log.cpp @@ -285,6 +285,7 @@ void Log::Start(const string p_LogBasePathString, // BSE if (NotesPropertyPresent(m_BSE_CEE_Rec )) m_BSE_CEE_Notes = BOOL_VECTOR(m_BSE_CEE_Notes.size(), true); + if (NotesPropertyPresent(m_BSE_CBD_Rec )) m_BSE_CBD_Notes = BOOL_VECTOR(m_BSE_CBD_Notes.size(), true); if (NotesPropertyPresent(m_BSE_DCO_Rec )) m_BSE_DCO_Notes = BOOL_VECTOR(m_BSE_DCO_Notes.size(), true); if (NotesPropertyPresent(m_BSE_Detailed_Rec )) m_BSE_Detailed_Notes = BOOL_VECTOR(m_BSE_Detailed_Notes.size(), true); if (NotesPropertyPresent(m_BSE_Pulsars_Rec )) m_BSE_Pulsars_Notes = BOOL_VECTOR(m_BSE_Pulsars_Notes.size(), true); @@ -2071,6 +2072,11 @@ std::tuple Log::GetStandardLogFile annotations = m_BSE_CEE_Notes; // logfile annotations break; + case LOGFILE::BSE_CIRCUMBINARY_DISKS: // BSE_CIRCUMBINARY_DISKS + recordProperties = m_BSE_CBD_Rec; // record properties + annotations = m_BSE_CBD_Notes; // logfile annotations + break; + case LOGFILE::BSE_DETAILED_OUTPUT: // BSE_DETAILED_OUTPUT recordProperties = m_BSE_Detailed_Rec; // record properties annotations = m_BSE_Detailed_Notes; // logfile annotations @@ -2440,6 +2446,13 @@ LogfileDetailsT Log::StandardLogFileDetails(const LOGFILE p_Logfile, const strin fileDetails.annotations = m_BSE_CEE_Notes; break; + case LOGFILE::BSE_CIRCUMBINARY_DISKS: // BSE_CIRCUMBINARY_DISKS + fileDetails.filename = std::get<0>(LOGFILE_DESCRIPTOR.at(LOGFILE::BSE_CIRCUMBINARY_DISKS)); + fileDetails.recordTypes = {1U}; + fileDetails.recordProperties = m_BSE_CBD_Rec; + fileDetails.annotations = m_BSE_CBD_Notes; + break; + case LOGFILE::BSE_DOUBLE_COMPACT_OBJECTS: // BSE_DOUBLE_COMPACT_OBJECTS fileDetails.filename = OPTIONS->LogfileDoubleCompactObjects(); fileDetails.recordTypes = OPTIONS->LogfileDoubleCompactObjectsRecordTypes(); @@ -3147,6 +3160,10 @@ void Log::UpdateLogfileRecordSpecs(const LOGFILE p_Logfile, if (p_UseDefaultProps) baseProps = m_BSE_CEE_Rec; baseNotes = m_BSE_CEE_Notes; break; + case LOGFILE::BSE_CIRCUMBINARY_DISKS: + if (p_UseDefaultProps) baseProps = m_BSE_CBD_Rec; + baseNotes = m_BSE_CBD_Notes; + break; case LOGFILE::BSE_DETAILED_OUTPUT: if (p_UseDefaultProps) baseProps = m_BSE_Detailed_Rec; baseNotes = m_BSE_Detailed_Notes; @@ -3294,6 +3311,7 @@ void Log::UpdateLogfileRecordSpecs(const LOGFILE p_Logfile, // replace existing props and annotations vector for given logfile switch (p_Logfile) { case LOGFILE::BSE_COMMON_ENVELOPES : m_BSE_CEE_Rec = newProps; m_BSE_CEE_Notes = newNotes; break; + case LOGFILE::BSE_CIRCUMBINARY_DISKS : m_BSE_CBD_Rec = newProps; m_BSE_CBD_Notes = newNotes; break; case LOGFILE::BSE_DETAILED_OUTPUT : m_BSE_Detailed_Rec = newProps; m_BSE_Detailed_Notes = newNotes; break; case LOGFILE::BSE_DOUBLE_COMPACT_OBJECTS: m_BSE_DCO_Rec = newProps; m_BSE_DCO_Notes = newNotes; break; case LOGFILE::BSE_PULSAR_EVOLUTION : m_BSE_Pulsars_Rec = newProps; m_BSE_Pulsars_Notes = newNotes; break; diff --git a/src/Log.h b/src/Log.h index 3ca691105..7525aa21a 100755 --- a/src/Log.h +++ b/src/Log.h @@ -570,6 +570,7 @@ class Log { // logfile record specifications // BSE ANY_PROPERTY_VECTOR m_BSE_CEE_Rec = BSE_COMMON_ENVELOPES_REC; // default specification + ANY_PROPERTY_VECTOR m_BSE_CBD_Rec = BSE_CIRCUMBINARY_DISKS_REC; // default specification ANY_PROPERTY_VECTOR m_BSE_DCO_Rec = BSE_DOUBLE_COMPACT_OBJECTS_REC; // default specification ANY_PROPERTY_VECTOR m_BSE_Detailed_Rec = BSE_DETAILED_OUTPUT_REC; // default specification ANY_PROPERTY_VECTOR m_BSE_Pulsars_Rec = BSE_PULSAR_EVOLUTION_REC; // default specification @@ -603,6 +604,7 @@ class Log { // BSE BOOL_VECTOR m_BSE_CEE_Notes = BOOL_VECTOR(OPTIONS->NotesHdrs().size(), false); + BOOL_VECTOR m_BSE_CBD_Notes = BOOL_VECTOR(OPTIONS->NotesHdrs().size(), false); BOOL_VECTOR m_BSE_DCO_Notes = BOOL_VECTOR(OPTIONS->NotesHdrs().size(), false); BOOL_VECTOR m_BSE_Detailed_Notes = BOOL_VECTOR(OPTIONS->NotesHdrs().size(), false); BOOL_VECTOR m_BSE_Pulsars_Notes = BOOL_VECTOR(OPTIONS->NotesHdrs().size(), false); @@ -1244,6 +1246,10 @@ class Log { bool LogCommonEnvelope(const T* const p_Binary, const CE_RECORD_TYPE p_RecordType) { return LogStandardRecord(std::get<2>(LOGFILE_DESCRIPTOR.at(LOGFILE::BSE_COMMON_ENVELOPES)), 0, LOGFILE::BSE_COMMON_ENVELOPES, static_cast(p_RecordType), p_Binary); } + // Write one circumbinary-disk event to the standard CBD logfile. + template + bool LogCircumbinaryDisk(const T* const p_Binary) { return LogStandardRecord(std::get<2>(LOGFILE_DESCRIPTOR.at(LOGFILE::BSE_CIRCUMBINARY_DISKS)), 0, LOGFILE::BSE_CIRCUMBINARY_DISKS, 1U, p_Binary); } + template bool LogDoubleCompactObject(const T* const p_Binary, const DCO_RECORD_TYPE p_RecordType) { return LogStandardRecord(std::get<2>(LOGFILE_DESCRIPTOR.at(LOGFILE::BSE_DOUBLE_COMPACT_OBJECTS)), 0, LOGFILE::BSE_DOUBLE_COMPACT_OBJECTS, static_cast(p_RecordType), p_Binary); } diff --git a/src/LogTypedefs.h b/src/LogTypedefs.h index cb99c198f..1f6ca952c 100644 --- a/src/LogTypedefs.h +++ b/src/LogTypedefs.h @@ -1,2621 +1,2721 @@ -#ifndef __LogTypedefs_h__ -#define __LogTypedefs_h__ - - -// This is where developer-defined types that pertain directly to the COMPAS looging functionality -// (including the definitions of the default record composition for the various log files) are -// defined. Non-logging tyedefs are listed in typedefs.h - - -#include "constants.h" - - -// logfile file types -enum class LOGFILETYPE: int { HDF5, CSV, TSV, TXT }; // need this declared here so can declare the constant... -const COMPASUnorderedMap LOGFILETYPELabel = { // file types - { LOGFILETYPE::HDF5, "HDF5" }, - { LOGFILETYPE::CSV, "CSV" }, - { LOGFILETYPE::TSV, "TSV" }, - { LOGFILETYPE::TXT, "TXT" } -}; -const COMPASUnorderedMap LOGFILETYPEFileExt = { // file extensions - { LOGFILETYPE::HDF5, "h5" }, - { LOGFILETYPE::CSV, "csv" }, - { LOGFILETYPE::TSV, "tsv" }, - { LOGFILETYPE::TXT, "txt" } -}; - - -// enum class TYPENAME -// Symbolic names for variable typenames (for printing) -enum class TYPENAME: int { - NONE, - BOOL, - SHORTINT, - INT, - LONGINT, - LONGLONGINT, - USHORTINT, - UINT, - ULONGINT, - ULONGLONGINT, - FLOAT, - DOUBLE, - DOUBLE_VECTOR, - LONGDOUBLE, - STRING, - OBJECT_ID, - ERROR, - STELLAR_TYPE, - MT_CASE, - MT_TRACKING, - MT_TIMESCALE, - SN_EVENT, - SN_STATE, - STRING_VECTOR, - EVOLUTION_STATUS -}; -// labels (long and short) for typenames -// unordered_map - key is integer typename (from enum class TYPENAME above) -const COMPASUnorderedMap TYPENAME_LABEL = { - { TYPENAME::NONE, { "NONE", "NONE" }}, - { TYPENAME::BOOL, { "BOOL", "BOOL" }}, - { TYPENAME::SHORTINT, { "SHORT INT", "INT" }}, - { TYPENAME::INT, { "INT", "INT" }}, - { TYPENAME::LONGINT, { "LONG_INT", "INT" }}, - { TYPENAME::LONGLONGINT, { "LONG_LONG_INT", "INT" }}, - { TYPENAME::USHORTINT, { "UNSIGNED_SHORT_INT", "INT" }}, - { TYPENAME::UINT, { "UNSIGNED_INT", "INT" }}, - { TYPENAME::ULONGINT, { "UNSIGNED_LONG_INT", "INT" }}, - { TYPENAME::ULONGLONGINT, { "UNSIGNED_LONG_LONG_INT", "INT" }}, - { TYPENAME::FLOAT, { "FLOAT", "FLOAT" }}, - { TYPENAME::DOUBLE, { "DOUBLE", "FLOAT" }}, - { TYPENAME::LONGDOUBLE, { "LONG_DOUBLE", "FLOAT" }}, - { TYPENAME::STRING, { "STRING", "STRING" }}, - { TYPENAME::OBJECT_ID, { "OBJECT_ID", "INT" }}, - { TYPENAME::ERROR, { "ERROR", "INT" }}, - { TYPENAME::STELLAR_TYPE, { "STELLAR_TYPE", "INT" }}, - { TYPENAME::MT_CASE, { "MT_CASE", "INT" }}, - { TYPENAME::MT_TRACKING, { "MT_TRACKING", "INT" }}, - { TYPENAME::MT_TIMESCALE, { "MT_TIMESCALE", "INT" }}, - { TYPENAME::SN_EVENT, { "SN_EVENT", "INT" }}, - { TYPENAME::SN_STATE, { "SN_STATE", "INT" }}, - { TYPENAME::STRING_VECTOR, { "STRING_VECTOR", "VECTOR" }}, - { TYPENAME::EVOLUTION_STATUS, { "EVOLUTION_STATUS", "INT" }} -}; - - -// (convenience) initializer list for INT data types -const std::initializer_list INT_TYPES = { - TYPENAME::SHORTINT, - TYPENAME::INT, - TYPENAME::LONGINT, - TYPENAME::LONGLONGINT, - TYPENAME::USHORTINT, - TYPENAME::UINT, - TYPENAME::ULONGINT, - TYPENAME::ULONGLONGINT -}; - -// (convenience) initializer list for FLOAT data types -const std::initializer_list FLOAT_TYPES = { - TYPENAME::FLOAT, - TYPENAME::DOUBLE, - TYPENAME::LONGDOUBLE -}; - - -// enum class STRING_QUALIFIER -// Qualifier for typename STRING: FIXED_LENGTH or VARIABLE_LENGTH (used for printing to HDF5 files) -enum class STRING_QUALIFIER: int { NONE, FIXED_LENGTH, VARIABLE_LENGTH }; - - -// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -// !!! !!! -// !!! Do not change the following enum classes and maps unless you are adding !!! -// !!! or deleting a new property (or changing the name of an existing property !!! -// !!! for some reason) !!! -// !!! !!! -// !!! The STAR_PROPERTIES #define below defines the STELLAR variables allowed !!! -// !!! for logfile record definition - if a property is not on the list it !!! -// !!! cannot be selected for inclusion in a logfile via the !!! -// !!! --logfile-definitions option. !!! -// !!! !!! -// !!! The enum classes STAR_PROPERTY, BINARY_PROPERTY, and PROGRAM_OPTION !!! -// !!! defined below defines the STELLAR and BINARY properties, and the !!! -// !!! PROGRAM_OPTIONs allowed for logfile record definition - if a property is !!! -// !!! not on those lists it cannot be selected for inclusion in a logfile via !!! -// !!! --logfile-definitions option. !!! -// !!! !!! -// !!! *NOTE* !!! -// !!! The following enum classes and maps are not where header strings should !!! -// !!! be changed! These classes and maps are a lookup facility for the logfile !!! -// !!! definitions file parser. !!! -// !!! !!! -// !!! Header strings are in the following maps, and should be changed there: !!! -// !!! !!! -// !!! std::map ANY_STAR_PROPERTY_DETAIL !!! -// !!! std::map BINARY_PROPERTY_DETAIL !!! -// !!! !!! -// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -// The #define below defines the STELLAR variables allowed for logfile record definition -// Add new property names here to make the property available for specification in a logfile -// #define is used so that the same list of variables can be used for the various stellar property enum classes (see below) -#define STAR_PROPERTIES \ - NONE, \ - AGE, \ - ANGULAR_MOMENTUM, \ - BINDING_ENERGY_AT_COMMON_ENVELOPE, \ - BINDING_ENERGY_CONVECTIVE_ENVELOPE, \ - BINDING_ENERGY_FIXED, \ - BINDING_ENERGY_NANJING, \ - BINDING_ENERGY_PRE_COMMON_ENVELOPE, \ - BINDING_ENERGY_LOVERIDGE, \ - BINDING_ENERGY_LOVERIDGE_WINDS, \ - BINDING_ENERGY_KRUCKOW, \ - CHEMICALLY_HOMOGENEOUS_MAIN_SEQUENCE, \ - CO_CORE_MASS, \ - CO_CORE_MASS_AT_COMMON_ENVELOPE, \ - CO_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, \ - CONVECTIVE_ENV_MASS, \ - CORE_MASS, \ - CORE_MASS_AT_COMMON_ENVELOPE, \ - CORE_MASS_AT_COMPACT_OBJECT_FORMATION, \ - CORE_RADIUS_AT_COMPACT_OBJECT_FORMATION, \ - DRAWN_KICK_MAGNITUDE, \ - DOMINANT_MASS_LOSS_RATE, \ - DT, \ - DYNAMICAL_TIMESCALE, \ - DYNAMICAL_TIMESCALE_POST_COMMON_ENVELOPE, \ - DYNAMICAL_TIMESCALE_PRE_COMMON_ENVELOPE, \ - ECCENTRIC_ANOMALY, \ - ENV_MASS, \ - ERROR, \ - EVOL_STATUS, \ - EXPERIENCED_AIC, \ - EXPERIENCED_CCSN, \ - EXPERIENCED_HeSD, \ - EXPERIENCED_ECSN, \ - EXPERIENCED_PISN, \ - EXPERIENCED_PPISN, \ - EXPERIENCED_RLOF, \ - EXPERIENCED_SNIA, \ - EXPERIENCED_SN_TYPE, \ - EXPERIENCED_USSN, \ - FALLBACK_FRACTION, \ - HE_CORE_MASS, \ - HE_CORE_MASS_AT_COMMON_ENVELOPE, \ - HE_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, \ - HELIUM_ABUNDANCE_CORE, \ - HELIUM_ABUNDANCE_SURFACE, \ - HYDROGEN_ABUNDANCE_CORE, \ - HYDROGEN_ABUNDANCE_SURFACE, \ - ID, \ - INITIAL_HELIUM_ABUNDANCE, \ - INITIAL_HYDROGEN_ABUNDANCE, \ - INITIAL_STELLAR_TYPE, \ - INITIAL_STELLAR_TYPE_NAME, \ - IS_AIC, \ - IS_CCSN, \ - IS_HeSD, \ - IS_ECSN, \ - IS_HYDROGEN_POOR, \ - IS_PISN, \ - IS_PPISN, \ - IS_RLOF, \ - IS_SNIA, \ - IS_USSN, \ - KICK_MAGNITUDE, \ - LAMBDA_AT_COMMON_ENVELOPE, \ - LAMBDA_CONVECTIVE_ENVELOPE, \ - LAMBDA_DEWI, \ - LAMBDA_FIXED, \ - LAMBDA_KRUCKOW, \ - LAMBDA_KRUCKOW_BOTTOM, \ - LAMBDA_KRUCKOW_MIDDLE, \ - LAMBDA_KRUCKOW_TOP, \ - LAMBDA_LOVERIDGE, \ - LAMBDA_LOVERIDGE_WINDS, \ - LAMBDA_NANJING, \ - LBV_PHASE_FLAG, \ - LUMINOSITY, \ - LUMINOSITY_POST_COMMON_ENVELOPE, \ - LUMINOSITY_PRE_COMMON_ENVELOPE, \ - MASS, \ - MASS_0, \ - MASS_LOSS_DIFF, \ - MASS_TRANSFER_DIFF, \ - MASS_TRANSFER_DONOR_HISTORY, \ - MDOT, \ - MEAN_ANOMALY, \ - METALLICITY, \ - MOMENT_OF_INERTIA, \ - MZAMS, \ - OMEGA, \ - OMEGA_BREAK, \ - OMEGA_ZAMS, \ - ORBITAL_ENERGY_POST_SUPERNOVA, \ - ORBITAL_ENERGY_PRE_SUPERNOVA, \ - PULSAR_MAGNETIC_FIELD, \ - PULSAR_SPIN_DOWN_RATE, \ - PULSAR_BIRTH_PERIOD, \ - PULSAR_BIRTH_SPIN_DOWN_RATE, \ - PULSAR_SPIN_FREQUENCY, \ - PULSAR_SPIN_PERIOD, \ - RADIAL_EXPANSION_TIMESCALE, \ - RADIAL_EXPANSION_TIMESCALE_POST_COMMON_ENVELOPE, \ - RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE, \ - RADIUS, \ - RANDOM_SEED, \ - RECYCLED_NEUTRON_STAR, \ - ROCKET_KICK_MAGNITUDE, \ - ROCKET_KICK_PHI, \ - ROCKET_KICK_THETA, \ - RZAMS, \ - SN_TYPE, \ - SPEED, \ - STELLAR_TYPE, \ - STELLAR_TYPE_NAME, \ - STELLAR_TYPE_PREV, \ - STELLAR_TYPE_PREV_NAME, \ - SUPERNOVA_KICK_MAGNITUDE_RANDOM_NUMBER, \ - SUPERNOVA_PHI, \ - SUPERNOVA_THETA, \ - TEMPERATURE, \ - TEMPERATURE_POST_COMMON_ENVELOPE, \ - TEMPERATURE_PRE_COMMON_ENVELOPE, \ - THERMAL_TIMESCALE, \ - THERMAL_TIMESCALE_POST_COMMON_ENVELOPE, \ - THERMAL_TIMESCALE_PRE_COMMON_ENVELOPE, \ - TIME, \ - TIMESCALE_MS, \ - TOTAL_MASS_AT_COMPACT_OBJECT_FORMATION, \ - TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, \ - TRUE_ANOMALY, \ - TZAMS, \ - VELOCITY_X, \ - VELOCITY_Y, \ - VELOCITY_Z, \ - ZETA_HURLEY, \ - ZETA_HURLEY_HE, \ - ZETA_SOBERMAN, \ - ZETA_SOBERMAN_HE - - -// enum class STAR_PROPERTY -// Symbolic names for variables of an individual star that can be selected for printing -// STAR_PROPERTY refers to an individual star of type BaseStar for SSE (differences are where the data comes from, and the column header) -enum class STAR_PROPERTY: int { STAR_PROPERTIES }; - -// map STAR PROPERTY to string identifying the property -// for lookup by the printing functions -// this map serves as the lookup for: STAR_PROPERTY, STAR_1_PROPERTY, STAR_2_PROPERTY, SUPERNOVA_PROPERTY, COMPANION_PROPERTY and ANY_STAR_PROPERTY -// -// Properties only need to be here if they are required to be available for printing in the logfiles. -// All keys present here should also be in the STAR_PROPERTIES #define and ANY_STAR_PROPERTY_DETAIL -const COMPASUnorderedMap STAR_PROPERTY_LABEL = { - { STAR_PROPERTY::NONE, "NONE" }, - { STAR_PROPERTY::AGE, "AGE" }, - { STAR_PROPERTY::ANGULAR_MOMENTUM, "ANGULAR_MOMENTUM" }, - { STAR_PROPERTY::BINDING_ENERGY_AT_COMMON_ENVELOPE, "BINDING_ENERGY_AT_COMMON_ENVELOPE" }, - { STAR_PROPERTY::BINDING_ENERGY_CONVECTIVE_ENVELOPE, "BINDING_ENERGY_CONVECTIVE_ENVELOPE" }, - { STAR_PROPERTY::BINDING_ENERGY_FIXED, "BINDING_ENERGY_FIXED" }, - { STAR_PROPERTY::BINDING_ENERGY_NANJING, "BINDING_ENERGY_NANJING" }, - { STAR_PROPERTY::BINDING_ENERGY_PRE_COMMON_ENVELOPE, "BINDING_ENERGY_PRE_COMMON_ENVELOPE" }, - { STAR_PROPERTY::BINDING_ENERGY_LOVERIDGE, "BINDING_ENERGY_LOVERIDGE" }, - { STAR_PROPERTY::BINDING_ENERGY_LOVERIDGE_WINDS, "BINDING_ENERGY_LOVERIDGE_WINDS" }, - { STAR_PROPERTY::BINDING_ENERGY_KRUCKOW, "BINDING_ENERGY_KRUCKOW" }, - { STAR_PROPERTY::CHEMICALLY_HOMOGENEOUS_MAIN_SEQUENCE, "CHEMICALLY_HOMOGENEOUS_MAIN_SEQUENCE" }, - { STAR_PROPERTY::CO_CORE_MASS, "CO_CORE_MASS" }, - { STAR_PROPERTY::CO_CORE_MASS_AT_COMMON_ENVELOPE, "CO_CORE_MASS_AT_COMMON_ENVELOPE" }, - { STAR_PROPERTY::CO_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, "CO_CORE_MASS_AT_COMPACT_OBJECT_FORMATION" }, - { STAR_PROPERTY::CONVECTIVE_ENV_MASS, "CONVECTIVE_ENV_MASS" }, - { STAR_PROPERTY::CORE_MASS, "CORE_MASS" }, - { STAR_PROPERTY::CORE_MASS_AT_COMMON_ENVELOPE, "CORE_MASS_AT_COMMON_ENVELOPE" }, - { STAR_PROPERTY::CORE_MASS_AT_COMPACT_OBJECT_FORMATION, "CORE_MASS_AT_COMPACT_OBJECT_FORMATION" }, - { STAR_PROPERTY::CORE_RADIUS_AT_COMPACT_OBJECT_FORMATION, "CORE_RADIUS_AT_COMPACT_OBJECT_FORMATION" }, - { STAR_PROPERTY::DRAWN_KICK_MAGNITUDE, "DRAWN_KICK_MAGNITUDE" }, - { STAR_PROPERTY::DOMINANT_MASS_LOSS_RATE, "DOMINANT_MASS_LOSS_RATE"}, - { STAR_PROPERTY::DT, "DT" }, - { STAR_PROPERTY::DYNAMICAL_TIMESCALE, "DYNAMICAL_TIMESCALE" }, - { STAR_PROPERTY::DYNAMICAL_TIMESCALE_POST_COMMON_ENVELOPE, "DYNAMICAL_TIMESCALE_POST_COMMON_ENVELOPE" }, - { STAR_PROPERTY::DYNAMICAL_TIMESCALE_PRE_COMMON_ENVELOPE, "DYNAMICAL_TIMESCALE_PRE_COMMON_ENVELOPE" }, - { STAR_PROPERTY::ECCENTRIC_ANOMALY, "ECCENTRIC_ANOMALY" }, - { STAR_PROPERTY::ENV_MASS, "ENV_MASS" }, - { STAR_PROPERTY::ERROR, "ERROR" }, - { STAR_PROPERTY::EVOL_STATUS, "EVOL_STATUS" }, - { STAR_PROPERTY::EXPERIENCED_AIC, "EXPERIENCED_AIC" }, - { STAR_PROPERTY::EXPERIENCED_CCSN, "EXPERIENCED_CCSN" }, - { STAR_PROPERTY::EXPERIENCED_HeSD, "EXPERIENCED_HeSD" }, - { STAR_PROPERTY::EXPERIENCED_ECSN, "EXPERIENCED_ECSN" }, - { STAR_PROPERTY::EXPERIENCED_PISN, "EXPERIENCED_PISN" }, - { STAR_PROPERTY::EXPERIENCED_PPISN, "EXPERIENCED_PPISN" }, - { STAR_PROPERTY::EXPERIENCED_RLOF, "EXPERIENCED_RLOF" }, - { STAR_PROPERTY::EXPERIENCED_SNIA, "EXPERIENCED_SNIA" }, - { STAR_PROPERTY::EXPERIENCED_SN_TYPE, "EXPERIENCED_SN_TYPE" }, - { STAR_PROPERTY::EXPERIENCED_USSN, "EXPERIENCED_USSN" }, - { STAR_PROPERTY::FALLBACK_FRACTION, "FALLBACK_FRACTION" }, - { STAR_PROPERTY::HE_CORE_MASS, "HE_CORE_MASS" }, - { STAR_PROPERTY::HE_CORE_MASS_AT_COMMON_ENVELOPE, "HE_CORE_MASS_AT_COMMON_ENVELOPE" }, - { STAR_PROPERTY::HE_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, "HE_CORE_MASS_AT_COMPACT_OBJECT_FORMATION" }, - { STAR_PROPERTY::HELIUM_ABUNDANCE_CORE, "HELIUM_ABUNDANCE_CORE" }, - { STAR_PROPERTY::HELIUM_ABUNDANCE_SURFACE, "HELIUM_ABUNDANCE_SURFACE" }, - { STAR_PROPERTY::HYDROGEN_ABUNDANCE_CORE, "HYDROGEN_ABUNDANCE_CORE" }, - { STAR_PROPERTY::HYDROGEN_ABUNDANCE_SURFACE, "HYDROGEN_ABUNDANCE_SURFACE" }, - { STAR_PROPERTY::ID, "ID" }, - { STAR_PROPERTY::INITIAL_HELIUM_ABUNDANCE, "INITIAL_HELIUM_ABUNDANCE" }, - { STAR_PROPERTY::INITIAL_HYDROGEN_ABUNDANCE, "INITIAL_HYDROGEN_ABUNDANCE" }, - { STAR_PROPERTY::INITIAL_STELLAR_TYPE, "INITIAL_STELLAR_TYPE" }, - { STAR_PROPERTY::INITIAL_STELLAR_TYPE, "INITIAL_STELLAR_TYPE" }, - { STAR_PROPERTY::INITIAL_STELLAR_TYPE_NAME, "INITIAL_STELLAR_TYPE_NAME" }, - { STAR_PROPERTY::IS_AIC, "IS_AIC" }, - { STAR_PROPERTY::IS_CCSN, "IS_CCSN" }, - { STAR_PROPERTY::IS_HeSD, "IS_HeSD" }, - { STAR_PROPERTY::IS_ECSN, "IS_ECSN" }, - { STAR_PROPERTY::IS_HYDROGEN_POOR, "IS_HYDROGEN_POOR" }, - { STAR_PROPERTY::IS_PISN, "IS_PISN" }, - { STAR_PROPERTY::IS_PPISN, "IS_PPISN" }, - { STAR_PROPERTY::IS_RLOF, "IS_RLOF" }, - { STAR_PROPERTY::IS_SNIA, "IS_SNIA" }, - { STAR_PROPERTY::IS_USSN, "IS_USSN" }, - { STAR_PROPERTY::KICK_MAGNITUDE, "KICK_MAGNITUDE" }, - { STAR_PROPERTY::LAMBDA_AT_COMMON_ENVELOPE, "LAMBDA_AT_COMMON_ENVELOPE" }, - { STAR_PROPERTY::LAMBDA_CONVECTIVE_ENVELOPE, "LAMBDA_CONVECTIVE_ENVELOPE" }, - { STAR_PROPERTY::LAMBDA_DEWI, "LAMBDA_DEWI" }, - { STAR_PROPERTY::LAMBDA_FIXED, "LAMBDA_FIXED" }, - { STAR_PROPERTY::LAMBDA_KRUCKOW, "LAMBDA_KRUCKOW" }, - { STAR_PROPERTY::LAMBDA_KRUCKOW_BOTTOM, "LAMBDA_KRUCKOW_BOTTOM" }, - { STAR_PROPERTY::LAMBDA_KRUCKOW_MIDDLE, "LAMBDA_KRUCKOW_MIDDLE" }, - { STAR_PROPERTY::LAMBDA_KRUCKOW_TOP, "LAMBDA_KRUCKOW_TOP" }, - { STAR_PROPERTY::LAMBDA_LOVERIDGE, "LAMBDA_LOVERIDGE" }, - { STAR_PROPERTY::LAMBDA_LOVERIDGE_WINDS, "LAMBDA_LOVERIDGE_WINDS" }, - { STAR_PROPERTY::LAMBDA_NANJING, "LAMBDA_NANJING" }, - { STAR_PROPERTY::LBV_PHASE_FLAG, "LBV_PHASE_FLAG" }, - { STAR_PROPERTY::LUMINOSITY, "LUMINOSITY" }, - { STAR_PROPERTY::LUMINOSITY_POST_COMMON_ENVELOPE, "LUMINOSITY_POST_COMMON_ENVELOPE" }, - { STAR_PROPERTY::LUMINOSITY_PRE_COMMON_ENVELOPE, "LUMINOSITY_PRE_COMMON_ENVELOPE" }, - { STAR_PROPERTY::MASS, "MASS" }, - { STAR_PROPERTY::MASS_0, "MASS_0" }, - { STAR_PROPERTY::MASS_LOSS_DIFF, "MASS_LOSS_DIFF" }, - { STAR_PROPERTY::MASS_TRANSFER_DIFF, "MASS_TRANSFER_DIFF" }, - { STAR_PROPERTY::MASS_TRANSFER_DONOR_HISTORY, "MASS_TRANSFER_DONOR_HISTORY" }, - { STAR_PROPERTY::MDOT, "MDOT" }, - { STAR_PROPERTY::MEAN_ANOMALY, "MEAN_ANOMALY" }, - { STAR_PROPERTY::METALLICITY, "METALLICITY" }, - { STAR_PROPERTY::MOMENT_OF_INERTIA, "MOMENT_OF_INERTIA"}, - { STAR_PROPERTY::MZAMS, "MZAMS" }, - { STAR_PROPERTY::OMEGA, "OMEGA" }, - { STAR_PROPERTY::OMEGA_BREAK, "OMEGA_BREAK" }, - { STAR_PROPERTY::OMEGA_ZAMS, "OMEGA_ZAMS" }, - { STAR_PROPERTY::ORBITAL_ENERGY_POST_SUPERNOVA, "ORBITAL_ENERGY_POST_SUPERNOVA" }, - { STAR_PROPERTY::ORBITAL_ENERGY_PRE_SUPERNOVA, "ORBITAL_ENERGY_PRE_SUPERNOVA" }, - { STAR_PROPERTY::PULSAR_MAGNETIC_FIELD, "PULSAR_MAGNETIC_FIELD" }, - { STAR_PROPERTY::PULSAR_SPIN_DOWN_RATE, "PULSAR_SPIN_DOWN_RATE" }, - { STAR_PROPERTY::PULSAR_BIRTH_PERIOD, "PULSAR_BIRTH_PERIOD" }, - { STAR_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, "PULSAR_BIRTH_SPIN_DOWN_RATE" }, - { STAR_PROPERTY::PULSAR_SPIN_FREQUENCY, "PULSAR_SPIN_FREQUENCY" }, - { STAR_PROPERTY::PULSAR_SPIN_PERIOD, "PULSAR_SPIN_PERIOD" }, - { STAR_PROPERTY::RADIAL_EXPANSION_TIMESCALE, "RADIAL_EXPANSION_TIMESCALE" }, - { STAR_PROPERTY::RADIAL_EXPANSION_TIMESCALE_POST_COMMON_ENVELOPE, "RADIAL_EXPANSION_TIMESCALE_POST_COMMON_ENVELOPE" }, - { STAR_PROPERTY::RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE, "RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE" }, - { STAR_PROPERTY::RADIUS, "RADIUS" }, - { STAR_PROPERTY::RANDOM_SEED, "RANDOM_SEED" }, - { STAR_PROPERTY::RECYCLED_NEUTRON_STAR, "RECYCLED_NEUTRON_STAR" }, - { STAR_PROPERTY::ROCKET_KICK_MAGNITUDE, "ROCKET_KICK_MAGNITUDE" }, - { STAR_PROPERTY::ROCKET_KICK_PHI, "ROCKET_KICK_PHI" }, - { STAR_PROPERTY::ROCKET_KICK_THETA, "ROCKET_KICK_THETA" }, - { STAR_PROPERTY::RZAMS, "RZAMS" }, - { STAR_PROPERTY::SN_TYPE, "SN_TYPE" }, - { STAR_PROPERTY::SPEED, "SPEED" }, - { STAR_PROPERTY::STELLAR_TYPE, "STELLAR_TYPE" }, - { STAR_PROPERTY::STELLAR_TYPE_NAME, "STELLAR_TYPE_NAME" }, - { STAR_PROPERTY::STELLAR_TYPE_PREV, "STELLAR_TYPE_PREV" }, - { STAR_PROPERTY::STELLAR_TYPE_PREV_NAME, "STELLAR_TYPE_PREV_NAME" }, - { STAR_PROPERTY::SUPERNOVA_KICK_MAGNITUDE_RANDOM_NUMBER, "SUPERNOVA_KICK_MAGNITUDE_RANDOM_NUMBER" }, - { STAR_PROPERTY::SUPERNOVA_PHI, "SUPERNOVA_PHI" }, - { STAR_PROPERTY::SUPERNOVA_THETA, "SUPERNOVA_THETA" }, - { STAR_PROPERTY::TEMPERATURE, "TEMPERATURE" }, - { STAR_PROPERTY::TEMPERATURE_POST_COMMON_ENVELOPE, "TEMPERATURE_POST_COMMON_ENVELOPE" }, - { STAR_PROPERTY::TEMPERATURE_PRE_COMMON_ENVELOPE, "TEMPERATURE_PRE_COMMON_ENVELOPE" }, - { STAR_PROPERTY::THERMAL_TIMESCALE, "THERMAL_TIMESCALE" }, - { STAR_PROPERTY::THERMAL_TIMESCALE_POST_COMMON_ENVELOPE, "THERMAL_TIMESCALE_POST_COMMON_ENVELOPE" }, - { STAR_PROPERTY::THERMAL_TIMESCALE_PRE_COMMON_ENVELOPE, "THERMAL_TIMESCALE_PRE_COMMON_ENVELOPE" }, - { STAR_PROPERTY::TIME, "TIME" }, - { STAR_PROPERTY::TIMESCALE_MS, "TIMESCALE_MS" }, - { STAR_PROPERTY::TOTAL_MASS_AT_COMPACT_OBJECT_FORMATION, "TOTAL_MASS_AT_COMPACT_OBJECT_FORMATION" }, - { STAR_PROPERTY::TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, "TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION" }, - { STAR_PROPERTY::TRUE_ANOMALY, "TRUE_ANOMALY" }, - { STAR_PROPERTY::TZAMS, "TZAMS" }, - { STAR_PROPERTY::VELOCITY_X, "VELOCITY_X" }, - { STAR_PROPERTY::VELOCITY_Y, "VELOCITY_Y" }, - { STAR_PROPERTY::VELOCITY_Z, "VELOCITY_Z" }, - { STAR_PROPERTY::ZETA_HURLEY, "ZETA_HURLEY" }, - { STAR_PROPERTY::ZETA_HURLEY_HE, "ZETA_HURLEY_HE" }, - { STAR_PROPERTY::ZETA_SOBERMAN, "ZETA_SOBERMAN" }, - { STAR_PROPERTY::ZETA_SOBERMAN_HE, "ZETA_SOBERMAN_HE" } -}; - - -// enum class STAR_1_PROPERTY -// Symbolic names for variables of an individual star that can be selected for printing -// STAR_1_PROPERTY refers to star 1 (of type BinaryConstituentStar) of a binary for BSE (differences are where the data comes from, and the column header) -enum class STAR_1_PROPERTY: int { STAR_PROPERTIES }; - - -// enum class STAR_2_PROPERTY -// Symbolic names for variables of an individual star that can be selected for printing -// STAR_2_PROPERTY refers to star 2 (of type BinaryConstituentStar) of a binary for BSE (differences are where the data comes from, and the column header) -enum class STAR_2_PROPERTY: int { STAR_PROPERTIES }; - - -// enum class SUPERNOVA_PROPERTY -// Symbolic names for variables of an individual star that can be selected for printing -// SUPERNOVA_PROPERTY refers to the supernova star (of type BinaryConstituentStar) of a binary where one star has experienced a SN event for BSE (differences are where the data comes from, and the column header) -enum class SUPERNOVA_PROPERTY: int { STAR_PROPERTIES }; - - -// enum class COMPANION_PROPERTY -// Symbolic names for variables of an individual star that can be selected for printing -// COMPANION_PROPERTY refers to the companion star (of type BinaryConstituentStar) of a binary where one star has experienced a SN event for BSE (differences are where the data comes from, and the column header) -enum class COMPANION_PROPERTY: int { STAR_PROPERTIES }; - - -// enum class ANY_STAR_PROPERTY -// Symbolic names for variables of an individual star that can be selected for printing -// ANY_STAR_PROPERTY refers to the any individual star -enum class ANY_STAR_PROPERTY: int { STAR_PROPERTIES }; - - -// enum class BINARY_PROPERTY -// Symbolic names for variables of binary stars that can be selected for printing -// BINARY_PROPERTY refers to a binary star of type BaseBinaryStar) for BSE -// -// Properties only need to be here if they are required to be available for -// printing in the logfiles - all keys present here should also be in BINARY_PROPERTY_LABEL -// and BINARY_PROPERTY_DETAIL -enum class BINARY_PROPERTY: int { - NONE, - CIRCULARIZATION_TIMESCALE, - COMMON_ENVELOPE_AT_LEAST_ONCE, - COMMON_ENVELOPE_EVENT_COUNT, - UNBOUND, - DOUBLE_CORE_COMMON_ENVELOPE, - DT, - ECCENTRICITY, - ECCENTRICITY_AT_DCO_FORMATION, - ECCENTRICITY_INITIAL, - ECCENTRICITY_POST_COMMON_ENVELOPE, - ECCENTRICITY_PRE_SUPERNOVA, - ECCENTRICITY_PRE_COMMON_ENVELOPE, - ERROR, - EVOL_STATUS, - ID, - IMMEDIATE_RLOF_POST_COMMON_ENVELOPE, - MASS_1_POST_COMMON_ENVELOPE, - MASS_1_PRE_COMMON_ENVELOPE, - MASS_2_POST_COMMON_ENVELOPE, - MASS_2_PRE_COMMON_ENVELOPE, - MASS_ENV_1, - MASS_ENV_2, - MASSES_EQUILIBRATED, - MASSES_EQUILIBRATED_AT_BIRTH, - MASS_TRANSFER_TRACKER_HISTORY, - MERGES_IN_HUBBLE_TIME, - OPTIMISTIC_COMMON_ENVELOPE, - ORBITAL_ANGULAR_MOMENTUM_VECTOR_X, - ORBITAL_ANGULAR_MOMENTUM_VECTOR_Y, - ORBITAL_ANGULAR_MOMENTUM_VECTOR_Z, - ORBITAL_ANGULAR_VELOCITY, - ORBITAL_VELOCITY_PRE_SUPERNOVA, - RADIUS_1_POST_COMMON_ENVELOPE, - RADIUS_1_PRE_COMMON_ENVELOPE, - RADIUS_2_POST_COMMON_ENVELOPE, - RADIUS_2_PRE_COMMON_ENVELOPE, - RANDOM_SEED, - RLOF_ACCRETION_EFFICIENCY, - RLOF_MASS_LOSS_RATE, - RLOF_MASS_TRANSFER_TIMESCALE, - RLOF_POST_MT_COMMON_ENVELOPE, - RLOF_POST_MT_ECCENTRICITY, - RLOF_POST_MT_EVENT_COUNTER, - RLOF_POST_MT_ID, - RLOF_POST_MT_SEMI_MAJOR_AXIS, - RLOF_POST_MT_STAR1_MASS, - RLOF_POST_MT_STAR2_MASS, - RLOF_POST_MT_STAR1_RADIUS, - RLOF_POST_MT_STAR2_RADIUS, - RLOF_POST_MT_STAR1_TEFF, - RLOF_POST_MT_STAR2_TEFF, - RLOF_POST_MT_STAR1_LUM, - RLOF_POST_MT_STAR2_LUM, - RLOF_POST_MT_STAR1_RLOF, - RLOF_POST_MT_STAR2_RLOF, - RLOF_POST_MT_STAR1_STELLAR_TYPE, - RLOF_POST_MT_STAR1_STELLAR_TYPE_NAME, - RLOF_POST_MT_STAR2_STELLAR_TYPE, - RLOF_POST_MT_STAR2_STELLAR_TYPE_NAME, - RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, - RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, - RLOF_PRE_MT_ECCENTRICITY, - RLOF_PRE_MT_SEMI_MAJOR_AXIS, - RLOF_PRE_MT_STAR1_MASS, - RLOF_PRE_MT_STAR2_MASS, - RLOF_PRE_MT_STAR1_RADIUS, - RLOF_PRE_MT_STAR2_RADIUS, - RLOF_PRE_MT_STAR1_TEFF, - RLOF_PRE_MT_STAR2_TEFF, - RLOF_PRE_MT_STAR1_LUM, - RLOF_PRE_MT_STAR2_LUM, - RLOF_PRE_MT_STAR1_RLOF, - RLOF_PRE_MT_STAR2_RLOF, - RLOF_PRE_MT_STAR1_STELLAR_TYPE, - RLOF_PRE_MT_STAR1_STELLAR_TYPE_NAME, - RLOF_PRE_MT_STAR2_STELLAR_TYPE, - RLOF_PRE_MT_STAR2_STELLAR_TYPE_NAME, - RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, - RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, - RLOF_SECONDARY_POST_COMMON_ENVELOPE, - RLOF_TIME_POST_MT, - RLOF_TIME_PRE_MT, - ROCHE_LOBE_RADIUS_1, - ROCHE_LOBE_RADIUS_2, - ROCHE_LOBE_RADIUS_1_POST_COMMON_ENVELOPE, - ROCHE_LOBE_RADIUS_2_POST_COMMON_ENVELOPE, - ROCHE_LOBE_RADIUS_1_PRE_COMMON_ENVELOPE, - ROCHE_LOBE_RADIUS_2_PRE_COMMON_ENVELOPE, - STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, - STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, - SEMI_MAJOR_AXIS_AT_DCO_FORMATION, - SEMI_MAJOR_AXIS_INITIAL, - SEMI_MAJOR_AXIS_POST_COMMON_ENVELOPE, - SEMI_MAJOR_AXIS_POST_STAGE_1_CE, - SEMI_MAJOR_AXIS_PRE_SUPERNOVA, - SEMI_MAJOR_AXIS_PRE_SUPERNOVA_RSOL, - SEMI_MAJOR_AXIS_PRE_COMMON_ENVELOPE, - SEMI_MAJOR_AXIS, - SEMI_MAJOR_AXIS_RSOL, - SIMULTANEOUS_RLOF, - STABLE_RLOF_POST_COMMON_ENVELOPE, - STELLAR_MERGER, - STELLAR_MERGER_AT_BIRTH, - STELLAR_TYPE_1_POST_COMMON_ENVELOPE, - STELLAR_TYPE_1_PRE_COMMON_ENVELOPE, - STELLAR_TYPE_2_POST_COMMON_ENVELOPE, - STELLAR_TYPE_2_PRE_COMMON_ENVELOPE, - STELLAR_TYPE_NAME_1_POST_COMMON_ENVELOPE, - STELLAR_TYPE_NAME_1_PRE_COMMON_ENVELOPE, - STELLAR_TYPE_NAME_2_POST_COMMON_ENVELOPE, - STELLAR_TYPE_NAME_2_PRE_COMMON_ENVELOPE, - SUPERNOVA_ORBIT_INCLINATION_ANGLE, - SUPERNOVA_STATE, - SYNCHRONIZATION_TIMESCALE_1, - SYNCHRONIZATION_TIMESCALE_2, - SYSTEMIC_SPEED, - SYSTEMIC_VELOCITY_X, - SYSTEMIC_VELOCITY_Y, - SYSTEMIC_VELOCITY_Z, - TIDAL_POTENTIAL_LOVE_NUMBER_10_1, - TIDAL_POTENTIAL_LOVE_NUMBER_12_1, - TIDAL_POTENTIAL_LOVE_NUMBER_22_1, - TIDAL_POTENTIAL_LOVE_NUMBER_32_1, - TIDAL_POTENTIAL_LOVE_NUMBER_10_2, - TIDAL_POTENTIAL_LOVE_NUMBER_12_2, - TIDAL_POTENTIAL_LOVE_NUMBER_22_2, - TIDAL_POTENTIAL_LOVE_NUMBER_32_2, - TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_1, - TIDAL_POTENTIAL_LOVE_NUMBER_12_EQ_1, - TIDAL_POTENTIAL_LOVE_NUMBER_22_EQ_1, - TIDAL_POTENTIAL_LOVE_NUMBER_32_EQ_1, - TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_2, - TIDAL_POTENTIAL_LOVE_NUMBER_12_EQ_2, - TIDAL_POTENTIAL_LOVE_NUMBER_22_EQ_2, - TIDAL_POTENTIAL_LOVE_NUMBER_32_EQ_2, - TIDAL_POTENTIAL_LOVE_NUMBER_10_DYN_1, - TIDAL_POTENTIAL_LOVE_NUMBER_12_DYN_1, - TIDAL_POTENTIAL_LOVE_NUMBER_22_DYN_1, - TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_1, - TIDAL_POTENTIAL_LOVE_NUMBER_10_DYN_2, - TIDAL_POTENTIAL_LOVE_NUMBER_12_DYN_2, - TIDAL_POTENTIAL_LOVE_NUMBER_22_DYN_2, - TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_2, - TIME, - TIME_TO_COALESCENCE, - TOTAL_ANGULAR_MOMENTUM, - TOTAL_ENERGY, - ZETA_LOBE, - ZETA_STAR -}; -// map BINARY_PROPERTY to string identifying the property -// for lookup by the printing functions -// -// Property names only need to be here if they are required to be available for -// printing in the logfiles - all keys present here should also be in BINARY_PROPERTY -// and BINARY_PROPERTY_DETAIL -const COMPASUnorderedMap BINARY_PROPERTY_LABEL = { - { BINARY_PROPERTY::NONE, "NONE" }, - { BINARY_PROPERTY::CIRCULARIZATION_TIMESCALE, "CIRCULARIZATION_TIMESCALE" }, - { BINARY_PROPERTY::COMMON_ENVELOPE_AT_LEAST_ONCE, "COMMON_ENVELOPE_AT_LEAST_ONCE" }, - { BINARY_PROPERTY::COMMON_ENVELOPE_EVENT_COUNT, "COMMON_ENVELOPE_EVENT_COUNT" }, - { BINARY_PROPERTY::UNBOUND, "UNBOUND" }, - { BINARY_PROPERTY::DOUBLE_CORE_COMMON_ENVELOPE, "DOUBLE_CORE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::DT, "DT" }, - { BINARY_PROPERTY::ECCENTRICITY, "ECCENTRICITY" }, - { BINARY_PROPERTY::ECCENTRICITY_AT_DCO_FORMATION, "ECCENTRICITY_AT_DCO_FORMATION" }, - { BINARY_PROPERTY::ECCENTRICITY_INITIAL, "ECCENTRICITY_INITIAL" }, - { BINARY_PROPERTY::ECCENTRICITY_POST_COMMON_ENVELOPE, "ECCENTRICITY_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::ECCENTRICITY_PRE_SUPERNOVA, "ECCENTRICITY_PRE_SUPERNOVA" }, - { BINARY_PROPERTY::ECCENTRICITY_PRE_COMMON_ENVELOPE, "ECCENTRICITY_PRE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::ERROR, "ERROR" }, - { BINARY_PROPERTY::EVOL_STATUS, "EVOL_STATUS" }, - { BINARY_PROPERTY::ID, "ID" }, - { BINARY_PROPERTY::IMMEDIATE_RLOF_POST_COMMON_ENVELOPE, "IMMEDIATE_RLOF_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::MASS_1_POST_COMMON_ENVELOPE, "MASS_1_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::MASS_1_PRE_COMMON_ENVELOPE, "MASS_1_PRE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::MASS_2_POST_COMMON_ENVELOPE, "MASS_2_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::MASS_2_PRE_COMMON_ENVELOPE, "MASS_2_PRE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::MASS_ENV_1, "MASS_ENV_1" }, - { BINARY_PROPERTY::MASS_ENV_2, "MASS_ENV_2" }, - { BINARY_PROPERTY::MASSES_EQUILIBRATED, "MASSES_EQUILIBRATED" }, - { BINARY_PROPERTY::MASSES_EQUILIBRATED_AT_BIRTH, "MASSES_EQUILIBRATED_AT_BIRTH" }, - { BINARY_PROPERTY::MASS_TRANSFER_TRACKER_HISTORY, "MASS_TRANSFER_TRACKER_HISTORY" }, - { BINARY_PROPERTY::MERGES_IN_HUBBLE_TIME, "MERGES_IN_HUBBLE_TIME" }, - { BINARY_PROPERTY::OPTIMISTIC_COMMON_ENVELOPE, "OPTIMISTIC_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_X, "ORBITAL_ANGULAR_MOMENTUM_VECTOR_X" }, - { BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_Y, "ORBITAL_ANGULAR_MOMENTUM_VECTOR_Y" }, - { BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_Z, "ORBITAL_ANGULAR_MOMENTUM_VECTOR_Z" }, - { BINARY_PROPERTY::ORBITAL_ANGULAR_VELOCITY, "ORBITAL_ANGULAR_VELOCITY" }, - { BINARY_PROPERTY::ORBITAL_VELOCITY_PRE_SUPERNOVA, "ORBITAL_VELOCITY_PRE_SUPERNOVA" }, - { BINARY_PROPERTY::RADIUS_1_POST_COMMON_ENVELOPE, "RADIUS_1_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::RADIUS_1_PRE_COMMON_ENVELOPE, "RADIUS_1_PRE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::RADIUS_2_POST_COMMON_ENVELOPE, "RADIUS_2_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::RADIUS_2_PRE_COMMON_ENVELOPE, "RADIUS_2_PRE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::RANDOM_SEED, "RANDOM_SEED" }, - { BINARY_PROPERTY::RLOF_ACCRETION_EFFICIENCY, "RLOF_ACCRETION_EFFICIENCY"}, - { BINARY_PROPERTY::RLOF_MASS_LOSS_RATE, "RLOF_MASS_LOSS_RATE"}, - { BINARY_PROPERTY::RLOF_MASS_TRANSFER_TIMESCALE, "RLOF_MASS_TRANSFER_TIMESCALE"}, - { BINARY_PROPERTY::RLOF_POST_MT_COMMON_ENVELOPE, "RLOF_POST_MT_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::RLOF_POST_MT_ECCENTRICITY, "RLOF_POST_MT_ECCENTRICITY" }, - { BINARY_PROPERTY::RLOF_POST_MT_EVENT_COUNTER, "RLOF_POST_MT_EVENT_COUNTER" }, - { BINARY_PROPERTY::RLOF_POST_MT_ID, "RLOF_POST_MT_ID" }, - { BINARY_PROPERTY::RLOF_POST_MT_SEMI_MAJOR_AXIS, "RLOF_POST_MT_SEMI_MAJOR_AXIS" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_MASS, "RLOF_POST_MT_STAR1_MASS" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_MASS, "RLOF_POST_MT_STAR2_MASS" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_RADIUS, "RLOF_POST_MT_STAR1_RADIUS" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_RADIUS, "RLOF_POST_MT_STAR2_RADIUS" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_TEFF, "RLOF_POST_MT_STAR1_TEFF" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_TEFF, "RLOF_POST_MT_STAR2_TEFF" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_LUM, "RLOF_POST_MT_STAR1_LUM" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_LUM, "RLOF_POST_MT_STAR2_LUM" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_RLOF, "RLOF_POST_MT_STAR1_RLOF" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_RLOF, "RLOF_POST_MT_STAR2_RLOF" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_STELLAR_TYPE, "RLOF_POST_MT_STAR1_STELLAR_TYPE" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_STELLAR_TYPE_NAME, "RLOF_POST_MT_STAR1_STELLAR_TYPE_NAME" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_STELLAR_TYPE, "RLOF_POST_MT_STAR2_STELLAR_TYPE" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_STELLAR_TYPE_NAME, "RLOF_POST_MT_STAR2_STELLAR_TYPE_NAME" }, - { BINARY_PROPERTY::RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, "RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1" }, - { BINARY_PROPERTY::RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, "RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2" }, - { BINARY_PROPERTY::RLOF_PRE_MT_ECCENTRICITY, "RLOF_PRE_MT_ECCENTRICITY" }, - { BINARY_PROPERTY::RLOF_PRE_MT_SEMI_MAJOR_AXIS, "RLOF_PRE_MT_SEMI_MAJOR_AXIS" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_MASS, "RLOF_PRE_MT_STAR1_MASS" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_MASS, "RLOF_PRE_MT_STAR2_MASS" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_RADIUS, "RLOF_PRE_MT_STAR1_RADIUS" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_RADIUS, "RLOF_PRE_MT_STAR2_RADIUS" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_TEFF, "RLOF_PRE_MT_STAR1_TEFF" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_TEFF, "RLOF_PRE_MT_STAR2_TEFF" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_LUM, "RLOF_PRE_MT_STAR1_LUM" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_LUM, "RLOF_PRE_MT_STAR2_LUM" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_RLOF, "RLOF_PRE_MT_STAR1_RLOF" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_RLOF, "RLOF_PRE_MT_STAR2_RLOF" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_STELLAR_TYPE, "RLOF_PRE_MT_STAR1_STELLAR_TYPE" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_STELLAR_TYPE_NAME, "RLOF_PRE_MT_STAR1_STELLAR_TYPE_NAME" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_STELLAR_TYPE, "RLOF_PRE_MT_STAR2_STELLAR_TYPE" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_STELLAR_TYPE_NAME, "RLOF_PRE_MT_STAR2_STELLAR_TYPE_NAME" }, - { BINARY_PROPERTY::RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, "RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1" }, - { BINARY_PROPERTY::RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, "RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2" }, - { BINARY_PROPERTY::RLOF_SECONDARY_POST_COMMON_ENVELOPE, "RLOF_SECONDARY_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::RLOF_TIME_POST_MT, "RLOF_TIME_POST_MT" }, - { BINARY_PROPERTY::RLOF_TIME_PRE_MT, "RLOF_TIME_PRE_MT" }, - { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1, "ROCHE_LOBE_RADIUS_1" }, - { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1_POST_COMMON_ENVELOPE, "ROCHE_LOBE_RADIUS_1_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1_PRE_COMMON_ENVELOPE, "ROCHE_LOBE_RADIUS_1_PRE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2, "ROCHE_LOBE_RADIUS_2" }, - { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2_POST_COMMON_ENVELOPE, "ROCHE_LOBE_RADIUS_2_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2_PRE_COMMON_ENVELOPE, "ROCHE_LOBE_RADIUS_2_PRE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, "STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1" }, - { BINARY_PROPERTY::STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, "STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2" }, - { BINARY_PROPERTY::SEMI_MAJOR_AXIS_AT_DCO_FORMATION, "SEMI_MAJOR_AXIS_AT_DCO_FORMATION" }, - { BINARY_PROPERTY::SEMI_MAJOR_AXIS_INITIAL, "SEMI_MAJOR_AXIS_INITIAL" }, - { BINARY_PROPERTY::SEMI_MAJOR_AXIS_POST_COMMON_ENVELOPE, "SEMI_MAJOR_AXIS_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::SEMI_MAJOR_AXIS_POST_STAGE_1_CE, "SEMI_MAJOR_AXIS_POST_STAGE_1_CE" }, - { BINARY_PROPERTY::SEMI_MAJOR_AXIS_PRE_SUPERNOVA, "SEMI_MAJOR_AXIS_PRE_SUPERNOVA" }, - { BINARY_PROPERTY::SEMI_MAJOR_AXIS_PRE_SUPERNOVA_RSOL, "SEMI_MAJOR_AXIS_PRE_SUPERNOVA_RSOL" }, - { BINARY_PROPERTY::SEMI_MAJOR_AXIS_PRE_COMMON_ENVELOPE, "SEMI_MAJOR_AXIS_PRE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::SEMI_MAJOR_AXIS, "SEMI_MAJOR_AXIS" }, - { BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, "SEMI_MAJOR_AXIS_RSOL" }, - { BINARY_PROPERTY::SIMULTANEOUS_RLOF, "SIMULTANEOUS_RLOF" }, - { BINARY_PROPERTY::STABLE_RLOF_POST_COMMON_ENVELOPE, "STABLE_RLOF_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::STELLAR_MERGER, "STELLAR_MERGER" }, - { BINARY_PROPERTY::STELLAR_MERGER_AT_BIRTH, "STELLAR_MERGER_AT_BIRTH" }, - { BINARY_PROPERTY::STELLAR_TYPE_1_POST_COMMON_ENVELOPE, "STELLAR_TYPE_1_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::STELLAR_TYPE_1_PRE_COMMON_ENVELOPE, "STELLAR_TYPE_1_PRE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::STELLAR_TYPE_2_POST_COMMON_ENVELOPE, "STELLAR_TYPE_2_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::STELLAR_TYPE_2_PRE_COMMON_ENVELOPE, "STELLAR_TYPE_2_PRE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::STELLAR_TYPE_NAME_1_POST_COMMON_ENVELOPE, "STELLAR_TYPE_NAME_1_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::STELLAR_TYPE_NAME_1_PRE_COMMON_ENVELOPE, "STELLAR_TYPE_NAME_1_PRE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::STELLAR_TYPE_NAME_2_POST_COMMON_ENVELOPE, "STELLAR_TYPE_NAME_2_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::STELLAR_TYPE_NAME_2_PRE_COMMON_ENVELOPE, "STELLAR_TYPE_NAME_2_PRE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::SUPERNOVA_ORBIT_INCLINATION_ANGLE, "SUPERNOVA_ORBIT_INCLINATION_ANGLE" }, - { BINARY_PROPERTY::SUPERNOVA_STATE, "SUPERNOVA_STATE" }, - { BINARY_PROPERTY::SYNCHRONIZATION_TIMESCALE_1, "SYNCHRONIZATION_TIMESCALE_1" }, - { BINARY_PROPERTY::SYNCHRONIZATION_TIMESCALE_2, "SYNCHRONIZATION_TIMESCALE_2" }, - { BINARY_PROPERTY::SYSTEMIC_SPEED, "SYSTEMIC_SPEED" }, - { BINARY_PROPERTY::SYSTEMIC_VELOCITY_X, "SYSTEMIC_VELOCITY_X" }, - { BINARY_PROPERTY::SYSTEMIC_VELOCITY_Y, "SYSTEMIC_VELOCITY_Y" }, - { BINARY_PROPERTY::SYSTEMIC_VELOCITY_Z, "SYSTEMIC_VELOCITY_Z" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_10_1, "TIDAL_POTENTIAL_LOVE_NUMBER_10_1" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_12_1, "TIDAL_POTENTIAL_LOVE_NUMBER_12_1" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_22_1, "TIDAL_POTENTIAL_LOVE_NUMBER_22_1" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_32_1, "TIDAL_POTENTIAL_LOVE_NUMBER_32_1" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_10_2, "TIDAL_POTENTIAL_LOVE_NUMBER_10_2" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_12_2, "TIDAL_POTENTIAL_LOVE_NUMBER_12_2" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_22_2, "TIDAL_POTENTIAL_LOVE_NUMBER_22_2" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_32_2, "TIDAL_POTENTIAL_LOVE_NUMBER_32_2" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_1, "TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_1" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_12_EQ_1, "TIDAL_POTENTIAL_LOVE_NUMBER_12_EQ_1" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_22_EQ_1, "TIDAL_POTENTIAL_LOVE_NUMBER_22_EQ_1" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_32_EQ_1, "TIDAL_POTENTIAL_LOVE_NUMBER_32_EQ_1" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_2, "TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_2" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_12_EQ_2, "TIDAL_POTENTIAL_LOVE_NUMBER_12_EQ_2" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_22_EQ_2, "TIDAL_POTENTIAL_LOVE_NUMBER_22_EQ_2" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_32_EQ_2, "TIDAL_POTENTIAL_LOVE_NUMBER_32_EQ_2" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_10_DYN_1, "TIDAL_POTENTIAL_LOVE_NUMBER_10_DYN_1" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_12_DYN_1, "TIDAL_POTENTIAL_LOVE_NUMBER_12_DYN_1" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_22_DYN_1, "TIDAL_POTENTIAL_LOVE_NUMBER_22_DYN_1" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_1, "TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_1" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_10_DYN_2, "TIDAL_POTENTIAL_LOVE_NUMBER_10_DYN_2" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_12_DYN_2, "TIDAL_POTENTIAL_LOVE_NUMBER_12_DYN_2" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_22_DYN_2, "TIDAL_POTENTIAL_LOVE_NUMBER_22_DYN_2" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_2, "TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_2" }, - { BINARY_PROPERTY::TIME, "TIME" }, - { BINARY_PROPERTY::TIME_TO_COALESCENCE, "TIME_TO_COALESCENCE" }, - { BINARY_PROPERTY::TOTAL_ANGULAR_MOMENTUM, "TOTAL_ANGULAR_MOMENTUM" }, - { BINARY_PROPERTY::TOTAL_ENERGY, "TOTAL_ENERGY" }, - { BINARY_PROPERTY::ZETA_LOBE, "ZETA_LOBE" }, - { BINARY_PROPERTY::ZETA_STAR, "ZETA_STAR" } -}; - - -// enum class PROGRAM_OPTION -// Symbolic names for program option values -// -// Options only need to be here if they are required to be -// available for printing in the logfiles -enum class PROGRAM_OPTION: int { - - NONE, - - ADD_OPTIONS_TO_SYSPARMS, - ALLOW_NON_STRIPPED_ECSN, - ALLOW_IMMEDIATE_RLOF_POST_CE_TO_SURVIVE_COMMON_ENVELOPE, - ALLOW_MS_STAR_TO_SURVIVE_COMMON_ENVELOPE, - ALLOW_RADIATIVE_ENVELOPE_STAR_TO_SURVIVE_COMMON_ENVELOPE, - ALLOW_RLOF_AT_BIRTH, - ALLOW_TOUCHING_AT_BIRTH, - ANG_MOM_CONSERVATION_DURING_CIRCULARISATION, - - BLACK_HOLE_KICKS_MODE, - - CASE_BB_STABILITY_PRESCRIPTION, - - CHECK_PHOTON_TIRING_LIMIT, - - CHE_MODE, - - CIRCULARISE_BINARY_DURING_MT, - - COMMON_ENVELOPE_ALPHA, - COMMON_ENVELOPE_ALPHA_THERMAL, - COMMON_ENVELOPE_FORMALISM, - COMMON_ENVELOPE_LAMBDA, - COMMON_ENVELOPE_LAMBDA_MULTIPLIER, - COMMON_ENVELOPE_LAMBDA_PRESCRIPTION, - COMMON_ENVELOPE_MASS_ACCRETION_CONSTANT, - COMMON_ENVELOPE_MASS_ACCRETION_MAX, - COMMON_ENVELOPE_MASS_ACCRETION_MIN, - COMMON_ENVELOPE_MASS_ACCRETION_PRESCRIPTION, - COMMON_ENVELOPE_RECOMBINATION_ENERGY_DENSITY, - COMMON_ENVELOPE_SECOND_STAGE_BETA, - COMMON_ENVELOPE_SECOND_STAGE_GAMMA_PRESCRIPTION, - COMMON_ENVELOPE_SLOPE_KRUCKOW, - - CONVECTIVE_ENVELOPE_MASS_THRESHOLD, - CONVECTIVE_ENVELOPE_TEMPERATURE_THRESHOLD, - - COOL_WIND_MASS_LOSS_MULTIPLIER, - - ECCENTRICITY, - ECCENTRICITY_DISTRIBUTION, - ECCENTRICITY_DISTRIBUTION_MAX, - ECCENTRICITY_DISTRIBUTION_MIN, - EDDINGTON_ACCRETION_FACTOR, - ENABLE_ROTATIONALLY_ENHANCED_MASS_LOSS, - ENHANCE_CHE_LIFETIMES_LUMINOSITIES, - ENVELOPE_STATE_PRESCRIPTION, - EVOLUTION_MODE, - - FP_ERROR_MODE, - - FRYER_SUPERNOVA_ENGINE, - - FRYER22_FMIX, - FRYER22_MCRIT, - - INITIAL_MASS, - INITIAL_MASS_1, - INITIAL_MASS_2, - - INITIAL_MASS_FUNCTION, - INITIAL_MASS_FUNCTION_MAX, - INITIAL_MASS_FUNCTION_MIN, - INITIAL_MASS_FUNCTION_POWER, - - KICK_DIRECTION_DISTRIBUTION, - KICK_DIRECTION_POWER, - KICK_SCALING_FACTOR, - KICK_MAGNITUDE_DISTRIBUTION, - KICK_MAGNITUDE_DISTRIBUTION_MAXIMUM, - - KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH, - KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS, - KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN, - KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN, - - KICK_MAGNITUDE, - KICK_MAGNITUDE_1, - KICK_MAGNITUDE_2, - - KICK_MAGNITUDE_RANDOM, - KICK_MAGNITUDE_RANDOM_1, - KICK_MAGNITUDE_RANDOM_2, - - KICK_MEAN_ANOMALY_1, - KICK_MEAN_ANOMALY_2, - KICK_PHI_1, - KICK_PHI_2, - KICK_THETA_1, - KICK_THETA_2, - - LBV_FACTOR, - LBV_MASS_LOSS_PRESCRIPTION, - - MALTSEV_FALLBACK, - MALTSEV_MODE, - - MASS_LOSS_PRESCRIPTION, - - MASS_RATIO, - MASS_RATIO_DISTRIBUTION, - MASS_RATIO_DISTRIBUTION_MAX, - MASS_RATIO_DISTRIBUTION_MIN, - - MAXIMUM_EVOLUTION_TIME, - MAXIMUM_DONOR_MASS, - MAXIMUM_NEUTRON_STAR_MASS, - MAXIMUM_TIMESTEPS, - - MCBUR1, - - METALLICITY, - METALLICITY_DISTRIBUTION, - METALLICITY_DISTRIBUTION_MAX, - METALLICITY_DISTRIBUTION_MIN, - - MINIMUM_SAMPLED_SECONDARY_MASS, - - MT_ACCRETION_EFFICIENCY_PRESCRIPTION, - MT_ANG_MOM_LOSS_PRESCRIPTION, - MT_THERMAL_LIMIT_C, - - MT_CRIT_MR_MS_LOW_MASS_DEGENERATE_ACCRETOR, - MT_CRIT_MR_MS_LOW_MASS_NON_DEGENERATE_ACCRETOR, - MT_CRIT_MR_MS_HIGH_MASS_DEGENERATE_ACCRETOR, - MT_CRIT_MR_MS_HIGH_MASS_NON_DEGENERATE_ACCRETOR, - MT_CRIT_MR_GIANT_DEGENERATE_ACCRETOR, - MT_CRIT_MR_GIANT_NON_DEGENERATE_ACCRETOR, - MT_CRIT_MR_HG_DEGENERATE_ACCRETOR, - MT_CRIT_MR_HG_NON_DEGENERATE_ACCRETOR, - MT_CRIT_MR_HE_GIANT_DEGENERATE_ACCRETOR, - MT_CRIT_MR_HE_GIANT_NON_DEGENERATE_ACCRETOR, - MT_CRIT_MR_HE_HG_DEGENERATE_ACCRETOR, - MT_CRIT_MR_HE_HG_NON_DEGENERATE_ACCRETOR, - MT_CRIT_MR_HE_MS_DEGENERATE_ACCRETOR, - MT_CRIT_MR_HE_MS_NON_DEGENERATE_ACCRETOR, - MT_CRIT_MR_WD_DEGENERATE_ACCRETOR, - MT_CRIT_MR_WD_NONDEGENERATE_ACCRETOR, - - MT_FRACTION_ACCRETED, - MT_JLOSS, - MT_JLOSS_LINEAR_FRACTION_DEGEN, - MT_JLOSS_LINEAR_FRACTION_NON_DEGEN, - MT_REJUVENATION_PRESCRIPTION, - MT_THERMALLY_LIMITED_VARIATION, - - MULLER_MANDEL_KICK_MULTIPLIER_BH, - MULLER_MANDEL_KICK_MULTIPLIER_NS, - MULLER_MANDEL_SIGMA_KICK_BH, - MULLER_MANDEL_SIGMA_KICK_NS, - - NEUTRINO_MASS_LOSS_ASSUMPTION_BH, - NEUTRINO_MASS_LOSS_VALUE_BH, - - NOTES, - - NS_ACCRETION_IN_CE, - NS_EOS, - - ORBITAL_PERIOD, - ORBITAL_PERIOD_DISTRIBUTION, - ORBITAL_PERIOD_DISTRIBUTION_MAX, - ORBITAL_PERIOD_DISTRIBUTION_MIN, - - OVERALL_WIND_MASS_LOSS_MULTIPLIER, - - PISN_LOWER_LIMIT, - PISN_UPPER_LIMIT, - - PPI_LOWER_LIMIT, - PPI_PRESCRIPTION, - PPI_UPPER_LIMIT, - PPI_CO_CORE_SHIFT_HENDRIKS, - - PULSAR_MAGNETIC_FIELD_DISTRIBUTION, - PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MAX, - PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MIN, - - PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION, - PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MAX, - PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MIN, - - PULSAR_MAGNETIC_FIELD_DECAY_MASS_SCALE, - PULSAR_MAGNETIC_FIELD_DECAY_TIME_SCALE, - - PULSAR_MINIMUM_MAGNETIC_FIELD, - - QCRIT_PRESCRIPTION, - - RANDOM_SEED, - RANDOM_SEED_CMDLINE, - - REMNANT_MASS_PRESCRIPTION, - - RESPONSE_TO_SPIN_UP, - - ROCKET_KICK_MAGNITUDE_1, - ROCKET_KICK_MAGNITUDE_2, - ROCKET_KICK_PHI_1, - ROCKET_KICK_PHI_2, - ROCKET_KICK_THETA_1, - ROCKET_KICK_THETA_2, - - ROTATIONAL_VELOCITY_DISTRIBUTION, - ROTATIONAL_FREQUENCY, - ROTATIONAL_FREQUENCY_1, - ROTATIONAL_FREQUENCY_2, - - SCALE_CHE_MASS_LOSS_SURF_HE_ABUNDANCE, - SCALE_TERMINAL_WIND_VEL_METALLICITY_POWER, - SEMI_MAJOR_AXIS, - SEMI_MAJOR_AXIS_DISTRIBUTION, - SEMI_MAJOR_AXIS_DISTRIBUTION_MAX, - SEMI_MAJOR_AXIS_DISTRIBUTION_MIN, - - STELLAR_ZETA_PRESCRIPTION, - - TIDES_PRESCRIPTION, - - USSN_KICKS_OVERRIDE_MANDEL_MULLER, - - WR_FACTOR, - - ZETA_ADIABATIC_ARBITRARY, - ZETA_MS, - ZETA_RADIATIVE_ENVELOPE_GIANT -}; -// map PROGRAM_OPTION to string identifying the property -// for lookup by the printing functions -// -// Options only need to be here if they are required to be -// available for printing in the logfiles - all keys present here -// should also be in PROGRAM_OPTION_DETAIL ( except PROGRAM_OPTION::NOTES) -const COMPASUnorderedMap PROGRAM_OPTION_LABEL = { - - { PROGRAM_OPTION::NONE, "NONE" }, - - { PROGRAM_OPTION::ALLOW_NON_STRIPPED_ECSN, "ALLOW_NON_STRIPPED_ECSN" }, - { PROGRAM_OPTION::ADD_OPTIONS_TO_SYSPARMS, "ADD_OPTIONS_TO_SYSPARMS" }, - { PROGRAM_OPTION::ALLOW_MS_STAR_TO_SURVIVE_COMMON_ENVELOPE, "ALLOW_MS_STAR_TO_SURVIVE_COMMON_ENVELOPE" }, - { PROGRAM_OPTION::ALLOW_RADIATIVE_ENVELOPE_STAR_TO_SURVIVE_COMMON_ENVELOPE, "ALLOW_RADIATIVE_ENVELOPE_STAR_TO_SURVIVE_COMMON_ENVELOPE" }, - { PROGRAM_OPTION::ALLOW_IMMEDIATE_RLOF_POST_CE_TO_SURVIVE_COMMON_ENVELOPE, "ALLOW_IMMEDIATE_RLOF_POST_CE_TO_SURVIVE_COMMON_ENVELOPE" }, - { PROGRAM_OPTION::ALLOW_RLOF_AT_BIRTH, "ALLOW_RLOF_AT_BIRTH" }, - { PROGRAM_OPTION::ALLOW_TOUCHING_AT_BIRTH, "ALLOW_TOUCHING_AT_BIRTH" }, - { PROGRAM_OPTION::ANG_MOM_CONSERVATION_DURING_CIRCULARISATION, "ANG_MOM_CONSERVATION_DURING_CIRCULARISATION" }, - - { PROGRAM_OPTION::BLACK_HOLE_KICKS_MODE, "BLACK_HOLE_KICKS_MODE" }, - - { PROGRAM_OPTION::CASE_BB_STABILITY_PRESCRIPTION, "CASE_BB_STABILITY_PRESCRIPTION" }, - - { PROGRAM_OPTION::CHECK_PHOTON_TIRING_LIMIT, "CHECK_PHOTON_TIRING_LIMIT" }, - - { PROGRAM_OPTION::CHE_MODE, "CHE_MODE" }, - - { PROGRAM_OPTION::CIRCULARISE_BINARY_DURING_MT, "CIRCULARISE_BINARY_DURING_MT" }, - - { PROGRAM_OPTION::COMMON_ENVELOPE_ALPHA, "COMMON_ENVELOPE_ALPHA" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_ALPHA_THERMAL, "COMMON_ENVELOPE_ALPHA_THERMAL" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_FORMALISM, "COMMON_ENVELOPE_FORMALISM" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_LAMBDA, "COMMON_ENVELOPE_LAMBDA" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_LAMBDA_MULTIPLIER, "COMMON_ENVELOPE_LAMBDA_MULTIPLIER" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_LAMBDA_PRESCRIPTION, "COMMON_ENVELOPE_LAMBDA_PRESCRIPTION" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_CONSTANT, "COMMON_ENVELOPE_MASS_ACCRETION_CONSTANT" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_MAX, "COMMON_ENVELOPE_MASS_ACCRETION_MAX" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_MIN, "COMMON_ENVELOPE_MASS_ACCRETION_MIN" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_PRESCRIPTION, "COMMON_ENVELOPE_MASS_ACCRETION_PRESCRIPTION" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_RECOMBINATION_ENERGY_DENSITY, "COMMON_ENVELOPE_RECOMBINATION_ENERGY_DENSITY" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_SECOND_STAGE_BETA, "COMMON_ENVELOPE_SECOND_STAGE_BETA" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_SECOND_STAGE_GAMMA_PRESCRIPTION, "COMMON_ENVELOPE_SECOND_STAGE_GAMMA_PRESCRIPTION" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_SLOPE_KRUCKOW, "COMMON_ENVELOPE_SLOPE_KRUCKOW" }, - - { PROGRAM_OPTION::COOL_WIND_MASS_LOSS_MULTIPLIER, "COOL_WIND_MASS_LOSS_MULTIPLIER" }, - - { PROGRAM_OPTION::ECCENTRICITY, "ECCENTRICITY" }, - { PROGRAM_OPTION::ECCENTRICITY_DISTRIBUTION, "ECCENTRICITY_DISTRIBUTION" }, - { PROGRAM_OPTION::ECCENTRICITY_DISTRIBUTION_MAX, "ECCENTRICITY_DISTRIBUTION_MAX" }, - { PROGRAM_OPTION::ECCENTRICITY_DISTRIBUTION_MIN, "ECCENTRICITY_DISTRIBUTION_MIN" }, - { PROGRAM_OPTION::EDDINGTON_ACCRETION_FACTOR, "EDDINGTON_ACCRETION_FACTOR" }, - { PROGRAM_OPTION::ENABLE_ROTATIONALLY_ENHANCED_MASS_LOSS, "ENABLE_ROTATIONALLY_ENHANCED_MASS_LOSS" }, - { PROGRAM_OPTION::ENHANCE_CHE_LIFETIMES_LUMINOSITIES, "ENHANCE_CHE_LIFETIMES_LUMINOSITIES" }, - { PROGRAM_OPTION::ENVELOPE_STATE_PRESCRIPTION, "ENVELOPE_STATE_PRESCRIPTION" }, - { PROGRAM_OPTION::EVOLUTION_MODE, "EVOLUTION_MODE" }, - - { PROGRAM_OPTION::FP_ERROR_MODE, "FP_ERROR_MODE" }, - - { PROGRAM_OPTION::FRYER_SUPERNOVA_ENGINE, "FRYER_SUPERNOVA_ENGINE" }, - - { PROGRAM_OPTION::FRYER22_FMIX, "FRYER22_FMIX" }, - { PROGRAM_OPTION::FRYER22_MCRIT, "FRYER22_MCRIT" }, - - { PROGRAM_OPTION::INITIAL_MASS, "INITIAL_MASS" }, - { PROGRAM_OPTION::INITIAL_MASS_1, "INITIAL_MASS_1" }, - { PROGRAM_OPTION::INITIAL_MASS_2, "INITIAL_MASS_2" }, - - { PROGRAM_OPTION::INITIAL_MASS_FUNCTION, "INITIAL_MASS_FUNCTION" }, - { PROGRAM_OPTION::INITIAL_MASS_FUNCTION_MAX, "INITIAL_MASS_FUNCTION_MAX" }, - { PROGRAM_OPTION::INITIAL_MASS_FUNCTION_MIN, "INITIAL_MASS_FUNCTION_MIN" }, - { PROGRAM_OPTION::INITIAL_MASS_FUNCTION_POWER, "INITIAL_MASS_FUNCTION_POWER" }, - { PROGRAM_OPTION::KICK_DIRECTION_DISTRIBUTION, "KICK_DIRECTION_DISTRIBUTION" }, - { PROGRAM_OPTION::KICK_DIRECTION_POWER, "KICK_DIRECTION_POWER" }, - { PROGRAM_OPTION::KICK_SCALING_FACTOR, "KICK_SCALING_FACTOR" }, - { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION, "KICK_MAGNITUDE_DISTRIBUTION" }, - { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_MAXIMUM, "KICK_MAGNITUDE_DISTRIBUTION_MAXIMUM" }, - - { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH, "KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH" }, - { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS, "KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS" }, - { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN, "KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN" }, - { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN, "KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN" }, - - { PROGRAM_OPTION::KICK_MAGNITUDE, "KICK_MAGNITUDE" }, - { PROGRAM_OPTION::KICK_MAGNITUDE_1, "KICK_MAGNITUDE_1" }, - { PROGRAM_OPTION::KICK_MAGNITUDE_2, "KICK_MAGNITUDE_2" }, - - { PROGRAM_OPTION::KICK_MAGNITUDE_RANDOM, "KICK_MAGNITUDE_RANDOM" }, - { PROGRAM_OPTION::KICK_MAGNITUDE_RANDOM_1, "KICK_MAGNITUDE_RANDOM_1" }, - { PROGRAM_OPTION::KICK_MAGNITUDE_RANDOM_2, "KICK_MAGNITUDE_RANDOM_2" }, - - { PROGRAM_OPTION::KICK_MEAN_ANOMALY_1, "KICK_MEAN_ANOMALY_1" }, - { PROGRAM_OPTION::KICK_MEAN_ANOMALY_2, "KICK_MEAN_ANOMALY_2" }, - { PROGRAM_OPTION::KICK_PHI_1, "KICK_PHI_1" }, - { PROGRAM_OPTION::KICK_PHI_2, "KICK_PHI_2" }, - { PROGRAM_OPTION::KICK_THETA_1, "KICK_THETA_1" }, - { PROGRAM_OPTION::KICK_THETA_2, "KICK_THETA_2" }, - - { PROGRAM_OPTION::LBV_FACTOR, "LBV_FACTOR" }, - { PROGRAM_OPTION::LBV_MASS_LOSS_PRESCRIPTION, "LBV_MASS_LOSS_PRESCRIPTION" }, - - { PROGRAM_OPTION::MALTSEV_FALLBACK, "MALTSEV_FALLBACK" }, - { PROGRAM_OPTION::MALTSEV_MODE, "MALTSEV_MODE" }, - { PROGRAM_OPTION::MASS_LOSS_PRESCRIPTION, "MASS_LOSS_PRESCRIPTION" }, - - { PROGRAM_OPTION::MASS_RATIO, "MASS_RATIO" }, - { PROGRAM_OPTION::MASS_RATIO_DISTRIBUTION, "MASS_RATIO_DISTRIBUTION" }, - { PROGRAM_OPTION::MASS_RATIO_DISTRIBUTION_MAX, "MASS_RATIO_DISTRIBUTION_MAX" }, - { PROGRAM_OPTION::MASS_RATIO_DISTRIBUTION_MIN, "MASS_RATIO_DISTRIBUTION_MIN" }, - - { PROGRAM_OPTION::MAXIMUM_EVOLUTION_TIME, "MAXIMUM_EVOLUTION_TIME" }, - { PROGRAM_OPTION::MAXIMUM_DONOR_MASS, "MAXIMUM_DONOR_MASS" }, - { PROGRAM_OPTION::MAXIMUM_NEUTRON_STAR_MASS, "MAXIMUM_NEUTRON_STAR_MASS" }, - { PROGRAM_OPTION::MAXIMUM_TIMESTEPS, "MAXIMUM_TIMESTEPS" }, - - { PROGRAM_OPTION::MCBUR1, "MCBUR1" }, - - { PROGRAM_OPTION::METALLICITY, "METALLICITY" }, - { PROGRAM_OPTION::METALLICITY_DISTRIBUTION, "METALLICITY_DISTRIBUTION" }, - { PROGRAM_OPTION::METALLICITY_DISTRIBUTION_MAX, "METALLICITY_DISTRIBUTION_MAX" }, - { PROGRAM_OPTION::METALLICITY_DISTRIBUTION_MIN, "METALLICITY_DISTRIBUTION_MIN" }, - - { PROGRAM_OPTION::MINIMUM_SAMPLED_SECONDARY_MASS, "MINIMUM_SAMPLED_SECONDARY_MASS" }, - - { PROGRAM_OPTION::MT_ACCRETION_EFFICIENCY_PRESCRIPTION, "MT_ACCRETION_EFFICIENCY_PRESCRIPTION" }, - { PROGRAM_OPTION::MT_ANG_MOM_LOSS_PRESCRIPTION, "MT_ANG_MOM_LOSS_PRESCRIPTION" }, - { PROGRAM_OPTION::MT_THERMAL_LIMIT_C, "MT_THERMAL_LIMIT_C" }, - - { PROGRAM_OPTION::MT_CRIT_MR_MS_LOW_MASS_DEGENERATE_ACCRETOR, "MT_CRIT_MR_MS_LOW_MASS_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_MS_LOW_MASS_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_MS_LOW_MASS_NON_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_MS_HIGH_MASS_DEGENERATE_ACCRETOR, "MT_CRIT_MR_MS_HIGH_MASS_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_MS_HIGH_MASS_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_MS_HIGH_MASS_NON_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_GIANT_DEGENERATE_ACCRETOR, "MT_CRIT_MR_GIANT_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_GIANT_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_GIANT_NON_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_HG_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HG_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_HG_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HG_NON_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_HE_GIANT_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HE_GIANT_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_HE_GIANT_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HE_GIANT_NON_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_HE_HG_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HE_HG_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_HE_HG_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HE_HG_NON_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_HE_MS_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HE_MS_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_HE_MS_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HE_MS_NON_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_WD_DEGENERATE_ACCRETOR, "MT_CRIT_MR_WD_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_WD_NONDEGENERATE_ACCRETOR, "MT_CRIT_MR_WD_NONDEGENERATE_ACCRETOR" }, - - { PROGRAM_OPTION::MT_FRACTION_ACCRETED, "MT_FRACTION_ACCRETED" }, - { PROGRAM_OPTION::MT_JLOSS, "MT_JLOSS" }, - { PROGRAM_OPTION::MT_JLOSS_LINEAR_FRACTION_DEGEN, "MT_JLOSS_LINEAR_FRACTION_DEGEN" }, - { PROGRAM_OPTION::MT_JLOSS_LINEAR_FRACTION_NON_DEGEN, "MT_JLOSS_LINEAR_FRACTION_NON_DEGEN" }, - { PROGRAM_OPTION::MT_REJUVENATION_PRESCRIPTION, "MT_REJUVENATION_PRESCRIPTION" }, - { PROGRAM_OPTION::MT_THERMALLY_LIMITED_VARIATION, "MT_THERMALLY_LIMITED_VARIATION" }, - - { PROGRAM_OPTION::MULLER_MANDEL_KICK_MULTIPLIER_BH, "MULLER_MANDEL_KICK_MULTIPLIER_BH" }, - { PROGRAM_OPTION::MULLER_MANDEL_KICK_MULTIPLIER_NS, "MULLER_MANDEL_KICK_MULTIPLIER_NS" }, - { PROGRAM_OPTION::MULLER_MANDEL_SIGMA_KICK_BH, "MULLER_MANDEL_SIGMA_KICK_BH" }, - { PROGRAM_OPTION::MULLER_MANDEL_SIGMA_KICK_NS, "MULLER_MANDEL_SIGMA_KICK_NS" }, - - { PROGRAM_OPTION::NEUTRINO_MASS_LOSS_ASSUMPTION_BH, "NEUTRINO_MASS_LOSS_ASSUMPTION_BH" }, - { PROGRAM_OPTION::NEUTRINO_MASS_LOSS_VALUE_BH, "NEUTRINO_MASS_LOSS_VALUE_BH" }, - - { PROGRAM_OPTION::NOTES, "NOTES" }, - - { PROGRAM_OPTION::NS_ACCRETION_IN_CE, "NS_ACCRETION_IN_CE" }, - { PROGRAM_OPTION::NS_EOS, "NS_EOS" }, - - { PROGRAM_OPTION::ORBITAL_PERIOD, "ORBITAL_PERIOD" }, - { PROGRAM_OPTION::ORBITAL_PERIOD_DISTRIBUTION, "ORBITAL_PERIOD_DISTRIBUTION" }, - { PROGRAM_OPTION::ORBITAL_PERIOD_DISTRIBUTION_MAX, "ORBITAL_PERIOD_DISTRIBUTION_MAX" }, - { PROGRAM_OPTION::ORBITAL_PERIOD_DISTRIBUTION_MIN, "ORBITAL_PERIOD_DISTRIBUTION_MIN" }, - - { PROGRAM_OPTION::OVERALL_WIND_MASS_LOSS_MULTIPLIER, "OVERALL_WIND_MASS_LOSS_MULTIPLIER" }, - - { PROGRAM_OPTION::PISN_LOWER_LIMIT, "PISN_LOWER_LIMIT" }, - { PROGRAM_OPTION::PISN_UPPER_LIMIT, "PISN_UPPER_LIMIT" }, - - { PROGRAM_OPTION::PPI_LOWER_LIMIT, "PPI_LOWER_LIMIT" }, - { PROGRAM_OPTION::PPI_PRESCRIPTION, "PPI_PRESCRIPTION" }, - { PROGRAM_OPTION::PPI_UPPER_LIMIT, "PPI_UPPER_LIMIT" }, - { PROGRAM_OPTION::PPI_CO_CORE_SHIFT_HENDRIKS, "PPI_CO_CORE_SHIFT_HENDRIKS"}, - - { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DISTRIBUTION, "PULSAR_MAGNETIC_FIELD_DISTRIBUTION" }, - { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MAX, "PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MAX" }, - { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MIN, "PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MIN" }, - - { PROGRAM_OPTION::PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION, "PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION" }, - { PROGRAM_OPTION::PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MAX, "PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MAX" }, - { PROGRAM_OPTION::PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MIN, "PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MIN" }, - - { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DECAY_MASS_SCALE, "PULSAR_MAGNETIC_FIELD_DECAY_MASS_SCALE" }, - { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DECAY_TIME_SCALE, "PULSAR_MAGNETIC_FIELD_DECAY_TIME_SCALE" }, - - { PROGRAM_OPTION::PULSAR_MINIMUM_MAGNETIC_FIELD, "PULSAR_MINIMUM_MAGNETIC_FIELD" }, - - { PROGRAM_OPTION::QCRIT_PRESCRIPTION, "QCRIT_PRESCRIPTION" }, - - { PROGRAM_OPTION::RANDOM_SEED, "RANDOM_SEED" }, - { PROGRAM_OPTION::RANDOM_SEED_CMDLINE, "RANDOM_SEED_CMDLINE" }, - - { PROGRAM_OPTION::REMNANT_MASS_PRESCRIPTION, "REMNANT_MASS_PRESCRIPTION" }, - - { PROGRAM_OPTION::ROCKET_KICK_MAGNITUDE_1, "ROCKET_KICK_MAGNITUDE_1" }, - { PROGRAM_OPTION::ROCKET_KICK_MAGNITUDE_2, "ROCKET_KICK_MAGNITUDE_2" }, - { PROGRAM_OPTION::ROCKET_KICK_PHI_1, "ROCKET_KICK_PHI_1" }, - { PROGRAM_OPTION::ROCKET_KICK_PHI_2, "ROCKET_KICK_PHI_2" }, - { PROGRAM_OPTION::ROCKET_KICK_THETA_1, "ROCKET_KICK_THETA_1" }, - { PROGRAM_OPTION::ROCKET_KICK_THETA_2, "ROCKET_KICK_THETA_2" }, - - { PROGRAM_OPTION::ROTATIONAL_VELOCITY_DISTRIBUTION, "ROTATIONAL_VELOCITY_DISTRIBUTION" }, - { PROGRAM_OPTION::ROTATIONAL_FREQUENCY, "ROTATIONAL_FREQUENCY" }, - { PROGRAM_OPTION::ROTATIONAL_FREQUENCY_1, "ROTATIONAL_FREQUENCY_1" }, - { PROGRAM_OPTION::ROTATIONAL_FREQUENCY_2, "ROTATIONAL_FREQUENCY_2" }, - - { PROGRAM_OPTION::SCALE_CHE_MASS_LOSS_SURF_HE_ABUNDANCE, "SCALE_CHE_MASS_LOSS_SURF_HE_ABUNDANCE" }, - { PROGRAM_OPTION::SCALE_TERMINAL_WIND_VEL_METALLICITY_POWER, "SCALE_TERMINAL_WIND_VEL_METALLICITY_POWER" }, - { PROGRAM_OPTION::SEMI_MAJOR_AXIS, "SEMI_MAJOR_AXIS" }, - { PROGRAM_OPTION::SEMI_MAJOR_AXIS_DISTRIBUTION, "SEMI_MAJOR_AXIS_DISTRIBUTION" }, - { PROGRAM_OPTION::SEMI_MAJOR_AXIS_DISTRIBUTION_MAX, "SEMI_MAJOR_AXIS_DISTRIBUTION_MAX" }, - { PROGRAM_OPTION::SEMI_MAJOR_AXIS_DISTRIBUTION_MIN, "SEMI_MAJOR_AXIS_DISTRIBUTION_MIN" }, - - { PROGRAM_OPTION::STELLAR_ZETA_PRESCRIPTION, "STELLAR_ZETA_PRESCRIPTION" }, - - { PROGRAM_OPTION::TIDES_PRESCRIPTION, "TIDES_PRESCRIPTION" }, - - { PROGRAM_OPTION::USSN_KICKS_OVERRIDE_MANDEL_MULLER, "USSN_KICKS_OVERRIDE_MANDEL_MULLER" }, - - { PROGRAM_OPTION::WR_FACTOR, "WR_FACTOR" }, - - { PROGRAM_OPTION::ZETA_ADIABATIC_ARBITRARY, "ZETA_ADIABATIC_ARBITRARY" }, - { PROGRAM_OPTION::ZETA_MS, "ZETA_MS" }, - { PROGRAM_OPTION::ZETA_RADIATIVE_ENVELOPE_GIANT, "ZETA_RADIATIVE_ENVELOPE_GIANT" } -}; - - -enum class ANY_PROPERTY_TYPE: int { T_STAR_1_PROPERTY, T_STAR_2_PROPERTY, T_SUPERNOVA_PROPERTY, T_COMPANION_PROPERTY, T_STAR_PROPERTY, T_BINARY_PROPERTY, T_PROGRAM_OPTION }; - -typedef boost::variant T_ANY_PROPERTY; -typedef boost::variant T_ANY_STAR_PROPERTY; -typedef boost::variant T_ANY_BINARY_CONSTITUENT_PROPERTY; -typedef boost::variant T_ANY_BINARY_PROPERTY; - - -typedef std::vector ANY_PROPERTY_VECTOR; - - -class VariantPropertyType: public boost::static_visitor { -public: - ANY_PROPERTY_TYPE operator()(STAR_PROPERTY prop) const { return ANY_PROPERTY_TYPE::T_STAR_PROPERTY; } - ANY_PROPERTY_TYPE operator()(STAR_1_PROPERTY prop) const { return ANY_PROPERTY_TYPE::T_STAR_1_PROPERTY; } - ANY_PROPERTY_TYPE operator()(STAR_2_PROPERTY prop) const { return ANY_PROPERTY_TYPE::T_STAR_2_PROPERTY; } - ANY_PROPERTY_TYPE operator()(SUPERNOVA_PROPERTY prop) const { return ANY_PROPERTY_TYPE::T_SUPERNOVA_PROPERTY; } - ANY_PROPERTY_TYPE operator()(COMPANION_PROPERTY prop) const { return ANY_PROPERTY_TYPE::T_COMPANION_PROPERTY; } - ANY_PROPERTY_TYPE operator()(BINARY_PROPERTY prop) const { return ANY_PROPERTY_TYPE::T_BINARY_PROPERTY; } - ANY_PROPERTY_TYPE operator()(PROGRAM_OPTION prop) const { return ANY_PROPERTY_TYPE::T_PROGRAM_OPTION; } -}; - - -// Property types -enum class PROPERTY_TYPE: int { NONE, STAR_PROPERTY, STAR_1_PROPERTY, STAR_2_PROPERTY, SUPERNOVA_PROPERTY, COMPANION_PROPERTY, ANY_STAR_PROPERTY, BINARY_PROPERTY, PROGRAM_OPTION }; -const COMPASUnorderedMap PROPERTY_TYPE_LABEL = { - { PROPERTY_TYPE::NONE, "" }, - { PROPERTY_TYPE::STAR_PROPERTY, "STAR_PROPERTY" }, - { PROPERTY_TYPE::STAR_1_PROPERTY, "STAR_1_PROPERTY" }, - { PROPERTY_TYPE::STAR_2_PROPERTY, "STAR_2_PROPERTY" }, - { PROPERTY_TYPE::SUPERNOVA_PROPERTY, "SUPERNOVA_PROPERTY" }, - { PROPERTY_TYPE::COMPANION_PROPERTY, "COMPANION_PROPERTY" }, - { PROPERTY_TYPE::ANY_STAR_PROPERTY, "ANY_STAR_PROPERTY" }, - { PROPERTY_TYPE::BINARY_PROPERTY, "BINARY_PROPERTY" }, - { PROPERTY_TYPE::PROGRAM_OPTION, "PROGRAM_OPTION" } -}; - - -// typedef for property details -// the property details provide information about the property to assist in printing the property value -// the property_details tuple contains: -// -// -// -// where: -// -// data type is, as the name suggest, the data type of the property, from the TYPENAME enum class (above) -// header string is the string to be printed as the column header for the property -// units string is the string to be printed as the units header for the property -// field width is the printf() field width of the property (does not apply to HDF5 files; meaning varies per the data type, refer to printf() documentation) -// field precision is the printf() field precision of the property (does not apply to HDF5 files; meaning varies per the data type, refer to printf() documentation) -typedef std::tuple PROPERTY_DETAILS; - -// map ANY_STAR_PROPERTY_DETAIL -// Records the details of STELLAR properties. The STELLAR properties are those that pertain -// to individual stars, whether they be a single star being evolved for SSE, or one of the -// constituent stars being evolved as part of a binary for BSE -// -// Properties only need to be here if they are required to be available for printing in -// the logfiles - all keys present here should also be in the STAR_PROPERTIES #define and -// STAR_PROPERTIES_LABEL -const std::map ANY_STAR_PROPERTY_DETAIL = { - { ANY_STAR_PROPERTY::AGE, { TYPENAME::DOUBLE, "Age", "Myr", 24, 15}}, - { ANY_STAR_PROPERTY::ANGULAR_MOMENTUM, { TYPENAME::DOUBLE, "Ang_Momentum", "Msol AU^2 yr^-1", 24, 15}}, - { ANY_STAR_PROPERTY::BINDING_ENERGY_AT_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Binding_Energy@CE", "erg", 24, 15}}, - { ANY_STAR_PROPERTY::BINDING_ENERGY_CONVECTIVE_ENVELOPE, { TYPENAME::DOUBLE, "BE_ConvectiveEnvelope", "erg", 24, 15}}, - { ANY_STAR_PROPERTY::BINDING_ENERGY_FIXED, { TYPENAME::DOUBLE, "BE_Fixed", "erg", 24, 15}}, - { ANY_STAR_PROPERTY::BINDING_ENERGY_NANJING, { TYPENAME::DOUBLE, "BE_Nanjing", "erg", 24, 15}}, - { ANY_STAR_PROPERTY::BINDING_ENERGY_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Binding_EnergyCE", "Myr", 24, 15}}, - { ANY_STAR_PROPERTY::DYNAMICAL_TIMESCALE_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Tau_DynamicalCE", "Lsol", 24, 15}}, - { ANY_STAR_PROPERTY::LUMINOSITY_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "LuminositySN", "Msol^2AU^-1", 24, 15}}, - { ANY_STAR_PROPERTY::ORBITAL_ENERGY_PRE_SUPERNOVA, { TYPENAME::DOUBLE, "Orbital_EnergyCE", "Myr", 24, 15}}, - { ANY_STAR_PROPERTY::RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Tau_RadialCE", "K", 24, 15}}, - { ANY_STAR_PROPERTY::TEMPERATURE_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "TeffCE", "Myr", 24, 15}}, - { ANY_STAR_PROPERTY::THERMAL_TIMESCALE_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Tau_Thermal BINARY_PROPERTY_DETAIL = { - { BINARY_PROPERTY::CIRCULARIZATION_TIMESCALE, { TYPENAME::DOUBLE, "Tau_Circ", "Myr", 24, 15}}, - { BINARY_PROPERTY::COMMON_ENVELOPE_AT_LEAST_ONCE, { TYPENAME::BOOL, "CEE", "Event", 0, 0 }}, - { BINARY_PROPERTY::COMMON_ENVELOPE_EVENT_COUNT, { TYPENAME::UINT, "CE_Event_Counter", "Count", 6, 1 }}, - { BINARY_PROPERTY::DOUBLE_CORE_COMMON_ENVELOPE, { TYPENAME::BOOL, "Double_Core_CE", "Event", 0, 0 }}, - { BINARY_PROPERTY::DT, { TYPENAME::DOUBLE, "dT", "Myr", 24, 15}}, - { BINARY_PROPERTY::ECCENTRICITY, { TYPENAME::DOUBLE, "Eccentricity", "-", 24, 15}}, - { BINARY_PROPERTY::ECCENTRICITY_AT_DCO_FORMATION, { TYPENAME::DOUBLE, "Eccentricity@DCO", "-", 24, 15}}, - { BINARY_PROPERTY::ECCENTRICITY_INITIAL, { TYPENAME::DOUBLE, "Eccentricity@ZAMS", "-", 24, 15}}, - { BINARY_PROPERTY::ECCENTRICITY_POST_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Eccentricity>CE", "-", 24, 15}}, - { BINARY_PROPERTY::ECCENTRICITY_PRE_SUPERNOVA, { TYPENAME::DOUBLE, "EccentricityCE", "Event", 0, 0 }}, - { BINARY_PROPERTY::MASS_1_POST_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Mass(1)>CE", "Msol", 24, 15}}, - { BINARY_PROPERTY::MASS_1_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Mass(1)CE", "Msol", 24, 15}}, - { BINARY_PROPERTY::MASS_2_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Mass(2)SN_X", "-", 24, 15}}, - { BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_Y, { TYPENAME::DOUBLE, "Orbital_AM_Vector>SN_Y", "-", 24, 15}}, - { BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_Z, { TYPENAME::DOUBLE, "Orbital_AM_Vector>SN_Z", "-", 24, 15}}, - { BINARY_PROPERTY::ORBITAL_ANGULAR_VELOCITY, { TYPENAME::DOUBLE, "Orbital_Angular_Velocity", "kms^-1", 24, 15}}, - { BINARY_PROPERTY::ORBITAL_VELOCITY_PRE_SUPERNOVA, { TYPENAME::DOUBLE, "Orb_VelocityCE", "Rsol", 24, 15}}, - { BINARY_PROPERTY::RADIUS_1_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Radius(1)CE", "Rsol", 24, 15}}, - { BINARY_PROPERTY::RADIUS_2_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Radius(2)MT", "State", 0, 0 }}, - { BINARY_PROPERTY::RLOF_POST_MT_ECCENTRICITY, { TYPENAME::DOUBLE, "Eccentricity>MT", "-", 24, 15}}, - { BINARY_PROPERTY::RLOF_POST_MT_EVENT_COUNTER, { TYPENAME::UINT, "MT_Event_Counter", "Count", 6, 1 }}, - { BINARY_PROPERTY::RLOF_POST_MT_ID, { TYPENAME::OBJECT_ID, "ID>MT", "-", 12, 1 }}, - { BINARY_PROPERTY::RLOF_POST_MT_SEMI_MAJOR_AXIS, { TYPENAME::DOUBLE, "SemiMajorAxis>MT", "Rsol", 24, 15}}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_MASS, { TYPENAME::DOUBLE, "Mass(1)>MT", "Msol", 24, 15}}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_MASS, { TYPENAME::DOUBLE, "Mass(2)>MT", "Msol", 24, 15}}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_RADIUS, { TYPENAME::DOUBLE, "Radius(1)>MT", "Rsol", 24, 15}}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_RADIUS, { TYPENAME::DOUBLE, "Radius(2)>MT", "Rsol", 24, 15}}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_TEFF, { TYPENAME::DOUBLE, "Teff(1)>MT", "K", 24, 15}}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_TEFF, { TYPENAME::DOUBLE, "Teff(2)>MT", "K", 24, 15}}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_LUM, { TYPENAME::DOUBLE, "Lum(1)>MT", "Lsol", 24, 15}}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_LUM, { TYPENAME::DOUBLE, "Lum(2)>MT", "Lsol", 24, 15}}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_RLOF, { TYPENAME::BOOL, "RLOF(1)>MT", "State", 0, 0 }}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_RLOF, { TYPENAME::BOOL, "RLOF(2)>MT", "State", 0, 0 }}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_STELLAR_TYPE, { TYPENAME::STELLAR_TYPE, "Stellar_Type(1)>MT", "-", 4, 1 }}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_STELLAR_TYPE_NAME, { TYPENAME::STRING, "Stellar_Type(1)>MT", "-", 42, 1 }}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_STELLAR_TYPE, { TYPENAME::STELLAR_TYPE, "Stellar_Type(2)>MT", "-", 4, 1 }}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_STELLAR_TYPE_NAME, { TYPENAME::STRING, "Stellar_Type(2)>MT", "-", 42, 1 }}, - { BINARY_PROPERTY::RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, { TYPENAME::DOUBLE, "Radius(1)|RL>step", "-", 24, 15}}, - { BINARY_PROPERTY::RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, { TYPENAME::DOUBLE, "Radius(2)|RL>step", "-", 24, 15}}, - { BINARY_PROPERTY::RLOF_PRE_MT_ECCENTRICITY, { TYPENAME::DOUBLE, "EccentricityCE", "Event", 0, 0 }}, - { BINARY_PROPERTY::RLOF_TIME_POST_MT, { TYPENAME::DOUBLE, "Time>MT", "Myr", 24, 15}}, - { BINARY_PROPERTY::RLOF_TIME_PRE_MT, { TYPENAME::DOUBLE, "TimeCE", "Rsol", 24, 15}}, - { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "RocheLobe(1)CE", "Rsol", 24, 15}}, - { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "RocheLobe(2)CE", "Rsol", 24, 15}}, - { BINARY_PROPERTY::SEMI_MAJOR_AXIS_POST_STAGE_1_CE, { TYPENAME::DOUBLE, "SemiMajorAxisStage1>CE", "Rsol", 24, 15}}, - { BINARY_PROPERTY::SEMI_MAJOR_AXIS_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "SemiMajorAxisCE", "State", 0, 0 }}, - { BINARY_PROPERTY::STELLAR_MERGER, { TYPENAME::BOOL, "Merger", "Event", 0, 0 }}, - { BINARY_PROPERTY::STELLAR_MERGER_AT_BIRTH, { TYPENAME::BOOL, "Merger_At_Birth", "Event", 0, 0 }}, - { BINARY_PROPERTY::STELLAR_TYPE_1_POST_COMMON_ENVELOPE, { TYPENAME::STELLAR_TYPE, "Stellar_Type(1)>CE", "-", 4, 1 }}, - { BINARY_PROPERTY::STELLAR_TYPE_1_PRE_COMMON_ENVELOPE, { TYPENAME::STELLAR_TYPE, "Stellar_Type(1)CE", "-", 4, 1 }}, - { BINARY_PROPERTY::STELLAR_TYPE_2_PRE_COMMON_ENVELOPE, { TYPENAME::STELLAR_TYPE, "Stellar_Type(2)CE", "-", 42, 1 }}, - { BINARY_PROPERTY::STELLAR_TYPE_NAME_1_PRE_COMMON_ENVELOPE, { TYPENAME::STRING, "Stellar_Type(1)CE", "-", 42, 1 }}, - { BINARY_PROPERTY::STELLAR_TYPE_NAME_2_PRE_COMMON_ENVELOPE, { TYPENAME::STRING, "Stellar_Type(2) PROGRAM_OPTION_DETAIL = { - - { PROGRAM_OPTION::ADD_OPTIONS_TO_SYSPARMS, { TYPENAME::INT, "PO_Add_Options_To_SysParms", "-", 4, 1 }}, - { PROGRAM_OPTION::ALLOW_NON_STRIPPED_ECSN, { TYPENAME::BOOL, "PO_Allow_Non_Stripped_ECSN", "Flag", 0, 0 }}, - { PROGRAM_OPTION::ALLOW_MS_STAR_TO_SURVIVE_COMMON_ENVELOPE, { TYPENAME::BOOL, "PO_Allow_MS_To_Survive_CE", "Flag", 0, 0 }}, - { PROGRAM_OPTION::ALLOW_RADIATIVE_ENVELOPE_STAR_TO_SURVIVE_COMMON_ENVELOPE, { TYPENAME::BOOL, "PO_Allow_Radiative_Envelope_To_Survive_CE", "Flag", 0, 0 }}, - { PROGRAM_OPTION::ALLOW_IMMEDIATE_RLOF_POST_CE_TO_SURVIVE_COMMON_ENVELOPE, { TYPENAME::BOOL, "PO_Allow_Immediate_RLOF>CE_To_Survive_CE", "Flag", 0, 0 }}, - { PROGRAM_OPTION::ALLOW_RLOF_AT_BIRTH, { TYPENAME::BOOL, "PO_Allow_RLOF@Birth", "Flag", 0, 0 }}, - { PROGRAM_OPTION::ALLOW_TOUCHING_AT_BIRTH, { TYPENAME::BOOL, "PO_Allow_Touching@Birth", "Flag", 0, 0 }}, - { PROGRAM_OPTION::ANG_MOM_CONSERVATION_DURING_CIRCULARISATION, { TYPENAME::BOOL, "PO_Conserve_AngMom@Circ", "Flag", 0, 0 }}, - - { PROGRAM_OPTION::BLACK_HOLE_KICKS_MODE, { TYPENAME::INT, "PO_BH_Kicks_Mode", "-", 4, 1 }}, - - { PROGRAM_OPTION::CASE_BB_STABILITY_PRESCRIPTION, { TYPENAME::INT, "PO_BB_Mass_xFer_Stblty_Prscrptn", "-", 4, 1 }}, - - { PROGRAM_OPTION::CHECK_PHOTON_TIRING_LIMIT, { TYPENAME::BOOL, "PO_Check_Photon_Tiring_Limit", "Flag", 0, 0 }}, - - { PROGRAM_OPTION::CHE_MODE, { TYPENAME::INT, "PO_CHE_Mode", "-", 4, 1 }}, - - { PROGRAM_OPTION::CIRCULARISE_BINARY_DURING_MT, { TYPENAME::BOOL, "PO_Circularise@MT", "Flag", 0, 0 }}, - - { PROGRAM_OPTION::COMMON_ENVELOPE_ALPHA, { TYPENAME::DOUBLE, "PO_CE_Alpha", "-", 24, 15}}, - { PROGRAM_OPTION::COMMON_ENVELOPE_ALPHA_THERMAL, { TYPENAME::DOUBLE, "PO_CE_Alpha_Thermal", "-", 24, 15}}, - { PROGRAM_OPTION::COMMON_ENVELOPE_FORMALISM, { TYPENAME::INT, "PO_CE_Formalism", "-", 4, 1 }}, - { PROGRAM_OPTION::COMMON_ENVELOPE_LAMBDA, { TYPENAME::DOUBLE, "PO_CE_Lambda", "-", 24, 15}}, - { PROGRAM_OPTION::COMMON_ENVELOPE_LAMBDA_MULTIPLIER, { TYPENAME::DOUBLE, "PO_CE_Lambda_Multiplier", "-", 24, 15}}, - { PROGRAM_OPTION::COMMON_ENVELOPE_LAMBDA_PRESCRIPTION, { TYPENAME::INT, "PO_CE_Lambda_Prscrptn", "-", 4, 1 }}, - { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_CONSTANT, { TYPENAME::DOUBLE, "PO_CE_Mass_Accr_Constant", "-", 24, 15}}, - { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_MAX, { TYPENAME::DOUBLE, "PO_CE_Mass_Accr_Max", "Msol", 24, 15}}, - { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_MIN, { TYPENAME::DOUBLE, "PO_CE_Mass_Accr_Min", "Msol", 24, 15}}, - { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_PRESCRIPTION, { TYPENAME::INT, "PO_CE_Mass_Accr_Prscrptn", "-", 4, 1 }}, - { PROGRAM_OPTION::COMMON_ENVELOPE_RECOMBINATION_ENERGY_DENSITY, { TYPENAME::DOUBLE, "PO_CE_Recomb_Enrgy_Dnsty", "erg g^-1", 24, 15}}, - { PROGRAM_OPTION::COMMON_ENVELOPE_SECOND_STAGE_BETA, { TYPENAME::DOUBLE, "PO_CE_Second_Stage_Beta", "-", 24, 15}}, - { PROGRAM_OPTION::COMMON_ENVELOPE_SECOND_STAGE_GAMMA_PRESCRIPTION, { TYPENAME::INT, "PO_CE_Second_Stage_Gamma_Prescription", "-", 24, 15}}, - { PROGRAM_OPTION::COMMON_ENVELOPE_SLOPE_KRUCKOW, { TYPENAME::DOUBLE, "PO_CE_Slope_Kruckow", "-", 24, 15}}, - - { PROGRAM_OPTION::COOL_WIND_MASS_LOSS_MULTIPLIER, { TYPENAME::DOUBLE, "PO_Cool_WindMassLoss_Multipl", "-", 24, 15}}, - - { PROGRAM_OPTION::ECCENTRICITY, { TYPENAME::DOUBLE, "PO_Eccentricity", "-", 24, 15}}, - { PROGRAM_OPTION::ECCENTRICITY_DISTRIBUTION, { TYPENAME::INT, "PO_Eccentricity_Dstrbtn", "-", 4, 1 }}, - { PROGRAM_OPTION::ECCENTRICITY_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Eccentricity_Dstrbtn_Max", "-", 24, 15}}, - { PROGRAM_OPTION::ECCENTRICITY_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Eccentricity_Dstrbtn_Min", "-", 24, 15}}, - { PROGRAM_OPTION::EDDINGTON_ACCRETION_FACTOR, { TYPENAME::DOUBLE, "PO_Eddington_Accr_Factor", "-", 24, 15}}, - { PROGRAM_OPTION::ENABLE_ROTATIONALLY_ENHANCED_MASS_LOSS, { TYPENAME::BOOL, "PO_Enable_Rotationally_Enhanced_Mass_Loss", "Flag", 0, 0}}, - { PROGRAM_OPTION::ENHANCE_CHE_LIFETIMES_LUMINOSITIES, { TYPENAME::BOOL, "PO_Enhance_CHE_lifetimes_luminosities", "Flag", 0, 0}}, - { PROGRAM_OPTION::ENVELOPE_STATE_PRESCRIPTION, { TYPENAME::INT, "PO_Envelope_State_Prscrptn", "-", 4, 1 }}, - { PROGRAM_OPTION::EVOLUTION_MODE, { TYPENAME::INT, "PO_Evolution_Mode", "Mode", 4, 1 }}, - - { PROGRAM_OPTION::FP_ERROR_MODE, { TYPENAME::INT, "PO_FP_Error_Mode", "Mode", 4, 1 }}, - - { PROGRAM_OPTION::FRYER_SUPERNOVA_ENGINE, { TYPENAME::INT, "PO_Fryer_SN_Engine", "-", 4, 1 }}, - - { PROGRAM_OPTION::FRYER22_FMIX, { TYPENAME::DOUBLE, "PO_Fryer22_mixing_fraction", "-", 24, 15}}, - { PROGRAM_OPTION::FRYER22_MCRIT, { TYPENAME::DOUBLE, "PO_Fryer22_crit_COcore_Mass", "Msol", 24, 15}}, - - { PROGRAM_OPTION::INITIAL_MASS, { TYPENAME::DOUBLE, "PO_Initial_Mass", "Msol", 24, 15}}, - { PROGRAM_OPTION::INITIAL_MASS_1, { TYPENAME::DOUBLE, "PO_Initial_Mass(1)", "Msol", 24, 15}}, - { PROGRAM_OPTION::INITIAL_MASS_2, { TYPENAME::DOUBLE, "PO_Initial_Mass(2)", "Msol", 24, 15}}, - - { PROGRAM_OPTION::INITIAL_MASS_FUNCTION, { TYPENAME::INT, "PO_Initial_Mass_Function", "-", 4, 1 }}, - { PROGRAM_OPTION::INITIAL_MASS_FUNCTION_MAX, { TYPENAME::DOUBLE, "PO_Initial_Mass_Func_Max", "Msol", 24, 15}}, - { PROGRAM_OPTION::INITIAL_MASS_FUNCTION_MIN, { TYPENAME::DOUBLE, "PO_Initial_Mass_Func_Min", "Msol", 24, 15}}, - { PROGRAM_OPTION::INITIAL_MASS_FUNCTION_POWER, { TYPENAME::DOUBLE, "PO_Initial_Mass_Func_Power", "-", 24, 15}}, - - { PROGRAM_OPTION::KICK_DIRECTION_DISTRIBUTION, { TYPENAME::INT, "PO_Kick_Direction_Dstrbtn", "-", 4, 1 }}, - { PROGRAM_OPTION::KICK_DIRECTION_POWER, { TYPENAME::DOUBLE, "PO_Kick_Direction_Power", "-", 24, 15}}, - { PROGRAM_OPTION::KICK_SCALING_FACTOR, { TYPENAME::DOUBLE, "PO_Kick_Scaling_Factor", "-", 24, 15}}, - { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION, { TYPENAME::INT, "PO_Kick_Magnitude_Dstrbtn", "-", 4, 1 }}, - { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_MAXIMUM, { TYPENAME::DOUBLE, "PO_Kick_Magnitude_Dstrbtn_Max", "-", 24, 15}}, - - { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH, { TYPENAME::DOUBLE, "PO_Sigma_Kick_CCSN_BH", "kms^-1", 24, 15}}, - { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS, { TYPENAME::DOUBLE, "PO_Sigma_Kick_CCSN_NS", "kms^-1", 24, 15}}, - { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN, { TYPENAME::DOUBLE, "PO_Sigma_Kick_ECSN", "kms^-1", 24, 15}}, - { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN, { TYPENAME::DOUBLE, "PO_Sigma_Kick_USSN", "kms^-1", 24, 15}}, - - { PROGRAM_OPTION::KICK_MAGNITUDE, { TYPENAME::DOUBLE, "PO_Kick_Magnitude", "kms^-1", 24, 15}}, - { PROGRAM_OPTION::KICK_MAGNITUDE_1, { TYPENAME::DOUBLE, "PO_Kick_Magnitude(1)", "kms^-1", 24, 15}}, - { PROGRAM_OPTION::KICK_MAGNITUDE_2, { TYPENAME::DOUBLE, "PO_Kick_Magnitude(2)", "kms^-1", 24, 15}}, - - { PROGRAM_OPTION::KICK_MAGNITUDE_RANDOM, { TYPENAME::DOUBLE, "PO_Kick_Magnitude_Random", "-", 24, 15}}, - { PROGRAM_OPTION::KICK_MAGNITUDE_RANDOM_1, { TYPENAME::DOUBLE, "PO_Kick_Magnitude_Random(1)", "-", 24, 15}}, - { PROGRAM_OPTION::KICK_MAGNITUDE_RANDOM_2, { TYPENAME::DOUBLE, "PO_Kick_Magnitude_Random(2)", "-", 24, 15}}, - - { PROGRAM_OPTION::KICK_MEAN_ANOMALY_1, { TYPENAME::DOUBLE, "PO_Kick_Mean_Anomaly(1)", "-", 24, 15}}, - { PROGRAM_OPTION::KICK_MEAN_ANOMALY_2, { TYPENAME::DOUBLE, "PO_Kick_Mean_Anomaly(2)", "-", 24, 15}}, - { PROGRAM_OPTION::KICK_PHI_1, { TYPENAME::DOUBLE, "PO_Kick_Phi(1)", "-", 24, 15}}, - { PROGRAM_OPTION::KICK_PHI_2, { TYPENAME::DOUBLE, "PO_Kick_Phi(2)", "-", 24, 15}}, - { PROGRAM_OPTION::KICK_THETA_1, { TYPENAME::DOUBLE, "PO_Kick_Theta(1)", "-", 24, 15}}, - { PROGRAM_OPTION::KICK_THETA_2, { TYPENAME::DOUBLE, "PO_Kick_Theta(2)", "-", 24, 15}}, - - { PROGRAM_OPTION::LBV_FACTOR, { TYPENAME::DOUBLE, "PO_LBV_Factor", "-", 24, 15}}, - { PROGRAM_OPTION::LBV_MASS_LOSS_PRESCRIPTION, { TYPENAME::INT, "PO_LBV_Mass_Loss_Prscrptn", "-", 4, 1 }}, - - { PROGRAM_OPTION::MALTSEV_FALLBACK, { TYPENAME::DOUBLE, "PO_Maltsev_Fallback", "-", 24, 15}}, - { PROGRAM_OPTION::MALTSEV_MODE, { TYPENAME::INT, "PO_Maltsev_Mode", "-", 4, 1 }}, - { PROGRAM_OPTION::MASS_LOSS_PRESCRIPTION, { TYPENAME::INT, "PO_Mass_Loss_Prscrptn", "-", 4, 1 }}, - - { PROGRAM_OPTION::MASS_RATIO, { TYPENAME::DOUBLE, "PO_Mass_Ratio", "-", 24, 15}}, - { PROGRAM_OPTION::MASS_RATIO_DISTRIBUTION, { TYPENAME::INT, "PO_Mass_Ratio_Dstrbtn", "-", 4, 1 }}, - { PROGRAM_OPTION::MASS_RATIO_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Mass_Ratio_Dstrbtn_Max", "-", 24, 15}}, - { PROGRAM_OPTION::MASS_RATIO_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Mass_Ratio_Dstrbtn_Min", "-", 24, 15}}, - - { PROGRAM_OPTION::MAXIMUM_EVOLUTION_TIME, { TYPENAME::DOUBLE, "PO_Max_Evolution_Time", "Myr", 24, 15}}, - { PROGRAM_OPTION::MAXIMUM_DONOR_MASS, { TYPENAME::DOUBLE, "PO_Max_Donor_Mass", "Msol", 24, 15}}, - { PROGRAM_OPTION::MAXIMUM_NEUTRON_STAR_MASS, { TYPENAME::DOUBLE, "PO_Max_NS_Mass", "Msol", 24, 15}}, - { PROGRAM_OPTION::MAXIMUM_TIMESTEPS, { TYPENAME::ULONGINT, "PO_Max_Timesteps", "Count", 10, 1 }}, - - { PROGRAM_OPTION::MCBUR1, { TYPENAME::DOUBLE, "PO_MCBUR1", "Msol", 24, 15}}, - - { PROGRAM_OPTION::METALLICITY, { TYPENAME::DOUBLE, "PO_Metallicity", "-", 24, 15}}, - { PROGRAM_OPTION::METALLICITY_DISTRIBUTION, { TYPENAME::INT, "PO_Metallicity_Dstrbtn", "-", 4, 1 }}, - { PROGRAM_OPTION::METALLICITY_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Metallicity_Dstrbtn_Max", "-", 24, 15}}, - { PROGRAM_OPTION::METALLICITY_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Metallicity_Dstrbtn_Min", "-", 24, 15}}, - - { PROGRAM_OPTION::MINIMUM_SAMPLED_SECONDARY_MASS, { TYPENAME::DOUBLE, "PO_Min_Sampled_Secondary_Mass", "Msol", 24, 15}}, - - { PROGRAM_OPTION::MT_ACCRETION_EFFICIENCY_PRESCRIPTION, { TYPENAME::INT, "PO_MT_Acc_Efficiency_Prscrptn", "-", 4, 1 }}, - { PROGRAM_OPTION::MT_ANG_MOM_LOSS_PRESCRIPTION, { TYPENAME::INT, "PO_MT_AngMom_Loss_Prscrptn", "-", 4, 1 }}, - { PROGRAM_OPTION::MT_THERMAL_LIMIT_C, { TYPENAME::DOUBLE, "PO_MT_Thermal_Limit_C", "-", 24, 15}}, - - { PROGRAM_OPTION::MT_CRIT_MR_MS_LOW_MASS_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_MS_Low_Mass_Deg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_MS_LOW_MASS_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_MS_Low_Mass_NonDeg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_MS_HIGH_MASS_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_MS_High_Mass_Deg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_MS_HIGH_MASS_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_MS_High_Mass_NonDeg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_GIANT_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_Giant_Deg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_GIANT_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_Giant_NonDeg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_HG_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HG_Deg_Acc", "-", 24, 15}}, - - { PROGRAM_OPTION::MT_CRIT_MR_HG_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HG_NonDeg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_HE_GIANT_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HE_Giant_Deg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_HE_GIANT_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HE_Giant_NonDeg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_HE_HG_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HE_HG_Deg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_HE_HG_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HE_HG_NonDeg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_HE_MS_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HE_MS_Deg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_HE_MS_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HE_MS_NonDeg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_WD_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_WD_Deg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_WD_NONDEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_WD_NonDeg_Acc", "-", 24, 15}}, - - { PROGRAM_OPTION::MT_FRACTION_ACCRETED, { TYPENAME::DOUBLE, "PO_MT_Fraction_Accreted", "-", 24, 15}}, - { PROGRAM_OPTION::MT_JLOSS, { TYPENAME::DOUBLE, "PO_MT_JLoss", "-", 24, 15}}, - { PROGRAM_OPTION::MT_JLOSS_LINEAR_FRACTION_DEGEN, { TYPENAME::DOUBLE, "PO_MT_JLoss_Linear_Frac_Degen", "-", 24, 15}}, - { PROGRAM_OPTION::MT_JLOSS_LINEAR_FRACTION_NON_DEGEN, { TYPENAME::DOUBLE, "PO_MT_JLoss_Linear_Frac_Non_Degen", "-", 24, 15}}, - { PROGRAM_OPTION::MT_REJUVENATION_PRESCRIPTION, { TYPENAME::INT, "PO_MT_Rejuvenation_Prscrptn", "-", 4, 1 }}, - { PROGRAM_OPTION::MT_THERMALLY_LIMITED_VARIATION, { TYPENAME::INT, "PO_MT_Thermally_Lmtd_Variation", "-", 4, 1 }}, - - { PROGRAM_OPTION::MULLER_MANDEL_KICK_MULTIPLIER_BH, { TYPENAME::DOUBLE, "PO_MM_Kick_Multiplier_BH", "-", 24, 15}}, - { PROGRAM_OPTION::MULLER_MANDEL_KICK_MULTIPLIER_NS, { TYPENAME::DOUBLE, "PO_MM_Kick_Multiplier_NS", "-", 24, 15}}, - { PROGRAM_OPTION::MULLER_MANDEL_SIGMA_KICK_BH, { TYPENAME::DOUBLE, "PO_MM_Sigma_Kick_BH", "-", 24, 15}}, - { PROGRAM_OPTION::MULLER_MANDEL_SIGMA_KICK_NS, { TYPENAME::DOUBLE, "PO_MM_Sigma_Kick_NS", "-", 24, 15}}, - - { PROGRAM_OPTION::NEUTRINO_MASS_LOSS_ASSUMPTION_BH, { TYPENAME::INT, "PO_Neutrino_Mass_Loss_Assmptn", "-", 4, 1 }}, - { PROGRAM_OPTION::NEUTRINO_MASS_LOSS_VALUE_BH, { TYPENAME::DOUBLE, "PO_Neutrino_Mass_Loss_Value", "-", 24, 15}}, - - { PROGRAM_OPTION::NS_ACCRETION_IN_CE, { TYPENAME::INT, "PO_NS_ACCRETION_IN_CE", "-", 4, 1 }}, - { PROGRAM_OPTION::NS_EOS, { TYPENAME::INT, "PO_NS_EOS", "-", 4, 1 }}, - - { PROGRAM_OPTION::ORBITAL_PERIOD, { TYPENAME::DOUBLE, "PO_Orbital_Period", "days", 24, 15}}, - { PROGRAM_OPTION::ORBITAL_PERIOD_DISTRIBUTION, { TYPENAME::INT, "PO_Orbital_Period_Dstrbtn", "-", 4, 1 }}, - { PROGRAM_OPTION::ORBITAL_PERIOD_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Orbital_Period_Max", "days", 24, 15}}, - { PROGRAM_OPTION::ORBITAL_PERIOD_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Orbital_Period_Min", "days", 24, 15}}, - - { PROGRAM_OPTION::OVERALL_WIND_MASS_LOSS_MULTIPLIER, { TYPENAME::DOUBLE, "PO_Overall_WindMassLoss_Multipl", "-", 24, 15}}, - - { PROGRAM_OPTION::PISN_LOWER_LIMIT, { TYPENAME::DOUBLE, "PO_PISN_Lower_Limit", "Msol", 24, 15}}, - { PROGRAM_OPTION::PISN_UPPER_LIMIT, { TYPENAME::DOUBLE, "PO_PISN_Upper_Limit", "Msol", 24, 15}}, - - { PROGRAM_OPTION::PPI_LOWER_LIMIT, { TYPENAME::DOUBLE, "PO_PPI_Lower_Limit", "Msol", 24, 15}}, - { PROGRAM_OPTION::PPI_PRESCRIPTION, { TYPENAME::INT, "PO_PPI_Prscrptn", "-", 4, 1 }}, - { PROGRAM_OPTION::PPI_UPPER_LIMIT, { TYPENAME::DOUBLE, "PO_PPI_Upper_Limit", "Msol", 24, 15}}, - { PROGRAM_OPTION::PPI_CO_CORE_SHIFT_HENDRIKS, { TYPENAME::DOUBLE, "PO_PPI_CO_CORE_SHIFT_HENDRIKS", "Msol", 24, 15}}, - - { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DISTRIBUTION, { TYPENAME::INT, "PO_Pulsar_Mag_Field_Dstrbtn", "-", 4, 1 }}, - { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Pulsar_Mag_Field_Dstrbtn_Max", "AU", 24, 15}}, - { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Pulsar_Mag_Field_Dstrbtn_Min", "AU", 24, 15}}, - - { PROGRAM_OPTION::PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION, { TYPENAME::INT, "PO_Pulsar_Spin_Period_Dstrbtn", "-", 4, 1 }}, - { PROGRAM_OPTION::PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Pulsar_Spin_Period_Dstrbtn_Max", "AU", 24, 15}}, - { PROGRAM_OPTION::PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Pulsar_Spin_Period_Dstrbtn_Min", "AU", 24, 15}}, - - { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DECAY_MASS_SCALE, { TYPENAME::DOUBLE, "PO_Pulsar_Mag_Field_Decay_mScale", "Msol", 24, 15}}, - { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DECAY_TIME_SCALE, { TYPENAME::DOUBLE, "PO_Pulsar_Mag_Field_Decay_tScale", "Myr", 24, 15}}, - - { PROGRAM_OPTION::PULSAR_MINIMUM_MAGNETIC_FIELD, { TYPENAME::DOUBLE, "PO_Pulsar_Minimum_Mag_Field", "Gauss", 24, 15}}, - - { PROGRAM_OPTION::QCRIT_PRESCRIPTION, { TYPENAME::INT, "PO_qCrit_Prescription", "-", 4, 1 }}, - - { PROGRAM_OPTION::RANDOM_SEED, { TYPENAME::ULONGINT, "PO_SEED(OPTION)", "-", 12, 1 }}, - { PROGRAM_OPTION::RANDOM_SEED_CMDLINE, { TYPENAME::ULONGINT, "PO_SEED(CMDLINE)", "-", 12, 1 }}, - - { PROGRAM_OPTION::REMNANT_MASS_PRESCRIPTION, { TYPENAME::INT, "PO_Remnant_Mass_Prscrptn", "-", 4, 1 }}, - - { PROGRAM_OPTION::RESPONSE_TO_SPIN_UP, { TYPENAME::INT, "PO_Response_To_Spin_Up", "-", 4, 1 }}, - - { PROGRAM_OPTION::ROCKET_KICK_MAGNITUDE_1, { TYPENAME::DOUBLE, "PO_Rocket_Kick_Magnitude(1)", "kms^-1", 24, 15}}, - { PROGRAM_OPTION::ROCKET_KICK_MAGNITUDE_2, { TYPENAME::DOUBLE, "PO_Rocket_Kick_Magnitude(2)", "kms^-1", 24, 15}}, - { PROGRAM_OPTION::ROCKET_KICK_PHI_1, { TYPENAME::DOUBLE, "PO_Rocket_Kick_Phi(1)", "-", 24, 15}}, - { PROGRAM_OPTION::ROCKET_KICK_PHI_2, { TYPENAME::DOUBLE, "PO_Rocket_Kick_Phi(2)", "-", 24, 15}}, - { PROGRAM_OPTION::ROCKET_KICK_THETA_1, { TYPENAME::DOUBLE, "PO_Rocket_Kick_Theta(1)", "-", 24, 15}}, - { PROGRAM_OPTION::ROCKET_KICK_THETA_2, { TYPENAME::DOUBLE, "PO_Rocket_Kick_Theta(2)", "-", 24, 15}}, - - { PROGRAM_OPTION::ROTATIONAL_VELOCITY_DISTRIBUTION, { TYPENAME::INT, "PO_Rotational_Velocity_Dstrbtn", "-", 4, 1 }}, - { PROGRAM_OPTION::ROTATIONAL_FREQUENCY, { TYPENAME::DOUBLE, "PO_Rotational_Frequency", "Hz", 24, 15}}, - { PROGRAM_OPTION::ROTATIONAL_FREQUENCY_1, { TYPENAME::DOUBLE, "PO_Rotational_Frequency(1)", "Hz", 24, 15}}, - { PROGRAM_OPTION::ROTATIONAL_FREQUENCY_2, { TYPENAME::DOUBLE, "PO_Rotational_Frequency(2)", "Hz", 24, 15}}, - - { PROGRAM_OPTION::SCALE_CHE_MASS_LOSS_SURF_HE_ABUNDANCE, { TYPENAME::BOOL, "PO_Scale_CHE_Mass_Loss_Surf_He_Abundance", "flag", 0, 0}}, - { PROGRAM_OPTION::SCALE_TERMINAL_WIND_VEL_METALLICITY_POWER, { TYPENAME::DOUBLE, "PO_Scale_Terminal_Wind_Vel_Metallicity_Power", "-", 24, 15}}, - { PROGRAM_OPTION::SEMI_MAJOR_AXIS, { TYPENAME::DOUBLE, "PO_Semi-Major_Axis", "AU", 24, 15}}, - { PROGRAM_OPTION::SEMI_MAJOR_AXIS_DISTRIBUTION, { TYPENAME::INT, "PO_Semi-Major_Axis_Dstrbtn", "-", 4, 1 }}, - { PROGRAM_OPTION::SEMI_MAJOR_AXIS_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Semi-Major_Axis_Dstrbtn_Max", "AU", 24, 15}}, - { PROGRAM_OPTION::SEMI_MAJOR_AXIS_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Semi-Major_Axis_Dstrbtn_Min", "AU", 24, 15}}, - - { PROGRAM_OPTION::STELLAR_ZETA_PRESCRIPTION, { TYPENAME::INT, "PO_Stellar_Zeta_Prscrptn", "-", 4, 1 }}, - - { PROGRAM_OPTION::TIDES_PRESCRIPTION, { TYPENAME::INT, "PO_Tides_Prscrptn", "-", 4, 1 }}, - - { PROGRAM_OPTION::USSN_KICKS_OVERRIDE_MANDEL_MULLER, { TYPENAME::BOOL, "PO_USSN_Kicks_Override_Mandel_Muller", "flag", 0, 0}}, - - { PROGRAM_OPTION::WR_FACTOR, { TYPENAME::DOUBLE, "PO_WR_Factor", "-", 24, 15}}, - - { PROGRAM_OPTION::ZETA_ADIABATIC_ARBITRARY, { TYPENAME::DOUBLE, "PO_Zeta_Adiabatic_Arbitrary", "-", 24, 15}}, - { PROGRAM_OPTION::ZETA_MS, { TYPENAME::DOUBLE, "PO_Zeta_Main_Sequence", "-", 24, 15}}, - { PROGRAM_OPTION::ZETA_RADIATIVE_ENVELOPE_GIANT, { TYPENAME::DOUBLE, "PO_Zeta_Radiative_Envelope_Giant", "-", 24, 15}} -}; - - -// enum class LOGFILE -// Symbolic names for logfiles -enum class LOGFILE: int { - NONE, - - DEBUG_LOG, - ERROR_LOG, - - BSE_COMMON_ENVELOPES, - BSE_DETAILED_OUTPUT, - BSE_DOUBLE_COMPACT_OBJECTS, - BSE_PULSAR_EVOLUTION, - BSE_RLOF_PARAMETERS, - BSE_SUPERNOVAE, - BSE_SWITCH_LOG, - BSE_SYSTEM_SNAPSHOT_LOG, - BSE_SYSTEM_PARAMETERS, - - SSE_DETAILED_OUTPUT, - SSE_PULSAR_EVOLUTION, - SSE_SUPERNOVAE, - SSE_SWITCH_LOG, - SSE_SYSTEM_SNAPSHOT_LOG, - SSE_SYSTEM_PARAMETERS -}; - - -// Logfile record types -// Note all enum classes for log record types start at 1 (and *must* start at 1) -typedef unsigned int LOGRECORDTYPE; - -enum class CE_RECORD_TYPE: unsigned int { // BSE_COMMON_ENVELOPES file record type - DEFAULT = 1 // 1 - default BSE_COMMON_ENVELOPES file record type -}; - -enum class DCO_RECORD_TYPE: unsigned int { // BSE_DOUBLE_COMPACT_OBJECTS file record type - DEFAULT = 1 // 1 - default BSE_DOUBLE_COMPACT_OBJECTS file record type -}; - -enum class BSE_PULSAR_RECORD_TYPE: unsigned int { // BSE_PULSAR_EVOLUTION file record type - PRE_SN = 1, // 1 - record was logged immediately prior to a supernova event - POST_SN, // 2 - record was logged immediately following a supernova event - POST_BINARY_TIMESTEP // 3 - record was logged immediately following binary timestep (i.e. the evolution of the binary system for a single timestep) -}; - -enum class RLOF_RECORD_TYPE: unsigned int { // BSE_RLOF_PARAMETERS file record type - DEFAULT = 1 // 1 - default BSE_RLOF_PARAMETERS file record type -}; - -enum class BSE_DETAILED_RECORD_TYPE: unsigned int { // BSE_DETAILED_OUTPUT file record type - INITIAL_STATE = 1, // 1 - record describes the initial state of the binary - POST_STELLAR_TIMESTEP, // 2 - record was logged immediately following stellar timestep (i.e. the evolution of the constituent stars for a single timestep) - POST_BINARY_TIMESTEP, // 3 - record was logged immediately following binary timestep (i.e. the evolution of the binary system for a single timestep) - TIMESTEP_COMPLETED, // 4 - record was logged immediately following the completion of the timestep (after all changes to the binary and components) - FINAL_STATE, // 5 - record describes the final state of the binary - STELLAR_TYPE_CHANGE_DURING_CEE, // 6 - record was logged immediately following a stellar type change during a common envelope event - STELLAR_TYPE_CHANGE_DURING_MT, // 7 - record was logged immediately following a stellar type change during a mass transfer event - STELLAR_TYPE_CHANGE_DURING_MASS_RESOLUTION, // 8 - record was logged immediately following a stellar type change during mass resolution - STELLAR_TYPE_CHANGE_DURING_CHE_EQUILIBRATION, // 9 - record was logged immediately following a stellar type change during mass equilibration for CHE - POST_MT, // 10 - record was logged immediately following a mass transfer event - POST_WINDS, // 11 - record was logged immediately following winds mass loss - POST_CEE, // 12 - record was logged immediately following a common envelope event - POST_SN, // 13 - record was logged immediately following a supernova event - POST_MASS_RESOLUTION, // 14 - record was logged immediately following mass resolution (i.e. after winds mass loss & mass transfer complete) - POST_MASS_RESOLUTION_MERGER, // 15 - record was logged immediately following a merger after mass resolution - PRE_STELLAR_TIMESTEP // 16 - record was logged immediately prior to stellar timestep (i.e. the evolution of the constituent stars for a single timestep) -}; - -enum class SSE_DETAILED_RECORD_TYPE: unsigned int { // SSE_DETAILED_OUTPUT file record type - INITIAL_STATE = 1, // 1 - record describes the initial state of the star - PRE_MASS_LOSS, // 2 - record was logged after timestep taken, but before mass loss resolution - POST_MASS_LOSS, // 3 - record was logged after after mass loss resolution - TIMESTEP_COMPLETED, // 4 - record was logged immediately following the completion of the timestep (after all changes to the star) - FINAL_STATE // 5 - record describes the final state of the star -}; - -enum class SSE_PULSAR_RECORD_TYPE: unsigned int { // SSE_PULSAR_EVOLUTION file record type - PRE_SN = 1, // 1 - record was logged immediately prior to a supernova event - POST_SN, // 2 - record was logged immediately following a supernova event - TIMESTEP_COMPLETED // 3 - record was logged immediately following the completion of the timestep (after all changes to the star) -}; - -enum class BSE_SN_RECORD_TYPE: unsigned int { // BSE_SUPERNOVAE file record type - DEFAULT = 1 // 1 - default BSE_SUPERNOVAE file record type -}; - -enum class SSE_SN_RECORD_TYPE: unsigned int { // SSE_SUPERNOVAE file record type - DEFAULT = 1 // 1 - default SSE_SUPERNOVAE file record type -}; - -enum class BSE_SYSPARMS_RECORD_TYPE: unsigned int { // BSE_SYSTEM_PARAMETERS file record type - DEFAULT = 1 // 1 - default BSE_SYSTEM_PARAMETERS file record type -}; - -enum class SSE_SYSPARMS_RECORD_TYPE: unsigned int { // SSE_SYSTEM_PARAMETERS file record type - DEFAULT = 1 // 1 - default SSE_SYSTEM_PARAMETERS file record type -}; - -enum class BSE_SYSTEM_SNAPSHOT_RECORD_TYPE: unsigned int { // BSE_SYSTEM_SNAPSHOT_LOG file record type - DEFAULT = 1 // 1 - default BSE_SYSTEM_SNAPSHOT_LOG file record type -}; - -enum class SSE_SYSTEM_SNAPSHOT_RECORD_TYPE: unsigned int { // SSE_SYSTEM_SNAPSHOT_LOG file record type - DEFAULT = 1 // 1 - default SSE_SYSTEM_SNAPSHOT_LOG file record type -}; - - -// enum class RUN_DETAILS_REC -// symbolic names for RUN DETAILS record definitions -// For preamble/stats columns only -// Program options columns are dynamic -// these must be left as default values - their order can be changed with the caveat that the sentinel "SENTINEL" must stay at the end -// it's a bit of a hack, but it lets me iterate over the enum -enum class RUN_DETAILS_COLUMNS: int { COMPAS_VERSION, - RUN_START, - RUN_END, - OBJECTS_REQUESTED, - OBJECTS_CREATED, - CLOCK_TIME, - WALL_TIME, - ACTUAL_RANDOM_SEED, - SENTINEL }; - -const COMPASUnorderedMap> RUN_DETAILS_DETAIL = { - { RUN_DETAILS_COLUMNS::COMPAS_VERSION, { "COMPAS-Version", TYPENAME::STRING, 8 }}, - { RUN_DETAILS_COLUMNS::RUN_START, { "Run-Start", TYPENAME::STRING, 24 }}, - { RUN_DETAILS_COLUMNS::RUN_END, { "Run-End", TYPENAME::STRING, 24 }}, - { RUN_DETAILS_COLUMNS::OBJECTS_REQUESTED, { "Objects-Requested", TYPENAME::INT, 0 }}, - { RUN_DETAILS_COLUMNS::OBJECTS_CREATED, { "Objects-Created", TYPENAME::INT, 0 }}, - { RUN_DETAILS_COLUMNS::CLOCK_TIME, { "Clock-Time", TYPENAME::DOUBLE, 0 }}, - { RUN_DETAILS_COLUMNS::WALL_TIME, { "Wall-Time", TYPENAME::STRING, 10 }}, - { RUN_DETAILS_COLUMNS::ACTUAL_RANDOM_SEED, { "Actual-Random-Seed", TYPENAME::ULONGINT, 0 }} -}; - - -// BSE output record definitions - -// BSE_COMMON_ENVELOPES_REC -// -// Default record definition for the Common Envelopes logfile -// -const ANY_PROPERTY_VECTOR BSE_COMMON_ENVELOPES_REC = { - BINARY_PROPERTY::RANDOM_SEED, - BINARY_PROPERTY::TIME, - STAR_1_PROPERTY::LAMBDA_AT_COMMON_ENVELOPE, - STAR_2_PROPERTY::LAMBDA_AT_COMMON_ENVELOPE, - STAR_1_PROPERTY::BINDING_ENERGY_PRE_COMMON_ENVELOPE, - STAR_2_PROPERTY::BINDING_ENERGY_PRE_COMMON_ENVELOPE, - BINARY_PROPERTY::ECCENTRICITY_PRE_COMMON_ENVELOPE, - BINARY_PROPERTY::ECCENTRICITY_POST_COMMON_ENVELOPE, - BINARY_PROPERTY::SEMI_MAJOR_AXIS_PRE_COMMON_ENVELOPE, - BINARY_PROPERTY::SEMI_MAJOR_AXIS_POST_COMMON_ENVELOPE, - BINARY_PROPERTY::SEMI_MAJOR_AXIS_POST_STAGE_1_CE, - BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1_PRE_COMMON_ENVELOPE, - BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1_POST_COMMON_ENVELOPE, - BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2_PRE_COMMON_ENVELOPE, - BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2_POST_COMMON_ENVELOPE, - BINARY_PROPERTY::MASS_1_PRE_COMMON_ENVELOPE, - BINARY_PROPERTY::MASS_1_POST_COMMON_ENVELOPE, - BINARY_PROPERTY::MASS_ENV_1, - BINARY_PROPERTY::RADIUS_1_PRE_COMMON_ENVELOPE, - BINARY_PROPERTY::RADIUS_1_POST_COMMON_ENVELOPE, - BINARY_PROPERTY::STELLAR_TYPE_1_PRE_COMMON_ENVELOPE, - STAR_1_PROPERTY::STELLAR_TYPE, - STAR_1_PROPERTY::LAMBDA_CONVECTIVE_ENVELOPE, - STAR_1_PROPERTY::LAMBDA_FIXED, - STAR_1_PROPERTY::LAMBDA_NANJING, - STAR_1_PROPERTY::LAMBDA_LOVERIDGE, - STAR_1_PROPERTY::LAMBDA_LOVERIDGE_WINDS, - STAR_1_PROPERTY::LAMBDA_KRUCKOW, - STAR_1_PROPERTY::BINDING_ENERGY_FIXED, - STAR_1_PROPERTY::BINDING_ENERGY_NANJING, - STAR_1_PROPERTY::BINDING_ENERGY_LOVERIDGE, - STAR_1_PROPERTY::BINDING_ENERGY_LOVERIDGE_WINDS, - STAR_1_PROPERTY::BINDING_ENERGY_KRUCKOW, - STAR_1_PROPERTY::CONVECTIVE_ENV_MASS, - BINARY_PROPERTY::MASS_2_PRE_COMMON_ENVELOPE, - BINARY_PROPERTY::MASS_2_POST_COMMON_ENVELOPE, - BINARY_PROPERTY::MASS_ENV_2, - BINARY_PROPERTY::RADIUS_2_PRE_COMMON_ENVELOPE, - BINARY_PROPERTY::RADIUS_2_POST_COMMON_ENVELOPE, - BINARY_PROPERTY::STELLAR_TYPE_2_PRE_COMMON_ENVELOPE, - STAR_2_PROPERTY::STELLAR_TYPE, - STAR_2_PROPERTY::LAMBDA_CONVECTIVE_ENVELOPE, - STAR_2_PROPERTY::LAMBDA_FIXED, - STAR_2_PROPERTY::LAMBDA_NANJING, - STAR_2_PROPERTY::LAMBDA_LOVERIDGE, - STAR_2_PROPERTY::LAMBDA_LOVERIDGE_WINDS, - STAR_2_PROPERTY::LAMBDA_KRUCKOW, - STAR_2_PROPERTY::BINDING_ENERGY_FIXED, - STAR_2_PROPERTY::BINDING_ENERGY_NANJING, - STAR_2_PROPERTY::BINDING_ENERGY_LOVERIDGE, - STAR_2_PROPERTY::BINDING_ENERGY_LOVERIDGE_WINDS, - STAR_2_PROPERTY::BINDING_ENERGY_KRUCKOW, - STAR_2_PROPERTY::CONVECTIVE_ENV_MASS, - BINARY_PROPERTY::MASS_TRANSFER_TRACKER_HISTORY, - BINARY_PROPERTY::STELLAR_MERGER, - BINARY_PROPERTY::OPTIMISTIC_COMMON_ENVELOPE, - BINARY_PROPERTY::COMMON_ENVELOPE_EVENT_COUNT, - BINARY_PROPERTY::DOUBLE_CORE_COMMON_ENVELOPE, - STAR_1_PROPERTY::IS_RLOF, - STAR_1_PROPERTY::LUMINOSITY_PRE_COMMON_ENVELOPE, - STAR_1_PROPERTY::TEMPERATURE_PRE_COMMON_ENVELOPE, - STAR_1_PROPERTY::DYNAMICAL_TIMESCALE_PRE_COMMON_ENVELOPE, - STAR_1_PROPERTY::THERMAL_TIMESCALE_PRE_COMMON_ENVELOPE, - STAR_2_PROPERTY::IS_RLOF, - STAR_2_PROPERTY::LUMINOSITY_PRE_COMMON_ENVELOPE, - STAR_2_PROPERTY::TEMPERATURE_PRE_COMMON_ENVELOPE, - STAR_2_PROPERTY::DYNAMICAL_TIMESCALE_PRE_COMMON_ENVELOPE, - STAR_2_PROPERTY::THERMAL_TIMESCALE_PRE_COMMON_ENVELOPE, - BINARY_PROPERTY::ZETA_STAR, - BINARY_PROPERTY::ZETA_LOBE, - BINARY_PROPERTY::SYNCHRONIZATION_TIMESCALE_1, - BINARY_PROPERTY::SYNCHRONIZATION_TIMESCALE_2, - BINARY_PROPERTY::CIRCULARIZATION_TIMESCALE, - STAR_1_PROPERTY::RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE, - STAR_2_PROPERTY::RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE, - BINARY_PROPERTY::IMMEDIATE_RLOF_POST_COMMON_ENVELOPE, - BINARY_PROPERTY::SIMULTANEOUS_RLOF -}; - - -// BSE_DETAILED_OUTPUT_REC -// -// Default record definition for the BSE Detailed Output logfile -// -const ANY_PROPERTY_VECTOR BSE_DETAILED_OUTPUT_REC = { - BINARY_PROPERTY::RANDOM_SEED, - BINARY_PROPERTY::DT, - BINARY_PROPERTY::TIME, - BINARY_PROPERTY::UNBOUND, - BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, - BINARY_PROPERTY::ECCENTRICITY, - STAR_1_PROPERTY::MZAMS, - STAR_2_PROPERTY::MZAMS, - STAR_1_PROPERTY::MASS_0, - STAR_2_PROPERTY::MASS_0, - STAR_1_PROPERTY::MASS, - STAR_2_PROPERTY::MASS, - STAR_1_PROPERTY::ENV_MASS, - STAR_2_PROPERTY::ENV_MASS, - STAR_1_PROPERTY::CORE_MASS, - STAR_2_PROPERTY::CORE_MASS, - STAR_1_PROPERTY::HE_CORE_MASS, - STAR_2_PROPERTY::HE_CORE_MASS, - STAR_1_PROPERTY::CO_CORE_MASS, - STAR_2_PROPERTY::CO_CORE_MASS, - STAR_1_PROPERTY::RADIUS, - STAR_2_PROPERTY::RADIUS, - BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1, - BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2, - STAR_1_PROPERTY::OMEGA, - STAR_2_PROPERTY::OMEGA, - STAR_1_PROPERTY::OMEGA_BREAK, - STAR_2_PROPERTY::OMEGA_BREAK, - STAR_1_PROPERTY::INITIAL_STELLAR_TYPE, - STAR_2_PROPERTY::INITIAL_STELLAR_TYPE, - STAR_1_PROPERTY::STELLAR_TYPE, - STAR_2_PROPERTY::STELLAR_TYPE, - STAR_1_PROPERTY::AGE, - STAR_2_PROPERTY::AGE, - STAR_1_PROPERTY::LUMINOSITY, - STAR_2_PROPERTY::LUMINOSITY, - STAR_1_PROPERTY::TEMPERATURE, - STAR_2_PROPERTY::TEMPERATURE, - STAR_1_PROPERTY::ANGULAR_MOMENTUM, - STAR_2_PROPERTY::ANGULAR_MOMENTUM, - STAR_1_PROPERTY::DYNAMICAL_TIMESCALE, - STAR_2_PROPERTY::DYNAMICAL_TIMESCALE, - STAR_1_PROPERTY::THERMAL_TIMESCALE, - STAR_2_PROPERTY::THERMAL_TIMESCALE, - STAR_1_PROPERTY::ZETA_SOBERMAN, - STAR_2_PROPERTY::ZETA_SOBERMAN, - STAR_1_PROPERTY::ZETA_SOBERMAN_HE, - STAR_2_PROPERTY::ZETA_SOBERMAN_HE, - STAR_1_PROPERTY::ZETA_HURLEY, - STAR_2_PROPERTY::ZETA_HURLEY, - STAR_1_PROPERTY::ZETA_HURLEY_HE, - STAR_2_PROPERTY::ZETA_HURLEY_HE, - STAR_1_PROPERTY::MASS_LOSS_DIFF, - STAR_2_PROPERTY::MASS_LOSS_DIFF, - STAR_1_PROPERTY::DOMINANT_MASS_LOSS_RATE, - STAR_2_PROPERTY::DOMINANT_MASS_LOSS_RATE, - STAR_1_PROPERTY::MASS_TRANSFER_DIFF, - STAR_2_PROPERTY::MASS_TRANSFER_DIFF, - STAR_1_PROPERTY::MDOT, - STAR_2_PROPERTY::MDOT, - BINARY_PROPERTY::TOTAL_ANGULAR_MOMENTUM, - BINARY_PROPERTY::TOTAL_ENERGY, - STAR_1_PROPERTY::METALLICITY, - STAR_2_PROPERTY::METALLICITY, - BINARY_PROPERTY::MASS_TRANSFER_TRACKER_HISTORY, - STAR_1_PROPERTY::PULSAR_MAGNETIC_FIELD, - STAR_2_PROPERTY::PULSAR_MAGNETIC_FIELD, - STAR_1_PROPERTY::PULSAR_SPIN_PERIOD, - STAR_2_PROPERTY::PULSAR_SPIN_PERIOD, - STAR_1_PROPERTY::PULSAR_SPIN_DOWN_RATE, - STAR_2_PROPERTY::PULSAR_SPIN_DOWN_RATE, - STAR_1_PROPERTY::PULSAR_BIRTH_PERIOD, - STAR_2_PROPERTY::PULSAR_BIRTH_PERIOD, - STAR_1_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, - STAR_2_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, - STAR_1_PROPERTY::RADIAL_EXPANSION_TIMESCALE, - STAR_2_PROPERTY::RADIAL_EXPANSION_TIMESCALE, - BINARY_PROPERTY::RLOF_MASS_LOSS_RATE, - BINARY_PROPERTY::RLOF_MASS_TRANSFER_TIMESCALE, - BINARY_PROPERTY::RLOF_ACCRETION_EFFICIENCY -}; - - -// BSE_DOUBLE_COMPACT_OBJECT_REC -// -// Default record definition for the Double Compact Objects logfile -// -const ANY_PROPERTY_VECTOR BSE_DOUBLE_COMPACT_OBJECTS_REC = { - BINARY_PROPERTY::RANDOM_SEED, - BINARY_PROPERTY::SEMI_MAJOR_AXIS_AT_DCO_FORMATION, - BINARY_PROPERTY::ECCENTRICITY_AT_DCO_FORMATION, - STAR_1_PROPERTY::MASS, - STAR_1_PROPERTY::STELLAR_TYPE, - STAR_2_PROPERTY::MASS, - STAR_2_PROPERTY::STELLAR_TYPE, - BINARY_PROPERTY::TIME_TO_COALESCENCE, - BINARY_PROPERTY::TIME, - BINARY_PROPERTY::MERGES_IN_HUBBLE_TIME, - STAR_1_PROPERTY::RECYCLED_NEUTRON_STAR, - STAR_2_PROPERTY::RECYCLED_NEUTRON_STAR -}; - - -// BSE_PULSAR_EVOLUTION_REC -// -// Default record definition for the BSE Pulsar Evolution logfile -// -const ANY_PROPERTY_VECTOR BSE_PULSAR_EVOLUTION_REC = { - BINARY_PROPERTY::RANDOM_SEED, - STAR_1_PROPERTY::MASS, - STAR_2_PROPERTY::MASS, - STAR_1_PROPERTY::STELLAR_TYPE, - STAR_2_PROPERTY::STELLAR_TYPE, - BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, - BINARY_PROPERTY::MASS_TRANSFER_TRACKER_HISTORY, - STAR_1_PROPERTY::PULSAR_MAGNETIC_FIELD, - STAR_2_PROPERTY::PULSAR_MAGNETIC_FIELD, - STAR_1_PROPERTY::PULSAR_SPIN_PERIOD, - STAR_2_PROPERTY::PULSAR_SPIN_PERIOD, - STAR_1_PROPERTY::PULSAR_SPIN_DOWN_RATE, - STAR_2_PROPERTY::PULSAR_SPIN_DOWN_RATE, - STAR_1_PROPERTY::PULSAR_BIRTH_PERIOD, - STAR_2_PROPERTY::PULSAR_BIRTH_PERIOD, - STAR_1_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, - STAR_2_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, - BINARY_PROPERTY::TIME, - BINARY_PROPERTY::DT -}; - - -// BSE_RLOF_PARAMETERS_REC -// -// Default record definition for the RLOF Parameters logfile -// -const ANY_PROPERTY_VECTOR BSE_RLOF_PARAMETERS_REC = { - BINARY_PROPERTY::RANDOM_SEED, - BINARY_PROPERTY::RLOF_TIME_POST_MT, - BINARY_PROPERTY::RLOF_TIME_PRE_MT, - BINARY_PROPERTY::RLOF_POST_MT_STAR1_MASS, - BINARY_PROPERTY::RLOF_POST_MT_STAR2_MASS, - BINARY_PROPERTY::RLOF_POST_MT_STAR1_RADIUS, - BINARY_PROPERTY::RLOF_POST_MT_STAR2_RADIUS, - BINARY_PROPERTY::RLOF_POST_MT_STAR1_STELLAR_TYPE, - BINARY_PROPERTY::RLOF_POST_MT_STAR2_STELLAR_TYPE, - BINARY_PROPERTY::RLOF_POST_MT_SEMI_MAJOR_AXIS, - BINARY_PROPERTY::RLOF_POST_MT_ECCENTRICITY, - BINARY_PROPERTY::RLOF_POST_MT_EVENT_COUNTER, - BINARY_PROPERTY::RLOF_POST_MT_STAR1_RLOF, - BINARY_PROPERTY::RLOF_POST_MT_STAR2_RLOF, - BINARY_PROPERTY::STELLAR_MERGER, - BINARY_PROPERTY::RLOF_POST_MT_COMMON_ENVELOPE, - BINARY_PROPERTY::RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, - BINARY_PROPERTY::RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, - BINARY_PROPERTY::RLOF_PRE_MT_STAR1_MASS, - BINARY_PROPERTY::RLOF_PRE_MT_STAR2_MASS, - BINARY_PROPERTY::RLOF_PRE_MT_STAR1_RADIUS, - BINARY_PROPERTY::RLOF_PRE_MT_STAR2_RADIUS, - BINARY_PROPERTY::RLOF_PRE_MT_STAR1_STELLAR_TYPE, - BINARY_PROPERTY::RLOF_PRE_MT_STAR2_STELLAR_TYPE, - BINARY_PROPERTY::RLOF_PRE_MT_SEMI_MAJOR_AXIS, - BINARY_PROPERTY::RLOF_PRE_MT_ECCENTRICITY, - BINARY_PROPERTY::RLOF_PRE_MT_STAR1_RLOF, - BINARY_PROPERTY::RLOF_PRE_MT_STAR2_RLOF, - BINARY_PROPERTY::RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, - BINARY_PROPERTY::RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, - BINARY_PROPERTY::RLOF_ACCRETION_EFFICIENCY, - BINARY_PROPERTY::RLOF_MASS_LOSS_RATE, - BINARY_PROPERTY::RLOF_MASS_TRANSFER_TIMESCALE, - STAR_1_PROPERTY::ZETA_SOBERMAN, - STAR_1_PROPERTY::ZETA_SOBERMAN_HE, - STAR_1_PROPERTY::ZETA_HURLEY, - STAR_1_PROPERTY::ZETA_HURLEY_HE, - STAR_2_PROPERTY::ZETA_SOBERMAN, - STAR_2_PROPERTY::ZETA_SOBERMAN_HE, - STAR_2_PROPERTY::ZETA_HURLEY, - STAR_2_PROPERTY::ZETA_HURLEY_HE -}; - - -// BSE_SUPERNOVAE_REC -// -// Default record definition for the BSE Supernovae logfile -// -const ANY_PROPERTY_VECTOR BSE_SUPERNOVAE_REC = { - BINARY_PROPERTY::RANDOM_SEED, - SUPERNOVA_PROPERTY::DRAWN_KICK_MAGNITUDE, - SUPERNOVA_PROPERTY::KICK_MAGNITUDE, - SUPERNOVA_PROPERTY::FALLBACK_FRACTION, - BINARY_PROPERTY::ORBITAL_VELOCITY_PRE_SUPERNOVA, - SUPERNOVA_PROPERTY::MEAN_ANOMALY, - SUPERNOVA_PROPERTY::SUPERNOVA_THETA, - SUPERNOVA_PROPERTY::SUPERNOVA_PHI, - SUPERNOVA_PROPERTY::SN_TYPE, - BINARY_PROPERTY::ECCENTRICITY_PRE_SUPERNOVA, - BINARY_PROPERTY::ECCENTRICITY, - BINARY_PROPERTY::SEMI_MAJOR_AXIS_PRE_SUPERNOVA_RSOL, - BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, - BINARY_PROPERTY::TIME, - BINARY_PROPERTY::SUPERNOVA_STATE, - BINARY_PROPERTY::UNBOUND, - COMPANION_PROPERTY::STELLAR_TYPE, - SUPERNOVA_PROPERTY::STELLAR_TYPE, - SUPERNOVA_PROPERTY::STELLAR_TYPE_PREV, - COMPANION_PROPERTY::MASS, - SUPERNOVA_PROPERTY::TOTAL_MASS_AT_COMPACT_OBJECT_FORMATION, - SUPERNOVA_PROPERTY::TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, - SUPERNOVA_PROPERTY::CORE_MASS_AT_COMPACT_OBJECT_FORMATION, - SUPERNOVA_PROPERTY::CO_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, - SUPERNOVA_PROPERTY::HE_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, - SUPERNOVA_PROPERTY::CORE_RADIUS_AT_COMPACT_OBJECT_FORMATION, - SUPERNOVA_PROPERTY::MASS, - SUPERNOVA_PROPERTY::EXPERIENCED_RLOF, - SUPERNOVA_PROPERTY::MASS_TRANSFER_DONOR_HISTORY, - SUPERNOVA_PROPERTY::SPEED, - COMPANION_PROPERTY::SPEED, - BINARY_PROPERTY::SYSTEMIC_SPEED, - SUPERNOVA_PROPERTY::IS_HYDROGEN_POOR, - BINARY_PROPERTY::SUPERNOVA_ORBIT_INCLINATION_ANGLE, - BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_X, - BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_Y, - BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_Z, - BINARY_PROPERTY::SYSTEMIC_VELOCITY_X, - BINARY_PROPERTY::SYSTEMIC_VELOCITY_Y, - BINARY_PROPERTY::SYSTEMIC_VELOCITY_Z, -}; - - -// BSE_SWITCH_LOG -// -// Default record definition for the BSE Switch Log logfile -// -const ANY_PROPERTY_VECTOR BSE_SWITCH_LOG_REC = { - BINARY_PROPERTY::RANDOM_SEED, - BINARY_PROPERTY::TIME, - BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, - BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1, - BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2, - STAR_1_PROPERTY::MASS, - STAR_2_PROPERTY::MASS, - STAR_1_PROPERTY::STELLAR_TYPE, - STAR_2_PROPERTY::STELLAR_TYPE, - STAR_1_PROPERTY::RADIUS, - STAR_2_PROPERTY::RADIUS -}; - - -// BSE_SYSTEM_PARAMETERS_REC -// -// Default record definition for the System Parameters logfile -// -const ANY_PROPERTY_VECTOR BSE_SYSTEM_PARAMETERS_REC = { - BINARY_PROPERTY::RANDOM_SEED, - STAR_1_PROPERTY::MZAMS, - STAR_2_PROPERTY::MZAMS, - BINARY_PROPERTY::SEMI_MAJOR_AXIS_INITIAL, - BINARY_PROPERTY::ECCENTRICITY_INITIAL, - STAR_1_PROPERTY::SUPERNOVA_KICK_MAGNITUDE_RANDOM_NUMBER, - STAR_2_PROPERTY::SUPERNOVA_KICK_MAGNITUDE_RANDOM_NUMBER, - STAR_1_PROPERTY::OMEGA_ZAMS, - STAR_2_PROPERTY::OMEGA_ZAMS, - PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS, - PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH, - PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN, - PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN, - PROGRAM_OPTION::LBV_FACTOR, - PROGRAM_OPTION::WR_FACTOR, - PROGRAM_OPTION::COMMON_ENVELOPE_ALPHA, - PROGRAM_OPTION::COMMON_ENVELOPE_FORMALISM, - STAR_1_PROPERTY::METALLICITY, - STAR_2_PROPERTY::METALLICITY, - BINARY_PROPERTY::UNBOUND, - BINARY_PROPERTY::STELLAR_MERGER, - BINARY_PROPERTY::STELLAR_MERGER_AT_BIRTH, - BINARY_PROPERTY::MASSES_EQUILIBRATED_AT_BIRTH, - STAR_1_PROPERTY::INITIAL_STELLAR_TYPE, - STAR_1_PROPERTY::STELLAR_TYPE, - STAR_2_PROPERTY::INITIAL_STELLAR_TYPE, - STAR_2_PROPERTY::STELLAR_TYPE, - STAR_1_PROPERTY::CHEMICALLY_HOMOGENEOUS_MAIN_SEQUENCE, - STAR_2_PROPERTY::CHEMICALLY_HOMOGENEOUS_MAIN_SEQUENCE, - BINARY_PROPERTY::EVOL_STATUS, - BINARY_PROPERTY::ERROR, - PROGRAM_OPTION::NOTES -}; - - -// BSE_SYSTEM_SNAPSHOT_LOG_REC -// -// Default record definition for the BSE System Snapshot logfile -// -const ANY_PROPERTY_VECTOR BSE_SYSTEM_SNAPSHOT_LOG_REC = { - BINARY_PROPERTY::RANDOM_SEED, - BINARY_PROPERTY::DT, - BINARY_PROPERTY::TIME, - BINARY_PROPERTY::UNBOUND, - BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, - BINARY_PROPERTY::ECCENTRICITY, - STAR_1_PROPERTY::MZAMS, - STAR_2_PROPERTY::MZAMS, - STAR_1_PROPERTY::MASS_0, - STAR_2_PROPERTY::MASS_0, - STAR_1_PROPERTY::MASS, - STAR_2_PROPERTY::MASS, - STAR_1_PROPERTY::ENV_MASS, - STAR_2_PROPERTY::ENV_MASS, - STAR_1_PROPERTY::CORE_MASS, - STAR_2_PROPERTY::CORE_MASS, - STAR_1_PROPERTY::HE_CORE_MASS, - STAR_2_PROPERTY::HE_CORE_MASS, - STAR_1_PROPERTY::CO_CORE_MASS, - STAR_2_PROPERTY::CO_CORE_MASS, - STAR_1_PROPERTY::RADIUS, - STAR_2_PROPERTY::RADIUS, - BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1, - BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2, - STAR_1_PROPERTY::OMEGA, - STAR_2_PROPERTY::OMEGA, - STAR_1_PROPERTY::OMEGA_BREAK, - STAR_2_PROPERTY::OMEGA_BREAK, - STAR_1_PROPERTY::INITIAL_STELLAR_TYPE, - STAR_2_PROPERTY::INITIAL_STELLAR_TYPE, - STAR_1_PROPERTY::STELLAR_TYPE, - STAR_2_PROPERTY::STELLAR_TYPE, - STAR_1_PROPERTY::AGE, - STAR_2_PROPERTY::AGE, - STAR_1_PROPERTY::LUMINOSITY, - STAR_2_PROPERTY::LUMINOSITY, - STAR_1_PROPERTY::TEMPERATURE, - STAR_2_PROPERTY::TEMPERATURE, - STAR_1_PROPERTY::ANGULAR_MOMENTUM, - STAR_2_PROPERTY::ANGULAR_MOMENTUM, - STAR_1_PROPERTY::DYNAMICAL_TIMESCALE, - STAR_2_PROPERTY::DYNAMICAL_TIMESCALE, - STAR_1_PROPERTY::THERMAL_TIMESCALE, - STAR_2_PROPERTY::THERMAL_TIMESCALE, - STAR_1_PROPERTY::ZETA_SOBERMAN, - STAR_2_PROPERTY::ZETA_SOBERMAN, - STAR_1_PROPERTY::ZETA_SOBERMAN_HE, - STAR_2_PROPERTY::ZETA_SOBERMAN_HE, - STAR_1_PROPERTY::ZETA_HURLEY, - STAR_2_PROPERTY::ZETA_HURLEY, - STAR_1_PROPERTY::ZETA_HURLEY_HE, - STAR_2_PROPERTY::ZETA_HURLEY_HE, - STAR_1_PROPERTY::MASS_LOSS_DIFF, - STAR_2_PROPERTY::MASS_LOSS_DIFF, - STAR_1_PROPERTY::DOMINANT_MASS_LOSS_RATE, - STAR_2_PROPERTY::DOMINANT_MASS_LOSS_RATE, - STAR_1_PROPERTY::MASS_TRANSFER_DIFF, - STAR_2_PROPERTY::MASS_TRANSFER_DIFF, - STAR_1_PROPERTY::MDOT, - STAR_2_PROPERTY::MDOT, - BINARY_PROPERTY::TOTAL_ANGULAR_MOMENTUM, - BINARY_PROPERTY::TOTAL_ENERGY, - STAR_1_PROPERTY::METALLICITY, - STAR_2_PROPERTY::METALLICITY, - BINARY_PROPERTY::MASS_TRANSFER_TRACKER_HISTORY, - STAR_1_PROPERTY::PULSAR_MAGNETIC_FIELD, - STAR_2_PROPERTY::PULSAR_MAGNETIC_FIELD, - STAR_1_PROPERTY::PULSAR_SPIN_PERIOD, - STAR_2_PROPERTY::PULSAR_SPIN_PERIOD, - STAR_1_PROPERTY::PULSAR_SPIN_DOWN_RATE, - STAR_2_PROPERTY::PULSAR_SPIN_DOWN_RATE, - STAR_1_PROPERTY::PULSAR_BIRTH_PERIOD, - STAR_2_PROPERTY::PULSAR_BIRTH_PERIOD, - STAR_1_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, - STAR_2_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, - STAR_1_PROPERTY::RADIAL_EXPANSION_TIMESCALE, - STAR_2_PROPERTY::RADIAL_EXPANSION_TIMESCALE, - BINARY_PROPERTY::RLOF_MASS_LOSS_RATE, - BINARY_PROPERTY::RLOF_MASS_TRANSFER_TIMESCALE, - BINARY_PROPERTY::RLOF_ACCRETION_EFFICIENCY -}; - - -// SSE output record definitions - -// SSE_DETAILED_OUTPUT_REC -// -// Default record definition for the SSE Detailed Output logfile -// -const ANY_PROPERTY_VECTOR SSE_DETAILED_OUTPUT_REC = { - STAR_PROPERTY::AGE, - STAR_PROPERTY::DT, - STAR_PROPERTY::TIME, - STAR_PROPERTY::STELLAR_TYPE, - STAR_PROPERTY::METALLICITY, - STAR_PROPERTY::MASS_0, - STAR_PROPERTY::MASS, - STAR_PROPERTY::RADIUS, - STAR_PROPERTY::RZAMS, - STAR_PROPERTY::LUMINOSITY, - STAR_PROPERTY::TEMPERATURE, - STAR_PROPERTY::CORE_MASS, - STAR_PROPERTY::CO_CORE_MASS, - STAR_PROPERTY::HE_CORE_MASS, - STAR_PROPERTY::MDOT, - STAR_PROPERTY::DOMINANT_MASS_LOSS_RATE, - STAR_PROPERTY::TIMESCALE_MS, - STAR_PROPERTY::OMEGA, - STAR_PROPERTY::OMEGA_BREAK -}; - -// SSE_PULSAR_EVOLUTION_REC -// -// Default record definition for the SSE Pulsar Evolution logfile -// -const ANY_PROPERTY_VECTOR SSE_PULSAR_EVOLUTION_REC = { - STAR_PROPERTY::RANDOM_SEED, - STAR_PROPERTY::MASS, - STAR_PROPERTY::STELLAR_TYPE, - STAR_PROPERTY::PULSAR_MAGNETIC_FIELD, - STAR_PROPERTY::PULSAR_SPIN_PERIOD, - STAR_PROPERTY::PULSAR_SPIN_DOWN_RATE, - STAR_PROPERTY::PULSAR_BIRTH_PERIOD, - STAR_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, - STAR_PROPERTY::TIME, - STAR_PROPERTY::DT -}; - -// SSE_SUPERNOVAE_REC -// -// Default record definition for the SSE Supernovae logfile -// -const ANY_PROPERTY_VECTOR SSE_SUPERNOVAE_REC = { - STAR_PROPERTY::RANDOM_SEED, - STAR_PROPERTY::DRAWN_KICK_MAGNITUDE, - STAR_PROPERTY::KICK_MAGNITUDE, - STAR_PROPERTY::FALLBACK_FRACTION, - STAR_PROPERTY::MEAN_ANOMALY, - STAR_PROPERTY::SN_TYPE, - STAR_PROPERTY::TOTAL_MASS_AT_COMPACT_OBJECT_FORMATION, - STAR_PROPERTY::TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, - STAR_PROPERTY::CO_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, - STAR_PROPERTY::MASS, - STAR_PROPERTY::STELLAR_TYPE, - STAR_PROPERTY::STELLAR_TYPE_PREV, - STAR_PROPERTY::CORE_MASS_AT_COMPACT_OBJECT_FORMATION, - STAR_PROPERTY::CORE_RADIUS_AT_COMPACT_OBJECT_FORMATION, - STAR_PROPERTY::HE_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, - STAR_PROPERTY::TIME, - STAR_PROPERTY::IS_HYDROGEN_POOR -}; - - -// SSE_SWITCH_LOG -// -// Default record definition for the SSE Switch Log logfile -// -const ANY_PROPERTY_VECTOR SSE_SWITCH_LOG_REC = { - STAR_PROPERTY::RANDOM_SEED, - STAR_PROPERTY::TIME, - STAR_PROPERTY::MASS, - STAR_PROPERTY::STELLAR_TYPE, - STAR_PROPERTY::RADIUS -}; - - -// SSE_SYSTEM_PARAMETERS_REC -// -// Default record definition for the SSE System Parameters logfile -// -const ANY_PROPERTY_VECTOR SSE_SYSTEM_PARAMETERS_REC = { - STAR_PROPERTY::RANDOM_SEED, - STAR_PROPERTY::MZAMS, - STAR_PROPERTY::RZAMS, - STAR_PROPERTY::METALLICITY, - STAR_PROPERTY::OMEGA_ZAMS, - STAR_PROPERTY::INITIAL_STELLAR_TYPE, - STAR_PROPERTY::STELLAR_TYPE, - STAR_PROPERTY::SUPERNOVA_KICK_MAGNITUDE_RANDOM_NUMBER, - STAR_PROPERTY::MASS, - STAR_PROPERTY::CHEMICALLY_HOMOGENEOUS_MAIN_SEQUENCE, - STAR_PROPERTY::EVOL_STATUS, - STAR_PROPERTY::ERROR, - PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS, - PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH, - PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN, - PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN, - PROGRAM_OPTION::LBV_FACTOR, - PROGRAM_OPTION::WR_FACTOR, - PROGRAM_OPTION::NOTES -}; - - -// SSE_SYSTEM_SNAPSHOT_LOG_REC -// -// Default record definition for the SSE System Snapshot logfile -// -const ANY_PROPERTY_VECTOR SSE_SYSTEM_SNAPSHOT_LOG_REC = { - STAR_PROPERTY::AGE, - STAR_PROPERTY::DT, - STAR_PROPERTY::TIME, - STAR_PROPERTY::STELLAR_TYPE, - STAR_PROPERTY::METALLICITY, - STAR_PROPERTY::MASS_0, - STAR_PROPERTY::MASS, - STAR_PROPERTY::RADIUS, - STAR_PROPERTY::RZAMS, - STAR_PROPERTY::LUMINOSITY, - STAR_PROPERTY::TEMPERATURE, - STAR_PROPERTY::CORE_MASS, - STAR_PROPERTY::CO_CORE_MASS, - STAR_PROPERTY::HE_CORE_MASS, - STAR_PROPERTY::MDOT, - STAR_PROPERTY::DOMINANT_MASS_LOSS_RATE, - STAR_PROPERTY::TIMESCALE_MS, - STAR_PROPERTY::OMEGA, - STAR_PROPERTY::OMEGA_BREAK -}; - - -// enum class LOGFILE_CLASS -// Symbolic names for logfile types -enum class LOGFILE_CLASS: int { NONE, STELLAR, BINARY }; - -// descriptors for logfiles -// unordered_map - key is integer logfile (from enum class LOGFILE above) -// fields are: {default filename, record descriptor, short file name, short record name, type} -// (the short names are for logfile definitions file parsing) -typedef std::tuple LOGFILE_DESCRIPTOR_T; -const std::map LOGFILE_DESCRIPTOR = { - { LOGFILE::NONE, { "" , {}, "", "", LOGFILE_CLASS::NONE}}, - - { LOGFILE::DEBUG_LOG, { "Debug_Log", {}, "", "", LOGFILE_CLASS::NONE }}, - { LOGFILE::ERROR_LOG, { "Error_Log", {}, "", "", LOGFILE_CLASS::NONE }}, - - { LOGFILE::BSE_COMMON_ENVELOPES, { "BSE_Common_Envelopes", BSE_COMMON_ENVELOPES_REC, "BSE_CEE", "BSE_CEE_REC", LOGFILE_CLASS::BINARY }}, - { LOGFILE::BSE_DETAILED_OUTPUT, { "BSE_Detailed_Output", BSE_DETAILED_OUTPUT_REC, "BSE_DETAILED", "BSE_DETAILED_REC", LOGFILE_CLASS::BINARY }}, - { LOGFILE::BSE_DOUBLE_COMPACT_OBJECTS, { "BSE_Double_Compact_Objects", BSE_DOUBLE_COMPACT_OBJECTS_REC, "BSE_DCO", "BSE_DCO_REC", LOGFILE_CLASS::BINARY }}, - { LOGFILE::BSE_PULSAR_EVOLUTION, { "BSE_Pulsar_Evolution", BSE_PULSAR_EVOLUTION_REC, "BSE_PULSARS", "BSE_PULSARS_REC", LOGFILE_CLASS::BINARY }}, - { LOGFILE::BSE_RLOF_PARAMETERS, { "BSE_RLOF", BSE_RLOF_PARAMETERS_REC, "BSE_RLOF", "BSE_RLOF_REC", LOGFILE_CLASS::BINARY }}, - { LOGFILE::BSE_SUPERNOVAE, { "BSE_Supernovae", BSE_SUPERNOVAE_REC, "BSE_SNE", "BSE_SNE_REC", LOGFILE_CLASS::BINARY }}, - { LOGFILE::BSE_SWITCH_LOG, { "BSE_Switch_Log", BSE_SWITCH_LOG_REC, "BSE_SWITCH_LOG", "BSE_SWITCH_REC", LOGFILE_CLASS::BINARY }}, - { LOGFILE::BSE_SYSTEM_PARAMETERS, { "BSE_System_Parameters", BSE_SYSTEM_PARAMETERS_REC, "BSE_SYSPARMS", "BSE_SYSPARMS_REC", LOGFILE_CLASS::BINARY }}, - { LOGFILE::BSE_SYSTEM_SNAPSHOT_LOG, { "BSE_System_Snapshot_Log", BSE_SYSTEM_SNAPSHOT_LOG_REC, "BSE_SYS_SNAPSHOT", "BSE_SYS_SNAPSHOT_REC", LOGFILE_CLASS::BINARY }}, - - { LOGFILE::SSE_DETAILED_OUTPUT, { "SSE_Detailed_Output", SSE_DETAILED_OUTPUT_REC, "SSE_DETAILED", "SSE_DETAILED_REC", LOGFILE_CLASS::STELLAR }}, - { LOGFILE::SSE_PULSAR_EVOLUTION, { "SSE_Pulsar_Evolution", SSE_PULSAR_EVOLUTION_REC, "SSE_PULSARS", "SSE_PULSARS_REC", LOGFILE_CLASS::STELLAR }}, - { LOGFILE::SSE_SUPERNOVAE, { "SSE_Supernovae", SSE_SUPERNOVAE_REC, "SSE_SNE", "SSE_SNE_REC", LOGFILE_CLASS::STELLAR }}, - { LOGFILE::SSE_SWITCH_LOG, { "SSE_Switch_Log", SSE_SWITCH_LOG_REC, "SSE_SWITCH_LOG", "SSE_SWITCH_REC", LOGFILE_CLASS::STELLAR }}, - { LOGFILE::SSE_SYSTEM_PARAMETERS, { "SSE_System_Parameters", SSE_SYSTEM_PARAMETERS_REC, "SSE_SYSPARMS", "SSE_SYSPARMS_REC", LOGFILE_CLASS::STELLAR }}, - { LOGFILE::SSE_SYSTEM_SNAPSHOT_LOG, { "SSE_System_Snapshot_Log", SSE_SYSTEM_SNAPSHOT_LOG_REC, "SSE_SYS_SNAPSHOT", "SSE_SYS_SNAPSHOT_REC", LOGFILE_CLASS::STELLAR }} -}; - -#endif // __LogTypedefs_h__ +#ifndef __LogTypedefs_h__ +#define __LogTypedefs_h__ + + +// This is where developer-defined types that pertain directly to the COMPAS looging functionality +// (including the definitions of the default record composition for the various log files) are +// defined. Non-logging tyedefs are listed in typedefs.h + + +#include "constants.h" + + +// logfile file types +enum class LOGFILETYPE: int { HDF5, CSV, TSV, TXT }; // need this declared here so can declare the constant... +const COMPASUnorderedMap LOGFILETYPELabel = { // file types + { LOGFILETYPE::HDF5, "HDF5" }, + { LOGFILETYPE::CSV, "CSV" }, + { LOGFILETYPE::TSV, "TSV" }, + { LOGFILETYPE::TXT, "TXT" } +}; +const COMPASUnorderedMap LOGFILETYPEFileExt = { // file extensions + { LOGFILETYPE::HDF5, "h5" }, + { LOGFILETYPE::CSV, "csv" }, + { LOGFILETYPE::TSV, "tsv" }, + { LOGFILETYPE::TXT, "txt" } +}; + + +// enum class TYPENAME +// Symbolic names for variable typenames (for printing) +enum class TYPENAME: int { + NONE, + BOOL, + SHORTINT, + INT, + LONGINT, + LONGLONGINT, + USHORTINT, + UINT, + ULONGINT, + ULONGLONGINT, + FLOAT, + DOUBLE, + DOUBLE_VECTOR, + LONGDOUBLE, + STRING, + OBJECT_ID, + ERROR, + STELLAR_TYPE, + MT_CASE, + MT_TRACKING, + MT_TIMESCALE, + SN_EVENT, + SN_STATE, + STRING_VECTOR, + EVOLUTION_STATUS +}; +// labels (long and short) for typenames +// unordered_map - key is integer typename (from enum class TYPENAME above) +const COMPASUnorderedMap TYPENAME_LABEL = { + { TYPENAME::NONE, { "NONE", "NONE" }}, + { TYPENAME::BOOL, { "BOOL", "BOOL" }}, + { TYPENAME::SHORTINT, { "SHORT INT", "INT" }}, + { TYPENAME::INT, { "INT", "INT" }}, + { TYPENAME::LONGINT, { "LONG_INT", "INT" }}, + { TYPENAME::LONGLONGINT, { "LONG_LONG_INT", "INT" }}, + { TYPENAME::USHORTINT, { "UNSIGNED_SHORT_INT", "INT" }}, + { TYPENAME::UINT, { "UNSIGNED_INT", "INT" }}, + { TYPENAME::ULONGINT, { "UNSIGNED_LONG_INT", "INT" }}, + { TYPENAME::ULONGLONGINT, { "UNSIGNED_LONG_LONG_INT", "INT" }}, + { TYPENAME::FLOAT, { "FLOAT", "FLOAT" }}, + { TYPENAME::DOUBLE, { "DOUBLE", "FLOAT" }}, + { TYPENAME::LONGDOUBLE, { "LONG_DOUBLE", "FLOAT" }}, + { TYPENAME::STRING, { "STRING", "STRING" }}, + { TYPENAME::OBJECT_ID, { "OBJECT_ID", "INT" }}, + { TYPENAME::ERROR, { "ERROR", "INT" }}, + { TYPENAME::STELLAR_TYPE, { "STELLAR_TYPE", "INT" }}, + { TYPENAME::MT_CASE, { "MT_CASE", "INT" }}, + { TYPENAME::MT_TRACKING, { "MT_TRACKING", "INT" }}, + { TYPENAME::MT_TIMESCALE, { "MT_TIMESCALE", "INT" }}, + { TYPENAME::SN_EVENT, { "SN_EVENT", "INT" }}, + { TYPENAME::SN_STATE, { "SN_STATE", "INT" }}, + { TYPENAME::STRING_VECTOR, { "STRING_VECTOR", "VECTOR" }}, + { TYPENAME::EVOLUTION_STATUS, { "EVOLUTION_STATUS", "INT" }} +}; + + +// (convenience) initializer list for INT data types +const std::initializer_list INT_TYPES = { + TYPENAME::SHORTINT, + TYPENAME::INT, + TYPENAME::LONGINT, + TYPENAME::LONGLONGINT, + TYPENAME::USHORTINT, + TYPENAME::UINT, + TYPENAME::ULONGINT, + TYPENAME::ULONGLONGINT +}; + +// (convenience) initializer list for FLOAT data types +const std::initializer_list FLOAT_TYPES = { + TYPENAME::FLOAT, + TYPENAME::DOUBLE, + TYPENAME::LONGDOUBLE +}; + + +// enum class STRING_QUALIFIER +// Qualifier for typename STRING: FIXED_LENGTH or VARIABLE_LENGTH (used for printing to HDF5 files) +enum class STRING_QUALIFIER: int { NONE, FIXED_LENGTH, VARIABLE_LENGTH }; + + +// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +// !!! !!! +// !!! Do not change the following enum classes and maps unless you are adding !!! +// !!! or deleting a new property (or changing the name of an existing property !!! +// !!! for some reason) !!! +// !!! !!! +// !!! The STAR_PROPERTIES #define below defines the STELLAR variables allowed !!! +// !!! for logfile record definition - if a property is not on the list it !!! +// !!! cannot be selected for inclusion in a logfile via the !!! +// !!! --logfile-definitions option. !!! +// !!! !!! +// !!! The enum classes STAR_PROPERTY, BINARY_PROPERTY, and PROGRAM_OPTION !!! +// !!! defined below defines the STELLAR and BINARY properties, and the !!! +// !!! PROGRAM_OPTIONs allowed for logfile record definition - if a property is !!! +// !!! not on those lists it cannot be selected for inclusion in a logfile via !!! +// !!! --logfile-definitions option. !!! +// !!! !!! +// !!! *NOTE* !!! +// !!! The following enum classes and maps are not where header strings should !!! +// !!! be changed! These classes and maps are a lookup facility for the logfile !!! +// !!! definitions file parser. !!! +// !!! !!! +// !!! Header strings are in the following maps, and should be changed there: !!! +// !!! !!! +// !!! std::map ANY_STAR_PROPERTY_DETAIL !!! +// !!! std::map BINARY_PROPERTY_DETAIL !!! +// !!! !!! +// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +// The #define below defines the STELLAR variables allowed for logfile record definition +// Add new property names here to make the property available for specification in a logfile +// #define is used so that the same list of variables can be used for the various stellar property enum classes (see below) +#define STAR_PROPERTIES \ + NONE, \ + AGE, \ + ANGULAR_MOMENTUM, \ + BINDING_ENERGY_AT_COMMON_ENVELOPE, \ + BINDING_ENERGY_CONVECTIVE_ENVELOPE, \ + BINDING_ENERGY_FIXED, \ + BINDING_ENERGY_NANJING, \ + BINDING_ENERGY_PRE_COMMON_ENVELOPE, \ + BINDING_ENERGY_LOVERIDGE, \ + BINDING_ENERGY_LOVERIDGE_WINDS, \ + BINDING_ENERGY_KRUCKOW, \ + CHEMICALLY_HOMOGENEOUS_MAIN_SEQUENCE, \ + CO_CORE_MASS, \ + CO_CORE_MASS_AT_COMMON_ENVELOPE, \ + CO_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, \ + CONVECTIVE_ENV_MASS, \ + CORE_MASS, \ + CORE_MASS_AT_COMMON_ENVELOPE, \ + CORE_MASS_AT_COMPACT_OBJECT_FORMATION, \ + CORE_RADIUS_AT_COMPACT_OBJECT_FORMATION, \ + DRAWN_KICK_MAGNITUDE, \ + DOMINANT_MASS_LOSS_RATE, \ + DT, \ + DYNAMICAL_TIMESCALE, \ + DYNAMICAL_TIMESCALE_POST_COMMON_ENVELOPE, \ + DYNAMICAL_TIMESCALE_PRE_COMMON_ENVELOPE, \ + ECCENTRIC_ANOMALY, \ + ENV_MASS, \ + ERROR, \ + EVOL_STATUS, \ + EXPERIENCED_AIC, \ + EXPERIENCED_CCSN, \ + EXPERIENCED_HeSD, \ + EXPERIENCED_ECSN, \ + EXPERIENCED_PISN, \ + EXPERIENCED_PPISN, \ + EXPERIENCED_RLOF, \ + EXPERIENCED_SNIA, \ + EXPERIENCED_SN_TYPE, \ + EXPERIENCED_USSN, \ + FALLBACK_FRACTION, \ + HE_CORE_MASS, \ + HE_CORE_MASS_AT_COMMON_ENVELOPE, \ + HE_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, \ + HELIUM_ABUNDANCE_CORE, \ + HELIUM_ABUNDANCE_SURFACE, \ + HYDROGEN_ABUNDANCE_CORE, \ + HYDROGEN_ABUNDANCE_SURFACE, \ + ID, \ + INITIAL_HELIUM_ABUNDANCE, \ + INITIAL_HYDROGEN_ABUNDANCE, \ + INITIAL_STELLAR_TYPE, \ + INITIAL_STELLAR_TYPE_NAME, \ + IS_AIC, \ + IS_CCSN, \ + IS_HeSD, \ + IS_ECSN, \ + IS_HYDROGEN_POOR, \ + IS_PISN, \ + IS_PPISN, \ + IS_RLOF, \ + IS_SNIA, \ + IS_USSN, \ + KICK_MAGNITUDE, \ + LAMBDA_AT_COMMON_ENVELOPE, \ + LAMBDA_CONVECTIVE_ENVELOPE, \ + LAMBDA_DEWI, \ + LAMBDA_FIXED, \ + LAMBDA_KRUCKOW, \ + LAMBDA_KRUCKOW_BOTTOM, \ + LAMBDA_KRUCKOW_MIDDLE, \ + LAMBDA_KRUCKOW_TOP, \ + LAMBDA_LOVERIDGE, \ + LAMBDA_LOVERIDGE_WINDS, \ + LAMBDA_NANJING, \ + LBV_PHASE_FLAG, \ + LUMINOSITY, \ + LUMINOSITY_POST_COMMON_ENVELOPE, \ + LUMINOSITY_PRE_COMMON_ENVELOPE, \ + MASS, \ + MASS_0, \ + MASS_LOSS_DIFF, \ + MASS_TRANSFER_DIFF, \ + MASS_TRANSFER_DONOR_HISTORY, \ + MDOT, \ + MEAN_ANOMALY, \ + METALLICITY, \ + MOMENT_OF_INERTIA, \ + MZAMS, \ + OMEGA, \ + OMEGA_BREAK, \ + OMEGA_ZAMS, \ + ORBITAL_ENERGY_POST_SUPERNOVA, \ + ORBITAL_ENERGY_PRE_SUPERNOVA, \ + PULSAR_MAGNETIC_FIELD, \ + PULSAR_SPIN_DOWN_RATE, \ + PULSAR_BIRTH_PERIOD, \ + PULSAR_BIRTH_SPIN_DOWN_RATE, \ + PULSAR_SPIN_FREQUENCY, \ + PULSAR_SPIN_PERIOD, \ + RADIAL_EXPANSION_TIMESCALE, \ + RADIAL_EXPANSION_TIMESCALE_POST_COMMON_ENVELOPE, \ + RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE, \ + RADIUS, \ + RANDOM_SEED, \ + RECYCLED_NEUTRON_STAR, \ + ROCKET_KICK_MAGNITUDE, \ + ROCKET_KICK_PHI, \ + ROCKET_KICK_THETA, \ + RZAMS, \ + SN_TYPE, \ + SPEED, \ + STELLAR_TYPE, \ + STELLAR_TYPE_NAME, \ + STELLAR_TYPE_PREV, \ + STELLAR_TYPE_PREV_NAME, \ + SUPERNOVA_KICK_MAGNITUDE_RANDOM_NUMBER, \ + SUPERNOVA_PHI, \ + SUPERNOVA_THETA, \ + TEMPERATURE, \ + TEMPERATURE_POST_COMMON_ENVELOPE, \ + TEMPERATURE_PRE_COMMON_ENVELOPE, \ + THERMAL_TIMESCALE, \ + THERMAL_TIMESCALE_POST_COMMON_ENVELOPE, \ + THERMAL_TIMESCALE_PRE_COMMON_ENVELOPE, \ + TIME, \ + TIMESCALE_MS, \ + TOTAL_MASS_AT_COMPACT_OBJECT_FORMATION, \ + TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, \ + TRUE_ANOMALY, \ + TZAMS, \ + VELOCITY_X, \ + VELOCITY_Y, \ + VELOCITY_Z, \ + ZETA_HURLEY, \ + ZETA_HURLEY_HE, \ + ZETA_SOBERMAN, \ + ZETA_SOBERMAN_HE + + +// enum class STAR_PROPERTY +// Symbolic names for variables of an individual star that can be selected for printing +// STAR_PROPERTY refers to an individual star of type BaseStar for SSE (differences are where the data comes from, and the column header) +enum class STAR_PROPERTY: int { STAR_PROPERTIES }; + +// map STAR PROPERTY to string identifying the property +// for lookup by the printing functions +// this map serves as the lookup for: STAR_PROPERTY, STAR_1_PROPERTY, STAR_2_PROPERTY, SUPERNOVA_PROPERTY, COMPANION_PROPERTY and ANY_STAR_PROPERTY +// +// Properties only need to be here if they are required to be available for printing in the logfiles. +// All keys present here should also be in the STAR_PROPERTIES #define and ANY_STAR_PROPERTY_DETAIL +const COMPASUnorderedMap STAR_PROPERTY_LABEL = { + { STAR_PROPERTY::NONE, "NONE" }, + { STAR_PROPERTY::AGE, "AGE" }, + { STAR_PROPERTY::ANGULAR_MOMENTUM, "ANGULAR_MOMENTUM" }, + { STAR_PROPERTY::BINDING_ENERGY_AT_COMMON_ENVELOPE, "BINDING_ENERGY_AT_COMMON_ENVELOPE" }, + { STAR_PROPERTY::BINDING_ENERGY_CONVECTIVE_ENVELOPE, "BINDING_ENERGY_CONVECTIVE_ENVELOPE" }, + { STAR_PROPERTY::BINDING_ENERGY_FIXED, "BINDING_ENERGY_FIXED" }, + { STAR_PROPERTY::BINDING_ENERGY_NANJING, "BINDING_ENERGY_NANJING" }, + { STAR_PROPERTY::BINDING_ENERGY_PRE_COMMON_ENVELOPE, "BINDING_ENERGY_PRE_COMMON_ENVELOPE" }, + { STAR_PROPERTY::BINDING_ENERGY_LOVERIDGE, "BINDING_ENERGY_LOVERIDGE" }, + { STAR_PROPERTY::BINDING_ENERGY_LOVERIDGE_WINDS, "BINDING_ENERGY_LOVERIDGE_WINDS" }, + { STAR_PROPERTY::BINDING_ENERGY_KRUCKOW, "BINDING_ENERGY_KRUCKOW" }, + { STAR_PROPERTY::CHEMICALLY_HOMOGENEOUS_MAIN_SEQUENCE, "CHEMICALLY_HOMOGENEOUS_MAIN_SEQUENCE" }, + { STAR_PROPERTY::CO_CORE_MASS, "CO_CORE_MASS" }, + { STAR_PROPERTY::CO_CORE_MASS_AT_COMMON_ENVELOPE, "CO_CORE_MASS_AT_COMMON_ENVELOPE" }, + { STAR_PROPERTY::CO_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, "CO_CORE_MASS_AT_COMPACT_OBJECT_FORMATION" }, + { STAR_PROPERTY::CONVECTIVE_ENV_MASS, "CONVECTIVE_ENV_MASS" }, + { STAR_PROPERTY::CORE_MASS, "CORE_MASS" }, + { STAR_PROPERTY::CORE_MASS_AT_COMMON_ENVELOPE, "CORE_MASS_AT_COMMON_ENVELOPE" }, + { STAR_PROPERTY::CORE_MASS_AT_COMPACT_OBJECT_FORMATION, "CORE_MASS_AT_COMPACT_OBJECT_FORMATION" }, + { STAR_PROPERTY::CORE_RADIUS_AT_COMPACT_OBJECT_FORMATION, "CORE_RADIUS_AT_COMPACT_OBJECT_FORMATION" }, + { STAR_PROPERTY::DRAWN_KICK_MAGNITUDE, "DRAWN_KICK_MAGNITUDE" }, + { STAR_PROPERTY::DOMINANT_MASS_LOSS_RATE, "DOMINANT_MASS_LOSS_RATE"}, + { STAR_PROPERTY::DT, "DT" }, + { STAR_PROPERTY::DYNAMICAL_TIMESCALE, "DYNAMICAL_TIMESCALE" }, + { STAR_PROPERTY::DYNAMICAL_TIMESCALE_POST_COMMON_ENVELOPE, "DYNAMICAL_TIMESCALE_POST_COMMON_ENVELOPE" }, + { STAR_PROPERTY::DYNAMICAL_TIMESCALE_PRE_COMMON_ENVELOPE, "DYNAMICAL_TIMESCALE_PRE_COMMON_ENVELOPE" }, + { STAR_PROPERTY::ECCENTRIC_ANOMALY, "ECCENTRIC_ANOMALY" }, + { STAR_PROPERTY::ENV_MASS, "ENV_MASS" }, + { STAR_PROPERTY::ERROR, "ERROR" }, + { STAR_PROPERTY::EVOL_STATUS, "EVOL_STATUS" }, + { STAR_PROPERTY::EXPERIENCED_AIC, "EXPERIENCED_AIC" }, + { STAR_PROPERTY::EXPERIENCED_CCSN, "EXPERIENCED_CCSN" }, + { STAR_PROPERTY::EXPERIENCED_HeSD, "EXPERIENCED_HeSD" }, + { STAR_PROPERTY::EXPERIENCED_ECSN, "EXPERIENCED_ECSN" }, + { STAR_PROPERTY::EXPERIENCED_PISN, "EXPERIENCED_PISN" }, + { STAR_PROPERTY::EXPERIENCED_PPISN, "EXPERIENCED_PPISN" }, + { STAR_PROPERTY::EXPERIENCED_RLOF, "EXPERIENCED_RLOF" }, + { STAR_PROPERTY::EXPERIENCED_SNIA, "EXPERIENCED_SNIA" }, + { STAR_PROPERTY::EXPERIENCED_SN_TYPE, "EXPERIENCED_SN_TYPE" }, + { STAR_PROPERTY::EXPERIENCED_USSN, "EXPERIENCED_USSN" }, + { STAR_PROPERTY::FALLBACK_FRACTION, "FALLBACK_FRACTION" }, + { STAR_PROPERTY::HE_CORE_MASS, "HE_CORE_MASS" }, + { STAR_PROPERTY::HE_CORE_MASS_AT_COMMON_ENVELOPE, "HE_CORE_MASS_AT_COMMON_ENVELOPE" }, + { STAR_PROPERTY::HE_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, "HE_CORE_MASS_AT_COMPACT_OBJECT_FORMATION" }, + { STAR_PROPERTY::HELIUM_ABUNDANCE_CORE, "HELIUM_ABUNDANCE_CORE" }, + { STAR_PROPERTY::HELIUM_ABUNDANCE_SURFACE, "HELIUM_ABUNDANCE_SURFACE" }, + { STAR_PROPERTY::HYDROGEN_ABUNDANCE_CORE, "HYDROGEN_ABUNDANCE_CORE" }, + { STAR_PROPERTY::HYDROGEN_ABUNDANCE_SURFACE, "HYDROGEN_ABUNDANCE_SURFACE" }, + { STAR_PROPERTY::ID, "ID" }, + { STAR_PROPERTY::INITIAL_HELIUM_ABUNDANCE, "INITIAL_HELIUM_ABUNDANCE" }, + { STAR_PROPERTY::INITIAL_HYDROGEN_ABUNDANCE, "INITIAL_HYDROGEN_ABUNDANCE" }, + { STAR_PROPERTY::INITIAL_STELLAR_TYPE, "INITIAL_STELLAR_TYPE" }, + { STAR_PROPERTY::INITIAL_STELLAR_TYPE, "INITIAL_STELLAR_TYPE" }, + { STAR_PROPERTY::INITIAL_STELLAR_TYPE_NAME, "INITIAL_STELLAR_TYPE_NAME" }, + { STAR_PROPERTY::IS_AIC, "IS_AIC" }, + { STAR_PROPERTY::IS_CCSN, "IS_CCSN" }, + { STAR_PROPERTY::IS_HeSD, "IS_HeSD" }, + { STAR_PROPERTY::IS_ECSN, "IS_ECSN" }, + { STAR_PROPERTY::IS_HYDROGEN_POOR, "IS_HYDROGEN_POOR" }, + { STAR_PROPERTY::IS_PISN, "IS_PISN" }, + { STAR_PROPERTY::IS_PPISN, "IS_PPISN" }, + { STAR_PROPERTY::IS_RLOF, "IS_RLOF" }, + { STAR_PROPERTY::IS_SNIA, "IS_SNIA" }, + { STAR_PROPERTY::IS_USSN, "IS_USSN" }, + { STAR_PROPERTY::KICK_MAGNITUDE, "KICK_MAGNITUDE" }, + { STAR_PROPERTY::LAMBDA_AT_COMMON_ENVELOPE, "LAMBDA_AT_COMMON_ENVELOPE" }, + { STAR_PROPERTY::LAMBDA_CONVECTIVE_ENVELOPE, "LAMBDA_CONVECTIVE_ENVELOPE" }, + { STAR_PROPERTY::LAMBDA_DEWI, "LAMBDA_DEWI" }, + { STAR_PROPERTY::LAMBDA_FIXED, "LAMBDA_FIXED" }, + { STAR_PROPERTY::LAMBDA_KRUCKOW, "LAMBDA_KRUCKOW" }, + { STAR_PROPERTY::LAMBDA_KRUCKOW_BOTTOM, "LAMBDA_KRUCKOW_BOTTOM" }, + { STAR_PROPERTY::LAMBDA_KRUCKOW_MIDDLE, "LAMBDA_KRUCKOW_MIDDLE" }, + { STAR_PROPERTY::LAMBDA_KRUCKOW_TOP, "LAMBDA_KRUCKOW_TOP" }, + { STAR_PROPERTY::LAMBDA_LOVERIDGE, "LAMBDA_LOVERIDGE" }, + { STAR_PROPERTY::LAMBDA_LOVERIDGE_WINDS, "LAMBDA_LOVERIDGE_WINDS" }, + { STAR_PROPERTY::LAMBDA_NANJING, "LAMBDA_NANJING" }, + { STAR_PROPERTY::LBV_PHASE_FLAG, "LBV_PHASE_FLAG" }, + { STAR_PROPERTY::LUMINOSITY, "LUMINOSITY" }, + { STAR_PROPERTY::LUMINOSITY_POST_COMMON_ENVELOPE, "LUMINOSITY_POST_COMMON_ENVELOPE" }, + { STAR_PROPERTY::LUMINOSITY_PRE_COMMON_ENVELOPE, "LUMINOSITY_PRE_COMMON_ENVELOPE" }, + { STAR_PROPERTY::MASS, "MASS" }, + { STAR_PROPERTY::MASS_0, "MASS_0" }, + { STAR_PROPERTY::MASS_LOSS_DIFF, "MASS_LOSS_DIFF" }, + { STAR_PROPERTY::MASS_TRANSFER_DIFF, "MASS_TRANSFER_DIFF" }, + { STAR_PROPERTY::MASS_TRANSFER_DONOR_HISTORY, "MASS_TRANSFER_DONOR_HISTORY" }, + { STAR_PROPERTY::MDOT, "MDOT" }, + { STAR_PROPERTY::MEAN_ANOMALY, "MEAN_ANOMALY" }, + { STAR_PROPERTY::METALLICITY, "METALLICITY" }, + { STAR_PROPERTY::MOMENT_OF_INERTIA, "MOMENT_OF_INERTIA"}, + { STAR_PROPERTY::MZAMS, "MZAMS" }, + { STAR_PROPERTY::OMEGA, "OMEGA" }, + { STAR_PROPERTY::OMEGA_BREAK, "OMEGA_BREAK" }, + { STAR_PROPERTY::OMEGA_ZAMS, "OMEGA_ZAMS" }, + { STAR_PROPERTY::ORBITAL_ENERGY_POST_SUPERNOVA, "ORBITAL_ENERGY_POST_SUPERNOVA" }, + { STAR_PROPERTY::ORBITAL_ENERGY_PRE_SUPERNOVA, "ORBITAL_ENERGY_PRE_SUPERNOVA" }, + { STAR_PROPERTY::PULSAR_MAGNETIC_FIELD, "PULSAR_MAGNETIC_FIELD" }, + { STAR_PROPERTY::PULSAR_SPIN_DOWN_RATE, "PULSAR_SPIN_DOWN_RATE" }, + { STAR_PROPERTY::PULSAR_BIRTH_PERIOD, "PULSAR_BIRTH_PERIOD" }, + { STAR_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, "PULSAR_BIRTH_SPIN_DOWN_RATE" }, + { STAR_PROPERTY::PULSAR_SPIN_FREQUENCY, "PULSAR_SPIN_FREQUENCY" }, + { STAR_PROPERTY::PULSAR_SPIN_PERIOD, "PULSAR_SPIN_PERIOD" }, + { STAR_PROPERTY::RADIAL_EXPANSION_TIMESCALE, "RADIAL_EXPANSION_TIMESCALE" }, + { STAR_PROPERTY::RADIAL_EXPANSION_TIMESCALE_POST_COMMON_ENVELOPE, "RADIAL_EXPANSION_TIMESCALE_POST_COMMON_ENVELOPE" }, + { STAR_PROPERTY::RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE, "RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE" }, + { STAR_PROPERTY::RADIUS, "RADIUS" }, + { STAR_PROPERTY::RANDOM_SEED, "RANDOM_SEED" }, + { STAR_PROPERTY::RECYCLED_NEUTRON_STAR, "RECYCLED_NEUTRON_STAR" }, + { STAR_PROPERTY::ROCKET_KICK_MAGNITUDE, "ROCKET_KICK_MAGNITUDE" }, + { STAR_PROPERTY::ROCKET_KICK_PHI, "ROCKET_KICK_PHI" }, + { STAR_PROPERTY::ROCKET_KICK_THETA, "ROCKET_KICK_THETA" }, + { STAR_PROPERTY::RZAMS, "RZAMS" }, + { STAR_PROPERTY::SN_TYPE, "SN_TYPE" }, + { STAR_PROPERTY::SPEED, "SPEED" }, + { STAR_PROPERTY::STELLAR_TYPE, "STELLAR_TYPE" }, + { STAR_PROPERTY::STELLAR_TYPE_NAME, "STELLAR_TYPE_NAME" }, + { STAR_PROPERTY::STELLAR_TYPE_PREV, "STELLAR_TYPE_PREV" }, + { STAR_PROPERTY::STELLAR_TYPE_PREV_NAME, "STELLAR_TYPE_PREV_NAME" }, + { STAR_PROPERTY::SUPERNOVA_KICK_MAGNITUDE_RANDOM_NUMBER, "SUPERNOVA_KICK_MAGNITUDE_RANDOM_NUMBER" }, + { STAR_PROPERTY::SUPERNOVA_PHI, "SUPERNOVA_PHI" }, + { STAR_PROPERTY::SUPERNOVA_THETA, "SUPERNOVA_THETA" }, + { STAR_PROPERTY::TEMPERATURE, "TEMPERATURE" }, + { STAR_PROPERTY::TEMPERATURE_POST_COMMON_ENVELOPE, "TEMPERATURE_POST_COMMON_ENVELOPE" }, + { STAR_PROPERTY::TEMPERATURE_PRE_COMMON_ENVELOPE, "TEMPERATURE_PRE_COMMON_ENVELOPE" }, + { STAR_PROPERTY::THERMAL_TIMESCALE, "THERMAL_TIMESCALE" }, + { STAR_PROPERTY::THERMAL_TIMESCALE_POST_COMMON_ENVELOPE, "THERMAL_TIMESCALE_POST_COMMON_ENVELOPE" }, + { STAR_PROPERTY::THERMAL_TIMESCALE_PRE_COMMON_ENVELOPE, "THERMAL_TIMESCALE_PRE_COMMON_ENVELOPE" }, + { STAR_PROPERTY::TIME, "TIME" }, + { STAR_PROPERTY::TIMESCALE_MS, "TIMESCALE_MS" }, + { STAR_PROPERTY::TOTAL_MASS_AT_COMPACT_OBJECT_FORMATION, "TOTAL_MASS_AT_COMPACT_OBJECT_FORMATION" }, + { STAR_PROPERTY::TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, "TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION" }, + { STAR_PROPERTY::TRUE_ANOMALY, "TRUE_ANOMALY" }, + { STAR_PROPERTY::TZAMS, "TZAMS" }, + { STAR_PROPERTY::VELOCITY_X, "VELOCITY_X" }, + { STAR_PROPERTY::VELOCITY_Y, "VELOCITY_Y" }, + { STAR_PROPERTY::VELOCITY_Z, "VELOCITY_Z" }, + { STAR_PROPERTY::ZETA_HURLEY, "ZETA_HURLEY" }, + { STAR_PROPERTY::ZETA_HURLEY_HE, "ZETA_HURLEY_HE" }, + { STAR_PROPERTY::ZETA_SOBERMAN, "ZETA_SOBERMAN" }, + { STAR_PROPERTY::ZETA_SOBERMAN_HE, "ZETA_SOBERMAN_HE" } +}; + + +// enum class STAR_1_PROPERTY +// Symbolic names for variables of an individual star that can be selected for printing +// STAR_1_PROPERTY refers to star 1 (of type BinaryConstituentStar) of a binary for BSE (differences are where the data comes from, and the column header) +enum class STAR_1_PROPERTY: int { STAR_PROPERTIES }; + + +// enum class STAR_2_PROPERTY +// Symbolic names for variables of an individual star that can be selected for printing +// STAR_2_PROPERTY refers to star 2 (of type BinaryConstituentStar) of a binary for BSE (differences are where the data comes from, and the column header) +enum class STAR_2_PROPERTY: int { STAR_PROPERTIES }; + + +// enum class SUPERNOVA_PROPERTY +// Symbolic names for variables of an individual star that can be selected for printing +// SUPERNOVA_PROPERTY refers to the supernova star (of type BinaryConstituentStar) of a binary where one star has experienced a SN event for BSE (differences are where the data comes from, and the column header) +enum class SUPERNOVA_PROPERTY: int { STAR_PROPERTIES }; + + +// enum class COMPANION_PROPERTY +// Symbolic names for variables of an individual star that can be selected for printing +// COMPANION_PROPERTY refers to the companion star (of type BinaryConstituentStar) of a binary where one star has experienced a SN event for BSE (differences are where the data comes from, and the column header) +enum class COMPANION_PROPERTY: int { STAR_PROPERTIES }; + + +// enum class ANY_STAR_PROPERTY +// Symbolic names for variables of an individual star that can be selected for printing +// ANY_STAR_PROPERTY refers to the any individual star +enum class ANY_STAR_PROPERTY: int { STAR_PROPERTIES }; + + +// enum class BINARY_PROPERTY +// Symbolic names for variables of binary stars that can be selected for printing +// BINARY_PROPERTY refers to a binary star of type BaseBinaryStar) for BSE +// +// Properties only need to be here if they are required to be available for +// printing in the logfiles - all keys present here should also be in BINARY_PROPERTY_LABEL +// and BINARY_PROPERTY_DETAIL +enum class BINARY_PROPERTY: int { + NONE, + CIRCULARIZATION_TIMESCALE, + CIRCUMBINARY_DISK_FORMED, + CIRCUMBINARY_DISK_INITIAL_MASS, + CIRCUMBINARY_DISK_MASS_RETAINED_1, + CIRCUMBINARY_DISK_MASS_RETAINED_2, + CIRCUMBINARY_DISK_MASS_SUPPLIED, + CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_PRE, + CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_POST, + CIRCUMBINARY_DISK_ECCENTRICITY_PRE, + CIRCUMBINARY_DISK_ECCENTRICITY_POST, + COMMON_ENVELOPE_AT_LEAST_ONCE, + COMMON_ENVELOPE_EVENT_COUNT, + UNBOUND, + DOUBLE_CORE_COMMON_ENVELOPE, + DT, + ECCENTRICITY, + ECCENTRICITY_AT_DCO_FORMATION, + ECCENTRICITY_INITIAL, + ECCENTRICITY_POST_COMMON_ENVELOPE, + ECCENTRICITY_PRE_SUPERNOVA, + ECCENTRICITY_PRE_COMMON_ENVELOPE, + ERROR, + EVOL_STATUS, + ID, + IMMEDIATE_RLOF_POST_COMMON_ENVELOPE, + MASS_1_POST_COMMON_ENVELOPE, + MASS_1_PRE_COMMON_ENVELOPE, + MASS_2_POST_COMMON_ENVELOPE, + MASS_2_PRE_COMMON_ENVELOPE, + MASS_ENV_1, + MASS_ENV_2, + MASSES_EQUILIBRATED, + MASSES_EQUILIBRATED_AT_BIRTH, + MASS_TRANSFER_TRACKER_HISTORY, + MERGES_IN_HUBBLE_TIME, + OPTIMISTIC_COMMON_ENVELOPE, + ORBITAL_ANGULAR_MOMENTUM_VECTOR_X, + ORBITAL_ANGULAR_MOMENTUM_VECTOR_Y, + ORBITAL_ANGULAR_MOMENTUM_VECTOR_Z, + ORBITAL_ANGULAR_VELOCITY, + ORBITAL_VELOCITY_PRE_SUPERNOVA, + RADIUS_1_POST_COMMON_ENVELOPE, + RADIUS_1_PRE_COMMON_ENVELOPE, + RADIUS_2_POST_COMMON_ENVELOPE, + RADIUS_2_PRE_COMMON_ENVELOPE, + RANDOM_SEED, + RLOF_ACCRETION_EFFICIENCY, + RLOF_MASS_LOSS_RATE, + RLOF_MASS_TRANSFER_TIMESCALE, + RLOF_POST_MT_COMMON_ENVELOPE, + RLOF_POST_MT_ECCENTRICITY, + RLOF_POST_MT_EVENT_COUNTER, + RLOF_POST_MT_ID, + RLOF_POST_MT_SEMI_MAJOR_AXIS, + RLOF_POST_MT_STAR1_MASS, + RLOF_POST_MT_STAR2_MASS, + RLOF_POST_MT_STAR1_RADIUS, + RLOF_POST_MT_STAR2_RADIUS, + RLOF_POST_MT_STAR1_TEFF, + RLOF_POST_MT_STAR2_TEFF, + RLOF_POST_MT_STAR1_LUM, + RLOF_POST_MT_STAR2_LUM, + RLOF_POST_MT_STAR1_RLOF, + RLOF_POST_MT_STAR2_RLOF, + RLOF_POST_MT_STAR1_STELLAR_TYPE, + RLOF_POST_MT_STAR1_STELLAR_TYPE_NAME, + RLOF_POST_MT_STAR2_STELLAR_TYPE, + RLOF_POST_MT_STAR2_STELLAR_TYPE_NAME, + RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, + RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, + RLOF_PRE_MT_ECCENTRICITY, + RLOF_PRE_MT_SEMI_MAJOR_AXIS, + RLOF_PRE_MT_STAR1_MASS, + RLOF_PRE_MT_STAR2_MASS, + RLOF_PRE_MT_STAR1_RADIUS, + RLOF_PRE_MT_STAR2_RADIUS, + RLOF_PRE_MT_STAR1_TEFF, + RLOF_PRE_MT_STAR2_TEFF, + RLOF_PRE_MT_STAR1_LUM, + RLOF_PRE_MT_STAR2_LUM, + RLOF_PRE_MT_STAR1_RLOF, + RLOF_PRE_MT_STAR2_RLOF, + RLOF_PRE_MT_STAR1_STELLAR_TYPE, + RLOF_PRE_MT_STAR1_STELLAR_TYPE_NAME, + RLOF_PRE_MT_STAR2_STELLAR_TYPE, + RLOF_PRE_MT_STAR2_STELLAR_TYPE_NAME, + RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, + RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, + RLOF_SECONDARY_POST_COMMON_ENVELOPE, + RLOF_TIME_POST_MT, + RLOF_TIME_PRE_MT, + ROCHE_LOBE_RADIUS_1, + ROCHE_LOBE_RADIUS_2, + ROCHE_LOBE_RADIUS_1_POST_COMMON_ENVELOPE, + ROCHE_LOBE_RADIUS_2_POST_COMMON_ENVELOPE, + ROCHE_LOBE_RADIUS_1_PRE_COMMON_ENVELOPE, + ROCHE_LOBE_RADIUS_2_PRE_COMMON_ENVELOPE, + STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, + STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, + SEMI_MAJOR_AXIS_AT_DCO_FORMATION, + SEMI_MAJOR_AXIS_INITIAL, + SEMI_MAJOR_AXIS_POST_COMMON_ENVELOPE, + SEMI_MAJOR_AXIS_POST_STAGE_1_CE, + SEMI_MAJOR_AXIS_PRE_SUPERNOVA, + SEMI_MAJOR_AXIS_PRE_SUPERNOVA_RSOL, + SEMI_MAJOR_AXIS_PRE_COMMON_ENVELOPE, + SEMI_MAJOR_AXIS, + SEMI_MAJOR_AXIS_RSOL, + SIMULTANEOUS_RLOF, + STABLE_RLOF_POST_COMMON_ENVELOPE, + STELLAR_MERGER, + STELLAR_MERGER_AT_BIRTH, + STELLAR_TYPE_1_POST_COMMON_ENVELOPE, + STELLAR_TYPE_1_PRE_COMMON_ENVELOPE, + STELLAR_TYPE_2_POST_COMMON_ENVELOPE, + STELLAR_TYPE_2_PRE_COMMON_ENVELOPE, + STELLAR_TYPE_NAME_1_POST_COMMON_ENVELOPE, + STELLAR_TYPE_NAME_1_PRE_COMMON_ENVELOPE, + STELLAR_TYPE_NAME_2_POST_COMMON_ENVELOPE, + STELLAR_TYPE_NAME_2_PRE_COMMON_ENVELOPE, + SUPERNOVA_ORBIT_INCLINATION_ANGLE, + SUPERNOVA_STATE, + SYNCHRONIZATION_TIMESCALE_1, + SYNCHRONIZATION_TIMESCALE_2, + SYSTEMIC_SPEED, + SYSTEMIC_VELOCITY_X, + SYSTEMIC_VELOCITY_Y, + SYSTEMIC_VELOCITY_Z, + TIDAL_POTENTIAL_LOVE_NUMBER_10_1, + TIDAL_POTENTIAL_LOVE_NUMBER_12_1, + TIDAL_POTENTIAL_LOVE_NUMBER_22_1, + TIDAL_POTENTIAL_LOVE_NUMBER_32_1, + TIDAL_POTENTIAL_LOVE_NUMBER_10_2, + TIDAL_POTENTIAL_LOVE_NUMBER_12_2, + TIDAL_POTENTIAL_LOVE_NUMBER_22_2, + TIDAL_POTENTIAL_LOVE_NUMBER_32_2, + TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_1, + TIDAL_POTENTIAL_LOVE_NUMBER_12_EQ_1, + TIDAL_POTENTIAL_LOVE_NUMBER_22_EQ_1, + TIDAL_POTENTIAL_LOVE_NUMBER_32_EQ_1, + TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_2, + TIDAL_POTENTIAL_LOVE_NUMBER_12_EQ_2, + TIDAL_POTENTIAL_LOVE_NUMBER_22_EQ_2, + TIDAL_POTENTIAL_LOVE_NUMBER_32_EQ_2, + TIDAL_POTENTIAL_LOVE_NUMBER_10_DYN_1, + TIDAL_POTENTIAL_LOVE_NUMBER_12_DYN_1, + TIDAL_POTENTIAL_LOVE_NUMBER_22_DYN_1, + TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_1, + TIDAL_POTENTIAL_LOVE_NUMBER_10_DYN_2, + TIDAL_POTENTIAL_LOVE_NUMBER_12_DYN_2, + TIDAL_POTENTIAL_LOVE_NUMBER_22_DYN_2, + TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_2, + TIME, + TIME_TO_COALESCENCE, + TOTAL_ANGULAR_MOMENTUM, + TOTAL_ENERGY, + ZETA_LOBE, + ZETA_STAR +}; +// map BINARY_PROPERTY to string identifying the property +// for lookup by the printing functions +// +// Property names only need to be here if they are required to be available for +// printing in the logfiles - all keys present here should also be in BINARY_PROPERTY +// and BINARY_PROPERTY_DETAIL +const COMPASUnorderedMap BINARY_PROPERTY_LABEL = { + { BINARY_PROPERTY::NONE, "NONE" }, + { BINARY_PROPERTY::CIRCULARIZATION_TIMESCALE, "CIRCULARIZATION_TIMESCALE" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_FORMED, "CIRCUMBINARY_DISK_FORMED" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_INITIAL_MASS, "CIRCUMBINARY_DISK_INITIAL_MASS" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_1, "CIRCUMBINARY_DISK_MASS_RETAINED_1" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_2, "CIRCUMBINARY_DISK_MASS_RETAINED_2" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_SUPPLIED, "CIRCUMBINARY_DISK_MASS_SUPPLIED" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_PRE, "CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_PRE" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_POST, "CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_POST" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_ECCENTRICITY_PRE, "CIRCUMBINARY_DISK_ECCENTRICITY_PRE" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_ECCENTRICITY_POST, "CIRCUMBINARY_DISK_ECCENTRICITY_POST" }, + { BINARY_PROPERTY::COMMON_ENVELOPE_AT_LEAST_ONCE, "COMMON_ENVELOPE_AT_LEAST_ONCE" }, + { BINARY_PROPERTY::COMMON_ENVELOPE_EVENT_COUNT, "COMMON_ENVELOPE_EVENT_COUNT" }, + { BINARY_PROPERTY::UNBOUND, "UNBOUND" }, + { BINARY_PROPERTY::DOUBLE_CORE_COMMON_ENVELOPE, "DOUBLE_CORE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::DT, "DT" }, + { BINARY_PROPERTY::ECCENTRICITY, "ECCENTRICITY" }, + { BINARY_PROPERTY::ECCENTRICITY_AT_DCO_FORMATION, "ECCENTRICITY_AT_DCO_FORMATION" }, + { BINARY_PROPERTY::ECCENTRICITY_INITIAL, "ECCENTRICITY_INITIAL" }, + { BINARY_PROPERTY::ECCENTRICITY_POST_COMMON_ENVELOPE, "ECCENTRICITY_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::ECCENTRICITY_PRE_SUPERNOVA, "ECCENTRICITY_PRE_SUPERNOVA" }, + { BINARY_PROPERTY::ECCENTRICITY_PRE_COMMON_ENVELOPE, "ECCENTRICITY_PRE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::ERROR, "ERROR" }, + { BINARY_PROPERTY::EVOL_STATUS, "EVOL_STATUS" }, + { BINARY_PROPERTY::ID, "ID" }, + { BINARY_PROPERTY::IMMEDIATE_RLOF_POST_COMMON_ENVELOPE, "IMMEDIATE_RLOF_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::MASS_1_POST_COMMON_ENVELOPE, "MASS_1_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::MASS_1_PRE_COMMON_ENVELOPE, "MASS_1_PRE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::MASS_2_POST_COMMON_ENVELOPE, "MASS_2_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::MASS_2_PRE_COMMON_ENVELOPE, "MASS_2_PRE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::MASS_ENV_1, "MASS_ENV_1" }, + { BINARY_PROPERTY::MASS_ENV_2, "MASS_ENV_2" }, + { BINARY_PROPERTY::MASSES_EQUILIBRATED, "MASSES_EQUILIBRATED" }, + { BINARY_PROPERTY::MASSES_EQUILIBRATED_AT_BIRTH, "MASSES_EQUILIBRATED_AT_BIRTH" }, + { BINARY_PROPERTY::MASS_TRANSFER_TRACKER_HISTORY, "MASS_TRANSFER_TRACKER_HISTORY" }, + { BINARY_PROPERTY::MERGES_IN_HUBBLE_TIME, "MERGES_IN_HUBBLE_TIME" }, + { BINARY_PROPERTY::OPTIMISTIC_COMMON_ENVELOPE, "OPTIMISTIC_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_X, "ORBITAL_ANGULAR_MOMENTUM_VECTOR_X" }, + { BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_Y, "ORBITAL_ANGULAR_MOMENTUM_VECTOR_Y" }, + { BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_Z, "ORBITAL_ANGULAR_MOMENTUM_VECTOR_Z" }, + { BINARY_PROPERTY::ORBITAL_ANGULAR_VELOCITY, "ORBITAL_ANGULAR_VELOCITY" }, + { BINARY_PROPERTY::ORBITAL_VELOCITY_PRE_SUPERNOVA, "ORBITAL_VELOCITY_PRE_SUPERNOVA" }, + { BINARY_PROPERTY::RADIUS_1_POST_COMMON_ENVELOPE, "RADIUS_1_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::RADIUS_1_PRE_COMMON_ENVELOPE, "RADIUS_1_PRE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::RADIUS_2_POST_COMMON_ENVELOPE, "RADIUS_2_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::RADIUS_2_PRE_COMMON_ENVELOPE, "RADIUS_2_PRE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::RANDOM_SEED, "RANDOM_SEED" }, + { BINARY_PROPERTY::RLOF_ACCRETION_EFFICIENCY, "RLOF_ACCRETION_EFFICIENCY"}, + { BINARY_PROPERTY::RLOF_MASS_LOSS_RATE, "RLOF_MASS_LOSS_RATE"}, + { BINARY_PROPERTY::RLOF_MASS_TRANSFER_TIMESCALE, "RLOF_MASS_TRANSFER_TIMESCALE"}, + { BINARY_PROPERTY::RLOF_POST_MT_COMMON_ENVELOPE, "RLOF_POST_MT_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::RLOF_POST_MT_ECCENTRICITY, "RLOF_POST_MT_ECCENTRICITY" }, + { BINARY_PROPERTY::RLOF_POST_MT_EVENT_COUNTER, "RLOF_POST_MT_EVENT_COUNTER" }, + { BINARY_PROPERTY::RLOF_POST_MT_ID, "RLOF_POST_MT_ID" }, + { BINARY_PROPERTY::RLOF_POST_MT_SEMI_MAJOR_AXIS, "RLOF_POST_MT_SEMI_MAJOR_AXIS" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_MASS, "RLOF_POST_MT_STAR1_MASS" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_MASS, "RLOF_POST_MT_STAR2_MASS" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_RADIUS, "RLOF_POST_MT_STAR1_RADIUS" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_RADIUS, "RLOF_POST_MT_STAR2_RADIUS" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_TEFF, "RLOF_POST_MT_STAR1_TEFF" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_TEFF, "RLOF_POST_MT_STAR2_TEFF" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_LUM, "RLOF_POST_MT_STAR1_LUM" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_LUM, "RLOF_POST_MT_STAR2_LUM" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_RLOF, "RLOF_POST_MT_STAR1_RLOF" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_RLOF, "RLOF_POST_MT_STAR2_RLOF" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_STELLAR_TYPE, "RLOF_POST_MT_STAR1_STELLAR_TYPE" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_STELLAR_TYPE_NAME, "RLOF_POST_MT_STAR1_STELLAR_TYPE_NAME" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_STELLAR_TYPE, "RLOF_POST_MT_STAR2_STELLAR_TYPE" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_STELLAR_TYPE_NAME, "RLOF_POST_MT_STAR2_STELLAR_TYPE_NAME" }, + { BINARY_PROPERTY::RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, "RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1" }, + { BINARY_PROPERTY::RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, "RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2" }, + { BINARY_PROPERTY::RLOF_PRE_MT_ECCENTRICITY, "RLOF_PRE_MT_ECCENTRICITY" }, + { BINARY_PROPERTY::RLOF_PRE_MT_SEMI_MAJOR_AXIS, "RLOF_PRE_MT_SEMI_MAJOR_AXIS" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_MASS, "RLOF_PRE_MT_STAR1_MASS" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_MASS, "RLOF_PRE_MT_STAR2_MASS" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_RADIUS, "RLOF_PRE_MT_STAR1_RADIUS" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_RADIUS, "RLOF_PRE_MT_STAR2_RADIUS" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_TEFF, "RLOF_PRE_MT_STAR1_TEFF" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_TEFF, "RLOF_PRE_MT_STAR2_TEFF" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_LUM, "RLOF_PRE_MT_STAR1_LUM" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_LUM, "RLOF_PRE_MT_STAR2_LUM" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_RLOF, "RLOF_PRE_MT_STAR1_RLOF" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_RLOF, "RLOF_PRE_MT_STAR2_RLOF" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_STELLAR_TYPE, "RLOF_PRE_MT_STAR1_STELLAR_TYPE" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_STELLAR_TYPE_NAME, "RLOF_PRE_MT_STAR1_STELLAR_TYPE_NAME" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_STELLAR_TYPE, "RLOF_PRE_MT_STAR2_STELLAR_TYPE" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_STELLAR_TYPE_NAME, "RLOF_PRE_MT_STAR2_STELLAR_TYPE_NAME" }, + { BINARY_PROPERTY::RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, "RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1" }, + { BINARY_PROPERTY::RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, "RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2" }, + { BINARY_PROPERTY::RLOF_SECONDARY_POST_COMMON_ENVELOPE, "RLOF_SECONDARY_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::RLOF_TIME_POST_MT, "RLOF_TIME_POST_MT" }, + { BINARY_PROPERTY::RLOF_TIME_PRE_MT, "RLOF_TIME_PRE_MT" }, + { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1, "ROCHE_LOBE_RADIUS_1" }, + { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1_POST_COMMON_ENVELOPE, "ROCHE_LOBE_RADIUS_1_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1_PRE_COMMON_ENVELOPE, "ROCHE_LOBE_RADIUS_1_PRE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2, "ROCHE_LOBE_RADIUS_2" }, + { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2_POST_COMMON_ENVELOPE, "ROCHE_LOBE_RADIUS_2_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2_PRE_COMMON_ENVELOPE, "ROCHE_LOBE_RADIUS_2_PRE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, "STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1" }, + { BINARY_PROPERTY::STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, "STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2" }, + { BINARY_PROPERTY::SEMI_MAJOR_AXIS_AT_DCO_FORMATION, "SEMI_MAJOR_AXIS_AT_DCO_FORMATION" }, + { BINARY_PROPERTY::SEMI_MAJOR_AXIS_INITIAL, "SEMI_MAJOR_AXIS_INITIAL" }, + { BINARY_PROPERTY::SEMI_MAJOR_AXIS_POST_COMMON_ENVELOPE, "SEMI_MAJOR_AXIS_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::SEMI_MAJOR_AXIS_POST_STAGE_1_CE, "SEMI_MAJOR_AXIS_POST_STAGE_1_CE" }, + { BINARY_PROPERTY::SEMI_MAJOR_AXIS_PRE_SUPERNOVA, "SEMI_MAJOR_AXIS_PRE_SUPERNOVA" }, + { BINARY_PROPERTY::SEMI_MAJOR_AXIS_PRE_SUPERNOVA_RSOL, "SEMI_MAJOR_AXIS_PRE_SUPERNOVA_RSOL" }, + { BINARY_PROPERTY::SEMI_MAJOR_AXIS_PRE_COMMON_ENVELOPE, "SEMI_MAJOR_AXIS_PRE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::SEMI_MAJOR_AXIS, "SEMI_MAJOR_AXIS" }, + { BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, "SEMI_MAJOR_AXIS_RSOL" }, + { BINARY_PROPERTY::SIMULTANEOUS_RLOF, "SIMULTANEOUS_RLOF" }, + { BINARY_PROPERTY::STABLE_RLOF_POST_COMMON_ENVELOPE, "STABLE_RLOF_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::STELLAR_MERGER, "STELLAR_MERGER" }, + { BINARY_PROPERTY::STELLAR_MERGER_AT_BIRTH, "STELLAR_MERGER_AT_BIRTH" }, + { BINARY_PROPERTY::STELLAR_TYPE_1_POST_COMMON_ENVELOPE, "STELLAR_TYPE_1_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::STELLAR_TYPE_1_PRE_COMMON_ENVELOPE, "STELLAR_TYPE_1_PRE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::STELLAR_TYPE_2_POST_COMMON_ENVELOPE, "STELLAR_TYPE_2_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::STELLAR_TYPE_2_PRE_COMMON_ENVELOPE, "STELLAR_TYPE_2_PRE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::STELLAR_TYPE_NAME_1_POST_COMMON_ENVELOPE, "STELLAR_TYPE_NAME_1_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::STELLAR_TYPE_NAME_1_PRE_COMMON_ENVELOPE, "STELLAR_TYPE_NAME_1_PRE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::STELLAR_TYPE_NAME_2_POST_COMMON_ENVELOPE, "STELLAR_TYPE_NAME_2_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::STELLAR_TYPE_NAME_2_PRE_COMMON_ENVELOPE, "STELLAR_TYPE_NAME_2_PRE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::SUPERNOVA_ORBIT_INCLINATION_ANGLE, "SUPERNOVA_ORBIT_INCLINATION_ANGLE" }, + { BINARY_PROPERTY::SUPERNOVA_STATE, "SUPERNOVA_STATE" }, + { BINARY_PROPERTY::SYNCHRONIZATION_TIMESCALE_1, "SYNCHRONIZATION_TIMESCALE_1" }, + { BINARY_PROPERTY::SYNCHRONIZATION_TIMESCALE_2, "SYNCHRONIZATION_TIMESCALE_2" }, + { BINARY_PROPERTY::SYSTEMIC_SPEED, "SYSTEMIC_SPEED" }, + { BINARY_PROPERTY::SYSTEMIC_VELOCITY_X, "SYSTEMIC_VELOCITY_X" }, + { BINARY_PROPERTY::SYSTEMIC_VELOCITY_Y, "SYSTEMIC_VELOCITY_Y" }, + { BINARY_PROPERTY::SYSTEMIC_VELOCITY_Z, "SYSTEMIC_VELOCITY_Z" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_10_1, "TIDAL_POTENTIAL_LOVE_NUMBER_10_1" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_12_1, "TIDAL_POTENTIAL_LOVE_NUMBER_12_1" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_22_1, "TIDAL_POTENTIAL_LOVE_NUMBER_22_1" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_32_1, "TIDAL_POTENTIAL_LOVE_NUMBER_32_1" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_10_2, "TIDAL_POTENTIAL_LOVE_NUMBER_10_2" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_12_2, "TIDAL_POTENTIAL_LOVE_NUMBER_12_2" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_22_2, "TIDAL_POTENTIAL_LOVE_NUMBER_22_2" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_32_2, "TIDAL_POTENTIAL_LOVE_NUMBER_32_2" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_1, "TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_1" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_12_EQ_1, "TIDAL_POTENTIAL_LOVE_NUMBER_12_EQ_1" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_22_EQ_1, "TIDAL_POTENTIAL_LOVE_NUMBER_22_EQ_1" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_32_EQ_1, "TIDAL_POTENTIAL_LOVE_NUMBER_32_EQ_1" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_2, "TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_2" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_12_EQ_2, "TIDAL_POTENTIAL_LOVE_NUMBER_12_EQ_2" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_22_EQ_2, "TIDAL_POTENTIAL_LOVE_NUMBER_22_EQ_2" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_32_EQ_2, "TIDAL_POTENTIAL_LOVE_NUMBER_32_EQ_2" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_10_DYN_1, "TIDAL_POTENTIAL_LOVE_NUMBER_10_DYN_1" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_12_DYN_1, "TIDAL_POTENTIAL_LOVE_NUMBER_12_DYN_1" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_22_DYN_1, "TIDAL_POTENTIAL_LOVE_NUMBER_22_DYN_1" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_1, "TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_1" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_10_DYN_2, "TIDAL_POTENTIAL_LOVE_NUMBER_10_DYN_2" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_12_DYN_2, "TIDAL_POTENTIAL_LOVE_NUMBER_12_DYN_2" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_22_DYN_2, "TIDAL_POTENTIAL_LOVE_NUMBER_22_DYN_2" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_2, "TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_2" }, + { BINARY_PROPERTY::TIME, "TIME" }, + { BINARY_PROPERTY::TIME_TO_COALESCENCE, "TIME_TO_COALESCENCE" }, + { BINARY_PROPERTY::TOTAL_ANGULAR_MOMENTUM, "TOTAL_ANGULAR_MOMENTUM" }, + { BINARY_PROPERTY::TOTAL_ENERGY, "TOTAL_ENERGY" }, + { BINARY_PROPERTY::ZETA_LOBE, "ZETA_LOBE" }, + { BINARY_PROPERTY::ZETA_STAR, "ZETA_STAR" } +}; + + +// enum class PROGRAM_OPTION +// Symbolic names for program option values +// +// Options only need to be here if they are required to be +// available for printing in the logfiles +enum class PROGRAM_OPTION: int { + + NONE, + + ADD_OPTIONS_TO_SYSPARMS, + ALLOW_NON_STRIPPED_ECSN, + ALLOW_IMMEDIATE_RLOF_POST_CE_TO_SURVIVE_COMMON_ENVELOPE, + ALLOW_MS_STAR_TO_SURVIVE_COMMON_ENVELOPE, + ALLOW_RADIATIVE_ENVELOPE_STAR_TO_SURVIVE_COMMON_ENVELOPE, + ALLOW_RLOF_AT_BIRTH, + ALLOW_TOUCHING_AT_BIRTH, + ANG_MOM_CONSERVATION_DURING_CIRCULARISATION, + + BLACK_HOLE_KICKS_MODE, + + CASE_BB_STABILITY_PRESCRIPTION, + + CHECK_PHOTON_TIRING_LIMIT, + + CHE_MODE, + + CIRCULARISE_BINARY_DURING_MT, + + CIRCUMBINARY_DISK, + CIRCUMBINARY_DISK_USE_SYNCHRONIZED_ENVELOPE_ANGULAR_MOMENTUM, + CIRCUMBINARY_DISK_BETA, + CIRCUMBINARY_DISK_EDDINGTON_CAP_FACTOR, + CIRCUMBINARY_DISK_EDDINGTON_GE23_FACTOR, + CIRCUMBINARY_DISK_EDDINGTON_MODE, + CIRCUMBINARY_DISK_INNER_RADIUS_OVER_SEPARATION, + CIRCUMBINARY_DISK_LIFETIME, + CIRCUMBINARY_DISK_STRUCTURE_FACTOR, + CIRCUMBINARY_DISK_ENVELOPE_MASS_FRACTION_SUPPLIED, + CIRCUMBINARY_DISK_EVOLUTION_MODE, + POST_COMMON_ENVELOPE_ECCENTRICITY_CAP, + POST_COMMON_ENVELOPE_ECCENTRICITY_FRACTION, + POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION, + + COMMON_ENVELOPE_ALPHA, + COMMON_ENVELOPE_ALPHA_THERMAL, + COMMON_ENVELOPE_FORMALISM, + COMMON_ENVELOPE_LAMBDA, + COMMON_ENVELOPE_LAMBDA_MULTIPLIER, + COMMON_ENVELOPE_LAMBDA_PRESCRIPTION, + COMMON_ENVELOPE_MASS_ACCRETION_CONSTANT, + COMMON_ENVELOPE_MASS_ACCRETION_MAX, + COMMON_ENVELOPE_MASS_ACCRETION_MIN, + COMMON_ENVELOPE_MASS_ACCRETION_PRESCRIPTION, + COMMON_ENVELOPE_RECOMBINATION_ENERGY_DENSITY, + COMMON_ENVELOPE_SECOND_STAGE_BETA, + COMMON_ENVELOPE_SECOND_STAGE_GAMMA_PRESCRIPTION, + COMMON_ENVELOPE_SLOPE_KRUCKOW, + + CONVECTIVE_ENVELOPE_MASS_THRESHOLD, + CONVECTIVE_ENVELOPE_TEMPERATURE_THRESHOLD, + + COOL_WIND_MASS_LOSS_MULTIPLIER, + + ECCENTRICITY, + ECCENTRICITY_DISTRIBUTION, + ECCENTRICITY_DISTRIBUTION_MAX, + ECCENTRICITY_DISTRIBUTION_MIN, + EDDINGTON_ACCRETION_FACTOR, + ENABLE_ROTATIONALLY_ENHANCED_MASS_LOSS, + ENHANCE_CHE_LIFETIMES_LUMINOSITIES, + ENVELOPE_STATE_PRESCRIPTION, + EVOLUTION_MODE, + + FP_ERROR_MODE, + + FRYER_SUPERNOVA_ENGINE, + + FRYER22_FMIX, + FRYER22_MCRIT, + + INITIAL_MASS, + INITIAL_MASS_1, + INITIAL_MASS_2, + + INITIAL_MASS_FUNCTION, + INITIAL_MASS_FUNCTION_MAX, + INITIAL_MASS_FUNCTION_MIN, + INITIAL_MASS_FUNCTION_POWER, + + KICK_DIRECTION_DISTRIBUTION, + KICK_DIRECTION_POWER, + KICK_SCALING_FACTOR, + KICK_MAGNITUDE_DISTRIBUTION, + KICK_MAGNITUDE_DISTRIBUTION_MAXIMUM, + + KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH, + KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS, + KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN, + KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN, + + KICK_MAGNITUDE, + KICK_MAGNITUDE_1, + KICK_MAGNITUDE_2, + + KICK_MAGNITUDE_RANDOM, + KICK_MAGNITUDE_RANDOM_1, + KICK_MAGNITUDE_RANDOM_2, + + KICK_MEAN_ANOMALY_1, + KICK_MEAN_ANOMALY_2, + KICK_PHI_1, + KICK_PHI_2, + KICK_THETA_1, + KICK_THETA_2, + + LBV_FACTOR, + LBV_MASS_LOSS_PRESCRIPTION, + + MALTSEV_FALLBACK, + MALTSEV_MODE, + + MASS_LOSS_PRESCRIPTION, + + MASS_RATIO, + MASS_RATIO_DISTRIBUTION, + MASS_RATIO_DISTRIBUTION_MAX, + MASS_RATIO_DISTRIBUTION_MIN, + + MAXIMUM_EVOLUTION_TIME, + MAXIMUM_DONOR_MASS, + MAXIMUM_NEUTRON_STAR_MASS, + MAXIMUM_TIMESTEPS, + + MCBUR1, + + METALLICITY, + METALLICITY_DISTRIBUTION, + METALLICITY_DISTRIBUTION_MAX, + METALLICITY_DISTRIBUTION_MIN, + + MINIMUM_SAMPLED_SECONDARY_MASS, + + MT_ACCRETION_EFFICIENCY_PRESCRIPTION, + MT_ANG_MOM_LOSS_PRESCRIPTION, + MT_THERMAL_LIMIT_C, + + MT_CRIT_MR_MS_LOW_MASS_DEGENERATE_ACCRETOR, + MT_CRIT_MR_MS_LOW_MASS_NON_DEGENERATE_ACCRETOR, + MT_CRIT_MR_MS_HIGH_MASS_DEGENERATE_ACCRETOR, + MT_CRIT_MR_MS_HIGH_MASS_NON_DEGENERATE_ACCRETOR, + MT_CRIT_MR_GIANT_DEGENERATE_ACCRETOR, + MT_CRIT_MR_GIANT_NON_DEGENERATE_ACCRETOR, + MT_CRIT_MR_HG_DEGENERATE_ACCRETOR, + MT_CRIT_MR_HG_NON_DEGENERATE_ACCRETOR, + MT_CRIT_MR_HE_GIANT_DEGENERATE_ACCRETOR, + MT_CRIT_MR_HE_GIANT_NON_DEGENERATE_ACCRETOR, + MT_CRIT_MR_HE_HG_DEGENERATE_ACCRETOR, + MT_CRIT_MR_HE_HG_NON_DEGENERATE_ACCRETOR, + MT_CRIT_MR_HE_MS_DEGENERATE_ACCRETOR, + MT_CRIT_MR_HE_MS_NON_DEGENERATE_ACCRETOR, + MT_CRIT_MR_WD_DEGENERATE_ACCRETOR, + MT_CRIT_MR_WD_NONDEGENERATE_ACCRETOR, + + MT_FRACTION_ACCRETED, + MT_JLOSS, + MT_JLOSS_LINEAR_FRACTION_DEGEN, + MT_JLOSS_LINEAR_FRACTION_NON_DEGEN, + MT_REJUVENATION_PRESCRIPTION, + MT_THERMALLY_LIMITED_VARIATION, + + MULLER_MANDEL_KICK_MULTIPLIER_BH, + MULLER_MANDEL_KICK_MULTIPLIER_NS, + MULLER_MANDEL_SIGMA_KICK_BH, + MULLER_MANDEL_SIGMA_KICK_NS, + + NEUTRINO_MASS_LOSS_ASSUMPTION_BH, + NEUTRINO_MASS_LOSS_VALUE_BH, + + NOTES, + + NS_ACCRETION_IN_CE, + NS_EOS, + + ORBITAL_PERIOD, + ORBITAL_PERIOD_DISTRIBUTION, + ORBITAL_PERIOD_DISTRIBUTION_MAX, + ORBITAL_PERIOD_DISTRIBUTION_MIN, + + OVERALL_WIND_MASS_LOSS_MULTIPLIER, + + PISN_LOWER_LIMIT, + PISN_UPPER_LIMIT, + + PPI_LOWER_LIMIT, + PPI_PRESCRIPTION, + PPI_UPPER_LIMIT, + PPI_CO_CORE_SHIFT_HENDRIKS, + + PULSAR_MAGNETIC_FIELD_DISTRIBUTION, + PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MAX, + PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MIN, + + PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION, + PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MAX, + PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MIN, + + PULSAR_MAGNETIC_FIELD_DECAY_MASS_SCALE, + PULSAR_MAGNETIC_FIELD_DECAY_TIME_SCALE, + + PULSAR_MINIMUM_MAGNETIC_FIELD, + + QCRIT_PRESCRIPTION, + + RANDOM_SEED, + RANDOM_SEED_CMDLINE, + + REMNANT_MASS_PRESCRIPTION, + + RESPONSE_TO_SPIN_UP, + + ROCKET_KICK_MAGNITUDE_1, + ROCKET_KICK_MAGNITUDE_2, + ROCKET_KICK_PHI_1, + ROCKET_KICK_PHI_2, + ROCKET_KICK_THETA_1, + ROCKET_KICK_THETA_2, + + ROTATIONAL_VELOCITY_DISTRIBUTION, + ROTATIONAL_FREQUENCY, + ROTATIONAL_FREQUENCY_1, + ROTATIONAL_FREQUENCY_2, + + SCALE_CHE_MASS_LOSS_SURF_HE_ABUNDANCE, + SCALE_TERMINAL_WIND_VEL_METALLICITY_POWER, + SEMI_MAJOR_AXIS, + SEMI_MAJOR_AXIS_DISTRIBUTION, + SEMI_MAJOR_AXIS_DISTRIBUTION_MAX, + SEMI_MAJOR_AXIS_DISTRIBUTION_MIN, + + STELLAR_ZETA_PRESCRIPTION, + + TIDES_PRESCRIPTION, + + USSN_KICKS_OVERRIDE_MANDEL_MULLER, + + WR_FACTOR, + + ZETA_ADIABATIC_ARBITRARY, + ZETA_MS, + ZETA_RADIATIVE_ENVELOPE_GIANT +}; +// map PROGRAM_OPTION to string identifying the property +// for lookup by the printing functions +// +// Options only need to be here if they are required to be +// available for printing in the logfiles - all keys present here +// should also be in PROGRAM_OPTION_DETAIL ( except PROGRAM_OPTION::NOTES) +const COMPASUnorderedMap PROGRAM_OPTION_LABEL = { + + { PROGRAM_OPTION::NONE, "NONE" }, + + { PROGRAM_OPTION::ALLOW_NON_STRIPPED_ECSN, "ALLOW_NON_STRIPPED_ECSN" }, + { PROGRAM_OPTION::ADD_OPTIONS_TO_SYSPARMS, "ADD_OPTIONS_TO_SYSPARMS" }, + { PROGRAM_OPTION::ALLOW_MS_STAR_TO_SURVIVE_COMMON_ENVELOPE, "ALLOW_MS_STAR_TO_SURVIVE_COMMON_ENVELOPE" }, + { PROGRAM_OPTION::ALLOW_RADIATIVE_ENVELOPE_STAR_TO_SURVIVE_COMMON_ENVELOPE, "ALLOW_RADIATIVE_ENVELOPE_STAR_TO_SURVIVE_COMMON_ENVELOPE" }, + { PROGRAM_OPTION::ALLOW_IMMEDIATE_RLOF_POST_CE_TO_SURVIVE_COMMON_ENVELOPE, "ALLOW_IMMEDIATE_RLOF_POST_CE_TO_SURVIVE_COMMON_ENVELOPE" }, + { PROGRAM_OPTION::ALLOW_RLOF_AT_BIRTH, "ALLOW_RLOF_AT_BIRTH" }, + { PROGRAM_OPTION::ALLOW_TOUCHING_AT_BIRTH, "ALLOW_TOUCHING_AT_BIRTH" }, + { PROGRAM_OPTION::ANG_MOM_CONSERVATION_DURING_CIRCULARISATION, "ANG_MOM_CONSERVATION_DURING_CIRCULARISATION" }, + + { PROGRAM_OPTION::BLACK_HOLE_KICKS_MODE, "BLACK_HOLE_KICKS_MODE" }, + + { PROGRAM_OPTION::CASE_BB_STABILITY_PRESCRIPTION, "CASE_BB_STABILITY_PRESCRIPTION" }, + + { PROGRAM_OPTION::CHECK_PHOTON_TIRING_LIMIT, "CHECK_PHOTON_TIRING_LIMIT" }, + + { PROGRAM_OPTION::CHE_MODE, "CHE_MODE" }, + + { PROGRAM_OPTION::CIRCULARISE_BINARY_DURING_MT, "CIRCULARISE_BINARY_DURING_MT" }, + + { PROGRAM_OPTION::CIRCUMBINARY_DISK, "CIRCUMBINARY_DISK" }, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_USE_SYNCHRONIZED_ENVELOPE_ANGULAR_MOMENTUM, "CIRCUMBINARY_DISK_USE_SYNCHRONIZED_ENVELOPE_ANGULAR_MOMENTUM" }, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_BETA, "CIRCUMBINARY_DISK_BETA" }, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_CAP_FACTOR, "CIRCUMBINARY_DISK_EDDINGTON_CAP_FACTOR" }, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_GE23_FACTOR, "CIRCUMBINARY_DISK_EDDINGTON_GE23_FACTOR" }, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_MODE, "CIRCUMBINARY_DISK_EDDINGTON_MODE" }, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_INNER_RADIUS_OVER_SEPARATION, "CIRCUMBINARY_DISK_INNER_RADIUS_OVER_SEPARATION" }, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_LIFETIME, "CIRCUMBINARY_DISK_LIFETIME" }, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_STRUCTURE_FACTOR, "CIRCUMBINARY_DISK_STRUCTURE_FACTOR" }, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_ENVELOPE_MASS_FRACTION_SUPPLIED, "CIRCUMBINARY_DISK_ENVELOPE_MASS_FRACTION_SUPPLIED" }, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_EVOLUTION_MODE, "CIRCUMBINARY_DISK_EVOLUTION_MODE" }, + { PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_CAP, "POST_COMMON_ENVELOPE_ECCENTRICITY_CAP" }, + { PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_FRACTION, "POST_COMMON_ENVELOPE_ECCENTRICITY_FRACTION" }, + { PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION, "POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION" }, + + { PROGRAM_OPTION::COMMON_ENVELOPE_ALPHA, "COMMON_ENVELOPE_ALPHA" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_ALPHA_THERMAL, "COMMON_ENVELOPE_ALPHA_THERMAL" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_FORMALISM, "COMMON_ENVELOPE_FORMALISM" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_LAMBDA, "COMMON_ENVELOPE_LAMBDA" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_LAMBDA_MULTIPLIER, "COMMON_ENVELOPE_LAMBDA_MULTIPLIER" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_LAMBDA_PRESCRIPTION, "COMMON_ENVELOPE_LAMBDA_PRESCRIPTION" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_CONSTANT, "COMMON_ENVELOPE_MASS_ACCRETION_CONSTANT" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_MAX, "COMMON_ENVELOPE_MASS_ACCRETION_MAX" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_MIN, "COMMON_ENVELOPE_MASS_ACCRETION_MIN" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_PRESCRIPTION, "COMMON_ENVELOPE_MASS_ACCRETION_PRESCRIPTION" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_RECOMBINATION_ENERGY_DENSITY, "COMMON_ENVELOPE_RECOMBINATION_ENERGY_DENSITY" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_SECOND_STAGE_BETA, "COMMON_ENVELOPE_SECOND_STAGE_BETA" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_SECOND_STAGE_GAMMA_PRESCRIPTION, "COMMON_ENVELOPE_SECOND_STAGE_GAMMA_PRESCRIPTION" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_SLOPE_KRUCKOW, "COMMON_ENVELOPE_SLOPE_KRUCKOW" }, + + { PROGRAM_OPTION::COOL_WIND_MASS_LOSS_MULTIPLIER, "COOL_WIND_MASS_LOSS_MULTIPLIER" }, + + { PROGRAM_OPTION::ECCENTRICITY, "ECCENTRICITY" }, + { PROGRAM_OPTION::ECCENTRICITY_DISTRIBUTION, "ECCENTRICITY_DISTRIBUTION" }, + { PROGRAM_OPTION::ECCENTRICITY_DISTRIBUTION_MAX, "ECCENTRICITY_DISTRIBUTION_MAX" }, + { PROGRAM_OPTION::ECCENTRICITY_DISTRIBUTION_MIN, "ECCENTRICITY_DISTRIBUTION_MIN" }, + { PROGRAM_OPTION::EDDINGTON_ACCRETION_FACTOR, "EDDINGTON_ACCRETION_FACTOR" }, + { PROGRAM_OPTION::ENABLE_ROTATIONALLY_ENHANCED_MASS_LOSS, "ENABLE_ROTATIONALLY_ENHANCED_MASS_LOSS" }, + { PROGRAM_OPTION::ENHANCE_CHE_LIFETIMES_LUMINOSITIES, "ENHANCE_CHE_LIFETIMES_LUMINOSITIES" }, + { PROGRAM_OPTION::ENVELOPE_STATE_PRESCRIPTION, "ENVELOPE_STATE_PRESCRIPTION" }, + { PROGRAM_OPTION::EVOLUTION_MODE, "EVOLUTION_MODE" }, + + { PROGRAM_OPTION::FP_ERROR_MODE, "FP_ERROR_MODE" }, + + { PROGRAM_OPTION::FRYER_SUPERNOVA_ENGINE, "FRYER_SUPERNOVA_ENGINE" }, + + { PROGRAM_OPTION::FRYER22_FMIX, "FRYER22_FMIX" }, + { PROGRAM_OPTION::FRYER22_MCRIT, "FRYER22_MCRIT" }, + + { PROGRAM_OPTION::INITIAL_MASS, "INITIAL_MASS" }, + { PROGRAM_OPTION::INITIAL_MASS_1, "INITIAL_MASS_1" }, + { PROGRAM_OPTION::INITIAL_MASS_2, "INITIAL_MASS_2" }, + + { PROGRAM_OPTION::INITIAL_MASS_FUNCTION, "INITIAL_MASS_FUNCTION" }, + { PROGRAM_OPTION::INITIAL_MASS_FUNCTION_MAX, "INITIAL_MASS_FUNCTION_MAX" }, + { PROGRAM_OPTION::INITIAL_MASS_FUNCTION_MIN, "INITIAL_MASS_FUNCTION_MIN" }, + { PROGRAM_OPTION::INITIAL_MASS_FUNCTION_POWER, "INITIAL_MASS_FUNCTION_POWER" }, + { PROGRAM_OPTION::KICK_DIRECTION_DISTRIBUTION, "KICK_DIRECTION_DISTRIBUTION" }, + { PROGRAM_OPTION::KICK_DIRECTION_POWER, "KICK_DIRECTION_POWER" }, + { PROGRAM_OPTION::KICK_SCALING_FACTOR, "KICK_SCALING_FACTOR" }, + { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION, "KICK_MAGNITUDE_DISTRIBUTION" }, + { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_MAXIMUM, "KICK_MAGNITUDE_DISTRIBUTION_MAXIMUM" }, + + { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH, "KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH" }, + { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS, "KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS" }, + { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN, "KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN" }, + { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN, "KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN" }, + + { PROGRAM_OPTION::KICK_MAGNITUDE, "KICK_MAGNITUDE" }, + { PROGRAM_OPTION::KICK_MAGNITUDE_1, "KICK_MAGNITUDE_1" }, + { PROGRAM_OPTION::KICK_MAGNITUDE_2, "KICK_MAGNITUDE_2" }, + + { PROGRAM_OPTION::KICK_MAGNITUDE_RANDOM, "KICK_MAGNITUDE_RANDOM" }, + { PROGRAM_OPTION::KICK_MAGNITUDE_RANDOM_1, "KICK_MAGNITUDE_RANDOM_1" }, + { PROGRAM_OPTION::KICK_MAGNITUDE_RANDOM_2, "KICK_MAGNITUDE_RANDOM_2" }, + + { PROGRAM_OPTION::KICK_MEAN_ANOMALY_1, "KICK_MEAN_ANOMALY_1" }, + { PROGRAM_OPTION::KICK_MEAN_ANOMALY_2, "KICK_MEAN_ANOMALY_2" }, + { PROGRAM_OPTION::KICK_PHI_1, "KICK_PHI_1" }, + { PROGRAM_OPTION::KICK_PHI_2, "KICK_PHI_2" }, + { PROGRAM_OPTION::KICK_THETA_1, "KICK_THETA_1" }, + { PROGRAM_OPTION::KICK_THETA_2, "KICK_THETA_2" }, + + { PROGRAM_OPTION::LBV_FACTOR, "LBV_FACTOR" }, + { PROGRAM_OPTION::LBV_MASS_LOSS_PRESCRIPTION, "LBV_MASS_LOSS_PRESCRIPTION" }, + + { PROGRAM_OPTION::MALTSEV_FALLBACK, "MALTSEV_FALLBACK" }, + { PROGRAM_OPTION::MALTSEV_MODE, "MALTSEV_MODE" }, + { PROGRAM_OPTION::MASS_LOSS_PRESCRIPTION, "MASS_LOSS_PRESCRIPTION" }, + + { PROGRAM_OPTION::MASS_RATIO, "MASS_RATIO" }, + { PROGRAM_OPTION::MASS_RATIO_DISTRIBUTION, "MASS_RATIO_DISTRIBUTION" }, + { PROGRAM_OPTION::MASS_RATIO_DISTRIBUTION_MAX, "MASS_RATIO_DISTRIBUTION_MAX" }, + { PROGRAM_OPTION::MASS_RATIO_DISTRIBUTION_MIN, "MASS_RATIO_DISTRIBUTION_MIN" }, + + { PROGRAM_OPTION::MAXIMUM_EVOLUTION_TIME, "MAXIMUM_EVOLUTION_TIME" }, + { PROGRAM_OPTION::MAXIMUM_DONOR_MASS, "MAXIMUM_DONOR_MASS" }, + { PROGRAM_OPTION::MAXIMUM_NEUTRON_STAR_MASS, "MAXIMUM_NEUTRON_STAR_MASS" }, + { PROGRAM_OPTION::MAXIMUM_TIMESTEPS, "MAXIMUM_TIMESTEPS" }, + + { PROGRAM_OPTION::MCBUR1, "MCBUR1" }, + + { PROGRAM_OPTION::METALLICITY, "METALLICITY" }, + { PROGRAM_OPTION::METALLICITY_DISTRIBUTION, "METALLICITY_DISTRIBUTION" }, + { PROGRAM_OPTION::METALLICITY_DISTRIBUTION_MAX, "METALLICITY_DISTRIBUTION_MAX" }, + { PROGRAM_OPTION::METALLICITY_DISTRIBUTION_MIN, "METALLICITY_DISTRIBUTION_MIN" }, + + { PROGRAM_OPTION::MINIMUM_SAMPLED_SECONDARY_MASS, "MINIMUM_SAMPLED_SECONDARY_MASS" }, + + { PROGRAM_OPTION::MT_ACCRETION_EFFICIENCY_PRESCRIPTION, "MT_ACCRETION_EFFICIENCY_PRESCRIPTION" }, + { PROGRAM_OPTION::MT_ANG_MOM_LOSS_PRESCRIPTION, "MT_ANG_MOM_LOSS_PRESCRIPTION" }, + { PROGRAM_OPTION::MT_THERMAL_LIMIT_C, "MT_THERMAL_LIMIT_C" }, + + { PROGRAM_OPTION::MT_CRIT_MR_MS_LOW_MASS_DEGENERATE_ACCRETOR, "MT_CRIT_MR_MS_LOW_MASS_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_MS_LOW_MASS_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_MS_LOW_MASS_NON_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_MS_HIGH_MASS_DEGENERATE_ACCRETOR, "MT_CRIT_MR_MS_HIGH_MASS_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_MS_HIGH_MASS_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_MS_HIGH_MASS_NON_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_GIANT_DEGENERATE_ACCRETOR, "MT_CRIT_MR_GIANT_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_GIANT_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_GIANT_NON_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_HG_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HG_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_HG_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HG_NON_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_HE_GIANT_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HE_GIANT_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_HE_GIANT_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HE_GIANT_NON_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_HE_HG_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HE_HG_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_HE_HG_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HE_HG_NON_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_HE_MS_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HE_MS_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_HE_MS_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HE_MS_NON_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_WD_DEGENERATE_ACCRETOR, "MT_CRIT_MR_WD_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_WD_NONDEGENERATE_ACCRETOR, "MT_CRIT_MR_WD_NONDEGENERATE_ACCRETOR" }, + + { PROGRAM_OPTION::MT_FRACTION_ACCRETED, "MT_FRACTION_ACCRETED" }, + { PROGRAM_OPTION::MT_JLOSS, "MT_JLOSS" }, + { PROGRAM_OPTION::MT_JLOSS_LINEAR_FRACTION_DEGEN, "MT_JLOSS_LINEAR_FRACTION_DEGEN" }, + { PROGRAM_OPTION::MT_JLOSS_LINEAR_FRACTION_NON_DEGEN, "MT_JLOSS_LINEAR_FRACTION_NON_DEGEN" }, + { PROGRAM_OPTION::MT_REJUVENATION_PRESCRIPTION, "MT_REJUVENATION_PRESCRIPTION" }, + { PROGRAM_OPTION::MT_THERMALLY_LIMITED_VARIATION, "MT_THERMALLY_LIMITED_VARIATION" }, + + { PROGRAM_OPTION::MULLER_MANDEL_KICK_MULTIPLIER_BH, "MULLER_MANDEL_KICK_MULTIPLIER_BH" }, + { PROGRAM_OPTION::MULLER_MANDEL_KICK_MULTIPLIER_NS, "MULLER_MANDEL_KICK_MULTIPLIER_NS" }, + { PROGRAM_OPTION::MULLER_MANDEL_SIGMA_KICK_BH, "MULLER_MANDEL_SIGMA_KICK_BH" }, + { PROGRAM_OPTION::MULLER_MANDEL_SIGMA_KICK_NS, "MULLER_MANDEL_SIGMA_KICK_NS" }, + + { PROGRAM_OPTION::NEUTRINO_MASS_LOSS_ASSUMPTION_BH, "NEUTRINO_MASS_LOSS_ASSUMPTION_BH" }, + { PROGRAM_OPTION::NEUTRINO_MASS_LOSS_VALUE_BH, "NEUTRINO_MASS_LOSS_VALUE_BH" }, + + { PROGRAM_OPTION::NOTES, "NOTES" }, + + { PROGRAM_OPTION::NS_ACCRETION_IN_CE, "NS_ACCRETION_IN_CE" }, + { PROGRAM_OPTION::NS_EOS, "NS_EOS" }, + + { PROGRAM_OPTION::ORBITAL_PERIOD, "ORBITAL_PERIOD" }, + { PROGRAM_OPTION::ORBITAL_PERIOD_DISTRIBUTION, "ORBITAL_PERIOD_DISTRIBUTION" }, + { PROGRAM_OPTION::ORBITAL_PERIOD_DISTRIBUTION_MAX, "ORBITAL_PERIOD_DISTRIBUTION_MAX" }, + { PROGRAM_OPTION::ORBITAL_PERIOD_DISTRIBUTION_MIN, "ORBITAL_PERIOD_DISTRIBUTION_MIN" }, + + { PROGRAM_OPTION::OVERALL_WIND_MASS_LOSS_MULTIPLIER, "OVERALL_WIND_MASS_LOSS_MULTIPLIER" }, + + { PROGRAM_OPTION::PISN_LOWER_LIMIT, "PISN_LOWER_LIMIT" }, + { PROGRAM_OPTION::PISN_UPPER_LIMIT, "PISN_UPPER_LIMIT" }, + + { PROGRAM_OPTION::PPI_LOWER_LIMIT, "PPI_LOWER_LIMIT" }, + { PROGRAM_OPTION::PPI_PRESCRIPTION, "PPI_PRESCRIPTION" }, + { PROGRAM_OPTION::PPI_UPPER_LIMIT, "PPI_UPPER_LIMIT" }, + { PROGRAM_OPTION::PPI_CO_CORE_SHIFT_HENDRIKS, "PPI_CO_CORE_SHIFT_HENDRIKS"}, + + { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DISTRIBUTION, "PULSAR_MAGNETIC_FIELD_DISTRIBUTION" }, + { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MAX, "PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MAX" }, + { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MIN, "PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MIN" }, + + { PROGRAM_OPTION::PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION, "PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION" }, + { PROGRAM_OPTION::PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MAX, "PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MAX" }, + { PROGRAM_OPTION::PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MIN, "PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MIN" }, + + { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DECAY_MASS_SCALE, "PULSAR_MAGNETIC_FIELD_DECAY_MASS_SCALE" }, + { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DECAY_TIME_SCALE, "PULSAR_MAGNETIC_FIELD_DECAY_TIME_SCALE" }, + + { PROGRAM_OPTION::PULSAR_MINIMUM_MAGNETIC_FIELD, "PULSAR_MINIMUM_MAGNETIC_FIELD" }, + + { PROGRAM_OPTION::QCRIT_PRESCRIPTION, "QCRIT_PRESCRIPTION" }, + + { PROGRAM_OPTION::RANDOM_SEED, "RANDOM_SEED" }, + { PROGRAM_OPTION::RANDOM_SEED_CMDLINE, "RANDOM_SEED_CMDLINE" }, + + { PROGRAM_OPTION::REMNANT_MASS_PRESCRIPTION, "REMNANT_MASS_PRESCRIPTION" }, + + { PROGRAM_OPTION::ROCKET_KICK_MAGNITUDE_1, "ROCKET_KICK_MAGNITUDE_1" }, + { PROGRAM_OPTION::ROCKET_KICK_MAGNITUDE_2, "ROCKET_KICK_MAGNITUDE_2" }, + { PROGRAM_OPTION::ROCKET_KICK_PHI_1, "ROCKET_KICK_PHI_1" }, + { PROGRAM_OPTION::ROCKET_KICK_PHI_2, "ROCKET_KICK_PHI_2" }, + { PROGRAM_OPTION::ROCKET_KICK_THETA_1, "ROCKET_KICK_THETA_1" }, + { PROGRAM_OPTION::ROCKET_KICK_THETA_2, "ROCKET_KICK_THETA_2" }, + + { PROGRAM_OPTION::ROTATIONAL_VELOCITY_DISTRIBUTION, "ROTATIONAL_VELOCITY_DISTRIBUTION" }, + { PROGRAM_OPTION::ROTATIONAL_FREQUENCY, "ROTATIONAL_FREQUENCY" }, + { PROGRAM_OPTION::ROTATIONAL_FREQUENCY_1, "ROTATIONAL_FREQUENCY_1" }, + { PROGRAM_OPTION::ROTATIONAL_FREQUENCY_2, "ROTATIONAL_FREQUENCY_2" }, + + { PROGRAM_OPTION::SCALE_CHE_MASS_LOSS_SURF_HE_ABUNDANCE, "SCALE_CHE_MASS_LOSS_SURF_HE_ABUNDANCE" }, + { PROGRAM_OPTION::SCALE_TERMINAL_WIND_VEL_METALLICITY_POWER, "SCALE_TERMINAL_WIND_VEL_METALLICITY_POWER" }, + { PROGRAM_OPTION::SEMI_MAJOR_AXIS, "SEMI_MAJOR_AXIS" }, + { PROGRAM_OPTION::SEMI_MAJOR_AXIS_DISTRIBUTION, "SEMI_MAJOR_AXIS_DISTRIBUTION" }, + { PROGRAM_OPTION::SEMI_MAJOR_AXIS_DISTRIBUTION_MAX, "SEMI_MAJOR_AXIS_DISTRIBUTION_MAX" }, + { PROGRAM_OPTION::SEMI_MAJOR_AXIS_DISTRIBUTION_MIN, "SEMI_MAJOR_AXIS_DISTRIBUTION_MIN" }, + + { PROGRAM_OPTION::STELLAR_ZETA_PRESCRIPTION, "STELLAR_ZETA_PRESCRIPTION" }, + + { PROGRAM_OPTION::TIDES_PRESCRIPTION, "TIDES_PRESCRIPTION" }, + + { PROGRAM_OPTION::USSN_KICKS_OVERRIDE_MANDEL_MULLER, "USSN_KICKS_OVERRIDE_MANDEL_MULLER" }, + + { PROGRAM_OPTION::WR_FACTOR, "WR_FACTOR" }, + + { PROGRAM_OPTION::ZETA_ADIABATIC_ARBITRARY, "ZETA_ADIABATIC_ARBITRARY" }, + { PROGRAM_OPTION::ZETA_MS, "ZETA_MS" }, + { PROGRAM_OPTION::ZETA_RADIATIVE_ENVELOPE_GIANT, "ZETA_RADIATIVE_ENVELOPE_GIANT" } +}; + + +enum class ANY_PROPERTY_TYPE: int { T_STAR_1_PROPERTY, T_STAR_2_PROPERTY, T_SUPERNOVA_PROPERTY, T_COMPANION_PROPERTY, T_STAR_PROPERTY, T_BINARY_PROPERTY, T_PROGRAM_OPTION }; + +typedef boost::variant T_ANY_PROPERTY; +typedef boost::variant T_ANY_STAR_PROPERTY; +typedef boost::variant T_ANY_BINARY_CONSTITUENT_PROPERTY; +typedef boost::variant T_ANY_BINARY_PROPERTY; + + +typedef std::vector ANY_PROPERTY_VECTOR; + + +class VariantPropertyType: public boost::static_visitor { +public: + ANY_PROPERTY_TYPE operator()(STAR_PROPERTY prop) const { return ANY_PROPERTY_TYPE::T_STAR_PROPERTY; } + ANY_PROPERTY_TYPE operator()(STAR_1_PROPERTY prop) const { return ANY_PROPERTY_TYPE::T_STAR_1_PROPERTY; } + ANY_PROPERTY_TYPE operator()(STAR_2_PROPERTY prop) const { return ANY_PROPERTY_TYPE::T_STAR_2_PROPERTY; } + ANY_PROPERTY_TYPE operator()(SUPERNOVA_PROPERTY prop) const { return ANY_PROPERTY_TYPE::T_SUPERNOVA_PROPERTY; } + ANY_PROPERTY_TYPE operator()(COMPANION_PROPERTY prop) const { return ANY_PROPERTY_TYPE::T_COMPANION_PROPERTY; } + ANY_PROPERTY_TYPE operator()(BINARY_PROPERTY prop) const { return ANY_PROPERTY_TYPE::T_BINARY_PROPERTY; } + ANY_PROPERTY_TYPE operator()(PROGRAM_OPTION prop) const { return ANY_PROPERTY_TYPE::T_PROGRAM_OPTION; } +}; + + +// Property types +enum class PROPERTY_TYPE: int { NONE, STAR_PROPERTY, STAR_1_PROPERTY, STAR_2_PROPERTY, SUPERNOVA_PROPERTY, COMPANION_PROPERTY, ANY_STAR_PROPERTY, BINARY_PROPERTY, PROGRAM_OPTION }; +const COMPASUnorderedMap PROPERTY_TYPE_LABEL = { + { PROPERTY_TYPE::NONE, "" }, + { PROPERTY_TYPE::STAR_PROPERTY, "STAR_PROPERTY" }, + { PROPERTY_TYPE::STAR_1_PROPERTY, "STAR_1_PROPERTY" }, + { PROPERTY_TYPE::STAR_2_PROPERTY, "STAR_2_PROPERTY" }, + { PROPERTY_TYPE::SUPERNOVA_PROPERTY, "SUPERNOVA_PROPERTY" }, + { PROPERTY_TYPE::COMPANION_PROPERTY, "COMPANION_PROPERTY" }, + { PROPERTY_TYPE::ANY_STAR_PROPERTY, "ANY_STAR_PROPERTY" }, + { PROPERTY_TYPE::BINARY_PROPERTY, "BINARY_PROPERTY" }, + { PROPERTY_TYPE::PROGRAM_OPTION, "PROGRAM_OPTION" } +}; + + +// typedef for property details +// the property details provide information about the property to assist in printing the property value +// the property_details tuple contains: +// +// +// +// where: +// +// data type is, as the name suggest, the data type of the property, from the TYPENAME enum class (above) +// header string is the string to be printed as the column header for the property +// units string is the string to be printed as the units header for the property +// field width is the printf() field width of the property (does not apply to HDF5 files; meaning varies per the data type, refer to printf() documentation) +// field precision is the printf() field precision of the property (does not apply to HDF5 files; meaning varies per the data type, refer to printf() documentation) +typedef std::tuple PROPERTY_DETAILS; + +// map ANY_STAR_PROPERTY_DETAIL +// Records the details of STELLAR properties. The STELLAR properties are those that pertain +// to individual stars, whether they be a single star being evolved for SSE, or one of the +// constituent stars being evolved as part of a binary for BSE +// +// Properties only need to be here if they are required to be available for printing in +// the logfiles - all keys present here should also be in the STAR_PROPERTIES #define and +// STAR_PROPERTIES_LABEL +const std::map ANY_STAR_PROPERTY_DETAIL = { + { ANY_STAR_PROPERTY::AGE, { TYPENAME::DOUBLE, "Age", "Myr", 24, 15}}, + { ANY_STAR_PROPERTY::ANGULAR_MOMENTUM, { TYPENAME::DOUBLE, "Ang_Momentum", "Msol AU^2 yr^-1", 24, 15}}, + { ANY_STAR_PROPERTY::BINDING_ENERGY_AT_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Binding_Energy@CE", "erg", 24, 15}}, + { ANY_STAR_PROPERTY::BINDING_ENERGY_CONVECTIVE_ENVELOPE, { TYPENAME::DOUBLE, "BE_ConvectiveEnvelope", "erg", 24, 15}}, + { ANY_STAR_PROPERTY::BINDING_ENERGY_FIXED, { TYPENAME::DOUBLE, "BE_Fixed", "erg", 24, 15}}, + { ANY_STAR_PROPERTY::BINDING_ENERGY_NANJING, { TYPENAME::DOUBLE, "BE_Nanjing", "erg", 24, 15}}, + { ANY_STAR_PROPERTY::BINDING_ENERGY_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Binding_EnergyCE", "Myr", 24, 15}}, + { ANY_STAR_PROPERTY::DYNAMICAL_TIMESCALE_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Tau_DynamicalCE", "Lsol", 24, 15}}, + { ANY_STAR_PROPERTY::LUMINOSITY_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "LuminositySN", "Msol^2AU^-1", 24, 15}}, + { ANY_STAR_PROPERTY::ORBITAL_ENERGY_PRE_SUPERNOVA, { TYPENAME::DOUBLE, "Orbital_EnergyCE", "Myr", 24, 15}}, + { ANY_STAR_PROPERTY::RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Tau_RadialCE", "K", 24, 15}}, + { ANY_STAR_PROPERTY::TEMPERATURE_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "TeffCE", "Myr", 24, 15}}, + { ANY_STAR_PROPERTY::THERMAL_TIMESCALE_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Tau_Thermal BINARY_PROPERTY_DETAIL = { + { BINARY_PROPERTY::CIRCULARIZATION_TIMESCALE, { TYPENAME::DOUBLE, "Tau_Circ", "Myr", 24, 15}}, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_FORMED, { TYPENAME::BOOL, "CBD", "Event", 0, 0 }}, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_INITIAL_MASS, { TYPENAME::DOUBLE, "Initial_CBD_Mass", "Msol", 24, 15}}, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_1, { TYPENAME::DOUBLE, "CBD_Mass_Retained(1)", "Msol", 24, 15}}, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_2, { TYPENAME::DOUBLE, "CBD_Mass_Retained(2)", "Msol", 24, 15}}, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_SUPPLIED, { TYPENAME::DOUBLE, "CBD_Mass_Supplied", "Msol", 24, 15}}, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_PRE, { TYPENAME::DOUBLE, "SemiMajorAxisCBD", "Rsol", 24, 15}}, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_ECCENTRICITY_PRE, { TYPENAME::DOUBLE, "EccentricityCBD", "-", 24, 15}}, + { BINARY_PROPERTY::COMMON_ENVELOPE_AT_LEAST_ONCE, { TYPENAME::BOOL, "CEE", "Event", 0, 0 }}, + { BINARY_PROPERTY::COMMON_ENVELOPE_EVENT_COUNT, { TYPENAME::UINT, "CE_Event_Counter", "Count", 6, 1 }}, + { BINARY_PROPERTY::DOUBLE_CORE_COMMON_ENVELOPE, { TYPENAME::BOOL, "Double_Core_CE", "Event", 0, 0 }}, + { BINARY_PROPERTY::DT, { TYPENAME::DOUBLE, "dT", "Myr", 24, 15}}, + { BINARY_PROPERTY::ECCENTRICITY, { TYPENAME::DOUBLE, "Eccentricity", "-", 24, 15}}, + { BINARY_PROPERTY::ECCENTRICITY_AT_DCO_FORMATION, { TYPENAME::DOUBLE, "Eccentricity@DCO", "-", 24, 15}}, + { BINARY_PROPERTY::ECCENTRICITY_INITIAL, { TYPENAME::DOUBLE, "Eccentricity@ZAMS", "-", 24, 15}}, + { BINARY_PROPERTY::ECCENTRICITY_POST_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Eccentricity>CE", "-", 24, 15}}, + { BINARY_PROPERTY::ECCENTRICITY_PRE_SUPERNOVA, { TYPENAME::DOUBLE, "EccentricityCE", "Event", 0, 0 }}, + { BINARY_PROPERTY::MASS_1_POST_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Mass(1)>CE", "Msol", 24, 15}}, + { BINARY_PROPERTY::MASS_1_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Mass(1)CE", "Msol", 24, 15}}, + { BINARY_PROPERTY::MASS_2_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Mass(2)SN_X", "-", 24, 15}}, + { BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_Y, { TYPENAME::DOUBLE, "Orbital_AM_Vector>SN_Y", "-", 24, 15}}, + { BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_Z, { TYPENAME::DOUBLE, "Orbital_AM_Vector>SN_Z", "-", 24, 15}}, + { BINARY_PROPERTY::ORBITAL_ANGULAR_VELOCITY, { TYPENAME::DOUBLE, "Orbital_Angular_Velocity", "kms^-1", 24, 15}}, + { BINARY_PROPERTY::ORBITAL_VELOCITY_PRE_SUPERNOVA, { TYPENAME::DOUBLE, "Orb_VelocityCE", "Rsol", 24, 15}}, + { BINARY_PROPERTY::RADIUS_1_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Radius(1)CE", "Rsol", 24, 15}}, + { BINARY_PROPERTY::RADIUS_2_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Radius(2)MT", "State", 0, 0 }}, + { BINARY_PROPERTY::RLOF_POST_MT_ECCENTRICITY, { TYPENAME::DOUBLE, "Eccentricity>MT", "-", 24, 15}}, + { BINARY_PROPERTY::RLOF_POST_MT_EVENT_COUNTER, { TYPENAME::UINT, "MT_Event_Counter", "Count", 6, 1 }}, + { BINARY_PROPERTY::RLOF_POST_MT_ID, { TYPENAME::OBJECT_ID, "ID>MT", "-", 12, 1 }}, + { BINARY_PROPERTY::RLOF_POST_MT_SEMI_MAJOR_AXIS, { TYPENAME::DOUBLE, "SemiMajorAxis>MT", "Rsol", 24, 15}}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_MASS, { TYPENAME::DOUBLE, "Mass(1)>MT", "Msol", 24, 15}}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_MASS, { TYPENAME::DOUBLE, "Mass(2)>MT", "Msol", 24, 15}}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_RADIUS, { TYPENAME::DOUBLE, "Radius(1)>MT", "Rsol", 24, 15}}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_RADIUS, { TYPENAME::DOUBLE, "Radius(2)>MT", "Rsol", 24, 15}}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_TEFF, { TYPENAME::DOUBLE, "Teff(1)>MT", "K", 24, 15}}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_TEFF, { TYPENAME::DOUBLE, "Teff(2)>MT", "K", 24, 15}}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_LUM, { TYPENAME::DOUBLE, "Lum(1)>MT", "Lsol", 24, 15}}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_LUM, { TYPENAME::DOUBLE, "Lum(2)>MT", "Lsol", 24, 15}}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_RLOF, { TYPENAME::BOOL, "RLOF(1)>MT", "State", 0, 0 }}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_RLOF, { TYPENAME::BOOL, "RLOF(2)>MT", "State", 0, 0 }}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_STELLAR_TYPE, { TYPENAME::STELLAR_TYPE, "Stellar_Type(1)>MT", "-", 4, 1 }}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_STELLAR_TYPE_NAME, { TYPENAME::STRING, "Stellar_Type(1)>MT", "-", 42, 1 }}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_STELLAR_TYPE, { TYPENAME::STELLAR_TYPE, "Stellar_Type(2)>MT", "-", 4, 1 }}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_STELLAR_TYPE_NAME, { TYPENAME::STRING, "Stellar_Type(2)>MT", "-", 42, 1 }}, + { BINARY_PROPERTY::RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, { TYPENAME::DOUBLE, "Radius(1)|RL>step", "-", 24, 15}}, + { BINARY_PROPERTY::RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, { TYPENAME::DOUBLE, "Radius(2)|RL>step", "-", 24, 15}}, + { BINARY_PROPERTY::RLOF_PRE_MT_ECCENTRICITY, { TYPENAME::DOUBLE, "EccentricityCE", "Event", 0, 0 }}, + { BINARY_PROPERTY::RLOF_TIME_POST_MT, { TYPENAME::DOUBLE, "Time>MT", "Myr", 24, 15}}, + { BINARY_PROPERTY::RLOF_TIME_PRE_MT, { TYPENAME::DOUBLE, "TimeCE", "Rsol", 24, 15}}, + { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "RocheLobe(1)CE", "Rsol", 24, 15}}, + { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "RocheLobe(2)CE", "Rsol", 24, 15}}, + { BINARY_PROPERTY::SEMI_MAJOR_AXIS_POST_STAGE_1_CE, { TYPENAME::DOUBLE, "SemiMajorAxisStage1>CE", "Rsol", 24, 15}}, + { BINARY_PROPERTY::SEMI_MAJOR_AXIS_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "SemiMajorAxisCE", "State", 0, 0 }}, + { BINARY_PROPERTY::STELLAR_MERGER, { TYPENAME::BOOL, "Merger", "Event", 0, 0 }}, + { BINARY_PROPERTY::STELLAR_MERGER_AT_BIRTH, { TYPENAME::BOOL, "Merger_At_Birth", "Event", 0, 0 }}, + { BINARY_PROPERTY::STELLAR_TYPE_1_POST_COMMON_ENVELOPE, { TYPENAME::STELLAR_TYPE, "Stellar_Type(1)>CE", "-", 4, 1 }}, + { BINARY_PROPERTY::STELLAR_TYPE_1_PRE_COMMON_ENVELOPE, { TYPENAME::STELLAR_TYPE, "Stellar_Type(1)CE", "-", 4, 1 }}, + { BINARY_PROPERTY::STELLAR_TYPE_2_PRE_COMMON_ENVELOPE, { TYPENAME::STELLAR_TYPE, "Stellar_Type(2)CE", "-", 42, 1 }}, + { BINARY_PROPERTY::STELLAR_TYPE_NAME_1_PRE_COMMON_ENVELOPE, { TYPENAME::STRING, "Stellar_Type(1)CE", "-", 42, 1 }}, + { BINARY_PROPERTY::STELLAR_TYPE_NAME_2_PRE_COMMON_ENVELOPE, { TYPENAME::STRING, "Stellar_Type(2) PROGRAM_OPTION_DETAIL = { + + { PROGRAM_OPTION::ADD_OPTIONS_TO_SYSPARMS, { TYPENAME::INT, "PO_Add_Options_To_SysParms", "-", 4, 1 }}, + { PROGRAM_OPTION::ALLOW_NON_STRIPPED_ECSN, { TYPENAME::BOOL, "PO_Allow_Non_Stripped_ECSN", "Flag", 0, 0 }}, + { PROGRAM_OPTION::ALLOW_MS_STAR_TO_SURVIVE_COMMON_ENVELOPE, { TYPENAME::BOOL, "PO_Allow_MS_To_Survive_CE", "Flag", 0, 0 }}, + { PROGRAM_OPTION::ALLOW_RADIATIVE_ENVELOPE_STAR_TO_SURVIVE_COMMON_ENVELOPE, { TYPENAME::BOOL, "PO_Allow_Radiative_Envelope_To_Survive_CE", "Flag", 0, 0 }}, + { PROGRAM_OPTION::ALLOW_IMMEDIATE_RLOF_POST_CE_TO_SURVIVE_COMMON_ENVELOPE, { TYPENAME::BOOL, "PO_Allow_Immediate_RLOF>CE_To_Survive_CE", "Flag", 0, 0 }}, + { PROGRAM_OPTION::ALLOW_RLOF_AT_BIRTH, { TYPENAME::BOOL, "PO_Allow_RLOF@Birth", "Flag", 0, 0 }}, + { PROGRAM_OPTION::ALLOW_TOUCHING_AT_BIRTH, { TYPENAME::BOOL, "PO_Allow_Touching@Birth", "Flag", 0, 0 }}, + { PROGRAM_OPTION::ANG_MOM_CONSERVATION_DURING_CIRCULARISATION, { TYPENAME::BOOL, "PO_Conserve_AngMom@Circ", "Flag", 0, 0 }}, + + { PROGRAM_OPTION::BLACK_HOLE_KICKS_MODE, { TYPENAME::INT, "PO_BH_Kicks_Mode", "-", 4, 1 }}, + + { PROGRAM_OPTION::CASE_BB_STABILITY_PRESCRIPTION, { TYPENAME::INT, "PO_BB_Mass_xFer_Stblty_Prscrptn", "-", 4, 1 }}, + + { PROGRAM_OPTION::CHECK_PHOTON_TIRING_LIMIT, { TYPENAME::BOOL, "PO_Check_Photon_Tiring_Limit", "Flag", 0, 0 }}, + + { PROGRAM_OPTION::CHE_MODE, { TYPENAME::INT, "PO_CHE_Mode", "-", 4, 1 }}, + + { PROGRAM_OPTION::CIRCULARISE_BINARY_DURING_MT, { TYPENAME::BOOL, "PO_Circularise@MT", "Flag", 0, 0 }}, + + { PROGRAM_OPTION::CIRCUMBINARY_DISK, { TYPENAME::BOOL, "PO_CBD", "Flag", 0, 0 }}, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_USE_SYNCHRONIZED_ENVELOPE_ANGULAR_MOMENTUM, { TYPENAME::BOOL, "PO_CBD_Use_Synchronized_Envelope_AM", "Flag", 0, 0 }}, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_EVOLUTION_MODE, { TYPENAME::INT, "PO_CBD_Evolution_Mode", "-", 4, 1 }}, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_MODE, { TYPENAME::INT, "PO_CBD_Eddington_Mode", "-", 4, 1 }}, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_CAP_FACTOR, { TYPENAME::DOUBLE, "PO_CBD_Eddington_Cap_Factor", "-", 24, 15}}, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_GE23_FACTOR, { TYPENAME::DOUBLE, "PO_CBD_Eddington_GE23_Factor", "-", 24, 15}}, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_BETA, { TYPENAME::DOUBLE, "PO_CBD_Beta", "-", 24, 15}}, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_INNER_RADIUS_OVER_SEPARATION, { TYPENAME::DOUBLE, "PO_CBD_Inner_Radius_Over_Separation", "-", 24, 15}}, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_LIFETIME, { TYPENAME::DOUBLE, "PO_CBD_Lifetime", "yr", 24, 15}}, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_STRUCTURE_FACTOR, { TYPENAME::DOUBLE, "PO_CBD_Structure_Factor", "-", 24, 15}}, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_ENVELOPE_MASS_FRACTION_SUPPLIED, { TYPENAME::DOUBLE, "PO_CBD_Envelope_Mass_Fraction_Supplied", "-", 24, 15}}, + { PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_CAP, { TYPENAME::DOUBLE, "PO_Post_CE_Eccentricity_Cap", "-", 24, 15}}, + { PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_FRACTION, { TYPENAME::DOUBLE, "PO_Post_CE_Eccentricity_Fraction", "-", 24, 15}}, + { PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION, { TYPENAME::INT, "PO_Post_CE_Eccentricity_Prescription", "-", 4, 1}}, + + { PROGRAM_OPTION::COMMON_ENVELOPE_ALPHA, { TYPENAME::DOUBLE, "PO_CE_Alpha", "-", 24, 15}}, + { PROGRAM_OPTION::COMMON_ENVELOPE_ALPHA_THERMAL, { TYPENAME::DOUBLE, "PO_CE_Alpha_Thermal", "-", 24, 15}}, + { PROGRAM_OPTION::COMMON_ENVELOPE_FORMALISM, { TYPENAME::INT, "PO_CE_Formalism", "-", 4, 1 }}, + { PROGRAM_OPTION::COMMON_ENVELOPE_LAMBDA, { TYPENAME::DOUBLE, "PO_CE_Lambda", "-", 24, 15}}, + { PROGRAM_OPTION::COMMON_ENVELOPE_LAMBDA_MULTIPLIER, { TYPENAME::DOUBLE, "PO_CE_Lambda_Multiplier", "-", 24, 15}}, + { PROGRAM_OPTION::COMMON_ENVELOPE_LAMBDA_PRESCRIPTION, { TYPENAME::INT, "PO_CE_Lambda_Prscrptn", "-", 4, 1 }}, + { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_CONSTANT, { TYPENAME::DOUBLE, "PO_CE_Mass_Accr_Constant", "-", 24, 15}}, + { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_MAX, { TYPENAME::DOUBLE, "PO_CE_Mass_Accr_Max", "Msol", 24, 15}}, + { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_MIN, { TYPENAME::DOUBLE, "PO_CE_Mass_Accr_Min", "Msol", 24, 15}}, + { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_PRESCRIPTION, { TYPENAME::INT, "PO_CE_Mass_Accr_Prscrptn", "-", 4, 1 }}, + { PROGRAM_OPTION::COMMON_ENVELOPE_RECOMBINATION_ENERGY_DENSITY, { TYPENAME::DOUBLE, "PO_CE_Recomb_Enrgy_Dnsty", "erg g^-1", 24, 15}}, + { PROGRAM_OPTION::COMMON_ENVELOPE_SECOND_STAGE_BETA, { TYPENAME::DOUBLE, "PO_CE_Second_Stage_Beta", "-", 24, 15}}, + { PROGRAM_OPTION::COMMON_ENVELOPE_SECOND_STAGE_GAMMA_PRESCRIPTION, { TYPENAME::INT, "PO_CE_Second_Stage_Gamma_Prescription", "-", 24, 15}}, + { PROGRAM_OPTION::COMMON_ENVELOPE_SLOPE_KRUCKOW, { TYPENAME::DOUBLE, "PO_CE_Slope_Kruckow", "-", 24, 15}}, + + { PROGRAM_OPTION::COOL_WIND_MASS_LOSS_MULTIPLIER, { TYPENAME::DOUBLE, "PO_Cool_WindMassLoss_Multipl", "-", 24, 15}}, + + { PROGRAM_OPTION::ECCENTRICITY, { TYPENAME::DOUBLE, "PO_Eccentricity", "-", 24, 15}}, + { PROGRAM_OPTION::ECCENTRICITY_DISTRIBUTION, { TYPENAME::INT, "PO_Eccentricity_Dstrbtn", "-", 4, 1 }}, + { PROGRAM_OPTION::ECCENTRICITY_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Eccentricity_Dstrbtn_Max", "-", 24, 15}}, + { PROGRAM_OPTION::ECCENTRICITY_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Eccentricity_Dstrbtn_Min", "-", 24, 15}}, + { PROGRAM_OPTION::EDDINGTON_ACCRETION_FACTOR, { TYPENAME::DOUBLE, "PO_Eddington_Accr_Factor", "-", 24, 15}}, + { PROGRAM_OPTION::ENABLE_ROTATIONALLY_ENHANCED_MASS_LOSS, { TYPENAME::BOOL, "PO_Enable_Rotationally_Enhanced_Mass_Loss", "Flag", 0, 0}}, + { PROGRAM_OPTION::ENHANCE_CHE_LIFETIMES_LUMINOSITIES, { TYPENAME::BOOL, "PO_Enhance_CHE_lifetimes_luminosities", "Flag", 0, 0}}, + { PROGRAM_OPTION::ENVELOPE_STATE_PRESCRIPTION, { TYPENAME::INT, "PO_Envelope_State_Prscrptn", "-", 4, 1 }}, + { PROGRAM_OPTION::EVOLUTION_MODE, { TYPENAME::INT, "PO_Evolution_Mode", "Mode", 4, 1 }}, + + { PROGRAM_OPTION::FP_ERROR_MODE, { TYPENAME::INT, "PO_FP_Error_Mode", "Mode", 4, 1 }}, + + { PROGRAM_OPTION::FRYER_SUPERNOVA_ENGINE, { TYPENAME::INT, "PO_Fryer_SN_Engine", "-", 4, 1 }}, + + { PROGRAM_OPTION::FRYER22_FMIX, { TYPENAME::DOUBLE, "PO_Fryer22_mixing_fraction", "-", 24, 15}}, + { PROGRAM_OPTION::FRYER22_MCRIT, { TYPENAME::DOUBLE, "PO_Fryer22_crit_COcore_Mass", "Msol", 24, 15}}, + + { PROGRAM_OPTION::INITIAL_MASS, { TYPENAME::DOUBLE, "PO_Initial_Mass", "Msol", 24, 15}}, + { PROGRAM_OPTION::INITIAL_MASS_1, { TYPENAME::DOUBLE, "PO_Initial_Mass(1)", "Msol", 24, 15}}, + { PROGRAM_OPTION::INITIAL_MASS_2, { TYPENAME::DOUBLE, "PO_Initial_Mass(2)", "Msol", 24, 15}}, + + { PROGRAM_OPTION::INITIAL_MASS_FUNCTION, { TYPENAME::INT, "PO_Initial_Mass_Function", "-", 4, 1 }}, + { PROGRAM_OPTION::INITIAL_MASS_FUNCTION_MAX, { TYPENAME::DOUBLE, "PO_Initial_Mass_Func_Max", "Msol", 24, 15}}, + { PROGRAM_OPTION::INITIAL_MASS_FUNCTION_MIN, { TYPENAME::DOUBLE, "PO_Initial_Mass_Func_Min", "Msol", 24, 15}}, + { PROGRAM_OPTION::INITIAL_MASS_FUNCTION_POWER, { TYPENAME::DOUBLE, "PO_Initial_Mass_Func_Power", "-", 24, 15}}, + + { PROGRAM_OPTION::KICK_DIRECTION_DISTRIBUTION, { TYPENAME::INT, "PO_Kick_Direction_Dstrbtn", "-", 4, 1 }}, + { PROGRAM_OPTION::KICK_DIRECTION_POWER, { TYPENAME::DOUBLE, "PO_Kick_Direction_Power", "-", 24, 15}}, + { PROGRAM_OPTION::KICK_SCALING_FACTOR, { TYPENAME::DOUBLE, "PO_Kick_Scaling_Factor", "-", 24, 15}}, + { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION, { TYPENAME::INT, "PO_Kick_Magnitude_Dstrbtn", "-", 4, 1 }}, + { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_MAXIMUM, { TYPENAME::DOUBLE, "PO_Kick_Magnitude_Dstrbtn_Max", "-", 24, 15}}, + + { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH, { TYPENAME::DOUBLE, "PO_Sigma_Kick_CCSN_BH", "kms^-1", 24, 15}}, + { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS, { TYPENAME::DOUBLE, "PO_Sigma_Kick_CCSN_NS", "kms^-1", 24, 15}}, + { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN, { TYPENAME::DOUBLE, "PO_Sigma_Kick_ECSN", "kms^-1", 24, 15}}, + { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN, { TYPENAME::DOUBLE, "PO_Sigma_Kick_USSN", "kms^-1", 24, 15}}, + + { PROGRAM_OPTION::KICK_MAGNITUDE, { TYPENAME::DOUBLE, "PO_Kick_Magnitude", "kms^-1", 24, 15}}, + { PROGRAM_OPTION::KICK_MAGNITUDE_1, { TYPENAME::DOUBLE, "PO_Kick_Magnitude(1)", "kms^-1", 24, 15}}, + { PROGRAM_OPTION::KICK_MAGNITUDE_2, { TYPENAME::DOUBLE, "PO_Kick_Magnitude(2)", "kms^-1", 24, 15}}, + + { PROGRAM_OPTION::KICK_MAGNITUDE_RANDOM, { TYPENAME::DOUBLE, "PO_Kick_Magnitude_Random", "-", 24, 15}}, + { PROGRAM_OPTION::KICK_MAGNITUDE_RANDOM_1, { TYPENAME::DOUBLE, "PO_Kick_Magnitude_Random(1)", "-", 24, 15}}, + { PROGRAM_OPTION::KICK_MAGNITUDE_RANDOM_2, { TYPENAME::DOUBLE, "PO_Kick_Magnitude_Random(2)", "-", 24, 15}}, + + { PROGRAM_OPTION::KICK_MEAN_ANOMALY_1, { TYPENAME::DOUBLE, "PO_Kick_Mean_Anomaly(1)", "-", 24, 15}}, + { PROGRAM_OPTION::KICK_MEAN_ANOMALY_2, { TYPENAME::DOUBLE, "PO_Kick_Mean_Anomaly(2)", "-", 24, 15}}, + { PROGRAM_OPTION::KICK_PHI_1, { TYPENAME::DOUBLE, "PO_Kick_Phi(1)", "-", 24, 15}}, + { PROGRAM_OPTION::KICK_PHI_2, { TYPENAME::DOUBLE, "PO_Kick_Phi(2)", "-", 24, 15}}, + { PROGRAM_OPTION::KICK_THETA_1, { TYPENAME::DOUBLE, "PO_Kick_Theta(1)", "-", 24, 15}}, + { PROGRAM_OPTION::KICK_THETA_2, { TYPENAME::DOUBLE, "PO_Kick_Theta(2)", "-", 24, 15}}, + + { PROGRAM_OPTION::LBV_FACTOR, { TYPENAME::DOUBLE, "PO_LBV_Factor", "-", 24, 15}}, + { PROGRAM_OPTION::LBV_MASS_LOSS_PRESCRIPTION, { TYPENAME::INT, "PO_LBV_Mass_Loss_Prscrptn", "-", 4, 1 }}, + + { PROGRAM_OPTION::MALTSEV_FALLBACK, { TYPENAME::DOUBLE, "PO_Maltsev_Fallback", "-", 24, 15}}, + { PROGRAM_OPTION::MALTSEV_MODE, { TYPENAME::INT, "PO_Maltsev_Mode", "-", 4, 1 }}, + { PROGRAM_OPTION::MASS_LOSS_PRESCRIPTION, { TYPENAME::INT, "PO_Mass_Loss_Prscrptn", "-", 4, 1 }}, + + { PROGRAM_OPTION::MASS_RATIO, { TYPENAME::DOUBLE, "PO_Mass_Ratio", "-", 24, 15}}, + { PROGRAM_OPTION::MASS_RATIO_DISTRIBUTION, { TYPENAME::INT, "PO_Mass_Ratio_Dstrbtn", "-", 4, 1 }}, + { PROGRAM_OPTION::MASS_RATIO_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Mass_Ratio_Dstrbtn_Max", "-", 24, 15}}, + { PROGRAM_OPTION::MASS_RATIO_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Mass_Ratio_Dstrbtn_Min", "-", 24, 15}}, + + { PROGRAM_OPTION::MAXIMUM_EVOLUTION_TIME, { TYPENAME::DOUBLE, "PO_Max_Evolution_Time", "Myr", 24, 15}}, + { PROGRAM_OPTION::MAXIMUM_DONOR_MASS, { TYPENAME::DOUBLE, "PO_Max_Donor_Mass", "Msol", 24, 15}}, + { PROGRAM_OPTION::MAXIMUM_NEUTRON_STAR_MASS, { TYPENAME::DOUBLE, "PO_Max_NS_Mass", "Msol", 24, 15}}, + { PROGRAM_OPTION::MAXIMUM_TIMESTEPS, { TYPENAME::ULONGINT, "PO_Max_Timesteps", "Count", 10, 1 }}, + + { PROGRAM_OPTION::MCBUR1, { TYPENAME::DOUBLE, "PO_MCBUR1", "Msol", 24, 15}}, + + { PROGRAM_OPTION::METALLICITY, { TYPENAME::DOUBLE, "PO_Metallicity", "-", 24, 15}}, + { PROGRAM_OPTION::METALLICITY_DISTRIBUTION, { TYPENAME::INT, "PO_Metallicity_Dstrbtn", "-", 4, 1 }}, + { PROGRAM_OPTION::METALLICITY_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Metallicity_Dstrbtn_Max", "-", 24, 15}}, + { PROGRAM_OPTION::METALLICITY_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Metallicity_Dstrbtn_Min", "-", 24, 15}}, + + { PROGRAM_OPTION::MINIMUM_SAMPLED_SECONDARY_MASS, { TYPENAME::DOUBLE, "PO_Min_Sampled_Secondary_Mass", "Msol", 24, 15}}, + + { PROGRAM_OPTION::MT_ACCRETION_EFFICIENCY_PRESCRIPTION, { TYPENAME::INT, "PO_MT_Acc_Efficiency_Prscrptn", "-", 4, 1 }}, + { PROGRAM_OPTION::MT_ANG_MOM_LOSS_PRESCRIPTION, { TYPENAME::INT, "PO_MT_AngMom_Loss_Prscrptn", "-", 4, 1 }}, + { PROGRAM_OPTION::MT_THERMAL_LIMIT_C, { TYPENAME::DOUBLE, "PO_MT_Thermal_Limit_C", "-", 24, 15}}, + + { PROGRAM_OPTION::MT_CRIT_MR_MS_LOW_MASS_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_MS_Low_Mass_Deg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_MS_LOW_MASS_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_MS_Low_Mass_NonDeg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_MS_HIGH_MASS_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_MS_High_Mass_Deg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_MS_HIGH_MASS_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_MS_High_Mass_NonDeg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_GIANT_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_Giant_Deg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_GIANT_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_Giant_NonDeg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_HG_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HG_Deg_Acc", "-", 24, 15}}, + + { PROGRAM_OPTION::MT_CRIT_MR_HG_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HG_NonDeg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_HE_GIANT_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HE_Giant_Deg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_HE_GIANT_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HE_Giant_NonDeg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_HE_HG_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HE_HG_Deg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_HE_HG_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HE_HG_NonDeg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_HE_MS_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HE_MS_Deg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_HE_MS_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HE_MS_NonDeg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_WD_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_WD_Deg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_WD_NONDEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_WD_NonDeg_Acc", "-", 24, 15}}, + + { PROGRAM_OPTION::MT_FRACTION_ACCRETED, { TYPENAME::DOUBLE, "PO_MT_Fraction_Accreted", "-", 24, 15}}, + { PROGRAM_OPTION::MT_JLOSS, { TYPENAME::DOUBLE, "PO_MT_JLoss", "-", 24, 15}}, + { PROGRAM_OPTION::MT_JLOSS_LINEAR_FRACTION_DEGEN, { TYPENAME::DOUBLE, "PO_MT_JLoss_Linear_Frac_Degen", "-", 24, 15}}, + { PROGRAM_OPTION::MT_JLOSS_LINEAR_FRACTION_NON_DEGEN, { TYPENAME::DOUBLE, "PO_MT_JLoss_Linear_Frac_Non_Degen", "-", 24, 15}}, + { PROGRAM_OPTION::MT_REJUVENATION_PRESCRIPTION, { TYPENAME::INT, "PO_MT_Rejuvenation_Prscrptn", "-", 4, 1 }}, + { PROGRAM_OPTION::MT_THERMALLY_LIMITED_VARIATION, { TYPENAME::INT, "PO_MT_Thermally_Lmtd_Variation", "-", 4, 1 }}, + + { PROGRAM_OPTION::MULLER_MANDEL_KICK_MULTIPLIER_BH, { TYPENAME::DOUBLE, "PO_MM_Kick_Multiplier_BH", "-", 24, 15}}, + { PROGRAM_OPTION::MULLER_MANDEL_KICK_MULTIPLIER_NS, { TYPENAME::DOUBLE, "PO_MM_Kick_Multiplier_NS", "-", 24, 15}}, + { PROGRAM_OPTION::MULLER_MANDEL_SIGMA_KICK_BH, { TYPENAME::DOUBLE, "PO_MM_Sigma_Kick_BH", "-", 24, 15}}, + { PROGRAM_OPTION::MULLER_MANDEL_SIGMA_KICK_NS, { TYPENAME::DOUBLE, "PO_MM_Sigma_Kick_NS", "-", 24, 15}}, + + { PROGRAM_OPTION::NEUTRINO_MASS_LOSS_ASSUMPTION_BH, { TYPENAME::INT, "PO_Neutrino_Mass_Loss_Assmptn", "-", 4, 1 }}, + { PROGRAM_OPTION::NEUTRINO_MASS_LOSS_VALUE_BH, { TYPENAME::DOUBLE, "PO_Neutrino_Mass_Loss_Value", "-", 24, 15}}, + + { PROGRAM_OPTION::NS_ACCRETION_IN_CE, { TYPENAME::INT, "PO_NS_ACCRETION_IN_CE", "-", 4, 1 }}, + { PROGRAM_OPTION::NS_EOS, { TYPENAME::INT, "PO_NS_EOS", "-", 4, 1 }}, + + { PROGRAM_OPTION::ORBITAL_PERIOD, { TYPENAME::DOUBLE, "PO_Orbital_Period", "days", 24, 15}}, + { PROGRAM_OPTION::ORBITAL_PERIOD_DISTRIBUTION, { TYPENAME::INT, "PO_Orbital_Period_Dstrbtn", "-", 4, 1 }}, + { PROGRAM_OPTION::ORBITAL_PERIOD_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Orbital_Period_Max", "days", 24, 15}}, + { PROGRAM_OPTION::ORBITAL_PERIOD_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Orbital_Period_Min", "days", 24, 15}}, + + { PROGRAM_OPTION::OVERALL_WIND_MASS_LOSS_MULTIPLIER, { TYPENAME::DOUBLE, "PO_Overall_WindMassLoss_Multipl", "-", 24, 15}}, + + { PROGRAM_OPTION::PISN_LOWER_LIMIT, { TYPENAME::DOUBLE, "PO_PISN_Lower_Limit", "Msol", 24, 15}}, + { PROGRAM_OPTION::PISN_UPPER_LIMIT, { TYPENAME::DOUBLE, "PO_PISN_Upper_Limit", "Msol", 24, 15}}, + + { PROGRAM_OPTION::PPI_LOWER_LIMIT, { TYPENAME::DOUBLE, "PO_PPI_Lower_Limit", "Msol", 24, 15}}, + { PROGRAM_OPTION::PPI_PRESCRIPTION, { TYPENAME::INT, "PO_PPI_Prscrptn", "-", 4, 1 }}, + { PROGRAM_OPTION::PPI_UPPER_LIMIT, { TYPENAME::DOUBLE, "PO_PPI_Upper_Limit", "Msol", 24, 15}}, + { PROGRAM_OPTION::PPI_CO_CORE_SHIFT_HENDRIKS, { TYPENAME::DOUBLE, "PO_PPI_CO_CORE_SHIFT_HENDRIKS", "Msol", 24, 15}}, + + { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DISTRIBUTION, { TYPENAME::INT, "PO_Pulsar_Mag_Field_Dstrbtn", "-", 4, 1 }}, + { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Pulsar_Mag_Field_Dstrbtn_Max", "AU", 24, 15}}, + { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Pulsar_Mag_Field_Dstrbtn_Min", "AU", 24, 15}}, + + { PROGRAM_OPTION::PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION, { TYPENAME::INT, "PO_Pulsar_Spin_Period_Dstrbtn", "-", 4, 1 }}, + { PROGRAM_OPTION::PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Pulsar_Spin_Period_Dstrbtn_Max", "AU", 24, 15}}, + { PROGRAM_OPTION::PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Pulsar_Spin_Period_Dstrbtn_Min", "AU", 24, 15}}, + + { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DECAY_MASS_SCALE, { TYPENAME::DOUBLE, "PO_Pulsar_Mag_Field_Decay_mScale", "Msol", 24, 15}}, + { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DECAY_TIME_SCALE, { TYPENAME::DOUBLE, "PO_Pulsar_Mag_Field_Decay_tScale", "Myr", 24, 15}}, + + { PROGRAM_OPTION::PULSAR_MINIMUM_MAGNETIC_FIELD, { TYPENAME::DOUBLE, "PO_Pulsar_Minimum_Mag_Field", "Gauss", 24, 15}}, + + { PROGRAM_OPTION::QCRIT_PRESCRIPTION, { TYPENAME::INT, "PO_qCrit_Prescription", "-", 4, 1 }}, + + { PROGRAM_OPTION::RANDOM_SEED, { TYPENAME::ULONGINT, "PO_SEED(OPTION)", "-", 12, 1 }}, + { PROGRAM_OPTION::RANDOM_SEED_CMDLINE, { TYPENAME::ULONGINT, "PO_SEED(CMDLINE)", "-", 12, 1 }}, + + { PROGRAM_OPTION::REMNANT_MASS_PRESCRIPTION, { TYPENAME::INT, "PO_Remnant_Mass_Prscrptn", "-", 4, 1 }}, + + { PROGRAM_OPTION::RESPONSE_TO_SPIN_UP, { TYPENAME::INT, "PO_Response_To_Spin_Up", "-", 4, 1 }}, + + { PROGRAM_OPTION::ROCKET_KICK_MAGNITUDE_1, { TYPENAME::DOUBLE, "PO_Rocket_Kick_Magnitude(1)", "kms^-1", 24, 15}}, + { PROGRAM_OPTION::ROCKET_KICK_MAGNITUDE_2, { TYPENAME::DOUBLE, "PO_Rocket_Kick_Magnitude(2)", "kms^-1", 24, 15}}, + { PROGRAM_OPTION::ROCKET_KICK_PHI_1, { TYPENAME::DOUBLE, "PO_Rocket_Kick_Phi(1)", "-", 24, 15}}, + { PROGRAM_OPTION::ROCKET_KICK_PHI_2, { TYPENAME::DOUBLE, "PO_Rocket_Kick_Phi(2)", "-", 24, 15}}, + { PROGRAM_OPTION::ROCKET_KICK_THETA_1, { TYPENAME::DOUBLE, "PO_Rocket_Kick_Theta(1)", "-", 24, 15}}, + { PROGRAM_OPTION::ROCKET_KICK_THETA_2, { TYPENAME::DOUBLE, "PO_Rocket_Kick_Theta(2)", "-", 24, 15}}, + + { PROGRAM_OPTION::ROTATIONAL_VELOCITY_DISTRIBUTION, { TYPENAME::INT, "PO_Rotational_Velocity_Dstrbtn", "-", 4, 1 }}, + { PROGRAM_OPTION::ROTATIONAL_FREQUENCY, { TYPENAME::DOUBLE, "PO_Rotational_Frequency", "Hz", 24, 15}}, + { PROGRAM_OPTION::ROTATIONAL_FREQUENCY_1, { TYPENAME::DOUBLE, "PO_Rotational_Frequency(1)", "Hz", 24, 15}}, + { PROGRAM_OPTION::ROTATIONAL_FREQUENCY_2, { TYPENAME::DOUBLE, "PO_Rotational_Frequency(2)", "Hz", 24, 15}}, + + { PROGRAM_OPTION::SCALE_CHE_MASS_LOSS_SURF_HE_ABUNDANCE, { TYPENAME::BOOL, "PO_Scale_CHE_Mass_Loss_Surf_He_Abundance", "flag", 0, 0}}, + { PROGRAM_OPTION::SCALE_TERMINAL_WIND_VEL_METALLICITY_POWER, { TYPENAME::DOUBLE, "PO_Scale_Terminal_Wind_Vel_Metallicity_Power", "-", 24, 15}}, + { PROGRAM_OPTION::SEMI_MAJOR_AXIS, { TYPENAME::DOUBLE, "PO_Semi-Major_Axis", "AU", 24, 15}}, + { PROGRAM_OPTION::SEMI_MAJOR_AXIS_DISTRIBUTION, { TYPENAME::INT, "PO_Semi-Major_Axis_Dstrbtn", "-", 4, 1 }}, + { PROGRAM_OPTION::SEMI_MAJOR_AXIS_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Semi-Major_Axis_Dstrbtn_Max", "AU", 24, 15}}, + { PROGRAM_OPTION::SEMI_MAJOR_AXIS_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Semi-Major_Axis_Dstrbtn_Min", "AU", 24, 15}}, + + { PROGRAM_OPTION::STELLAR_ZETA_PRESCRIPTION, { TYPENAME::INT, "PO_Stellar_Zeta_Prscrptn", "-", 4, 1 }}, + + { PROGRAM_OPTION::TIDES_PRESCRIPTION, { TYPENAME::INT, "PO_Tides_Prscrptn", "-", 4, 1 }}, + + { PROGRAM_OPTION::USSN_KICKS_OVERRIDE_MANDEL_MULLER, { TYPENAME::BOOL, "PO_USSN_Kicks_Override_Mandel_Muller", "flag", 0, 0}}, + + { PROGRAM_OPTION::WR_FACTOR, { TYPENAME::DOUBLE, "PO_WR_Factor", "-", 24, 15}}, + + { PROGRAM_OPTION::ZETA_ADIABATIC_ARBITRARY, { TYPENAME::DOUBLE, "PO_Zeta_Adiabatic_Arbitrary", "-", 24, 15}}, + { PROGRAM_OPTION::ZETA_MS, { TYPENAME::DOUBLE, "PO_Zeta_Main_Sequence", "-", 24, 15}}, + { PROGRAM_OPTION::ZETA_RADIATIVE_ENVELOPE_GIANT, { TYPENAME::DOUBLE, "PO_Zeta_Radiative_Envelope_Giant", "-", 24, 15}} +}; + + +// enum class LOGFILE +// Symbolic names for logfiles +enum class LOGFILE: int { + NONE, + + DEBUG_LOG, + ERROR_LOG, + + BSE_COMMON_ENVELOPES, + BSE_CIRCUMBINARY_DISKS, + BSE_DETAILED_OUTPUT, + BSE_DOUBLE_COMPACT_OBJECTS, + BSE_PULSAR_EVOLUTION, + BSE_RLOF_PARAMETERS, + BSE_SUPERNOVAE, + BSE_SWITCH_LOG, + BSE_SYSTEM_SNAPSHOT_LOG, + BSE_SYSTEM_PARAMETERS, + + SSE_DETAILED_OUTPUT, + SSE_PULSAR_EVOLUTION, + SSE_SUPERNOVAE, + SSE_SWITCH_LOG, + SSE_SYSTEM_SNAPSHOT_LOG, + SSE_SYSTEM_PARAMETERS +}; + + +// Logfile record types +// Note all enum classes for log record types start at 1 (and *must* start at 1) +typedef unsigned int LOGRECORDTYPE; + +enum class CE_RECORD_TYPE: unsigned int { // BSE_COMMON_ENVELOPES file record type + DEFAULT = 1 // 1 - default BSE_COMMON_ENVELOPES file record type +}; + +enum class DCO_RECORD_TYPE: unsigned int { // BSE_DOUBLE_COMPACT_OBJECTS file record type + DEFAULT = 1 // 1 - default BSE_DOUBLE_COMPACT_OBJECTS file record type +}; + +enum class BSE_PULSAR_RECORD_TYPE: unsigned int { // BSE_PULSAR_EVOLUTION file record type + PRE_SN = 1, // 1 - record was logged immediately prior to a supernova event + POST_SN, // 2 - record was logged immediately following a supernova event + POST_BINARY_TIMESTEP // 3 - record was logged immediately following binary timestep (i.e. the evolution of the binary system for a single timestep) +}; + +enum class RLOF_RECORD_TYPE: unsigned int { // BSE_RLOF_PARAMETERS file record type + DEFAULT = 1 // 1 - default BSE_RLOF_PARAMETERS file record type +}; + +enum class BSE_DETAILED_RECORD_TYPE: unsigned int { // BSE_DETAILED_OUTPUT file record type + INITIAL_STATE = 1, // 1 - record describes the initial state of the binary + POST_STELLAR_TIMESTEP, // 2 - record was logged immediately following stellar timestep (i.e. the evolution of the constituent stars for a single timestep) + POST_BINARY_TIMESTEP, // 3 - record was logged immediately following binary timestep (i.e. the evolution of the binary system for a single timestep) + TIMESTEP_COMPLETED, // 4 - record was logged immediately following the completion of the timestep (after all changes to the binary and components) + FINAL_STATE, // 5 - record describes the final state of the binary + STELLAR_TYPE_CHANGE_DURING_CEE, // 6 - record was logged immediately following a stellar type change during a common envelope event + STELLAR_TYPE_CHANGE_DURING_MT, // 7 - record was logged immediately following a stellar type change during a mass transfer event + STELLAR_TYPE_CHANGE_DURING_MASS_RESOLUTION, // 8 - record was logged immediately following a stellar type change during mass resolution + STELLAR_TYPE_CHANGE_DURING_CHE_EQUILIBRATION, // 9 - record was logged immediately following a stellar type change during mass equilibration for CHE + POST_MT, // 10 - record was logged immediately following a mass transfer event + POST_WINDS, // 11 - record was logged immediately following winds mass loss + POST_CEE, // 12 - record was logged immediately following a common envelope event, before any instantaneous circumbinary disk interaction + POST_SN, // 13 - record was logged immediately following a supernova event + POST_MASS_RESOLUTION, // 14 - record was logged immediately following mass resolution (i.e. after winds mass loss & mass transfer complete) + POST_MASS_RESOLUTION_MERGER, // 15 - record was logged immediately following a merger after mass resolution + PRE_STELLAR_TIMESTEP, // 16 - record was logged immediately prior to stellar timestep (i.e. the evolution of the constituent stars for a single timestep) + POST_CBD // 17 - record was logged immediately following instantaneous circumbinary disk evolution after a common envelope event +}; + +enum class SSE_DETAILED_RECORD_TYPE: unsigned int { // SSE_DETAILED_OUTPUT file record type + INITIAL_STATE = 1, // 1 - record describes the initial state of the star + PRE_MASS_LOSS, // 2 - record was logged after timestep taken, but before mass loss resolution + POST_MASS_LOSS, // 3 - record was logged after after mass loss resolution + TIMESTEP_COMPLETED, // 4 - record was logged immediately following the completion of the timestep (after all changes to the star) + FINAL_STATE // 5 - record describes the final state of the star +}; + +enum class SSE_PULSAR_RECORD_TYPE: unsigned int { // SSE_PULSAR_EVOLUTION file record type + PRE_SN = 1, // 1 - record was logged immediately prior to a supernova event + POST_SN, // 2 - record was logged immediately following a supernova event + TIMESTEP_COMPLETED // 3 - record was logged immediately following the completion of the timestep (after all changes to the star) +}; + +enum class BSE_SN_RECORD_TYPE: unsigned int { // BSE_SUPERNOVAE file record type + DEFAULT = 1 // 1 - default BSE_SUPERNOVAE file record type +}; + +enum class SSE_SN_RECORD_TYPE: unsigned int { // SSE_SUPERNOVAE file record type + DEFAULT = 1 // 1 - default SSE_SUPERNOVAE file record type +}; + +enum class BSE_SYSPARMS_RECORD_TYPE: unsigned int { // BSE_SYSTEM_PARAMETERS file record type + DEFAULT = 1 // 1 - default BSE_SYSTEM_PARAMETERS file record type +}; + +enum class SSE_SYSPARMS_RECORD_TYPE: unsigned int { // SSE_SYSTEM_PARAMETERS file record type + DEFAULT = 1 // 1 - default SSE_SYSTEM_PARAMETERS file record type +}; + +enum class BSE_SYSTEM_SNAPSHOT_RECORD_TYPE: unsigned int { // BSE_SYSTEM_SNAPSHOT_LOG file record type + DEFAULT = 1 // 1 - default BSE_SYSTEM_SNAPSHOT_LOG file record type +}; + +enum class SSE_SYSTEM_SNAPSHOT_RECORD_TYPE: unsigned int { // SSE_SYSTEM_SNAPSHOT_LOG file record type + DEFAULT = 1 // 1 - default SSE_SYSTEM_SNAPSHOT_LOG file record type +}; + + +// enum class RUN_DETAILS_REC +// symbolic names for RUN DETAILS record definitions +// For preamble/stats columns only +// Program options columns are dynamic +// these must be left as default values - their order can be changed with the caveat that the sentinel "SENTINEL" must stay at the end +// it's a bit of a hack, but it lets me iterate over the enum +enum class RUN_DETAILS_COLUMNS: int { COMPAS_VERSION, + RUN_START, + RUN_END, + OBJECTS_REQUESTED, + OBJECTS_CREATED, + CLOCK_TIME, + WALL_TIME, + ACTUAL_RANDOM_SEED, + SENTINEL }; + +const COMPASUnorderedMap> RUN_DETAILS_DETAIL = { + { RUN_DETAILS_COLUMNS::COMPAS_VERSION, { "COMPAS-Version", TYPENAME::STRING, 8 }}, + { RUN_DETAILS_COLUMNS::RUN_START, { "Run-Start", TYPENAME::STRING, 24 }}, + { RUN_DETAILS_COLUMNS::RUN_END, { "Run-End", TYPENAME::STRING, 24 }}, + { RUN_DETAILS_COLUMNS::OBJECTS_REQUESTED, { "Objects-Requested", TYPENAME::INT, 0 }}, + { RUN_DETAILS_COLUMNS::OBJECTS_CREATED, { "Objects-Created", TYPENAME::INT, 0 }}, + { RUN_DETAILS_COLUMNS::CLOCK_TIME, { "Clock-Time", TYPENAME::DOUBLE, 0 }}, + { RUN_DETAILS_COLUMNS::WALL_TIME, { "Wall-Time", TYPENAME::STRING, 10 }}, + { RUN_DETAILS_COLUMNS::ACTUAL_RANDOM_SEED, { "Actual-Random-Seed", TYPENAME::ULONGINT, 0 }} +}; + + +// BSE output record definitions + +// BSE_COMMON_ENVELOPES_REC +// +// Default record definition for the Common Envelopes logfile +// +const ANY_PROPERTY_VECTOR BSE_COMMON_ENVELOPES_REC = { + BINARY_PROPERTY::RANDOM_SEED, + BINARY_PROPERTY::TIME, + STAR_1_PROPERTY::LAMBDA_AT_COMMON_ENVELOPE, + STAR_2_PROPERTY::LAMBDA_AT_COMMON_ENVELOPE, + STAR_1_PROPERTY::BINDING_ENERGY_PRE_COMMON_ENVELOPE, + STAR_2_PROPERTY::BINDING_ENERGY_PRE_COMMON_ENVELOPE, + BINARY_PROPERTY::ECCENTRICITY_PRE_COMMON_ENVELOPE, + BINARY_PROPERTY::ECCENTRICITY_POST_COMMON_ENVELOPE, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_PRE_COMMON_ENVELOPE, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_POST_COMMON_ENVELOPE, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_POST_STAGE_1_CE, + BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1_PRE_COMMON_ENVELOPE, + BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1_POST_COMMON_ENVELOPE, + BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2_PRE_COMMON_ENVELOPE, + BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2_POST_COMMON_ENVELOPE, + BINARY_PROPERTY::MASS_1_PRE_COMMON_ENVELOPE, + BINARY_PROPERTY::MASS_1_POST_COMMON_ENVELOPE, + BINARY_PROPERTY::MASS_ENV_1, + BINARY_PROPERTY::RADIUS_1_PRE_COMMON_ENVELOPE, + BINARY_PROPERTY::RADIUS_1_POST_COMMON_ENVELOPE, + BINARY_PROPERTY::STELLAR_TYPE_1_PRE_COMMON_ENVELOPE, + STAR_1_PROPERTY::STELLAR_TYPE, + STAR_1_PROPERTY::LAMBDA_CONVECTIVE_ENVELOPE, + STAR_1_PROPERTY::LAMBDA_FIXED, + STAR_1_PROPERTY::LAMBDA_NANJING, + STAR_1_PROPERTY::LAMBDA_LOVERIDGE, + STAR_1_PROPERTY::LAMBDA_LOVERIDGE_WINDS, + STAR_1_PROPERTY::LAMBDA_KRUCKOW, + STAR_1_PROPERTY::BINDING_ENERGY_FIXED, + STAR_1_PROPERTY::BINDING_ENERGY_NANJING, + STAR_1_PROPERTY::BINDING_ENERGY_LOVERIDGE, + STAR_1_PROPERTY::BINDING_ENERGY_LOVERIDGE_WINDS, + STAR_1_PROPERTY::BINDING_ENERGY_KRUCKOW, + STAR_1_PROPERTY::CONVECTIVE_ENV_MASS, + BINARY_PROPERTY::MASS_2_PRE_COMMON_ENVELOPE, + BINARY_PROPERTY::MASS_2_POST_COMMON_ENVELOPE, + BINARY_PROPERTY::MASS_ENV_2, + BINARY_PROPERTY::RADIUS_2_PRE_COMMON_ENVELOPE, + BINARY_PROPERTY::RADIUS_2_POST_COMMON_ENVELOPE, + BINARY_PROPERTY::STELLAR_TYPE_2_PRE_COMMON_ENVELOPE, + STAR_2_PROPERTY::STELLAR_TYPE, + STAR_2_PROPERTY::LAMBDA_CONVECTIVE_ENVELOPE, + STAR_2_PROPERTY::LAMBDA_FIXED, + STAR_2_PROPERTY::LAMBDA_NANJING, + STAR_2_PROPERTY::LAMBDA_LOVERIDGE, + STAR_2_PROPERTY::LAMBDA_LOVERIDGE_WINDS, + STAR_2_PROPERTY::LAMBDA_KRUCKOW, + STAR_2_PROPERTY::BINDING_ENERGY_FIXED, + STAR_2_PROPERTY::BINDING_ENERGY_NANJING, + STAR_2_PROPERTY::BINDING_ENERGY_LOVERIDGE, + STAR_2_PROPERTY::BINDING_ENERGY_LOVERIDGE_WINDS, + STAR_2_PROPERTY::BINDING_ENERGY_KRUCKOW, + STAR_2_PROPERTY::CONVECTIVE_ENV_MASS, + BINARY_PROPERTY::MASS_TRANSFER_TRACKER_HISTORY, + BINARY_PROPERTY::STELLAR_MERGER, + BINARY_PROPERTY::OPTIMISTIC_COMMON_ENVELOPE, + BINARY_PROPERTY::COMMON_ENVELOPE_EVENT_COUNT, + BINARY_PROPERTY::DOUBLE_CORE_COMMON_ENVELOPE, + STAR_1_PROPERTY::IS_RLOF, + STAR_1_PROPERTY::LUMINOSITY_PRE_COMMON_ENVELOPE, + STAR_1_PROPERTY::TEMPERATURE_PRE_COMMON_ENVELOPE, + STAR_1_PROPERTY::DYNAMICAL_TIMESCALE_PRE_COMMON_ENVELOPE, + STAR_1_PROPERTY::THERMAL_TIMESCALE_PRE_COMMON_ENVELOPE, + STAR_2_PROPERTY::IS_RLOF, + STAR_2_PROPERTY::LUMINOSITY_PRE_COMMON_ENVELOPE, + STAR_2_PROPERTY::TEMPERATURE_PRE_COMMON_ENVELOPE, + STAR_2_PROPERTY::DYNAMICAL_TIMESCALE_PRE_COMMON_ENVELOPE, + STAR_2_PROPERTY::THERMAL_TIMESCALE_PRE_COMMON_ENVELOPE, + BINARY_PROPERTY::ZETA_STAR, + BINARY_PROPERTY::ZETA_LOBE, + BINARY_PROPERTY::SYNCHRONIZATION_TIMESCALE_1, + BINARY_PROPERTY::SYNCHRONIZATION_TIMESCALE_2, + BINARY_PROPERTY::CIRCULARIZATION_TIMESCALE, + STAR_1_PROPERTY::RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE, + STAR_2_PROPERTY::RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE, + BINARY_PROPERTY::IMMEDIATE_RLOF_POST_COMMON_ENVELOPE, + BINARY_PROPERTY::SIMULTANEOUS_RLOF +}; + + +// BSE_DETAILED_OUTPUT_REC +// +// Default record definition for the BSE Detailed Output logfile +// +const ANY_PROPERTY_VECTOR BSE_DETAILED_OUTPUT_REC = { + BINARY_PROPERTY::RANDOM_SEED, + BINARY_PROPERTY::DT, + BINARY_PROPERTY::TIME, + BINARY_PROPERTY::UNBOUND, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, + BINARY_PROPERTY::ECCENTRICITY, + STAR_1_PROPERTY::MZAMS, + STAR_2_PROPERTY::MZAMS, + STAR_1_PROPERTY::MASS_0, + STAR_2_PROPERTY::MASS_0, + STAR_1_PROPERTY::MASS, + STAR_2_PROPERTY::MASS, + STAR_1_PROPERTY::ENV_MASS, + STAR_2_PROPERTY::ENV_MASS, + STAR_1_PROPERTY::CORE_MASS, + STAR_2_PROPERTY::CORE_MASS, + STAR_1_PROPERTY::HE_CORE_MASS, + STAR_2_PROPERTY::HE_CORE_MASS, + STAR_1_PROPERTY::CO_CORE_MASS, + STAR_2_PROPERTY::CO_CORE_MASS, + STAR_1_PROPERTY::RADIUS, + STAR_2_PROPERTY::RADIUS, + BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1, + BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2, + STAR_1_PROPERTY::OMEGA, + STAR_2_PROPERTY::OMEGA, + STAR_1_PROPERTY::OMEGA_BREAK, + STAR_2_PROPERTY::OMEGA_BREAK, + STAR_1_PROPERTY::INITIAL_STELLAR_TYPE, + STAR_2_PROPERTY::INITIAL_STELLAR_TYPE, + STAR_1_PROPERTY::STELLAR_TYPE, + STAR_2_PROPERTY::STELLAR_TYPE, + STAR_1_PROPERTY::AGE, + STAR_2_PROPERTY::AGE, + STAR_1_PROPERTY::LUMINOSITY, + STAR_2_PROPERTY::LUMINOSITY, + STAR_1_PROPERTY::TEMPERATURE, + STAR_2_PROPERTY::TEMPERATURE, + STAR_1_PROPERTY::ANGULAR_MOMENTUM, + STAR_2_PROPERTY::ANGULAR_MOMENTUM, + STAR_1_PROPERTY::DYNAMICAL_TIMESCALE, + STAR_2_PROPERTY::DYNAMICAL_TIMESCALE, + STAR_1_PROPERTY::THERMAL_TIMESCALE, + STAR_2_PROPERTY::THERMAL_TIMESCALE, + STAR_1_PROPERTY::ZETA_SOBERMAN, + STAR_2_PROPERTY::ZETA_SOBERMAN, + STAR_1_PROPERTY::ZETA_SOBERMAN_HE, + STAR_2_PROPERTY::ZETA_SOBERMAN_HE, + STAR_1_PROPERTY::ZETA_HURLEY, + STAR_2_PROPERTY::ZETA_HURLEY, + STAR_1_PROPERTY::ZETA_HURLEY_HE, + STAR_2_PROPERTY::ZETA_HURLEY_HE, + STAR_1_PROPERTY::MASS_LOSS_DIFF, + STAR_2_PROPERTY::MASS_LOSS_DIFF, + STAR_1_PROPERTY::DOMINANT_MASS_LOSS_RATE, + STAR_2_PROPERTY::DOMINANT_MASS_LOSS_RATE, + STAR_1_PROPERTY::MASS_TRANSFER_DIFF, + STAR_2_PROPERTY::MASS_TRANSFER_DIFF, + STAR_1_PROPERTY::MDOT, + STAR_2_PROPERTY::MDOT, + BINARY_PROPERTY::TOTAL_ANGULAR_MOMENTUM, + BINARY_PROPERTY::TOTAL_ENERGY, + STAR_1_PROPERTY::METALLICITY, + STAR_2_PROPERTY::METALLICITY, + BINARY_PROPERTY::MASS_TRANSFER_TRACKER_HISTORY, + STAR_1_PROPERTY::PULSAR_MAGNETIC_FIELD, + STAR_2_PROPERTY::PULSAR_MAGNETIC_FIELD, + STAR_1_PROPERTY::PULSAR_SPIN_PERIOD, + STAR_2_PROPERTY::PULSAR_SPIN_PERIOD, + STAR_1_PROPERTY::PULSAR_SPIN_DOWN_RATE, + STAR_2_PROPERTY::PULSAR_SPIN_DOWN_RATE, + STAR_1_PROPERTY::PULSAR_BIRTH_PERIOD, + STAR_2_PROPERTY::PULSAR_BIRTH_PERIOD, + STAR_1_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, + STAR_2_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, + STAR_1_PROPERTY::RADIAL_EXPANSION_TIMESCALE, + STAR_2_PROPERTY::RADIAL_EXPANSION_TIMESCALE, + BINARY_PROPERTY::RLOF_MASS_LOSS_RATE, + BINARY_PROPERTY::RLOF_MASS_TRANSFER_TIMESCALE, + BINARY_PROPERTY::RLOF_ACCRETION_EFFICIENCY +}; + + +// BSE_CIRCUMBINARY_DISKS_REC +// +// Default record definition for the BSE Circumbinary Disks logfile. +// +// This file is event-based: one row is written for each CBD that forms. +// INSTANTANEOUS mode writes the row after the full interaction. TIMESTEPPED +// mode writes the row when the active disk is exhausted or truncated by an +// ordinary COMPAS termination/event boundary. +// +const ANY_PROPERTY_VECTOR BSE_CIRCUMBINARY_DISKS_REC = { + BINARY_PROPERTY::RANDOM_SEED, + BINARY_PROPERTY::TIME, + BINARY_PROPERTY::CIRCUMBINARY_DISK_INITIAL_MASS, + BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_SUPPLIED, + BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_1, + BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_2, + BINARY_PROPERTY::CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_PRE, + BINARY_PROPERTY::CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_POST, + BINARY_PROPERTY::CIRCUMBINARY_DISK_ECCENTRICITY_PRE, + BINARY_PROPERTY::CIRCUMBINARY_DISK_ECCENTRICITY_POST, + STAR_1_PROPERTY::MASS, + STAR_1_PROPERTY::STELLAR_TYPE, + STAR_2_PROPERTY::MASS, + STAR_2_PROPERTY::STELLAR_TYPE +}; +// BSE_DOUBLE_COMPACT_OBJECT_REC +// +// Default record definition for the Double Compact Objects logfile +// +const ANY_PROPERTY_VECTOR BSE_DOUBLE_COMPACT_OBJECTS_REC = { + BINARY_PROPERTY::RANDOM_SEED, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_AT_DCO_FORMATION, + BINARY_PROPERTY::ECCENTRICITY_AT_DCO_FORMATION, + STAR_1_PROPERTY::MASS, + STAR_1_PROPERTY::STELLAR_TYPE, + STAR_2_PROPERTY::MASS, + STAR_2_PROPERTY::STELLAR_TYPE, + BINARY_PROPERTY::TIME_TO_COALESCENCE, + BINARY_PROPERTY::TIME, + BINARY_PROPERTY::MERGES_IN_HUBBLE_TIME, + STAR_1_PROPERTY::RECYCLED_NEUTRON_STAR, + STAR_2_PROPERTY::RECYCLED_NEUTRON_STAR +}; + + +// BSE_PULSAR_EVOLUTION_REC +// +// Default record definition for the BSE Pulsar Evolution logfile +// +const ANY_PROPERTY_VECTOR BSE_PULSAR_EVOLUTION_REC = { + BINARY_PROPERTY::RANDOM_SEED, + STAR_1_PROPERTY::MASS, + STAR_2_PROPERTY::MASS, + STAR_1_PROPERTY::STELLAR_TYPE, + STAR_2_PROPERTY::STELLAR_TYPE, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, + BINARY_PROPERTY::MASS_TRANSFER_TRACKER_HISTORY, + STAR_1_PROPERTY::PULSAR_MAGNETIC_FIELD, + STAR_2_PROPERTY::PULSAR_MAGNETIC_FIELD, + STAR_1_PROPERTY::PULSAR_SPIN_PERIOD, + STAR_2_PROPERTY::PULSAR_SPIN_PERIOD, + STAR_1_PROPERTY::PULSAR_SPIN_DOWN_RATE, + STAR_2_PROPERTY::PULSAR_SPIN_DOWN_RATE, + STAR_1_PROPERTY::PULSAR_BIRTH_PERIOD, + STAR_2_PROPERTY::PULSAR_BIRTH_PERIOD, + STAR_1_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, + STAR_2_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, + BINARY_PROPERTY::TIME, + BINARY_PROPERTY::DT +}; + + +// BSE_RLOF_PARAMETERS_REC +// +// Default record definition for the RLOF Parameters logfile +// +const ANY_PROPERTY_VECTOR BSE_RLOF_PARAMETERS_REC = { + BINARY_PROPERTY::RANDOM_SEED, + BINARY_PROPERTY::RLOF_TIME_POST_MT, + BINARY_PROPERTY::RLOF_TIME_PRE_MT, + BINARY_PROPERTY::RLOF_POST_MT_STAR1_MASS, + BINARY_PROPERTY::RLOF_POST_MT_STAR2_MASS, + BINARY_PROPERTY::RLOF_POST_MT_STAR1_RADIUS, + BINARY_PROPERTY::RLOF_POST_MT_STAR2_RADIUS, + BINARY_PROPERTY::RLOF_POST_MT_STAR1_STELLAR_TYPE, + BINARY_PROPERTY::RLOF_POST_MT_STAR2_STELLAR_TYPE, + BINARY_PROPERTY::RLOF_POST_MT_SEMI_MAJOR_AXIS, + BINARY_PROPERTY::RLOF_POST_MT_ECCENTRICITY, + BINARY_PROPERTY::RLOF_POST_MT_EVENT_COUNTER, + BINARY_PROPERTY::RLOF_POST_MT_STAR1_RLOF, + BINARY_PROPERTY::RLOF_POST_MT_STAR2_RLOF, + BINARY_PROPERTY::STELLAR_MERGER, + BINARY_PROPERTY::RLOF_POST_MT_COMMON_ENVELOPE, + BINARY_PROPERTY::RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, + BINARY_PROPERTY::RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, + BINARY_PROPERTY::RLOF_PRE_MT_STAR1_MASS, + BINARY_PROPERTY::RLOF_PRE_MT_STAR2_MASS, + BINARY_PROPERTY::RLOF_PRE_MT_STAR1_RADIUS, + BINARY_PROPERTY::RLOF_PRE_MT_STAR2_RADIUS, + BINARY_PROPERTY::RLOF_PRE_MT_STAR1_STELLAR_TYPE, + BINARY_PROPERTY::RLOF_PRE_MT_STAR2_STELLAR_TYPE, + BINARY_PROPERTY::RLOF_PRE_MT_SEMI_MAJOR_AXIS, + BINARY_PROPERTY::RLOF_PRE_MT_ECCENTRICITY, + BINARY_PROPERTY::RLOF_PRE_MT_STAR1_RLOF, + BINARY_PROPERTY::RLOF_PRE_MT_STAR2_RLOF, + BINARY_PROPERTY::RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, + BINARY_PROPERTY::RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, + BINARY_PROPERTY::RLOF_ACCRETION_EFFICIENCY, + BINARY_PROPERTY::RLOF_MASS_LOSS_RATE, + BINARY_PROPERTY::RLOF_MASS_TRANSFER_TIMESCALE, + STAR_1_PROPERTY::ZETA_SOBERMAN, + STAR_1_PROPERTY::ZETA_SOBERMAN_HE, + STAR_1_PROPERTY::ZETA_HURLEY, + STAR_1_PROPERTY::ZETA_HURLEY_HE, + STAR_2_PROPERTY::ZETA_SOBERMAN, + STAR_2_PROPERTY::ZETA_SOBERMAN_HE, + STAR_2_PROPERTY::ZETA_HURLEY, + STAR_2_PROPERTY::ZETA_HURLEY_HE +}; + + +// BSE_SUPERNOVAE_REC +// +// Default record definition for the BSE Supernovae logfile +// +const ANY_PROPERTY_VECTOR BSE_SUPERNOVAE_REC = { + BINARY_PROPERTY::RANDOM_SEED, + SUPERNOVA_PROPERTY::DRAWN_KICK_MAGNITUDE, + SUPERNOVA_PROPERTY::KICK_MAGNITUDE, + SUPERNOVA_PROPERTY::FALLBACK_FRACTION, + BINARY_PROPERTY::ORBITAL_VELOCITY_PRE_SUPERNOVA, + SUPERNOVA_PROPERTY::MEAN_ANOMALY, + SUPERNOVA_PROPERTY::SUPERNOVA_THETA, + SUPERNOVA_PROPERTY::SUPERNOVA_PHI, + SUPERNOVA_PROPERTY::SN_TYPE, + BINARY_PROPERTY::ECCENTRICITY_PRE_SUPERNOVA, + BINARY_PROPERTY::ECCENTRICITY, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_PRE_SUPERNOVA_RSOL, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, + BINARY_PROPERTY::TIME, + BINARY_PROPERTY::SUPERNOVA_STATE, + BINARY_PROPERTY::UNBOUND, + COMPANION_PROPERTY::STELLAR_TYPE, + SUPERNOVA_PROPERTY::STELLAR_TYPE, + SUPERNOVA_PROPERTY::STELLAR_TYPE_PREV, + COMPANION_PROPERTY::MASS, + SUPERNOVA_PROPERTY::TOTAL_MASS_AT_COMPACT_OBJECT_FORMATION, + SUPERNOVA_PROPERTY::TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, + SUPERNOVA_PROPERTY::CORE_MASS_AT_COMPACT_OBJECT_FORMATION, + SUPERNOVA_PROPERTY::CO_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, + SUPERNOVA_PROPERTY::HE_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, + SUPERNOVA_PROPERTY::CORE_RADIUS_AT_COMPACT_OBJECT_FORMATION, + SUPERNOVA_PROPERTY::MASS, + SUPERNOVA_PROPERTY::EXPERIENCED_RLOF, + SUPERNOVA_PROPERTY::MASS_TRANSFER_DONOR_HISTORY, + SUPERNOVA_PROPERTY::SPEED, + COMPANION_PROPERTY::SPEED, + BINARY_PROPERTY::SYSTEMIC_SPEED, + SUPERNOVA_PROPERTY::IS_HYDROGEN_POOR, + BINARY_PROPERTY::SUPERNOVA_ORBIT_INCLINATION_ANGLE, + BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_X, + BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_Y, + BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_Z, + BINARY_PROPERTY::SYSTEMIC_VELOCITY_X, + BINARY_PROPERTY::SYSTEMIC_VELOCITY_Y, + BINARY_PROPERTY::SYSTEMIC_VELOCITY_Z, +}; + + +// BSE_SWITCH_LOG +// +// Default record definition for the BSE Switch Log logfile +// +const ANY_PROPERTY_VECTOR BSE_SWITCH_LOG_REC = { + BINARY_PROPERTY::RANDOM_SEED, + BINARY_PROPERTY::TIME, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, + BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1, + BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2, + STAR_1_PROPERTY::MASS, + STAR_2_PROPERTY::MASS, + STAR_1_PROPERTY::STELLAR_TYPE, + STAR_2_PROPERTY::STELLAR_TYPE, + STAR_1_PROPERTY::RADIUS, + STAR_2_PROPERTY::RADIUS +}; + + +// BSE_SYSTEM_PARAMETERS_REC +// +// Default record definition for the System Parameters logfile +// +const ANY_PROPERTY_VECTOR BSE_SYSTEM_PARAMETERS_REC = { + BINARY_PROPERTY::RANDOM_SEED, + STAR_1_PROPERTY::MZAMS, + STAR_2_PROPERTY::MZAMS, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_INITIAL, + BINARY_PROPERTY::ECCENTRICITY_INITIAL, + STAR_1_PROPERTY::SUPERNOVA_KICK_MAGNITUDE_RANDOM_NUMBER, + STAR_2_PROPERTY::SUPERNOVA_KICK_MAGNITUDE_RANDOM_NUMBER, + STAR_1_PROPERTY::OMEGA_ZAMS, + STAR_2_PROPERTY::OMEGA_ZAMS, + PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS, + PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH, + PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN, + PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN, + PROGRAM_OPTION::LBV_FACTOR, + PROGRAM_OPTION::WR_FACTOR, + PROGRAM_OPTION::COMMON_ENVELOPE_ALPHA, + PROGRAM_OPTION::COMMON_ENVELOPE_FORMALISM, + STAR_1_PROPERTY::METALLICITY, + STAR_2_PROPERTY::METALLICITY, + BINARY_PROPERTY::UNBOUND, + BINARY_PROPERTY::STELLAR_MERGER, + BINARY_PROPERTY::STELLAR_MERGER_AT_BIRTH, + BINARY_PROPERTY::MASSES_EQUILIBRATED_AT_BIRTH, + STAR_1_PROPERTY::INITIAL_STELLAR_TYPE, + STAR_1_PROPERTY::STELLAR_TYPE, + STAR_2_PROPERTY::INITIAL_STELLAR_TYPE, + STAR_2_PROPERTY::STELLAR_TYPE, + STAR_1_PROPERTY::CHEMICALLY_HOMOGENEOUS_MAIN_SEQUENCE, + STAR_2_PROPERTY::CHEMICALLY_HOMOGENEOUS_MAIN_SEQUENCE, + BINARY_PROPERTY::EVOL_STATUS, + BINARY_PROPERTY::ERROR, + PROGRAM_OPTION::NOTES +}; + + +// BSE_SYSTEM_SNAPSHOT_LOG_REC +// +// Default record definition for the BSE System Snapshot logfile +// +const ANY_PROPERTY_VECTOR BSE_SYSTEM_SNAPSHOT_LOG_REC = { + BINARY_PROPERTY::RANDOM_SEED, + BINARY_PROPERTY::DT, + BINARY_PROPERTY::TIME, + BINARY_PROPERTY::UNBOUND, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, + BINARY_PROPERTY::ECCENTRICITY, + STAR_1_PROPERTY::MZAMS, + STAR_2_PROPERTY::MZAMS, + STAR_1_PROPERTY::MASS_0, + STAR_2_PROPERTY::MASS_0, + STAR_1_PROPERTY::MASS, + STAR_2_PROPERTY::MASS, + STAR_1_PROPERTY::ENV_MASS, + STAR_2_PROPERTY::ENV_MASS, + STAR_1_PROPERTY::CORE_MASS, + STAR_2_PROPERTY::CORE_MASS, + STAR_1_PROPERTY::HE_CORE_MASS, + STAR_2_PROPERTY::HE_CORE_MASS, + STAR_1_PROPERTY::CO_CORE_MASS, + STAR_2_PROPERTY::CO_CORE_MASS, + STAR_1_PROPERTY::RADIUS, + STAR_2_PROPERTY::RADIUS, + BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1, + BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2, + STAR_1_PROPERTY::OMEGA, + STAR_2_PROPERTY::OMEGA, + STAR_1_PROPERTY::OMEGA_BREAK, + STAR_2_PROPERTY::OMEGA_BREAK, + STAR_1_PROPERTY::INITIAL_STELLAR_TYPE, + STAR_2_PROPERTY::INITIAL_STELLAR_TYPE, + STAR_1_PROPERTY::STELLAR_TYPE, + STAR_2_PROPERTY::STELLAR_TYPE, + STAR_1_PROPERTY::AGE, + STAR_2_PROPERTY::AGE, + STAR_1_PROPERTY::LUMINOSITY, + STAR_2_PROPERTY::LUMINOSITY, + STAR_1_PROPERTY::TEMPERATURE, + STAR_2_PROPERTY::TEMPERATURE, + STAR_1_PROPERTY::ANGULAR_MOMENTUM, + STAR_2_PROPERTY::ANGULAR_MOMENTUM, + STAR_1_PROPERTY::DYNAMICAL_TIMESCALE, + STAR_2_PROPERTY::DYNAMICAL_TIMESCALE, + STAR_1_PROPERTY::THERMAL_TIMESCALE, + STAR_2_PROPERTY::THERMAL_TIMESCALE, + STAR_1_PROPERTY::ZETA_SOBERMAN, + STAR_2_PROPERTY::ZETA_SOBERMAN, + STAR_1_PROPERTY::ZETA_SOBERMAN_HE, + STAR_2_PROPERTY::ZETA_SOBERMAN_HE, + STAR_1_PROPERTY::ZETA_HURLEY, + STAR_2_PROPERTY::ZETA_HURLEY, + STAR_1_PROPERTY::ZETA_HURLEY_HE, + STAR_2_PROPERTY::ZETA_HURLEY_HE, + STAR_1_PROPERTY::MASS_LOSS_DIFF, + STAR_2_PROPERTY::MASS_LOSS_DIFF, + STAR_1_PROPERTY::DOMINANT_MASS_LOSS_RATE, + STAR_2_PROPERTY::DOMINANT_MASS_LOSS_RATE, + STAR_1_PROPERTY::MASS_TRANSFER_DIFF, + STAR_2_PROPERTY::MASS_TRANSFER_DIFF, + STAR_1_PROPERTY::MDOT, + STAR_2_PROPERTY::MDOT, + BINARY_PROPERTY::TOTAL_ANGULAR_MOMENTUM, + BINARY_PROPERTY::TOTAL_ENERGY, + STAR_1_PROPERTY::METALLICITY, + STAR_2_PROPERTY::METALLICITY, + BINARY_PROPERTY::MASS_TRANSFER_TRACKER_HISTORY, + STAR_1_PROPERTY::PULSAR_MAGNETIC_FIELD, + STAR_2_PROPERTY::PULSAR_MAGNETIC_FIELD, + STAR_1_PROPERTY::PULSAR_SPIN_PERIOD, + STAR_2_PROPERTY::PULSAR_SPIN_PERIOD, + STAR_1_PROPERTY::PULSAR_SPIN_DOWN_RATE, + STAR_2_PROPERTY::PULSAR_SPIN_DOWN_RATE, + STAR_1_PROPERTY::PULSAR_BIRTH_PERIOD, + STAR_2_PROPERTY::PULSAR_BIRTH_PERIOD, + STAR_1_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, + STAR_2_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, + STAR_1_PROPERTY::RADIAL_EXPANSION_TIMESCALE, + STAR_2_PROPERTY::RADIAL_EXPANSION_TIMESCALE, + BINARY_PROPERTY::RLOF_MASS_LOSS_RATE, + BINARY_PROPERTY::RLOF_MASS_TRANSFER_TIMESCALE, + BINARY_PROPERTY::RLOF_ACCRETION_EFFICIENCY +}; + + +// SSE output record definitions + +// SSE_DETAILED_OUTPUT_REC +// +// Default record definition for the SSE Detailed Output logfile +// +const ANY_PROPERTY_VECTOR SSE_DETAILED_OUTPUT_REC = { + STAR_PROPERTY::AGE, + STAR_PROPERTY::DT, + STAR_PROPERTY::TIME, + STAR_PROPERTY::STELLAR_TYPE, + STAR_PROPERTY::METALLICITY, + STAR_PROPERTY::MASS_0, + STAR_PROPERTY::MASS, + STAR_PROPERTY::RADIUS, + STAR_PROPERTY::RZAMS, + STAR_PROPERTY::LUMINOSITY, + STAR_PROPERTY::TEMPERATURE, + STAR_PROPERTY::CORE_MASS, + STAR_PROPERTY::CO_CORE_MASS, + STAR_PROPERTY::HE_CORE_MASS, + STAR_PROPERTY::MDOT, + STAR_PROPERTY::DOMINANT_MASS_LOSS_RATE, + STAR_PROPERTY::TIMESCALE_MS, + STAR_PROPERTY::OMEGA, + STAR_PROPERTY::OMEGA_BREAK +}; + +// SSE_PULSAR_EVOLUTION_REC +// +// Default record definition for the SSE Pulsar Evolution logfile +// +const ANY_PROPERTY_VECTOR SSE_PULSAR_EVOLUTION_REC = { + STAR_PROPERTY::RANDOM_SEED, + STAR_PROPERTY::MASS, + STAR_PROPERTY::STELLAR_TYPE, + STAR_PROPERTY::PULSAR_MAGNETIC_FIELD, + STAR_PROPERTY::PULSAR_SPIN_PERIOD, + STAR_PROPERTY::PULSAR_SPIN_DOWN_RATE, + STAR_PROPERTY::PULSAR_BIRTH_PERIOD, + STAR_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, + STAR_PROPERTY::TIME, + STAR_PROPERTY::DT +}; + +// SSE_SUPERNOVAE_REC +// +// Default record definition for the SSE Supernovae logfile +// +const ANY_PROPERTY_VECTOR SSE_SUPERNOVAE_REC = { + STAR_PROPERTY::RANDOM_SEED, + STAR_PROPERTY::DRAWN_KICK_MAGNITUDE, + STAR_PROPERTY::KICK_MAGNITUDE, + STAR_PROPERTY::FALLBACK_FRACTION, + STAR_PROPERTY::MEAN_ANOMALY, + STAR_PROPERTY::SN_TYPE, + STAR_PROPERTY::TOTAL_MASS_AT_COMPACT_OBJECT_FORMATION, + STAR_PROPERTY::TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, + STAR_PROPERTY::CO_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, + STAR_PROPERTY::MASS, + STAR_PROPERTY::STELLAR_TYPE, + STAR_PROPERTY::STELLAR_TYPE_PREV, + STAR_PROPERTY::CORE_MASS_AT_COMPACT_OBJECT_FORMATION, + STAR_PROPERTY::CORE_RADIUS_AT_COMPACT_OBJECT_FORMATION, + STAR_PROPERTY::HE_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, + STAR_PROPERTY::TIME, + STAR_PROPERTY::IS_HYDROGEN_POOR +}; + + +// SSE_SWITCH_LOG +// +// Default record definition for the SSE Switch Log logfile +// +const ANY_PROPERTY_VECTOR SSE_SWITCH_LOG_REC = { + STAR_PROPERTY::RANDOM_SEED, + STAR_PROPERTY::TIME, + STAR_PROPERTY::MASS, + STAR_PROPERTY::STELLAR_TYPE, + STAR_PROPERTY::RADIUS +}; + + +// SSE_SYSTEM_PARAMETERS_REC +// +// Default record definition for the SSE System Parameters logfile +// +const ANY_PROPERTY_VECTOR SSE_SYSTEM_PARAMETERS_REC = { + STAR_PROPERTY::RANDOM_SEED, + STAR_PROPERTY::MZAMS, + STAR_PROPERTY::RZAMS, + STAR_PROPERTY::METALLICITY, + STAR_PROPERTY::OMEGA_ZAMS, + STAR_PROPERTY::INITIAL_STELLAR_TYPE, + STAR_PROPERTY::STELLAR_TYPE, + STAR_PROPERTY::SUPERNOVA_KICK_MAGNITUDE_RANDOM_NUMBER, + STAR_PROPERTY::MASS, + STAR_PROPERTY::CHEMICALLY_HOMOGENEOUS_MAIN_SEQUENCE, + STAR_PROPERTY::EVOL_STATUS, + STAR_PROPERTY::ERROR, + PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS, + PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH, + PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN, + PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN, + PROGRAM_OPTION::LBV_FACTOR, + PROGRAM_OPTION::WR_FACTOR, + PROGRAM_OPTION::NOTES +}; + + +// SSE_SYSTEM_SNAPSHOT_LOG_REC +// +// Default record definition for the SSE System Snapshot logfile +// +const ANY_PROPERTY_VECTOR SSE_SYSTEM_SNAPSHOT_LOG_REC = { + STAR_PROPERTY::AGE, + STAR_PROPERTY::DT, + STAR_PROPERTY::TIME, + STAR_PROPERTY::STELLAR_TYPE, + STAR_PROPERTY::METALLICITY, + STAR_PROPERTY::MASS_0, + STAR_PROPERTY::MASS, + STAR_PROPERTY::RADIUS, + STAR_PROPERTY::RZAMS, + STAR_PROPERTY::LUMINOSITY, + STAR_PROPERTY::TEMPERATURE, + STAR_PROPERTY::CORE_MASS, + STAR_PROPERTY::CO_CORE_MASS, + STAR_PROPERTY::HE_CORE_MASS, + STAR_PROPERTY::MDOT, + STAR_PROPERTY::DOMINANT_MASS_LOSS_RATE, + STAR_PROPERTY::TIMESCALE_MS, + STAR_PROPERTY::OMEGA, + STAR_PROPERTY::OMEGA_BREAK +}; + + +// enum class LOGFILE_CLASS +// Symbolic names for logfile types +enum class LOGFILE_CLASS: int { NONE, STELLAR, BINARY }; + +// descriptors for logfiles +// unordered_map - key is integer logfile (from enum class LOGFILE above) +// fields are: {default filename, record descriptor, short file name, short record name, type} +// (the short names are for logfile definitions file parsing) +typedef std::tuple LOGFILE_DESCRIPTOR_T; +const std::map LOGFILE_DESCRIPTOR = { + { LOGFILE::NONE, { "" , {}, "", "", LOGFILE_CLASS::NONE}}, + + { LOGFILE::DEBUG_LOG, { "Debug_Log", {}, "", "", LOGFILE_CLASS::NONE }}, + { LOGFILE::ERROR_LOG, { "Error_Log", {}, "", "", LOGFILE_CLASS::NONE }}, + + { LOGFILE::BSE_COMMON_ENVELOPES, { "BSE_Common_Envelopes", BSE_COMMON_ENVELOPES_REC, "BSE_CEE", "BSE_CEE_REC", LOGFILE_CLASS::BINARY }}, + { LOGFILE::BSE_CIRCUMBINARY_DISKS, { "BSE_Circumbinary_Disks", BSE_CIRCUMBINARY_DISKS_REC, "BSE_CBD", "BSE_CBD_REC", LOGFILE_CLASS::BINARY }}, + { LOGFILE::BSE_DETAILED_OUTPUT, { "BSE_Detailed_Output", BSE_DETAILED_OUTPUT_REC, "BSE_DETAILED", "BSE_DETAILED_REC", LOGFILE_CLASS::BINARY }}, + { LOGFILE::BSE_DOUBLE_COMPACT_OBJECTS, { "BSE_Double_Compact_Objects", BSE_DOUBLE_COMPACT_OBJECTS_REC, "BSE_DCO", "BSE_DCO_REC", LOGFILE_CLASS::BINARY }}, + { LOGFILE::BSE_PULSAR_EVOLUTION, { "BSE_Pulsar_Evolution", BSE_PULSAR_EVOLUTION_REC, "BSE_PULSARS", "BSE_PULSARS_REC", LOGFILE_CLASS::BINARY }}, + { LOGFILE::BSE_RLOF_PARAMETERS, { "BSE_RLOF", BSE_RLOF_PARAMETERS_REC, "BSE_RLOF", "BSE_RLOF_REC", LOGFILE_CLASS::BINARY }}, + { LOGFILE::BSE_SUPERNOVAE, { "BSE_Supernovae", BSE_SUPERNOVAE_REC, "BSE_SNE", "BSE_SNE_REC", LOGFILE_CLASS::BINARY }}, + { LOGFILE::BSE_SWITCH_LOG, { "BSE_Switch_Log", BSE_SWITCH_LOG_REC, "BSE_SWITCH_LOG", "BSE_SWITCH_REC", LOGFILE_CLASS::BINARY }}, + { LOGFILE::BSE_SYSTEM_PARAMETERS, { "BSE_System_Parameters", BSE_SYSTEM_PARAMETERS_REC, "BSE_SYSPARMS", "BSE_SYSPARMS_REC", LOGFILE_CLASS::BINARY }}, + { LOGFILE::BSE_SYSTEM_SNAPSHOT_LOG, { "BSE_System_Snapshot_Log", BSE_SYSTEM_SNAPSHOT_LOG_REC, "BSE_SYS_SNAPSHOT", "BSE_SYS_SNAPSHOT_REC", LOGFILE_CLASS::BINARY }}, + + { LOGFILE::SSE_DETAILED_OUTPUT, { "SSE_Detailed_Output", SSE_DETAILED_OUTPUT_REC, "SSE_DETAILED", "SSE_DETAILED_REC", LOGFILE_CLASS::STELLAR }}, + { LOGFILE::SSE_PULSAR_EVOLUTION, { "SSE_Pulsar_Evolution", SSE_PULSAR_EVOLUTION_REC, "SSE_PULSARS", "SSE_PULSARS_REC", LOGFILE_CLASS::STELLAR }}, + { LOGFILE::SSE_SUPERNOVAE, { "SSE_Supernovae", SSE_SUPERNOVAE_REC, "SSE_SNE", "SSE_SNE_REC", LOGFILE_CLASS::STELLAR }}, + { LOGFILE::SSE_SWITCH_LOG, { "SSE_Switch_Log", SSE_SWITCH_LOG_REC, "SSE_SWITCH_LOG", "SSE_SWITCH_REC", LOGFILE_CLASS::STELLAR }}, + { LOGFILE::SSE_SYSTEM_PARAMETERS, { "SSE_System_Parameters", SSE_SYSTEM_PARAMETERS_REC, "SSE_SYSPARMS", "SSE_SYSPARMS_REC", LOGFILE_CLASS::STELLAR }}, + { LOGFILE::SSE_SYSTEM_SNAPSHOT_LOG, { "SSE_System_Snapshot_Log", SSE_SYSTEM_SNAPSHOT_LOG_REC, "SSE_SYS_SNAPSHOT", "SSE_SYS_SNAPSHOT_REC", LOGFILE_CLASS::STELLAR }} +}; + +#endif // __LogTypedefs_h__ diff --git a/src/Makefile b/src/Makefile index 0cf30f8ff..86da33d02 100644 --- a/src/Makefile +++ b/src/Makefile @@ -68,10 +68,23 @@ SOURCES := \ \ BinaryConstituentStar.cpp \ BaseBinaryStar.cpp \ + CircumbinaryDiskFormation.cpp \ BinaryStar.cpp \ \ main.cpp +# Optional spindler-c backend. Default OFF keeps ordinary COMPAS builds +# independent of the external spindler-c and librinterpolate libraries. +# To enable the backend, either set this here or provide it on the make command +# line, e.g. make SPINDLER_C_ROOT=/path/to/spindler-c +SPINDLER_C_ROOT ?= + +ifneq ($(strip $(SPINDLER_C_ROOT)),) +SOURCES += CircumbinaryDiskEvolutionSpindler.cpp +else +SOURCES += CircumbinaryDiskEvolutionUnavailable.cpp +endif + OBJS := $(patsubst %.cpp,$(ODIR)/%.o,$(SOURCES)) # GSL, Boost, and HDF5 directories @@ -86,6 +99,50 @@ BOOSTLIBDIR ?= /lib HDF5INCDIR ?= /usr/include/hdf5/serial HDF5LIBDIR ?= /usr/lib/x86_64-linux-gnu/hdf5/serial +# spindler-c include/link flags are populated only when SPINDLER_C_ROOT is +# nonempty. +SPINDLER_C_CPPFLAGS := +SPINDLER_C_LDFLAGS := +SPINDLER_C_LIBS := + +ifneq ($(strip $(SPINDLER_C_ROOT)),) + +SPINDLER_C_INCDIR ?= $(SPINDLER_C_ROOT)/include +SPINDLER_C_LIBDIR ?= $(SPINDLER_C_ROOT)/lib + +# librinterpolate is a dependency of spindler-c, linked as -lrinterpolate. +# Leave RINTERPOLATE_ROOT empty if librinterpolate is installed in a standard +# compiler/linker search path. Otherwise, set it here or on the make command +# line, e.g. make SPINDLER_C_ROOT=/path/to/spindler-c RINTERPOLATE_ROOT=/path/to/rinterpolate +RINTERPOLATE_ROOT ?= +RINTERPOLATE_INCDIR ?= +RINTERPOLATE_LIBDIR ?= + +ifneq ($(strip $(RINTERPOLATE_ROOT)),) +ifeq ($(strip $(RINTERPOLATE_INCDIR)),) +RINTERPOLATE_INCDIR := $(RINTERPOLATE_ROOT)/include +endif +ifeq ($(strip $(RINTERPOLATE_LIBDIR)),) +RINTERPOLATE_LIBDIR := $(RINTERPOLATE_ROOT)/lib +endif +endif + +SPINDLER_C_CPPFLAGS += -DCOMPAS_ENABLE_SPINDLER_C +SPINDLER_C_CPPFLAGS += -I$(SPINDLER_C_INCDIR) +ifneq ($(strip $(RINTERPOLATE_INCDIR)),) +SPINDLER_C_CPPFLAGS += -I$(RINTERPOLATE_INCDIR) +endif +SPINDLER_C_CPPFLAGS += -DSPINDLER_C_ROOT=\"$(SPINDLER_C_ROOT)\" +SPINDLER_C_LDFLAGS += -L$(SPINDLER_C_LIBDIR) \ + -Wl,-rpath,$(SPINDLER_C_LIBDIR) +ifneq ($(strip $(RINTERPOLATE_LIBDIR)),) +SPINDLER_C_LDFLAGS += -L$(RINTERPOLATE_LIBDIR) \ + -Wl,-rpath,$(RINTERPOLATE_LIBDIR) +endif +SPINDLER_C_LIBS += -lspindler -lrinterpolate + +endif + # Homebrew defaults for macOS local builds ifeq ($(UNAME_S),Darwin) ifneq ($(wildcard $(HOMEBREW_PREFIX)/opt/boost/include/boost/version.hpp),) @@ -108,7 +165,7 @@ endif # might need -Wno-vla-cxx-extension for clang>18? EXTRA_WARN_SUPPRESS := -Wno-vla-extension -CXXFLAGS := -std=c++17 -Wall $(OPTFLAGS) $(CXXFLAGS_SPECIFIC) $(EXTRA_WARN_SUPPRESS) +CXXFLAGS := -std=c++17 -Wall $(OPTFLAGS) $(CXXFLAGS_SPECIFIC) $(EXTRA_WARN_SUPPRESS) $(SPINDLER_C_CPPFLAGS) ICFLAGS := -I$(GSLINCDIR) -I$(BOOSTINCDIR) -I$(HDF5INCDIR) -I. LIBS := -lm -lz -ldl -lpthread @@ -120,7 +177,7 @@ ifeq ($(wildcard $(BOOSTLIBDIR)/libboost_system*),) endif endif HDF5LIBS := -lhdf5_hl_cpp -lhdf5_cpp -lhdf5_hl -lhdf5 -LFLAGS := -L$(GSLLIBDIR) -L$(BOOSTLIBDIR) -L$(HDF5LIBDIR) -Xlinker -rpath -Xlinker $(BOOSTLIBDIR) $(HDF5LIBS) $(LIBS) $(GSLLIBS) $(BOOSTLIBS) $(LFLAGS_SPECIFIC) +LFLAGS := -L$(GSLLIBDIR) -L$(BOOSTLIBDIR) -L$(HDF5LIBDIR) $(SPINDLER_C_LDFLAGS) -Xlinker -rpath -Xlinker $(BOOSTLIBDIR) $(HDF5LIBS) $(LIBS) $(GSLLIBS) $(BOOSTLIBS) $(SPINDLER_C_LIBS) $(LFLAGS_SPECIFIC) .PHONY: all static fast staticfast clean link diff --git a/src/Options.cpp b/src/Options.cpp index ec62db46c..893129154 100644 --- a/src/Options.cpp +++ b/src/Options.cpp @@ -555,6 +555,24 @@ void Options::OptionValues::Initialise() { m_CommonEnvelopeMassAccretionConstant = 0.0; // Common envelope formalism + m_PostCommonEnvelopeEccentricityPrescription.type = POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION::CIRCULAR; + m_PostCommonEnvelopeEccentricityPrescription.typeString = POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION_LABEL.at(m_PostCommonEnvelopeEccentricityPrescription.type); + m_PostCommonEnvelopeEccentricityCap = 0.1; + m_PostCommonEnvelopeEccentricityFraction = 0.1; + m_CircumbinaryDisk = false; + m_CircumbinaryDiskUseSynchronizedEnvelopeAngularMomentum = false; + m_CircumbinaryDiskBeta = 3.0; + m_CircumbinaryDiskEddingtonMode.type = CIRCUMBINARY_DISK_EDDINGTON_MODE::GE23; + m_CircumbinaryDiskEddingtonMode.typeString = CIRCUMBINARY_DISK_EDDINGTON_MODE_LABEL.at(m_CircumbinaryDiskEddingtonMode.type); + m_CircumbinaryDiskEddingtonCapFactor = 1.0; + m_CircumbinaryDiskEddingtonGe23Factor = 2.0 / 3.0; + m_CircumbinaryDiskInnerRadiusOverSeparation = 2.5; + m_CircumbinaryDiskLifetime = 1.0e5; + m_CircumbinaryDiskStructureFactor = 4.0; + m_CircumbinaryDiskEnvelopeMassFractionSupplied = 0.05; + m_CircumbinaryDiskEvolutionMode.type = CIRCUMBINARY_DISK_EVOLUTION_MODE::INSTANTANEOUS; + m_CircumbinaryDiskEvolutionMode.typeString = CIRCUMBINARY_DISK_EVOLUTION_MODE_LABEL.at(m_CircumbinaryDiskEvolutionMode.type); + m_CommonEnvelopeFormalism.type = CE_FORMALISM::ENERGY; m_CommonEnvelopeFormalism.typeString = CE_FORMALISM_LABEL.at(m_CommonEnvelopeFormalism.type); @@ -850,6 +868,16 @@ bool Options::AddOptions(OptionValues *p_Options, po::options_description *p_Opt po::value(&p_Options->m_CirculariseBinaryDuringMassTransfer)->default_value(p_Options->m_CirculariseBinaryDuringMassTransfer)->implicit_value(true), ("Circularise binary when it enters a Mass Transfer episode (default = " + std::string(p_Options->m_CirculariseBinaryDuringMassTransfer ? "TRUE" : "FALSE") + ")").c_str() ) + ( + "circumbinary-disk", + po::value(&p_Options->m_CircumbinaryDisk)->default_value(p_Options->m_CircumbinaryDisk)->implicit_value(true), + ("Apply post-common-envelope circumbinary-disk evolution where the CBD formation criterion is satisfied (default = " + std::string(p_Options->m_CircumbinaryDisk ? "TRUE" : "FALSE") + ")").c_str() + ) + ( + "circumbinary-disk-use-synchronized-envelope-angular-momentum", + po::value(&p_Options->m_CircumbinaryDiskUseSynchronizedEnvelopeAngularMomentum)->default_value(p_Options->m_CircumbinaryDiskUseSynchronizedEnvelopeAngularMomentum)->implicit_value(true), + ("Use the synchronized-envelope angular-momentum estimate in the CBD formation criterion instead of COMPAS total angular momentum (default = " + std::string(p_Options->m_CircumbinaryDiskUseSynchronizedEnvelopeAngularMomentum ? "TRUE" : "FALSE") + ")").c_str() + ) ( "common-envelope-allow-immediate-RLOF-post-CE-survive", po::value(&p_Options->m_AllowImmediateRLOFpostCEToSurviveCommonEnvelope)->default_value(p_Options->m_AllowImmediateRLOFpostCEToSurviveCommonEnvelope)->implicit_value(true), @@ -1137,6 +1165,67 @@ bool Options::AddOptions(OptionValues *p_Options, po::options_description *p_Opt // double + // Circumbinary-disk and post-CE eccentricity options. + ( + "circumbinary-disk-beta", + po::value(&p_Options->m_CircumbinaryDiskBeta)->default_value(p_Options->m_CircumbinaryDiskBeta), + ("Circumbinary disk angular-momentum retention parameter beta = fJ/fM; must be non-negative, and beta * fM must be <= 1 (default = " + std::to_string(p_Options->m_CircumbinaryDiskBeta) + ")").c_str() + ) + ( + "circumbinary-disk-eddington-cap-factor", + po::value(&p_Options->m_CircumbinaryDiskEddingtonCapFactor)->default_value(p_Options->m_CircumbinaryDiskEddingtonCapFactor), + ("Multiplier applied to the Eddington accretion rate in CBD Eddington mode CAP (default = " + std::to_string(p_Options->m_CircumbinaryDiskEddingtonCapFactor) + ")").c_str() + ) + ( + "circumbinary-disk-eddington-ge23-factor", + po::value(&p_Options->m_CircumbinaryDiskEddingtonGe23Factor)->default_value(p_Options->m_CircumbinaryDiskEddingtonGe23Factor), + ("Retained fraction of the requested super-Eddington CBD accretion rate in Eddington mode GE23; must satisfy 0 < f <= 1 (default = " + std::to_string(p_Options->m_CircumbinaryDiskEddingtonGe23Factor) + ")").c_str() + ) + ( + "circumbinary-disk-inner-radius-over-separation", + po::value(&p_Options->m_CircumbinaryDiskInnerRadiusOverSeparation)->default_value(p_Options->m_CircumbinaryDiskInnerRadiusOverSeparation), + ("Inner circumbinary-disk radius in units of post-CE binary separation; must be >= 1 (default = " + std::to_string(p_Options->m_CircumbinaryDiskInnerRadiusOverSeparation) + ")").c_str() + ) + ( + "circumbinary-disk-lifetime", + po::value(&p_Options->m_CircumbinaryDiskLifetime)->default_value(p_Options->m_CircumbinaryDiskLifetime), + ("Circumbinary-disk lifetime in years; must be > 0 (default = " + std::to_string(p_Options->m_CircumbinaryDiskLifetime) + ")").c_str() + ) + ( + "circumbinary-disk-structure-factor", + po::value(&p_Options->m_CircumbinaryDiskStructureFactor)->default_value(p_Options->m_CircumbinaryDiskStructureFactor), + ("Disk-structure factor multiplying the CBD angular-momentum threshold; must be > 1 (default = " + std::to_string(p_Options->m_CircumbinaryDiskStructureFactor) + ")").c_str() + ) + ( + "circumbinary-disk-envelope-mass-fraction-supplied", + po::value(&p_Options->m_CircumbinaryDiskEnvelopeMassFractionSupplied)->default_value(p_Options->m_CircumbinaryDiskEnvelopeMassFractionSupplied), + ("Fraction of the total binary mass lost during common-envelope evolution that is supplied through a circumbinary disk; the resulting initial CBD mass (logged as Initial_CBD_Mass) is assumed to be much smaller than the post-CE binary mass in the Spindler formalism; must be between 0 and 0.2 (default = " + std::to_string(p_Options->m_CircumbinaryDiskEnvelopeMassFractionSupplied) + ")").c_str() + ) + ( + "post-common-envelope-eccentricity-prescription", + po::value(&p_Options->m_PostCommonEnvelopeEccentricityPrescription.typeString)->default_value(p_Options->m_PostCommonEnvelopeEccentricityPrescription.typeString), + ("Post-common-envelope eccentricity prescription: CIRCULAR, PRE_RLOF_CAP, or PRE_RLOF_FRACTION (default = " + p_Options->m_PostCommonEnvelopeEccentricityPrescription.typeString + ")").c_str() + ) + ( + "circumbinary-disk-evolution-mode", + po::value(&p_Options->m_CircumbinaryDiskEvolutionMode.typeString)->default_value(p_Options->m_CircumbinaryDiskEvolutionMode.typeString), + ("Circumbinary-disk evolution mode: INSTANTANEOUS applies the full disk interaction immediately after CE; TIMESTEPPED stores an active reservoir and evolves it over later COMPAS timesteps until the reservoir/lifetime is exhausted or an ordinary binary event terminates the active CBD (default = " + p_Options->m_CircumbinaryDiskEvolutionMode.typeString + ")").c_str() + ) + ( + "circumbinary-disk-eddington-mode", + po::value(&p_Options->m_CircumbinaryDiskEddingtonMode.typeString)->default_value(p_Options->m_CircumbinaryDiskEddingtonMode.typeString), + ("CBD Eddington-limited accretion mode: CAP, TM23, or GE23 (default = " + p_Options->m_CircumbinaryDiskEddingtonMode.typeString + ")").c_str() + ) + ( + "post-common-envelope-eccentricity-cap", + po::value(&p_Options->m_PostCommonEnvelopeEccentricityCap)->default_value(p_Options->m_PostCommonEnvelopeEccentricityCap), + ("Upper cap on the post-common-envelope eccentricity when --post-common-envelope-eccentricity-prescription is PRE_RLOF_CAP; must be in [0, 1) (default = " + std::to_string(p_Options->m_PostCommonEnvelopeEccentricityCap) + ")").c_str() + ) + ( + "post-common-envelope-eccentricity-fraction", + po::value(&p_Options->m_PostCommonEnvelopeEccentricityFraction)->default_value(p_Options->m_PostCommonEnvelopeEccentricityFraction), + ("Fraction of the pre-RLOF eccentricity retained after common envelope evolution when --post-common-envelope-eccentricity-prescription is PRE_RLOF_FRACTION; must be in [0, 1] (default = " + std::to_string(p_Options->m_PostCommonEnvelopeEccentricityFraction) + ")").c_str() + ) ( "common-envelope-alpha", po::value(&p_Options->m_CommonEnvelopeAlpha)->default_value(p_Options->m_CommonEnvelopeAlpha), @@ -2376,6 +2465,21 @@ std::string Options::OptionValues::CheckAndSetOptions() { COMPLAIN_IF(!found, "Unknown Mass Transfer Angular Momentum Loss Prescription for 2-stage CE"); } + if (!DEFAULTED("circumbinary-disk-eddington-mode")) { + std::tie(found, m_CircumbinaryDiskEddingtonMode.type) = utils::GetMapKey(m_CircumbinaryDiskEddingtonMode.typeString, CIRCUMBINARY_DISK_EDDINGTON_MODE_LABEL, m_CircumbinaryDiskEddingtonMode.type); + COMPLAIN_IF(!found, "Unknown circumbinary disk Eddington mode: use CAP, GE23, or TM23"); + } + + if (!DEFAULTED("circumbinary-disk-evolution-mode")) { + std::tie(found, m_CircumbinaryDiskEvolutionMode.type) = utils::GetMapKey(m_CircumbinaryDiskEvolutionMode.typeString, CIRCUMBINARY_DISK_EVOLUTION_MODE_LABEL, m_CircumbinaryDiskEvolutionMode.type); + COMPLAIN_IF(!found, "Unknown circumbinary disk evolution mode: use INSTANTANEOUS or TIMESTEPPED"); + } + + if (!DEFAULTED("post-common-envelope-eccentricity-prescription")) { + std::tie(found, m_PostCommonEnvelopeEccentricityPrescription.type) = utils::GetMapKey(m_PostCommonEnvelopeEccentricityPrescription.typeString, POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION_LABEL, m_PostCommonEnvelopeEccentricityPrescription.type); + COMPLAIN_IF(!found, "Unknown post-CE eccentricity prescription (--post-common-envelope-eccentricity-prescription). Allowed: CIRCULAR, PRE_RLOF_CAP, PRE_RLOF_FRACTION"); + } + if (!DEFAULTED("critical-mass-ratio-prescription")) { // critical mass ratio prescription std::tie(found, m_QCritPrescription.type) = utils::GetMapKey(m_QCritPrescription.typeString, QCRIT_PRESCRIPTION_LABEL, m_QCritPrescription.type); COMPLAIN_IF(!found, "Unknown qCrit Prescription"); @@ -2566,6 +2670,32 @@ std::string Options::OptionValues::CheckAndSetOptions() { // constraint/value/range checks - alphabetically (where possible) + COMPLAIN_IF(utils::Compare(m_PostCommonEnvelopeEccentricityCap, 0.0) < 0 || utils::Compare(m_PostCommonEnvelopeEccentricityCap, 1.0) >= 0, + "Post-CE eccentricity cap (--post-common-envelope-eccentricity-cap) must be in [0, 1)"); + COMPLAIN_IF(utils::Compare(m_PostCommonEnvelopeEccentricityFraction, 0.0) < 0 || utils::Compare(m_PostCommonEnvelopeEccentricityFraction, 1.0) > 0, + "Post-CE eccentricity fraction (--post-common-envelope-eccentricity-fraction) must be in [0, 1]"); + + COMPLAIN_IF(utils::Compare(m_CircumbinaryDiskBeta, 0.0) < 0, + "CBD beta (--circumbinary-disk-beta) must be >= 0"); + COMPLAIN_IF(utils::Compare(m_CircumbinaryDiskEddingtonCapFactor, 0.0) <= 0, + "CBD Eddington CAP factor (--circumbinary-disk-eddington-cap-factor) must be > 0"); + COMPLAIN_IF(utils::Compare(m_CircumbinaryDiskEddingtonGe23Factor, 0.0) <= 0 || utils::Compare(m_CircumbinaryDiskEddingtonGe23Factor, 1.0) > 0, + "CBD Eddington GE23 factor (--circumbinary-disk-eddington-ge23-factor) must satisfy 0 < f <= 1"); + COMPLAIN_IF(utils::Compare(m_CircumbinaryDiskEnvelopeMassFractionSupplied, 0.0) < 0 || utils::Compare(m_CircumbinaryDiskEnvelopeMassFractionSupplied, 0.2) > 0, + "CBD CE mass-loss fraction supplied (--circumbinary-disk-envelope-mass-fraction-supplied) must be between 0 and 0.2"); + COMPLAIN_IF(utils::Compare(m_CircumbinaryDiskBeta * m_CircumbinaryDiskEnvelopeMassFractionSupplied, 1.0) > 0, + "CBD beta * CE mass-loss fraction supplied must be <= 1"); + COMPLAIN_IF(utils::Compare(m_CircumbinaryDiskInnerRadiusOverSeparation, 1.0) < 0, + "CBD inner radius over separation (--circumbinary-disk-inner-radius-over-separation) must be >= 1"); + COMPLAIN_IF(utils::Compare(m_CircumbinaryDiskLifetime, 0.0) <= 0, + "CBD lifetime (--circumbinary-disk-lifetime) must be > 0 yr"); + COMPLAIN_IF(utils::Compare(m_CircumbinaryDiskStructureFactor, 1.0) <= 0, + "CBD structure factor (--circumbinary-disk-structure-factor) must be > 1"); +#ifndef COMPAS_ENABLE_SPINDLER_C + COMPLAIN_IF(m_CircumbinaryDisk, + "Circumbinary-disk evolution was requested, but this COMPAS executable was built without spindler-c support. Rebuild with SPINDLER_C_ROOT set to the spindler-c build tree."); +#endif + COMPLAIN_IF(m_CommonEnvelopeAlpha < 0.0, "CE alpha (--common-envelope-alpha) < 0"); COMPLAIN_IF(m_CommonEnvelopeAlphaThermal < 0.0 || m_CommonEnvelopeAlphaThermal > 1.0, "CE alpha thermal (--common-envelope-alpha-thermal) must be between 0 and 1"); COMPLAIN_IF(m_CommonEnvelopeLambdaMultiplier < 0.0, "CE lambda multiplie (--common-envelope-lambda-multiplier < 0"); @@ -2819,6 +2949,9 @@ STR_VECTOR Options::AllowedOptionValues(const std::string p_OptionString) { case _("chemically-homogeneous-evolution-mode") : POPULATE_RET(CHE_MODE_LABEL); break; case _("common-envelope-formalism") : POPULATE_RET(CE_FORMALISM_LABEL); break; case _("common-envelope-lambda-prescription") : POPULATE_RET(CE_LAMBDA_PRESCRIPTION_LABEL); break; + case _("circumbinary-disk-evolution-mode") : POPULATE_RET(CIRCUMBINARY_DISK_EVOLUTION_MODE_LABEL); break; + case _("circumbinary-disk-eddington-mode") : POPULATE_RET(CIRCUMBINARY_DISK_EDDINGTON_MODE_LABEL); break; + case _("post-common-envelope-eccentricity-prescription") : POPULATE_RET(POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION_LABEL); break; case _("common-envelope-mass-accretion-prescription") : POPULATE_RET(CE_ACCRETION_PRESCRIPTION_LABEL); break; case _("common-envelope-second-stage-gamma-prescription") : POPULATE_RET(MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION_LABEL); break; case _("critical-mass-ratio-prescription") : POPULATE_RET(QCRIT_PRESCRIPTION_LABEL); break; @@ -4929,6 +5062,21 @@ COMPAS_VARIABLE Options::OptionValue(const T_ANY_PROPERTY p_Property) const { case PROGRAM_OPTION::CIRCULARISE_BINARY_DURING_MT : value = CirculariseBinaryDuringMassTransfer(); break; + case PROGRAM_OPTION::CIRCUMBINARY_DISK : value = CircumbinaryDisk(); break; + case PROGRAM_OPTION::CIRCUMBINARY_DISK_USE_SYNCHRONIZED_ENVELOPE_ANGULAR_MOMENTUM : value = CircumbinaryDiskUseSynchronizedEnvelopeAngularMomentum(); break; + case PROGRAM_OPTION::CIRCUMBINARY_DISK_BETA : value = CircumbinaryDiskBeta(); break; + case PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_CAP_FACTOR : value = CircumbinaryDiskEddingtonCapFactor(); break; + case PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_GE23_FACTOR : value = CircumbinaryDiskEddingtonGe23Factor(); break; + case PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_MODE : value = static_cast(CircumbinaryDiskEddingtonMode()); break; + case PROGRAM_OPTION::CIRCUMBINARY_DISK_INNER_RADIUS_OVER_SEPARATION : value = CircumbinaryDiskInnerRadiusOverSeparation(); break; + case PROGRAM_OPTION::CIRCUMBINARY_DISK_LIFETIME : value = CircumbinaryDiskLifetime(); break; + case PROGRAM_OPTION::CIRCUMBINARY_DISK_STRUCTURE_FACTOR : value = CircumbinaryDiskStructureFactor(); break; + case PROGRAM_OPTION::CIRCUMBINARY_DISK_ENVELOPE_MASS_FRACTION_SUPPLIED : value = CircumbinaryDiskEnvelopeMassFractionSupplied(); break; + case PROGRAM_OPTION::CIRCUMBINARY_DISK_EVOLUTION_MODE : value = static_cast(CircumbinaryDiskEvolutionMode()); break; + case PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_CAP : value = PostCommonEnvelopeEccentricityCap(); break; + case PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_FRACTION : value = PostCommonEnvelopeEccentricityFraction(); break; + case PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION : value = static_cast(PostCommonEnvelopeEccentricityPrescription()); break; + case PROGRAM_OPTION::COMMON_ENVELOPE_ALPHA : value = CommonEnvelopeAlpha(); break; case PROGRAM_OPTION::COMMON_ENVELOPE_ALPHA_THERMAL : value = CommonEnvelopeAlphaThermal(); break; case PROGRAM_OPTION::COMMON_ENVELOPE_FORMALISM : value = static_cast(CommonEnvelopeFormalism()); break; diff --git a/src/Options.h b/src/Options.h index a9c1eb162..0f31d0036 100755 --- a/src/Options.h +++ b/src/Options.h @@ -19,7 +19,6 @@ #include #include "constants.h" - #include // Boost string manipulation #include // Boost command line options tools #include // Boost filesystem tools for handling paths etc. @@ -469,6 +468,17 @@ class Options { "case-BB-stability-prescription", "circularise-binary-during-mass-transfer", + "circumbinary-disk", + "circumbinary-disk-beta", + "circumbinary-disk-eddington-cap-factor", + "circumbinary-disk-eddington-ge23-factor", + "circumbinary-disk-eddington-mode", + "circumbinary-disk-envelope-mass-fraction-supplied", + "circumbinary-disk-evolution-mode", + "circumbinary-disk-inner-radius-over-separation", + "circumbinary-disk-lifetime", + "circumbinary-disk-structure-factor", + "circumbinary-disk-use-synchronized-envelope-angular-momentum", "common-envelope-allow-main-sequence-survive", "common-envelope-alpha", "common-envelope-alpha-thermal", @@ -544,6 +554,10 @@ class Options { "orbital-period-max", "orbital-period-min", + "post-common-envelope-eccentricity-cap", + "post-common-envelope-eccentricity-fraction", + "post-common-envelope-eccentricity-prescription", + "rlof-printing", "rotational-frequency-1", "rotational-frequency-2", @@ -589,6 +603,17 @@ class Options { "check-photon-tiring-limit", "chemically-homogeneous-evolution-mode", "circularise-binary-during-mass-transfer", + "circumbinary-disk", + "circumbinary-disk-beta", + "circumbinary-disk-eddington-cap-factor", + "circumbinary-disk-eddington-ge23-factor", + "circumbinary-disk-eddington-mode", + "circumbinary-disk-envelope-mass-fraction-supplied", + "circumbinary-disk-evolution-mode", + "circumbinary-disk-inner-radius-over-separation", + "circumbinary-disk-lifetime", + "circumbinary-disk-structure-factor", + "circumbinary-disk-use-synchronized-envelope-angular-momentum", "common-envelope-allow-main-sequence-survive", "common-envelope-formalism", "common-envelope-lambda-prescription", @@ -1102,6 +1127,22 @@ class Options { double m_MassTransferCriticalMassRatioWhiteDwarfNonDegenerateAccretor; // Critical mass ratio for MT from a white dwarf double m_MassTransferCriticalMassRatioWhiteDwarfDegenerateAccretor; // Critical mass ratio for MT from a white dwarf on to a degenerate accretor + // Circumbinary disk and post-CE eccentricity options + ENUM_OPT m_PostCommonEnvelopeEccentricityPrescription; // Prescription for setting eccentricity after common envelope evolution + double m_PostCommonEnvelopeEccentricityCap; // Eccentricity cap assigned after common envelope evolution when requested + double m_PostCommonEnvelopeEccentricityFraction; // Fraction of the pre-RLOF eccentricity retained after common envelope evolution when requested + bool m_CircumbinaryDisk; // Whether to apply post-CE CBD evolution where the formation criterion is satisfied + bool m_CircumbinaryDiskUseSynchronizedEnvelopeAngularMomentum; // Whether to use the synchronized-envelope angular-momentum estimate for CBD formation + double m_CircumbinaryDiskBeta; // CBD angular-momentum parameter beta = fJ/fM + ENUM_OPT m_CircumbinaryDiskEddingtonMode; // CBD Eddington-limited accretion mode: CAP, GE23, or TM23 + double m_CircumbinaryDiskEddingtonCapFactor; // CAP-mode multiplier applied to the Eddington rate + double m_CircumbinaryDiskEddingtonGe23Factor; // GE23-mode retained fraction for super-Eddington requested accretion + double m_CircumbinaryDiskInnerRadiusOverSeparation; // Inner CBD radius in units of post-CE binary separation + double m_CircumbinaryDiskLifetime; // CBD lifetime in yr + double m_CircumbinaryDiskStructureFactor; // Disk-structure factor multiplying the CBD angular-momentum threshold + double m_CircumbinaryDiskEnvelopeMassFractionSupplied; // Fraction of CE mass loss supplied through a CBD; assumed to yield initial m_CBD << post-CE binary mass + ENUM_OPT m_CircumbinaryDiskEvolutionMode; // INSTANTANEOUS evolves the full CBD during CE; TIMESTEPPED evolves it over later COMPAS timesteps + // Common Envelope options double m_CommonEnvelopeAlpha; // Common envelope efficiency alpha parameter double m_CommonEnvelopeLambda; // Common envelope Lambda parameter @@ -1432,6 +1473,20 @@ class Options { bool CommandLineGrid() const { return m_CmdLine.complexOptionValues.size() != 0; } + bool CircumbinaryDisk() const { return OPT_VALUE("circumbinary-disk", m_CircumbinaryDisk, true); } + bool CircumbinaryDiskUseSynchronizedEnvelopeAngularMomentum() const { return OPT_VALUE("circumbinary-disk-use-synchronized-envelope-angular-momentum", m_CircumbinaryDiskUseSynchronizedEnvelopeAngularMomentum, true); } + double CircumbinaryDiskBeta() const { return OPT_VALUE("circumbinary-disk-beta", m_CircumbinaryDiskBeta, true); } + CIRCUMBINARY_DISK_EDDINGTON_MODE CircumbinaryDiskEddingtonMode() const { return OPT_VALUE("circumbinary-disk-eddington-mode", m_CircumbinaryDiskEddingtonMode.type, true); } + double CircumbinaryDiskEddingtonCapFactor() const { return OPT_VALUE("circumbinary-disk-eddington-cap-factor", m_CircumbinaryDiskEddingtonCapFactor, true); } + double CircumbinaryDiskEddingtonGe23Factor() const { return OPT_VALUE("circumbinary-disk-eddington-ge23-factor", m_CircumbinaryDiskEddingtonGe23Factor, true); } + double CircumbinaryDiskInnerRadiusOverSeparation() const { return OPT_VALUE("circumbinary-disk-inner-radius-over-separation", m_CircumbinaryDiskInnerRadiusOverSeparation, true); } + double CircumbinaryDiskLifetime() const { return OPT_VALUE("circumbinary-disk-lifetime", m_CircumbinaryDiskLifetime, true); } + double CircumbinaryDiskStructureFactor() const { return OPT_VALUE("circumbinary-disk-structure-factor", m_CircumbinaryDiskStructureFactor, true); } + double CircumbinaryDiskEnvelopeMassFractionSupplied() const { return OPT_VALUE("circumbinary-disk-envelope-mass-fraction-supplied", m_CircumbinaryDiskEnvelopeMassFractionSupplied, true); } + CIRCUMBINARY_DISK_EVOLUTION_MODE CircumbinaryDiskEvolutionMode() const { return OPT_VALUE("circumbinary-disk-evolution-mode", m_CircumbinaryDiskEvolutionMode.type, true); } + double PostCommonEnvelopeEccentricityCap() const { return OPT_VALUE("post-common-envelope-eccentricity-cap", m_PostCommonEnvelopeEccentricityCap, true); } + double PostCommonEnvelopeEccentricityFraction() const { return OPT_VALUE("post-common-envelope-eccentricity-fraction", m_PostCommonEnvelopeEccentricityFraction, true); } + POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION PostCommonEnvelopeEccentricityPrescription() const { return OPT_VALUE("post-common-envelope-eccentricity-prescription", m_PostCommonEnvelopeEccentricityPrescription.type, true); } double CommonEnvelopeAlpha() const { return OPT_VALUE("common-envelope-alpha", m_CommonEnvelopeAlpha, true); } double CommonEnvelopeAlphaThermal() const { return OPT_VALUE("common-envelope-alpha-thermal", m_CommonEnvelopeAlphaThermal, true); } CE_FORMALISM CommonEnvelopeFormalism() const { return OPT_VALUE("common-envelope-formalism", m_CommonEnvelopeFormalism.type, true); } diff --git a/src/changelog.h b/src/changelog.h index 20cd4638c..2f6138f23 100644 --- a/src/changelog.h +++ b/src/changelog.h @@ -1705,7 +1705,25 @@ // - Corrected the M&M NS remnant mass prescription to never return a remnant mass larger than the CO core mass (see issue #1468) // 03.29.05 AG - May 26, 2026 - Defect repair: // - Fix for generalized issue #1378: reinstate "false" fallback option for SN kick angle options (mistakenly changed to "true" in v03.00.00) -// +// 03.30.00 AG - June 05, 2026 - Enhancement: +// Added a post-common-envelope circumbinary disk (CBD) framework – disabled by default - based on the formalism +// described in Grichener et al. (2026). The framework assumes that after common-envelope +// evolution (CEE), a fraction of the pre-RLOF envelope mass and the binary's total angular +// momentum (AM) might remain available for CBD formation. If the available AM suffices to support a CBD of the retained mass, one is formed. +// The CBD is then accreted back by the binary, with the evolution based on spindler-c (*), modified to account for the Eddington accretion limit. +// Non-accreted material is assumed to be lost in winds carrying the accretor's specific orbital angular momentum. +// CBD related output is written in a new file called BSE_Circumbinary_Disks. +// Main user options: +// --circumbinary-disk enables the CBD framework +// --circumbinary-disk-beta controls the likelihood of CBD formation +// --circumbinary-disk-envelope-mass-fraction-supplied controls the CBD mass +// --circumbinary-disk-eddington-mode controls the Eddington-limited accretion prescription +// --post-common-envelope-eccentricity-prescription controls the post-CEE eccentricity (non-zero values tend to be significantly increased by the CBD-binary interaction) +// See documentation for more information on the available options. +// (*) https://github.com/ruggero-valli/spindler-c, installation required to use the CBD module + + + // Version string format is MM.mm.rr, where // // MM is the MAJOR release number: this should be incremented whenever major new functionality is introduced @@ -1715,7 +1733,7 @@ // if MM is incremented, set mm and rr to 00, even if defect repairs and minor enhancements were also made // if mm is incremented, set rr to 00, even if defect repairs were also made -const std::string VERSION_STRING = "03.29.05"; +const std::string VERSION_STRING = "03.30.00"; # endif // __changelog_h__ diff --git a/src/typedefs.h b/src/typedefs.h index 7d16ddbe9..b452e5e0f 100755 --- a/src/typedefs.h +++ b/src/typedefs.h @@ -352,6 +352,28 @@ const COMPASUnorderedMap CASE_BB_ST { CASE_BB_STABILITY_PRESCRIPTION::ALWAYS_UNSTABLE, "ALWAYS_UNSTABLE" } }; + +// circumbinary disk Eddington-limited accretion modes +// CAP applies a user-scaled Eddington cap; GE23 applies a fixed retained +// fraction motivated by Ghodla & Eldridge; TM23 applies the Tuna & Metzger +// compact-object prescription. +enum class CIRCUMBINARY_DISK_EDDINGTON_MODE: int { CAP, GE23, TM23 }; +const COMPASUnorderedMap CIRCUMBINARY_DISK_EDDINGTON_MODE_LABEL = { + { CIRCUMBINARY_DISK_EDDINGTON_MODE::CAP, "CAP" }, + { CIRCUMBINARY_DISK_EDDINGTON_MODE::GE23, "GE23" }, + { CIRCUMBINARY_DISK_EDDINGTON_MODE::TM23, "TM23" } +}; + +// circumbinary disk evolution modes +// INSTANTANEOUS applies the full CBD interaction immediately after CE; +// TIMESTEPPED stores an active disk reservoir and evolves it over later +// COMPAS timesteps. +enum class CIRCUMBINARY_DISK_EVOLUTION_MODE: int { INSTANTANEOUS, TIMESTEPPED }; +const COMPASUnorderedMap CIRCUMBINARY_DISK_EVOLUTION_MODE_LABEL = { + { CIRCUMBINARY_DISK_EVOLUTION_MODE::INSTANTANEOUS, "INSTANTANEOUS" }, + { CIRCUMBINARY_DISK_EVOLUTION_MODE::TIMESTEPPED, "TIMESTEPPED" } +}; + // common envelope cccretion prescriptions enum class CE_ACCRETION_PRESCRIPTION: int { ZERO, CONSTANT, UNIFORM, MACLEOD, CHEVALIER }; const COMPASUnorderedMap CE_ACCRETION_PRESCRIPTION_LABEL = { @@ -761,6 +783,18 @@ const COMPASUnorderedMap OBJECT_TYPE_LABEL = { { OBJECT_TYPE::BINARY_CONSTITUENT_STAR, "BinaryConstituentStar" } }; + +// post-common-envelope eccentricity prescriptions +// CIRCULAR uses the usual e=0 CE outcome; PRE_RLOF_CAP uses +// min(e_pre_RLOF, eccentricity_cap); PRE_RLOF_FRACTION uses +// eccentricity_fraction * e_pre_RLOF. +enum class POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION: int { CIRCULAR, PRE_RLOF_CAP, PRE_RLOF_FRACTION }; +const COMPASUnorderedMap POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION_LABEL = { + { POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION::CIRCULAR, "CIRCULAR" }, + { POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION::PRE_RLOF_CAP, "PRE_RLOF_CAP" }, + { POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION::PRE_RLOF_FRACTION, "PRE_RLOF_FRACTION" } +}; + // program options origin indicator (command line or gridfile line) enum class OPTIONS_ORIGIN: int { CMDLINE, GRIDFILE }; diff --git a/src/yaml.h b/src/yaml.h index e64190982..d0f3219d4 100644 --- a/src/yaml.h +++ b/src/yaml.h @@ -119,6 +119,10 @@ namespace yaml { " --common-envelope-lambda-nanjing-use-rejuvenated-mass", " --revised-energy-formalism-nandez-ivanova", "", + " ### CIRCUMBINARY DISK", + " --circumbinary-disk", + " --circumbinary-disk-use-synchronized-envelope-angular-momentum", + "", " ### SUPERNOVAE, KICKS AND REMNANTS", " --allow-non-stripped-ECSN", " --pair-instability-supernovae", @@ -235,6 +239,17 @@ namespace yaml { " --common-envelope-second-stage-beta", " --common-envelope-slope-kruckow", " --maximum-mass-donor-nandez-ivanova", + " --post-common-envelope-eccentricity-cap", + " --post-common-envelope-eccentricity-fraction", + "", + " ### CIRCUMBINARY DISK", + " --circumbinary-disk-beta", + " --circumbinary-disk-eddington-cap-factor", + " --circumbinary-disk-eddington-ge23-factor", + " --circumbinary-disk-envelope-mass-fraction-supplied", + " --circumbinary-disk-inner-radius-over-separation", + " --circumbinary-disk-lifetime", + " --circumbinary-disk-structure-factor", "", " ### SUPERNOVAE, KICKS AND REMNANTS", " --eddington-accretion-factor # multiplication Factor for eddington accretion onto NS&BH", @@ -341,6 +356,11 @@ namespace yaml { " --common-envelope-lambda-prescription # Xu & Li 2010", " --common-envelope-mass-accretion-prescription", " --common-envelope-second-stage-gamma-prescription", + " --post-common-envelope-eccentricity-prescription", + "", + " ### CIRCUMBINARY DISK", + " --circumbinary-disk-eddington-mode", + " --circumbinary-disk-evolution-mode", "", " ### TIDES", " --tides-prescription", From 81dadba8bf6fa7d0f15b96eef115307cc787b9f8 Mon Sep 17 00:00:00 2001 From: Aldana Grichener <110453835+AldanaGrichener@users.noreply.github.com> Date: Fri, 4 Sep 2026 18:17:05 -0700 Subject: [PATCH 02/10] Update README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index bdba8e989..e9803206d 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,13 @@ ![COMPASlogo](misc/COMPAS_logos/COMPAS_banner.png) +# Research version with circumbinary-disk (CBD) evolution + +This fork contains the CBD implementation used in Grichener et al. (2026). +The CBD implementation is a research extension of [COMPAS](https://github.com/TeamCOMPAS/COMPAS) +and is not currently part of the official COMPAS release. + + # Compact Object Mergers: Population Astrophysics & Statistics [//]: ## (Outline features) From da29eef541a0e296bbf659c0bc690ae88cac18b9 Mon Sep 17 00:00:00 2001 From: Aldana Grichener <110453835+AldanaGrichener@users.noreply.github.com> Date: Fri, 4 Sep 2026 18:51:09 -0700 Subject: [PATCH 03/10] Update README.md --- README.md | 106 ------------------------------------------------------ 1 file changed, 106 deletions(-) diff --git a/README.md b/README.md index e9803206d..bc0c9437a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,3 @@ -[//]: ## (grip -b README.md) - -![COMPASlogo](misc/COMPAS_logos/COMPAS_banner.png) - # Research version with circumbinary-disk (CBD) evolution This fork contains the CBD implementation used in Grichener et al. (2026). @@ -9,106 +5,4 @@ The CBD implementation is a research extension of [COMPAS](https://github.com/Te and is not currently part of the official COMPAS release. -# Compact Object Mergers: Population Astrophysics & Statistics - -[//]: ## (Outline features) -COMPAS is a publicly available rapid binary population synthesis code (https://compas.science/) that is designed so that evolution prescriptions and model parameters are easily -adjustable. COMPAS draws properties for a binary star system from a set of initial distributions, and evolves it from zero-age main sequence to the end of its life as two compact -remnants. It has been used for inference from observations of gravitational-wave mergers, Galactic neutron stars, X-ray binaries, and luminous red novae. - -## Documentation -https://compas.science/docs - -## Contact -Please email your queries to compas-user@googlegroups.com. You are also welcome to join the [COMPAS User Google Group](https://groups.google.com/forum/#!members/compas-user) to engage in discussions with COMPAS users and developers. - -## Acknowledgements -If you use this code or parts of this code for results presented in a scientific publication, we would greatly appreciate if you send us your paper reference and make your input settings and output data -publicly available by uploading it to the [COMPAS Zenodo community](https://zenodo.org/communities/compas/). Please also kindly include citations to our COMPAS methods papers -https://ui.adsabs.harvard.edu/abs/2022ApJS..258...34R -and -https://ui.adsabs.harvard.edu/abs/2025ApJS..280...43T . -As the public COMPAS code is a product of work by the entire COMPAS collaboration over many years, we kindly request that, in recognition of -this team effort, the papers are cited as “Team COMPAS: J. Riley et al. (2021)” and "Team COMPAS: I. Mandel et al. (2025). Example bibtex codes are: - -@ARTICLE{compas2021, - author = {{Team COMPAS: Riley}, Jeff and {Agrawal}, Poojan and {Barrett}, Jim W. and {Boyett}, Kristan N.~K. and {Broekgaarden}, Floor S. and {Chattopadhyay}, Debatri and {Gaebel}, Sebastian M. and {Gittins}, Fabian and {Hirai}, Ryosuke and {Howitt}, George and {Justham}, Stephen and {Khandelwal}, Lokesh and {Kummer}, Floris and {Lau}, Mike Y.~M. and {Mandel}, Ilya and {de Mink}, Selma E. and {Neijssel}, Coenraad and {Riley}, Tim and {van Son}, Lieke and {Stevenson}, Simon and {Vigna-G{\'o}mez}, Alejandro and {Vinciguerra}, Serena and {Wagg}, Tom and {Willcox}, Reinhold}, - title = "{Rapid Stellar and Binary Population Synthesis with COMPAS}", - journal = {\apjs}, - keywords = {1622, 154, 1108, 162}, - year = 2022, - month = feb, - volume = {258}, - number = {2}, - eid = {34}, - pages = {34}, - doi = {10.3847/1538-4365/ac416c}, - adsurl = {https://ui.adsabs.harvard.edu/abs/2022ApJS..258...34R}, - adsnote = {Provided by the SAO/NASA Astrophysics Data System} -} - -@ARTICLE{compas2025, - author = {{Team COMPAS: Mandel}, Ilya and {Riley}, Jeff and {Boesky}, Adam and {Brcek}, Adam and {Hirai}, Ryosuke and {Kapil}, Veome and {Lau}, Mike Y.~M. and {Merritt}, JD and {Rodr{\'\i}guez-Segovia}, Nicol{\'a}s and {Romero-Shaw}, Isobel and {Song}, Yuzhe and {Stevenson}, Simon and {Vajpeyi}, Avi and {van Son}, L.~A.~C. and {Vigna-G{\'o}mez}, Alejandro and {Willcox}, Reinhold}, - title = "{Rapid Stellar and Binary Population Synthesis with COMPAS: Methods Paper II}", - journal = {\apjs}, - keywords = {Binary stars, Stellar populations, Stellar evolution, Stellar evolutionary models, Stellar remnants, 154, 1622, 1599, 2046, 1627, Solar and Stellar Astrophysics, High Energy Astrophysical Phenomena, Instrumentation and Methods for Astrophysics}, - year = 2025, - month = sep, - volume = {280}, - number = {1}, - eid = {43}, - pages = {43}, - doi = {10.3847/1538-4365/adf8d0}, -archivePrefix = {arXiv}, - eprint = {2506.02316}, - primaryClass = {astro-ph.SR}, - adsurl = {https://ui.adsabs.harvard.edu/abs/2025ApJS..280...43T}, - adsnote = {Provided by the SAO/NASA Astrophysics Data System} -} - -##Note that the preferred acknowledgement relies on \noopsort and cites the paper as TEAM COMPAS; Riley et al.; to make it work, you'll have to include the following line at the start of your bibtex file: -##@PREAMBLE{ {\providecommand{\noopsort}[1]{}} } - -##and change the author line in the bib entry to: - -##author = {{\noopsort{Team COMPAS}}{Team COMPAS: Riley, J.} and {Agrawal}, Poojan and {Barrett}, Jim W. and {Boyett}, Kristan N.~K. and {Broekgaarden}, Floor S. and {Chattopadhyay}, Debatri and {Gaebel}, Sebastian M. and {Gittins}, Fabian and {Hirai}, Ryosuke and {Howitt}, George and {Justham}, Stephen and {Khandelwal}, Lokesh and {Kummer}, Floris and {Lau}, Mike Y.~M. and {Mandel}, Ilya and {de Mink}, Selma E. and {Neijssel}, Coenraad and {Riley}, Tim and {van Son}, Lieke and {Stevenson}, Simon and {Vigna-Gomez}, Alejandro and {Vinciguerra}, Serena and {Wagg}, Tom and {Willcox}, Reinhold} - - - -In addition, we suggest to kindly include the two following papers: - -1. Stevenson S., Vigna-Gómez A., Mandel I., Barrett J. W., Neijssel C. J., Perkins D., de Mink S. E., 2017, [Nature Communications, 8, 14906](https://ui.adsabs.harvard.edu/abs/2017NatCo...814906S/abstract) -2. Vigna-Gómez A., Neijssel C. J., Stevenson S., Barrett J. W., Belczynski K., Justham S., de Mink S., Müller B., Podsiadlowski Ph., Renzo M., Szécsi D., Mandel I., 2018, [MNRAS, 481, 4009](https://ui.adsabs.harvard.edu/abs/2018MNRAS.481.4009V/abstract) - -We also greatly appreciate an acknowledgement of the form: - ->_Simulations in this paper made use of the COMPAS rapid binary population synthesis code (version X.X.X), which is freely available at http://github.com/TeamCOMPAS/COMPAS_. - -Furthermore, - - * If you use COMPAS's importance sampling algorithm STROOPWAFEL, please cite - - Broekgaarden F. S., Justham S., de Mink S. E., Gair J., Mandel I., Stevenson S., Barrett J. W., Vigna-Gómez A., Neijssel C. J., 2019, [MNRAS, 490, 5228](https://ui.adsabs.harvard.edu/abs/2019MNRAS.490.5228B/abstract) - - * If using the COMPAS model of gravitational wave selection effects, please cite - - Barrett J. W., Gaebel S. M., Neijssel C. J., Vigna-Gómez A., Stevenson S., Berry C. P. L., Farr W. M., Mandel I., 2018, [MNRAS, 477, 4685](https://ui.adsabs.harvard.edu/abs/2018MNRAS.477.4685B/abstract) - - * If using COMPAS's integration over cosmic star formation history, please cite - - Neijssel C. J., Vigna-Gómez A., Stevenson S., Barrett J. W., Gaebel S. M., Broekgaarden F. S., de Mink S. E., Szécsi D., Vinciguerra S., Mandel I., 2019, [MNRAS, 490, 3740](https://ui.adsabs.harvard.edu/abs/2019MNRAS.490.3740N/abstract) - - * If using the COMPAS model of (pulsational) pair instability supernova, please cite - - Stevenson S., Sampson M., Powell J., Vigna-Gómez A., Neijssel C. J., Szécsi D., Mandel I., 2019, [ApJ, 882, 121](https://ui.adsabs.harvard.edu/abs/2019ApJ...882..121S/abstract) - - * If evolving pulsar spins and magnetic fields with COMPAS, please cite - - Chattopadhyay D., Stevenson S., Hurley J. R., Rossi L. J., Flynn C., 2020, [MNRAS](https://ui.adsabs.harvard.edu/abs/2020MNRAS.tmp..697C/abstract) - -## License -[MIT](https://choosealicense.com/licenses/mit/) - - -### Highlighted papers that have made use of COMPAS are listed at https://compas.science/science.html ; see https://ui.adsabs.harvard.edu/public-libraries/gzRk1qpbRUy4cP2GydR36Q for a full ADS library From 3553e26677b8d44a472f5f00cda1651084f86f39 Mon Sep 17 00:00:00 2001 From: Aldana Grichener <110453835+AldanaGrichener@users.noreply.github.com> Date: Sat, 31 Oct 2026 15:19:06 -0700 Subject: [PATCH 04/10] Update README.md --- README.md | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bc0c9437a..553214725 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,76 @@ This fork contains the CBD implementation used in Grichener et al. (2026). The CBD implementation is a research extension of [COMPAS](https://github.com/TeamCOMPAS/COMPAS) -and is not currently part of the official COMPAS release. +and is not currently part of the official COMPAS release, and is in processes of being integrated into COMPAS. + +## Summary +This PR adds an optional post-common-envelope circumbinary disk (CBD) framework to COMPAS. The new framework checks whether a CBD can form in post-common-envelope systems containing a neutron star or black hole companion, based on angular-momentum considerations. If a CBD forms, the framework evolves the post-CEE binary under disk-driven accretion and angular-momentum exchange based on an external library called [spindler-c](https://github.com/ruggero-valli/spindler-c). When the compact object accretion rate exceeds the Eddington limit, the framework applies an Eddington-limited accretion correction, reducing the actually accreted mass and ejecting the difference as winds, which carry away angular momentum. + +The framework is disabled by default, so existing COMPAS behavior is preserved unless the new CBD options are explicitly enabled by the user supplied boolean option --circumbinary-disk. + +I used ChatGPT as a coding assistant while translating my research prototype into main-branch-worthy (hopefully) C++ code. I've continuously reviewed the implementation and tested it against my prototype. + +## Motivation +Post-common-envelope CBDs affect the orbital separations, eccentricities, and masses of binary systems, and therefore their survival probabilities, merger times, and observable properties. This PR provides a first implementation of such a framework in COMPAS. + +## Main changes +- Adds a new 'CircumbinaryDisk' module. +- Adds user-facing options controlling CBD formation and evolution. +- Adds CBD-related logging quantities, outputs to BSE_Circumbinary_Disks. +- Adds documentation of the physical assumptions, units, and limitations. + +## Dependencies +Using the CBD module requires installing [spindler-c](https://github.com/ruggero-valli/spindler-c), which itself requires [libinterpolate](https://gitlab.com/rob.izzard/librinterpolate). While working on the CBD module I encountered a bug in spindler-c. I've opened a PR to fix it, but for now using [my version](https://github.com/AldanaGrichener/spindler-c) would be better. +By default, COMPAS will compile without spindler-c, making the CBD module unavailable. COMPAS users who want to use the CBD module will have to supply paths to spindler-c at compile time. + +## Modified files +- Adds: CircumbinaryDiskFormation.cpp, CircumbinaryDiskEvolutionSpindler.cpp, CircumbinaryDiskEvolutionUnavailable.cpp, and CircumbinaryDisk.h. +- Modifies: BaseBinaryStar.cpp, BaseBinaryStar.h, Log.cpp, Log.h, LogTypedefs.h, Makefile, Options.cpp, Options.h, typedefs.h, yaml.h. + +## CBD user-supplied options and their defaults +I've added quite a few user-supplied options as part of the CBD framework. Some of these should perhaps be hardcoded, while others are legacy options which ultimately shouldn't be part of the main branch. Here's a table summarizing the added options: + +| Option | Default | Allowed values / range | Symbol | Purpose | +|---|---:|---|---|---| +| `--circumbinary-disk` | `false` | Boolean | --- | Enables post-CEE circumbinary disk formation and evolution. | +| `--circumbinary-disk-envelope-mass-fraction-supplied` | `0.05` | `[0, 0.2]`; also requires $\beta f_M <= 1$ | $f_M$ | Fraction of the common envelope mass available for CBD formation. | +| `--circumbinary-disk-beta` | `3.0` | `>= 0`; also requires $\beta f_M <= 1$ | $\beta$ | Ratio between fraction of binary's AM and fraction of envelope's mass available for CBD formation. | +| `--circumbinary-disk-lifetime` | `1.0e5 yr` | `> 0 yr` | $\tau_{CBD}$ | Duration over which the supplied CBD mass is delivered. | +| `--circumbinary-disk-structure-factor` | `4.0` | `> 1` | $\zeta$ | Disk structure factor multiplying the CBD angular-momentum threshold. | +| `--circumbinary-disk-inner-radius-over-separation` | `2.5` | `>= 1` | $R_{CBD,in}$ | Inner radius of the CBD in units of the post-CE binary separation. | +| `--circumbinary-disk-evolution-mode` | `INSTANTANEOUS` | `INSTANTANEOUS`, `TIMESTEPPED` | --- | Selects whether the CBD-binary interaction is evolved immediately after CE or over later COMPAS timesteps. | +| `--circumbinary-disk-eddington-mode` | `GE23` | `CAP`, `GE23`, `TM23` | --- | Selects the Eddington-limited CBD accretion prescription. | +| `--circumbinary-disk-eddington-cap-factor` | `1.0` | `> 0` | $c_{Edd}$ | Multiplier applied to the Eddington accretion rate in `CAP` mode. | +| `--circumbinary-disk-eddington-ge23-factor` | `2.0 / 3.0` | `(0, 1]` | $f_{GE23}$ | Retained fraction of the requested super-Eddington accretion rate in `GE23` mode. | +| `--post-common-envelope-eccentricity-prescription` | `CIRCULAR` | `CIRCULAR`, `PRE_RLOF_CAP`, `PRE_RLOF_FRACTION` | --- | Controls the eccentricity assigned immediately after CE. | +| `--post-common-envelope-eccentricity-cap` | `0.1` | `[0, 1)` | $e_{CE,max}$ | Used by `PRE_RLOF_CAP`: $e_{postCE} = min(e_{preRLOF}, e_{CE,max})$ | +| `--post-common-envelope-eccentricity-fraction` | `0.1` | `[0, 1]` | $f_e$ | Used by `PRE_RLOF_FRACTION`: $e_{postCE} = f_e e_{preRLOF}$. | +| `--circumbinary-disk-use-synchronized-envelope-angular-momentum` | `false` | Boolean | --- | Legacy option for compatibility with [Unger+2026](https://ui.adsabs.harvard.edu/abs/2026ApJ...998...79U/abstract). Uses the synchronized-envelope angular-momentum estimate in the CBD formation criterion instead of COMPAS total angular momentum. | + +## CBD logic, options, and assumptions + +CBD formation: we assume a CBD of mass $f_M M_{env}$ is formed whenever the system could retain enough angular momentum in the CE process to form one. The AM available for CBD formation is parametrized as $J_{avail} = \beta f_M J_{tot}$ where $J_{tot}$ is the binary's pre-RLOF total AM. The AM required to support a CBD with an inner radius $R_{CBD,in}$ is given by the Keplerian AM times the structure factor $\zeta$. + +Evolution of the orbit and mass of the binary given a CBD: if a CBD is formed, the binary's total mass, mass ratio, semi-major axis, and eccentricity all evolve according to derivatives provided by spindler-c. The combination of total mass and mass ratio dictates the mass supplied to each binary component. A non-compact star accretes all the supplied mass, while the accretion towards a neutron star or a black hole might be suppressed in case of super Eddington accretion, which isn't accounted for in spindler-c. We thus add to spindler-c's derivatives terms which account for the Eddington limit. We allow three different suppression modes in case of super-Eddington accretion: + + +1. GE23 – $`\dot{M}_{actual} = f_{GE23}\dot{M}_{supplied}`$ +Allows for strongly super-Eddington accretion. Based on [Ghodla & Eldridge 2023](https://ui.adsabs.harvard.edu/abs/2023MNRAS.523.1711G/abstract). +2. TM23 – $`\dot{M}_{actual} \propto \dot{M}_{supplied} ^ {\frac{2}{5}}`$ +Allows for mildly super-Eddington accretion. Based on [Tuna & Metzger 2023.](https://ui.adsabs.harvard.edu/abs/2023ApJ...955..125T/abstract) +3. CAP – $`\dot{M}_{actual} = min(\dot{M}_{supplied}, c_{Edd} \dot{M}_{Edd})`$ +Ad hoc option. + +In all cases, the difference between the supplied and retained masses is assumed to be launched in winds from the accretor, carrying away its specific orbital angular momentum. + +CBD lifetime: the supplied CBD mass is delivered over a user-specified lifetime at a constant rate. By default, we assume that the lifetime is shorter than any other post-CEE timescale, and therefore the entire CBD-binary interaction can be carried out "instantaneously" in the aftermath of the CEE. I've also included a "timestepped" mode, where the CBD-binary interaction is concurrent with whatever else is going on in the system (winds, tides, etc.), but as it requires more significant changes in the code and its benefit for realistic CBD lifetimes is small, perhaps it'd be better to cut it. + +## Additional post-CEE eccentricity functionality +COMPAS currently sets the post-CEE eccentricity to zero, which makes sense since it is a big unknown, which usually doesn't impact the results much. However, since the CBD-driven orbital evolution, and particularly eccentricity pumping, is sensitive to the eccentricity at disk formation, I added a user-supplied option for '--post-common-envelope-eccentricity-prescription'. The options are + +1. 'CIRCULAR' (default) – the regular COMPAS behavior. +2. 'PRE_RLOF_CAP' - the user provides a maximal post-CEE eccentricity through '--post-common-envelope-eccentricity', the pre-RLOF eccentricity is retained if it was below the cap. +3. 'PRE_RLOF_FRACTION' - the post-CEE eccentricity is set to a user-provided fraction of the pre-RLOF eccentricity through '--post-common-envelope-eccentricity-fraction'. From c32fcf97651d51616eea149896233860485a9f30 Mon Sep 17 00:00:00 2001 From: Aldana Grichener <110453835+AldanaGrichener@users.noreply.github.com> Date: Sat, 31 Oct 2026 16:44:57 -0700 Subject: [PATCH 05/10] Update README.md --- README.md | 74 +------------------------------------------------------ 1 file changed, 1 insertion(+), 73 deletions(-) diff --git a/README.md b/README.md index 553214725..a7ac3d33c 100644 --- a/README.md +++ b/README.md @@ -1,77 +1,5 @@ # Research version with circumbinary-disk (CBD) evolution -This fork contains the CBD implementation used in Grichener et al. (2026). -The CBD implementation is a research extension of [COMPAS](https://github.com/TeamCOMPAS/COMPAS) -and is not currently part of the official COMPAS release, and is in processes of being integrated into COMPAS. - -## Summary -This PR adds an optional post-common-envelope circumbinary disk (CBD) framework to COMPAS. The new framework checks whether a CBD can form in post-common-envelope systems containing a neutron star or black hole companion, based on angular-momentum considerations. If a CBD forms, the framework evolves the post-CEE binary under disk-driven accretion and angular-momentum exchange based on an external library called [spindler-c](https://github.com/ruggero-valli/spindler-c). When the compact object accretion rate exceeds the Eddington limit, the framework applies an Eddington-limited accretion correction, reducing the actually accreted mass and ejecting the difference as winds, which carry away angular momentum. - -The framework is disabled by default, so existing COMPAS behavior is preserved unless the new CBD options are explicitly enabled by the user supplied boolean option --circumbinary-disk. - -I used ChatGPT as a coding assistant while translating my research prototype into main-branch-worthy (hopefully) C++ code. I've continuously reviewed the implementation and tested it against my prototype. - -## Motivation -Post-common-envelope CBDs affect the orbital separations, eccentricities, and masses of binary systems, and therefore their survival probabilities, merger times, and observable properties. This PR provides a first implementation of such a framework in COMPAS. - -## Main changes -- Adds a new 'CircumbinaryDisk' module. -- Adds user-facing options controlling CBD formation and evolution. -- Adds CBD-related logging quantities, outputs to BSE_Circumbinary_Disks. -- Adds documentation of the physical assumptions, units, and limitations. - -## Dependencies -Using the CBD module requires installing [spindler-c](https://github.com/ruggero-valli/spindler-c), which itself requires [libinterpolate](https://gitlab.com/rob.izzard/librinterpolate). While working on the CBD module I encountered a bug in spindler-c. I've opened a PR to fix it, but for now using [my version](https://github.com/AldanaGrichener/spindler-c) would be better. -By default, COMPAS will compile without spindler-c, making the CBD module unavailable. COMPAS users who want to use the CBD module will have to supply paths to spindler-c at compile time. - -## Modified files -- Adds: CircumbinaryDiskFormation.cpp, CircumbinaryDiskEvolutionSpindler.cpp, CircumbinaryDiskEvolutionUnavailable.cpp, and CircumbinaryDisk.h. -- Modifies: BaseBinaryStar.cpp, BaseBinaryStar.h, Log.cpp, Log.h, LogTypedefs.h, Makefile, Options.cpp, Options.h, typedefs.h, yaml.h. - -## CBD user-supplied options and their defaults -I've added quite a few user-supplied options as part of the CBD framework. Some of these should perhaps be hardcoded, while others are legacy options which ultimately shouldn't be part of the main branch. Here's a table summarizing the added options: - -| Option | Default | Allowed values / range | Symbol | Purpose | -|---|---:|---|---|---| -| `--circumbinary-disk` | `false` | Boolean | --- | Enables post-CEE circumbinary disk formation and evolution. | -| `--circumbinary-disk-envelope-mass-fraction-supplied` | `0.05` | `[0, 0.2]`; also requires $\beta f_M <= 1$ | $f_M$ | Fraction of the common envelope mass available for CBD formation. | -| `--circumbinary-disk-beta` | `3.0` | `>= 0`; also requires $\beta f_M <= 1$ | $\beta$ | Ratio between fraction of binary's AM and fraction of envelope's mass available for CBD formation. | -| `--circumbinary-disk-lifetime` | `1.0e5 yr` | `> 0 yr` | $\tau_{CBD}$ | Duration over which the supplied CBD mass is delivered. | -| `--circumbinary-disk-structure-factor` | `4.0` | `> 1` | $\zeta$ | Disk structure factor multiplying the CBD angular-momentum threshold. | -| `--circumbinary-disk-inner-radius-over-separation` | `2.5` | `>= 1` | $R_{CBD,in}$ | Inner radius of the CBD in units of the post-CE binary separation. | -| `--circumbinary-disk-evolution-mode` | `INSTANTANEOUS` | `INSTANTANEOUS`, `TIMESTEPPED` | --- | Selects whether the CBD-binary interaction is evolved immediately after CE or over later COMPAS timesteps. | -| `--circumbinary-disk-eddington-mode` | `GE23` | `CAP`, `GE23`, `TM23` | --- | Selects the Eddington-limited CBD accretion prescription. | -| `--circumbinary-disk-eddington-cap-factor` | `1.0` | `> 0` | $c_{Edd}$ | Multiplier applied to the Eddington accretion rate in `CAP` mode. | -| `--circumbinary-disk-eddington-ge23-factor` | `2.0 / 3.0` | `(0, 1]` | $f_{GE23}$ | Retained fraction of the requested super-Eddington accretion rate in `GE23` mode. | -| `--post-common-envelope-eccentricity-prescription` | `CIRCULAR` | `CIRCULAR`, `PRE_RLOF_CAP`, `PRE_RLOF_FRACTION` | --- | Controls the eccentricity assigned immediately after CE. | -| `--post-common-envelope-eccentricity-cap` | `0.1` | `[0, 1)` | $e_{CE,max}$ | Used by `PRE_RLOF_CAP`: $e_{postCE} = min(e_{preRLOF}, e_{CE,max})$ | -| `--post-common-envelope-eccentricity-fraction` | `0.1` | `[0, 1]` | $f_e$ | Used by `PRE_RLOF_FRACTION`: $e_{postCE} = f_e e_{preRLOF}$. | -| `--circumbinary-disk-use-synchronized-envelope-angular-momentum` | `false` | Boolean | --- | Legacy option for compatibility with [Unger+2026](https://ui.adsabs.harvard.edu/abs/2026ApJ...998...79U/abstract). Uses the synchronized-envelope angular-momentum estimate in the CBD formation criterion instead of COMPAS total angular momentum. | - -## CBD logic, options, and assumptions - -CBD formation: we assume a CBD of mass $f_M M_{env}$ is formed whenever the system could retain enough angular momentum in the CE process to form one. The AM available for CBD formation is parametrized as $J_{avail} = \beta f_M J_{tot}$ where $J_{tot}$ is the binary's pre-RLOF total AM. The AM required to support a CBD with an inner radius $R_{CBD,in}$ is given by the Keplerian AM times the structure factor $\zeta$. - -Evolution of the orbit and mass of the binary given a CBD: if a CBD is formed, the binary's total mass, mass ratio, semi-major axis, and eccentricity all evolve according to derivatives provided by spindler-c. The combination of total mass and mass ratio dictates the mass supplied to each binary component. A non-compact star accretes all the supplied mass, while the accretion towards a neutron star or a black hole might be suppressed in case of super Eddington accretion, which isn't accounted for in spindler-c. We thus add to spindler-c's derivatives terms which account for the Eddington limit. We allow three different suppression modes in case of super-Eddington accretion: - - -1. GE23 – $`\dot{M}_{actual} = f_{GE23}\dot{M}_{supplied}`$ -Allows for strongly super-Eddington accretion. Based on [Ghodla & Eldridge 2023](https://ui.adsabs.harvard.edu/abs/2023MNRAS.523.1711G/abstract). -2. TM23 – $`\dot{M}_{actual} \propto \dot{M}_{supplied} ^ {\frac{2}{5}}`$ -Allows for mildly super-Eddington accretion. Based on [Tuna & Metzger 2023.](https://ui.adsabs.harvard.edu/abs/2023ApJ...955..125T/abstract) -3. CAP – $`\dot{M}_{actual} = min(\dot{M}_{supplied}, c_{Edd} \dot{M}_{Edd})`$ -Ad hoc option. - -In all cases, the difference between the supplied and retained masses is assumed to be launched in winds from the accretor, carrying away its specific orbital angular momentum. - -CBD lifetime: the supplied CBD mass is delivered over a user-specified lifetime at a constant rate. By default, we assume that the lifetime is shorter than any other post-CEE timescale, and therefore the entire CBD-binary interaction can be carried out "instantaneously" in the aftermath of the CEE. I've also included a "timestepped" mode, where the CBD-binary interaction is concurrent with whatever else is going on in the system (winds, tides, etc.), but as it requires more significant changes in the code and its benefit for realistic CBD lifetimes is small, perhaps it'd be better to cut it. - -## Additional post-CEE eccentricity functionality -COMPAS currently sets the post-CEE eccentricity to zero, which makes sense since it is a big unknown, which usually doesn't impact the results much. However, since the CBD-driven orbital evolution, and particularly eccentricity pumping, is sensitive to the eccentricity at disk formation, I added a user-supplied option for '--post-common-envelope-eccentricity-prescription'. The options are - -1. 'CIRCULAR' (default) – the regular COMPAS behavior. -2. 'PRE_RLOF_CAP' - the user provides a maximal post-CEE eccentricity through '--post-common-envelope-eccentricity', the pre-RLOF eccentricity is retained if it was below the cap. -3. 'PRE_RLOF_FRACTION' - the post-CEE eccentricity is set to a user-provided fraction of the pre-RLOF eccentricity through '--post-common-envelope-eccentricity-fraction'. - +This fork contains the CBD implementation used in Grichener et al. (2026), which is currently being integrated into [COMPAS](https://github.com/TeamCOMPAS/COMPAS), From f974ab623eef54cef398168e399a33a0807cd2f0 Mon Sep 17 00:00:00 2001 From: Aldana Grichener <110453835+AldanaGrichener@users.noreply.github.com> Date: Sat, 31 Oct 2026 16:45:07 -0700 Subject: [PATCH 06/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a7ac3d33c..470d35f0f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Research version with circumbinary-disk (CBD) evolution -This fork contains the CBD implementation used in Grichener et al. (2026), which is currently being integrated into [COMPAS](https://github.com/TeamCOMPAS/COMPAS), +This fork contains the CBD implementation used in Grichener et al. (2026), which is currently being integrated into [COMPAS](https://github.com/TeamCOMPAS/COMPAS). From a81f8ae277c29ab14408ad9c985afe38fa423c05 Mon Sep 17 00:00:00 2001 From: Aldana Grichener Date: Sun, 1 Nov 2026 21:07:51 -0800 Subject: [PATCH 07/10] Cleanup sweep Removed legacy options, synched with latest dev branch, improved variable names --- .../preprocessing/compasConfigDefault.yaml | 8 +- ...-specifications-BSE-circumbinary-disks.rst | 13 +- ...d-logfiles-record-specification-binary.rst | 99 +- ...-logfiles-record-specification-options.rst | 29 - .../program-options-list-defaults.rst | 33 +- online-docs/pages/whats-new.rst | 4 + src/BaseBinaryStar.cpp | 401 ++---- src/BaseBinaryStar.h | 33 +- src/CircumbinaryDisk.h | 64 +- src/CircumbinaryDiskEvolutionSpindler.cpp | 411 ++---- src/CircumbinaryDiskFormation.cpp | 136 +- src/EnumHash.h | 52 +- src/ErrorCatalog.h | 774 +++++------ src/HeMS.cpp | 6 +- src/LogTypedefs.h | 45 +- src/MainSequence.cpp | 18 +- src/Makefile | 2 +- src/Options.cpp | 23 +- src/Options.h | 8 - src/WhiteDwarfs.h | 226 ++-- src/changelog.h | 15 +- src/constants.h | 20 + src/profiling.cpp | 498 ++++---- src/profiling.h | 150 +-- src/typedefs.h | 15 +- src/yaml.cpp | 1136 ++++++++--------- src/yaml.h | 2 - 27 files changed, 1943 insertions(+), 2278 deletions(-) diff --git a/compas_python_utils/preprocessing/compasConfigDefault.yaml b/compas_python_utils/preprocessing/compasConfigDefault.yaml index 855676dc5..607817553 100644 --- a/compas_python_utils/preprocessing/compasConfigDefault.yaml +++ b/compas_python_utils/preprocessing/compasConfigDefault.yaml @@ -1,5 +1,5 @@ ##~!!~## COMPAS option values -##~!!~## File Created Tue Jul 7 13:45:05 2026 by COMPAS v03.29.04 +##~!!~## File Created Sun Nov 1 20:57:27 2026 by COMPAS v03.31.00 ##~!!~## ##~!!~## The default COMPAS YAML file (``compasConfigDefault.yaml``), as distributed, has ##~!!~## all COMPAS option entries commented so that the COMPAS default value for the @@ -55,7 +55,6 @@ booleanChoices: ### CIRCUMBINARY DISK # --circumbinary-disk: False # Default: False -# --circumbinary-disk-use-synchronized-envelope-angular-momentum: False # Default: False ### SUPERNOVAE, KICKS AND REMNANTS # --allow-non-stripped-ECSN: False # Default: False @@ -279,7 +278,7 @@ stringChoices: # --case-BB-stability-prescription: 'ALWAYS_STABLE' # Default: 'ALWAYS_STABLE' # Options: ['ALWAYS_UNSTABLE','TREAT_AS_OTHER_MT','ALWAYS_STABLE_ONTO_NSBH','ALWAYS_STABLE'] # --critical-mass-ratio-prescription: 'NONE' # Default: 'NONE' # Options: ['HURLEY_HJELLMING_WEBBINK','GE','GE_IC','CLAEYS','NONE'] # --stellar-zeta-prescription: 'SOBERMAN' # Default: 'SOBERMAN' # Options: ['ARBITRARY','HURLEY','SOBERMAN'] -# --mass-transfer-angular-momentum-loss-prescription: 'ISOTROPIC' # Default: 'ISOTROPIC' # Options: ['ARBITRARY','KLENCKI_LINEAR','MACLEOD_LINEAR','CIRCUMBINARY','ISOTROPIC','JEANS'] +# --mass-transfer-angular-momentum-loss-prescription: 'ISOTROPIC' # Default: 'ISOTROPIC' # Options: ['MIN','ARBITRARY','KLENCKI_LINEAR','MACLEOD_LINEAR','CIRCUMBINARY','ISOTROPIC','JEANS'] # --mass-transfer-accretion-efficiency-prescription: 'THERMAL' # Default: 'THERMAL' # Options: ['HAMSTARS','FIXED','THERMAL'] # --mass-transfer-rejuvenation-prescription: 'STARTRACK' # Default: 'STARTRACK' # Options: ['STARTRACK','HURLEY'] # --mass-transfer-thermal-limit-accretor-multiplier: 'CFACTOR' # Default: 'CFACTOR' # Options: ['ROCHELOBE','CFACTOR'] @@ -289,12 +288,11 @@ stringChoices: # --common-envelope-formalism: 'ENERGY' # Default: 'ENERGY' # Options: ['TWO_STAGE','ENERGY'] # --common-envelope-lambda-prescription: 'LAMBDA_NANJING' # Default: 'LAMBDA_NANJING' # Options: ['LAMBDA_DEWI','LAMBDA_KRUCKOW','LAMBDA_NANJING','LAMBDA_LOVERIDGE','LAMBDA_FIXED'] # Xu & Li 2010 # --common-envelope-mass-accretion-prescription: 'ZERO' # Default: 'ZERO' # Options: ['CHEVALIER','MACLEOD','UNIFORM','CONSTANT','ZERO'] -# --common-envelope-second-stage-gamma-prescription: 'ISOTROPIC' # Default: 'ISOTROPIC' # Options: ['ARBITRARY','KLENCKI_LINEAR','MACLEOD_LINEAR','CIRCUMBINARY','ISOTROPIC','JEANS'] +# --common-envelope-second-stage-gamma-prescription: 'ISOTROPIC' # Default: 'ISOTROPIC' # Options: ['MIN','ARBITRARY','KLENCKI_LINEAR','MACLEOD_LINEAR','CIRCUMBINARY','ISOTROPIC','JEANS'] # --post-common-envelope-eccentricity-prescription: 'CIRCULAR' # Default: 'CIRCULAR' # Options: ['PRE_RLOF_FRACTION','PRE_RLOF_CAP','CIRCULAR'] ### CIRCUMBINARY DISK # --circumbinary-disk-eddington-mode: 'GE23' # Default: 'GE23' # Options: ['TM23','GE23','CAP'] -# --circumbinary-disk-evolution-mode: 'INSTANTANEOUS' # Default: 'INSTANTANEOUS' # Options: ['TIMESTEPPED','INSTANTANEOUS'] ### TIDES # --tides-prescription: 'NONE' # Default: 'NONE' # Options: ['ZAHN1977','KAPIL2026','PERFECT','NONE'] diff --git a/online-docs/pages/User guide/COMPAS output/standard-logfiles-default-record-specifications-BSE-circumbinary-disks.rst b/online-docs/pages/User guide/COMPAS output/standard-logfiles-default-record-specifications-BSE-circumbinary-disks.rst index 63df8e910..31a2fed0a 100644 --- a/online-docs/pages/User guide/COMPAS output/standard-logfiles-default-record-specifications-BSE-circumbinary-disks.rst +++ b/online-docs/pages/User guide/COMPAS output/standard-logfiles-default-record-specifications-BSE-circumbinary-disks.rst @@ -5,7 +5,8 @@ Default record definition for the BSE Circumbinary Disks log file:: const ANY_PROPERTY_VECTOR BSE_CIRCUMBINARY_DISKS_REC = { BINARY_PROPERTY::RANDOM_SEED, - BINARY_PROPERTY::TIME, + BINARY_PROPERTY::CIRCUMBINARY_DISK_FORMATION_TIME, + BINARY_PROPERTY::CIRCUMBINARY_DISK_INITIAL_MASS, BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_SUPPLIED, BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_1, BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_2, @@ -13,8 +14,8 @@ Default record definition for the BSE Circumbinary Disks log file:: BINARY_PROPERTY::CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_POST, BINARY_PROPERTY::CIRCUMBINARY_DISK_ECCENTRICITY_PRE, BINARY_PROPERTY::CIRCUMBINARY_DISK_ECCENTRICITY_POST, - STAR_1_PROPERTY::MASS, - STAR_1_PROPERTY::STELLAR_TYPE, - STAR_2_PROPERTY::MASS, - STAR_2_PROPERTY::STELLAR_TYPE - }; \ No newline at end of file + BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_1_AT_FORMATION, + BINARY_PROPERTY::CIRCUMBINARY_DISK_STELLAR_TYPE_1_AT_FORMATION, + BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_2_AT_FORMATION, + BINARY_PROPERTY::CIRCUMBINARY_DISK_STELLAR_TYPE_2_AT_FORMATION + }; diff --git a/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-binary.rst b/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-binary.rst index cb815ca45..92ad89e8f 100644 --- a/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-binary.rst +++ b/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-binary.rst @@ -79,7 +79,7 @@ Binary Properties * - COMPAS variable: - BaseBinaryStar::m_CircumbinaryDiskDetails.massSupplied * - Description: - - Mass supplied to the binary through the circumbinary disk (\ :math:`M_\odot`). + - Mass supplied to the binary through the circumbinary disk, potentially less than the initial reservoir if interrupted (\ :math:`M_\odot`). * - Header String: - CBD_Mass_Supplied @@ -186,6 +186,103 @@ Binary Properties - Eccentricity>CBD + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_FORMATION_TIME** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - BaseBinaryStar::m_CircumbinaryDiskDetails.formationTime + * - Description: + - Time at which the disk formed (Myr). + * - Header String: + - Time + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_INITIAL_MASS** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - BaseBinaryStar::m_CircumbinaryDiskDetails.initialReservoirMass + * - Description: + - Initial mass assigned to the CBD reservoir (\ :math:`M_\odot`). + * - Header String: + - Initial_CBD_Mass + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_MASS_1_AT_FORMATION** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - BaseBinaryStar::m_CircumbinaryDiskDetails.mass1AtFormation + * - Description: + - Mass of star 1 when the CBD formed (\ :math:`M_\odot`). + * - Header String: + - Mass(1) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_MASS_2_AT_FORMATION** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - BaseBinaryStar::m_CircumbinaryDiskDetails.mass2AtFormation + * - Description: + - Mass of star 2 when the CBD formed (\ :math:`M_\odot`). + * - Header String: + - Mass(2) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_STELLAR_TYPE_1_AT_FORMATION** + - + * - Data type: + - STELLAR_TYPE + * - COMPAS variable: + - BaseBinaryStar::m_CircumbinaryDiskDetails.stellarType1AtFormation + * - Description: + - Stellar type of star 1 when the CBD formed. + * - Header String: + - Stellar_Type(1) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_STELLAR_TYPE_2_AT_FORMATION** + - + * - Data type: + - STELLAR_TYPE + * - COMPAS variable: + - BaseBinaryStar::m_CircumbinaryDiskDetails.stellarType2AtFormation + * - Description: + - Stellar type of star 2 when the CBD formed. + * - Header String: + - Stellar_Type(2) + .. flat-table:: :widths: 25 75 1 1 :header-rows: 0 diff --git a/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-options.rst b/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-options.rst index 936122092..1259536c3 100644 --- a/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-options.rst +++ b/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-options.rst @@ -347,38 +347,9 @@ DEPRECATION NOTICE: property ``BLACK_HOLE_KICKS`` has been deprecated and will s - PO_CBD_Eddington_GE23_Factor -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - * - :cspan:`2` **CIRCUMBINARY_DISK_EVOLUTION_MODE** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_CircumbinaryDiskEvolutionMode - * - Description: - - Value of program option ``--circumbinary-disk-evolution-mode`` - * - Header String: - - PO_CBD_Evolution_Mode -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **CIRCUMBINARY_DISK_USE_SYNCHRONIZED_ENVELOPE_ANGULAR_MOMENTUM** - - - * - Data type: - - BOOL - * - COMPAS variable: - - Options::m_CircumbinaryDiskUseSynchronizedEnvelopeAngularMomentum - * - Description: - - Value of program option ``--circumbinary-disk-use-synchronized-envelope-angular-momentum`` - * - Header String: - - PO_CBD_Use_Synchronized_Envelope_AM .. flat-table:: :widths: 25 75 1 1 diff --git a/online-docs/pages/User guide/Program options/program-options-list-defaults.rst b/online-docs/pages/User guide/Program options/program-options-list-defaults.rst index c7f061558..ba3c0d5ee 100644 --- a/online-docs/pages/User guide/Program options/program-options-list-defaults.rst +++ b/online-docs/pages/User guide/Program options/program-options-list-defaults.rst @@ -151,8 +151,8 @@ Disk structure factor multiplying the circumbinary disk angular-momentum thresho **--circumbinary-disk-eddington-mode** |br| Eddington-limited accretion prescription used during circumbinary disk evolution. |br| Options: { CAP, GE23, TM23 } -|br| ``CAP`` limits the accretion to ``--circumbinary-disk-eddington-cap-factor`` times the Eddingtom accretion rate. -|br| ``GE23`` reduces the supplied mass rate by a factor of ``--circumbinary-disk-eddington-cap-factor``, following Ghodla & Eldrigde 2023. +|br| ``CAP`` limits the accretion to ``--circumbinary-disk-eddington-cap-factor`` times the Eddington accretion rate. +|br| ``GE23`` reduces the super-Eddington retained accretion rate by a factor of ``--circumbinary-disk-eddington-ge23-factor``, following Ghodla & Eldridge 2023. |br| ``TM23`` applies the Tuna & Metzger 2023 compact-object accretion prescription. |br| Default = GE23 @@ -164,18 +164,6 @@ Multiplier applied to the Eddington accretion rate in ``CAP`` mode. Retained fraction of the requested super-Eddington accretion rate in ``GE23`` mode. |br| Default = :math:`2 / 3` -**--circumbinary-disk-evolution-mode** |br| -Circumbinary disk evolution mode. -|br| Options: { INSTANTANEOUS, TIMESTEPPED } -|br| ``INSTANTANEOUS`` applies the full disk interaction immediately after common-envelope evolution. -|br| ``TIMESTEPPED`` stores an active disk reservoir and evolves it over later COMPAS timesteps. -|br| Default = INSTANTANEOUS - -**--circumbinary-disk-use-synchronized-envelope-angular-momentum** |br| -Use the synchronized-envelope angular-momentum estimate in the circumbinary disk formation criterion instead of the COMPAS total angular momentum. -|br| This is a legacy option for compatibility with Unger et al. 2026. -|br| Default = FALSE - **--common-envelope-allow-immediate-RLOF-post-CE-survive** |br| Allow binaries that experience Roche lobe overflow immediately at the end of the CE phase to survive. |br| Default = FALSE @@ -259,6 +247,15 @@ Default = ZERO Recombination energy density (erg g−1). |br| Default = :math:`1.5 \times 10^{13}` +**--common-envelope-second-stage-beta** |br| +The fraction of the mass lost during the second stage of a 2-stage common envelope that is accreted. |br| +Default = 0 + +**--common-envelope-second-stage-gamma-prescription** |br| +The specific angular momentum prescription for mass lost during the second stage of a 2-stage common envelope event. |br| +Options: { JEANS, ISOTROPIC, CIRCUMBINARY, KLENCKI_LINEAR, MACLEOD_LINEAR, ARBITRARY, MIN } |br| +Default = ISOTROPIC + **--common-envelope-slope-kruckow** |br| Slope for the Kruckow lambda (see Kruckow et al. 2016 as implemented by Vigna-Gomez et al. 2018). |br| Default = −0.833333 @@ -946,7 +943,7 @@ Default = THERMAL **--mass-transfer-angular-momentum-loss-prescription** |br| Mass Transfer Angular Momentum Loss prescription. |br| -Options: { JEANS, ISOTROPIC, CIRCUMBINARY, KLENCKI_LINEAR, MACLEOD_LINEAR, ARBITRARY } |br| +Options: { JEANS, ISOTROPIC, CIRCUMBINARY, KLENCKI_LINEAR, MACLEOD_LINEAR, ARBITRARY, MIN } |br| Default = ISOTROPIC **--mass-transfer-fa** |br| @@ -1641,11 +1638,11 @@ Go to :ref:`the top of this page ` for the full alphabetical --common-envelope-lambda-nanjing-use_rejuvenated-mass, --common-envelope-allow-main-sequence-survive, --common-envelope-allow-radiative-envelope-survive, --common-envelope-allow-immediate-RLOF-post-CE-survive, --common-envelope-mass-accretion-prescription, --common-envelope-mass-accretion-constant, --common-envelope-mass-accretion-min, --common-envelope-mass-accretion-max, --common-envelope-recombination-energy-density, --maximum-mass-donor-nandez-ivanova, ---revised-energy-formalism-nandez-ivanova, --post-common-envelope-eccentricity-prescription, --post-common-envelope-eccentricity-cap, --post-common-envelope-eccentricity-fraction +--revised-energy-formalism-nandez-ivanova, --common-envelope-second-stage-beta, --common-envelope-second-stage-gamma-prescription, --post-common-envelope-eccentricity-prescription, --post-common-envelope-eccentricity-cap, --post-common-envelope-eccentricity-fraction --circumbinary-disk, --circumbinary-disk-beta, --circumbinary-disk-envelope-mass-fraction-supplied, --circumbinary-disk-inner-radius-over-separation, --circumbinary-disk-lifetime, ---circumbinary-disk-structure-factor, --circumbinary-disk-eddington-mode, --circumbinary-disk-eddington-cap-factor, --circumbinary-disk-eddington-ge23-factor, ---circumbinary-disk-evolution-mode, --circumbinary-disk-use-synchronized-envelope-angular-momentum +--circumbinary-disk-structure-factor, --circumbinary-disk-eddington-mode, --circumbinary-disk-eddington-cap-factor, --circumbinary-disk-eddington-ge23-factor + :ref:`Back to Top ` diff --git a/online-docs/pages/whats-new.rst b/online-docs/pages/whats-new.rst index 04887c1c5..81294e3c9 100644 --- a/online-docs/pages/whats-new.rst +++ b/online-docs/pages/whats-new.rst @@ -3,6 +3,10 @@ What's new Following is a brief list of important updates to the COMPAS code. A complete record of changes can be found in the file ``changelog.h``. +**Unreleased — circumbinary-disk integration** + +* Added post-common-envelope circumbinary disk formation and evolution following Grichener et al. (2026), including new CBD program options and the ``BSE_Circumbinary_Disks`` logfile. + **03.29.00 January 30, 2026** * Added new tidal prescription based on Zahn (1977) and Hurley et. al (2002), called ``ZAHN1977``. * Renamed the ``KAPIL2025`` tides prescription to ``KAPIL2026`` to match paper date. diff --git a/src/BaseBinaryStar.cpp b/src/BaseBinaryStar.cpp index 27541e67e..ee8707891 100644 --- a/src/BaseBinaryStar.cpp +++ b/src/BaseBinaryStar.cpp @@ -9,6 +9,12 @@ // gsl includes #include +// CBD reservoir bookkeeping tolerances used only by BaseBinaryStar. +namespace { +constexpr double CBD_RESERVOIR_COMPLETION_ABSOLUTE_TOLERANCE_MSOL = 1.0E-12; +constexpr double CBD_RESERVOIR_COMPLETION_RELATIVE_TOLERANCE = 1.0E-10; +} + /* Constructor * * Parameter p_Seed is the seed for the random number generator - see main.cpp for an @@ -532,6 +538,11 @@ COMPAS_VARIABLE BaseBinaryStar::BinaryPropertyValue(const T_ANY_PROPERTY p_Prope case BINARY_PROPERTY::CIRCULARIZATION_TIMESCALE: value = CircularizationTimescale(); break; case BINARY_PROPERTY::CIRCUMBINARY_DISK_FORMED: value = CircumbinaryDiskFormed(); break; + case BINARY_PROPERTY::CIRCUMBINARY_DISK_FORMATION_TIME: value = CircumbinaryDiskFormationTime(); break; + case BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_1_AT_FORMATION: value = CircumbinaryDiskMass1AtFormation(); break; + case BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_2_AT_FORMATION: value = CircumbinaryDiskMass2AtFormation(); break; + case BINARY_PROPERTY::CIRCUMBINARY_DISK_STELLAR_TYPE_1_AT_FORMATION: value = CircumbinaryDiskStellarType1AtFormation(); break; + case BINARY_PROPERTY::CIRCUMBINARY_DISK_STELLAR_TYPE_2_AT_FORMATION: value = CircumbinaryDiskStellarType2AtFormation(); break; case BINARY_PROPERTY::CIRCUMBINARY_DISK_INITIAL_MASS: value = CircumbinaryDiskInitialMass(); break; case BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_1: value = CircumbinaryDiskMassRetained1(); break; case BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_2: value = CircumbinaryDiskMassRetained2(); break; @@ -1003,9 +1014,10 @@ void BaseBinaryStar::SetPostCEEValues(const double p_SemiMajorAxis, m_CEDetails.postCEE.rocheLobe1to2 = p_RocheLobe1to2; m_CEDetails.postCEE.rocheLobe2to1 = p_RocheLobe2to1; - m_RLOFDetails.immediateRLOFPostCEE = - utils::Compare(m_Star1->RadiusPostCEE(), m_CEDetails.postCEE.rocheLobe1to2) >= 0 || // Check for RLOF immediately after the CEE - utils::Compare(m_Star2->RadiusPostCEE(), m_CEDetails.postCEE.rocheLobe2to1) >= 0; + if (utils::Compare(m_Star1->RadiusPostCEE(), m_CEDetails.postCEE.rocheLobe1to2) >= 0 || // Check for RLOF immediately after the CEE + utils::Compare(m_Star2->RadiusPostCEE(), m_CEDetails.postCEE.rocheLobe2to1) >= 0) { + m_RLOFDetails.immediateRLOFPostCEE = true; + } } @@ -1542,73 +1554,30 @@ void BaseBinaryStar::EvaluateSupernovae() { } -/* - * Update values set by SetPostCEEValues() to account for binary-CBD interaction - * - * void SetPostCBDValues(const double p_SemiMajorAxisAU, - * const double p_EccentricityAfterCBD, - * const double p_Mass1AfterCBD, - * const double p_Mass2AfterCBD) - * - * @param [IN] p_SemiMajorAxisAU Post-CBD semi-major axis (AU) - * @param [IN] p_EccentricityAfterCBD Post-CBD eccentricity - * @param [IN] p_Mass1AfterCBD Post-CBD mass of star 1 (Msol) - * @param [IN] p_Mass2AfterCBD Post-CBD mass of star 2 (Msol) - */ -void BaseBinaryStar::SetPostCBDValues(const double p_SemiMajorAxisAU, - const double p_EccentricityAfterCBD, - const double p_Mass1AfterCBD, - const double p_Mass2AfterCBD) { - - m_SemiMajorAxis = p_SemiMajorAxisAU; - m_Eccentricity = p_EccentricityAfterCBD; - - const double postCBDPeriastronAU = m_SemiMajorAxis * (1.0 - p_EccentricityAfterCBD); - const double rocheLobe1AU = postCBDPeriastronAU * CalculateRocheLobeRadius_Static(p_Mass1AfterCBD, p_Mass2AfterCBD); - const double rocheLobe2AU = postCBDPeriastronAU * CalculateRocheLobeRadius_Static(p_Mass2AfterCBD, p_Mass1AfterCBD); - const double rocheLobe1Rsol = rocheLobe1AU * AU_TO_RSOL; - const double rocheLobe2Rsol = rocheLobe2AU * AU_TO_RSOL; - - SetPostCEEValues( - m_SemiMajorAxis * AU_TO_RSOL, - m_CEDetails.postCEE.semiMajorAxisAfterStage1, - p_EccentricityAfterCBD, - rocheLobe1Rsol, - rocheLobe2Rsol - ); -} - - /* * Apply optional post-CE circumbinary disk evolution, following the steps below: * * 1. Disk formation. The CircumbinaryDisk module assigns a fraction of the total - * binary mass lost during CE and a fraction of the binary's pre-RLOF + * binary mass lost during CE and a fraction of the binary's pre-RLOF * total angular momentum to the disk, then checks whether that angular * momentum is large enough for the material to orbit outside the adopted * inner disk radius. If not, COMPAS continues with the ordinary post-CE state. * - * 2. Disk evolution. The CBD orbital evolution in response to accreted mass + * 2. Disk evolution. The CBD orbital evolution in response to accreted mass * is calculated using spindler-c (based on Valli+2024), modified to account for Eddington-limited accretion. * Mass that is not accreted due to the Eddington limit is assumed to be ejected * from the vicinity of the accretor, carrying its component-specific orbital * angular momentum. The Spindler formalism assumes that the initial CBD * reservoir is much smaller than the post-CE binary mass. * - * INSTANTANEOUS applies the complete CBD interaction here. TIMESTEPPED stores - * the active reservoir and returns; later timesteps process the reservoir before - * ordinary event checks, and the CBD row is logged only when the active disk is - * exhausted or truncated. - * - * This method translates COMPAS state to CBD inputs, applies the returned - * masses/orbit, handles possible AIC state mutation, and logs the event. + * A formed CBD is stored as an active reservoir. Later COMPAS timesteps + * process it before ordinary binary event checks, and the CBD event is logged + * when the reservoir is exhausted or the disk is truncated by another event. * * void ApplyCircumbinaryDiskAfterCommonEnvelope(const STELLAR_TYPE p_StellarType1PreCE, * const STELLAR_TYPE p_StellarType2PreCE, * const double p_Mass1PreCE, * const double p_Mass2PreCE, - * const double p_Radius1PreCERsol, - * const double p_Radius2PreCERsol, * const bool p_EnvelopeFlag1, * const bool p_EnvelopeFlag2) * @@ -1616,8 +1585,6 @@ void BaseBinaryStar::SetPostCBDValues(const double p_SemiMajorAxisAU, * @param [IN] p_StellarType2PreCE Stellar type of star 2 immediately before CE * @param [IN] p_Mass1PreCE Mass of star 1 immediately before CE (Msol) * @param [IN] p_Mass2PreCE Mass of star 2 immediately before CE (Msol) - * @param [IN] p_Radius1PreCERsol Radius of star 1 immediately before CE (Rsol) - * @param [IN] p_Radius2PreCERsol Radius of star 2 immediately before CE (Rsol) * @param [IN] p_EnvelopeFlag1 Whether star 1 had an envelope immediately before CE * @param [IN] p_EnvelopeFlag2 Whether star 2 had an envelope immediately before CE */ @@ -1625,42 +1592,36 @@ void BaseBinaryStar::ApplyCircumbinaryDiskAfterCommonEnvelope(const STELLAR_TYPE const STELLAR_TYPE p_StellarType2PreCE, const double p_Mass1PreCE, const double p_Mass2PreCE, - const double p_Radius1PreCERsol, - const double p_Radius2PreCERsol, const bool p_EnvelopeFlag1, const bool p_EnvelopeFlag2) { - const CircumbinaryDisk::CommonEnvelopeChannel channel{CircumbinaryDisk::MakeCommonEnvelopeChannel( + const bool supportedChannel = CircumbinaryDisk::IsSupportedCommonEnvelopeChannel( p_StellarType1PreCE, p_StellarType2PreCE, p_Mass1PreCE, p_Mass2PreCE, - p_Radius1PreCERsol, - p_Radius2PreCERsol, p_EnvelopeFlag1, p_EnvelopeFlag2 - )}; + ); - if (!channel.supported) { + if (!supportedChannel) { return; } - const double circumbinaryDiskLifetime = OPTIONS->CircumbinaryDiskLifetime(); + const double diskLifetimeYears = OPTIONS->CircumbinaryDiskLifetime(); const CircumbinaryDisk::FormationOptions formationOptions{CircumbinaryDisk::MakeFormationOptionsFromCompasOptions()}; - const double mass1PostCE = m_Star1->Mass(); - const double mass2PostCE = m_Star2->Mass(); + const double mass1PostCEMsol = m_Star1->Mass(); + const double mass2PostCEMsol = m_Star2->Mass(); const double semiMajorAxisPostCERsol = m_SemiMajorAxis * AU_TO_RSOL; // The formation test uses the pre-RLOF orbit as the basis for the angular-momentum // reservoir estimate. The post-CE separation is used only to define // the inner CBD radius. const CircumbinaryDisk::FormationInput circumbinaryDiskFormationInput{ - channel, p_Mass1PreCE + p_Mass2PreCE, - mass1PostCE + mass2PostCE, + mass1PostCEMsol + mass2PostCEMsol, m_SemiMajorAxisPreRLOF * AU_TO_RSOL, semiMajorAxisPostCERsol, - m_EccentricityPreRLOF, m_TotalAngularMomentumPreRLOF, formationOptions }; @@ -1670,13 +1631,12 @@ void BaseBinaryStar::ApplyCircumbinaryDiskAfterCommonEnvelope(const STELLAR_TYPE return; } - // The formation step defines the intended CBD reservoir. In TIMESTEPPED - // mode the mass actually supplied can be smaller if another binary event - // truncates the disk before that reservoir is exhausted. - const double suppliedMassMsol = formationResult.suppliedMassMsol; + // The formation step defines the intended CBD reservoir. The mass actually + // supplied can be smaller if another binary event truncates the disk. + const double initialReservoirMassMsol = formationResult.initialReservoirMassMsol; m_CircumbinaryDiskDetails.formed = true; - m_CircumbinaryDiskDetails.initialMass = suppliedMassMsol; + m_CircumbinaryDiskDetails.initialReservoirMass = initialReservoirMassMsol; m_CircumbinaryDiskDetails.massSupplied = 0.0; m_CircumbinaryDiskDetails.massRetained1 = 0.0; m_CircumbinaryDiskDetails.massRetained2 = 0.0; @@ -1684,156 +1644,24 @@ void BaseBinaryStar::ApplyCircumbinaryDiskAfterCommonEnvelope(const STELLAR_TYPE m_CircumbinaryDiskDetails.semiMajorAxisPost = semiMajorAxisPostCERsol; m_CircumbinaryDiskDetails.eccentricityPre = m_Eccentricity; m_CircumbinaryDiskDetails.eccentricityPost = m_Eccentricity; - - if (OPTIONS->CircumbinaryDiskEvolutionMode() == CIRCUMBINARY_DISK_EVOLUTION_MODE::TIMESTEPPED) { - // Finite-lifetime mode: store the reservoir and let future COMPAS - // timesteps consume it. This avoids freezing stellar radii/types and - // Eddington limits for the entire CBD lifetime at the CE event. - m_ActiveCircumbinaryDisk.active = true; - m_ActiveCircumbinaryDisk.totalSuppliedMass = suppliedMassMsol; - m_ActiveCircumbinaryDisk.remainingSuppliedMass = suppliedMassMsol; - m_ActiveCircumbinaryDisk.supplyRate = suppliedMassMsol / circumbinaryDiskLifetime; - m_ActiveCircumbinaryDisk.remainingDuration = circumbinaryDiskLifetime; - m_RestartTimestepAfterImmediateEvent = true; - return; - } - - (void)PrintDetailedOutput(m_Id, BSE_DETAILED_RECORD_TYPE::POST_CEE); - - const double radius1PostCE = m_Star1->Radius(); - const double radius2PostCE = m_Star2->Radius(); - const STELLAR_TYPE stellarType1PostCE = m_Star1->StellarType(); - const STELLAR_TYPE stellarType2PostCE = m_Star2->StellarType(); - const CircumbinaryDisk::EvolutionOptions evolutionOptions{CircumbinaryDisk::MakeEvolutionOptionsFromCompasOptions()}; - - double retainedMass1 = 0.0; - double retainedMass2 = 0.0; - // AIC can occur if either post-CE component is an ONe WD and CBD accretion - // pushes it to the Chandrasekhar-mass threshold. The CBD integrator stops - // at that mass so the ordinary COMPAS AIC/SN machinery can handle - // the stellar-type and mass changes before any remaining CBD - // reservoir is evolved. - const CircumbinaryDisk::StarLabel aicTargetStar = stellarType1PostCE == STELLAR_TYPE::OXYGEN_NEON_WHITE_DWARF - ? CircumbinaryDisk::StarLabel::STAR_1 - : stellarType2PostCE == STELLAR_TYPE::OXYGEN_NEON_WHITE_DWARF - ? CircumbinaryDisk::StarLabel::STAR_2 - : CircumbinaryDisk::StarLabel::NONE; - const CircumbinaryDisk::EvolutionInput initialEvolutionInput{ - mass1PostCE, - mass2PostCE, - radius1PostCE, - radius2PostCE, - stellarType1PostCE, - stellarType2PostCE, - m_Eccentricity, - suppliedMassMsol, - circumbinaryDiskLifetime, - aicTargetStar, - evolutionOptions - }; - - const CircumbinaryDisk::EvolutionTrack initialTrack{CircumbinaryDisk::EvolveTrack(initialEvolutionInput)}; - double finalMass1 = 0.0; - double finalMass2 = 0.0; - - if (initialTrack.aicOccurred) { - const double semiMajorAxisAtAICFactor = initialTrack.semiMajorAxisFactor; - const double eccentricityAtAIC = initialTrack.eccentricity; - const double mass1AtAIC = initialTrack.mass1Msol; - const double mass2AtAIC = initialTrack.mass2Msol; - - retainedMass1 += mass1AtAIC - mass1PostCE; - retainedMass2 += mass2AtAIC - mass2PostCE; - // Move the binary to the CBD state at the instant of AIC. The - // post-AIC continuation below starts from the live COMPAS state after - // EvaluateSupernovae() has resolved the event. - SetPostCBDValues( - m_SemiMajorAxis * semiMajorAxisAtAICFactor, - eccentricityAtAIC, - mass1AtAIC, - mass2AtAIC - ); - - ApplyCircumbinaryDiskMassChange(m_Star1, mass1AtAIC); - ApplyCircumbinaryDiskMassChange(m_Star2, mass2AtAIC); - - EvaluateSupernovae(); - - (void)PrintDetailedOutput(m_Id, BSE_DETAILED_RECORD_TYPE::POST_SN); - - const double remainingDurationPostAIC = std::max( - circumbinaryDiskLifetime - initialTrack.elapsedTimeYears, - 0.0 - ); - const double remainingSuppliedMassPostAIC = std::max( - suppliedMassMsol - initialTrack.suppliedMassMsol, - 0.0 - ); - - const double mass1PostAIC = m_Star1->Mass(); - const double mass2PostAIC = m_Star2->Mass(); - - if (utils::Compare(remainingDurationPostAIC, 0.0) > 0 && utils::Compare(remainingSuppliedMassPostAIC, 0.0) > 0) { - // Continue the same physical disk after the AIC, but with the new - // compact-object type/mass/radius returned by COMPAS. This matters - // because the Eddington limit depends on the accretor type. - const CircumbinaryDisk::EvolutionInput postAICEvolutionInput{ - mass1PostAIC, - mass2PostAIC, - m_Star1->Radius(), - m_Star2->Radius(), - m_Star1->StellarType(), - m_Star2->StellarType(), - m_Eccentricity, - remainingSuppliedMassPostAIC, - remainingDurationPostAIC, - CircumbinaryDisk::StarLabel::NONE, - evolutionOptions - }; - - const CircumbinaryDisk::EvolutionTrack postAICTrack{CircumbinaryDisk::EvolveTrack(postAICEvolutionInput)}; - finalMass1 = postAICTrack.mass1Msol; - finalMass2 = postAICTrack.mass2Msol; - - retainedMass1 += finalMass1 - mass1PostAIC; - retainedMass2 += finalMass2 - mass2PostAIC; - - SetPostCBDValues( - m_SemiMajorAxis * postAICTrack.semiMajorAxisFactor, - postAICTrack.eccentricity, - finalMass1, - finalMass2 - ); - } - else { - finalMass1 = mass1PostAIC; - finalMass2 = mass2PostAIC; - } - } - else { - finalMass1 = initialTrack.mass1Msol; - finalMass2 = initialTrack.mass2Msol; - retainedMass1 = finalMass1 - mass1PostCE; - retainedMass2 = finalMass2 - mass2PostCE; - - SetPostCBDValues( - m_SemiMajorAxis * initialTrack.semiMajorAxisFactor, - initialTrack.eccentricity, - finalMass1, - finalMass2 - ); - } - - m_CircumbinaryDiskDetails.massSupplied = suppliedMassMsol; - m_CircumbinaryDiskDetails.massRetained1 = retainedMass1; - m_CircumbinaryDiskDetails.massRetained2 = retainedMass2; - m_CircumbinaryDiskDetails.semiMajorAxisPost = m_SemiMajorAxis * AU_TO_RSOL; - m_CircumbinaryDiskDetails.eccentricityPost = m_Eccentricity; - - ApplyCircumbinaryDiskMassChange(m_Star1, finalMass1); - ApplyCircumbinaryDiskMassChange(m_Star2, finalMass2); - - (void)PrintCircumbinaryDisk(); + m_CircumbinaryDiskDetails.formationTime = m_Time; + m_CircumbinaryDiskDetails.mass1AtFormation = m_Star1->Mass(); + m_CircumbinaryDiskDetails.mass2AtFormation = m_Star2->Mass(); + m_CircumbinaryDiskDetails.stellarType1AtFormation = m_Star1->StellarType(); + m_CircumbinaryDiskDetails.stellarType2AtFormation = m_Star2->StellarType(); + + // Store the reservoir for evolution over subsequent COMPAS timesteps. + // This allows stellar radii, types, and Eddington limits to change while + // the disk is active. + m_ActiveCircumbinaryDisk.active = true; + m_ActiveCircumbinaryDisk.initialReservoirMass = initialReservoirMassMsol; + m_ActiveCircumbinaryDisk.remainingReservoirMass = initialReservoirMassMsol; + m_ActiveCircumbinaryDisk.supplyRateMsolPerYear = initialReservoirMassMsol / diskLifetimeYears; + m_ActiveCircumbinaryDisk.remainingLifetimeYears = diskLifetimeYears; + m_ActiveCircumbinaryDisk.massSupplied = 0.0; + m_ActiveCircumbinaryDisk.massRetained1 = 0.0; + m_ActiveCircumbinaryDisk.massRetained2 = 0.0; + m_RestartTimestepAfterImmediateEvent = true; } @@ -1872,9 +1700,6 @@ void BaseBinaryStar::ApplyCircumbinaryDiskMassChange(BinaryConstituentStar *p_St * FinaliseActiveCircumbinaryDisk() * * Deactivate the active finite-duration CBD and print the event record. - * Instantaneous CBD evolution continues to print from - * ApplyCircumbinaryDiskAfterCommonEnvelope(); this helper is used only by the - * opt-in TIMESTEPPED mode. * * The post-CBD orbital fields are deliberately not sampled here from the * current binary state. They are cached immediately after each CBD increment @@ -1887,17 +1712,18 @@ void BaseBinaryStar::ApplyCircumbinaryDiskMassChange(BinaryConstituentStar *p_St */ void BaseBinaryStar::FinaliseActiveCircumbinaryDisk() { - const double totalSuppliedMass = std::max(m_ActiveCircumbinaryDisk.totalSuppliedMass, 0.0); - const double completionTolerance = std::max(1.0e-12, 1.0e-10 * std::max(totalSuppliedMass, 1.0)); + const double initialReservoirMassMsol = std::max(m_ActiveCircumbinaryDisk.initialReservoirMass, 0.0); + const double completionToleranceMsol = std::max(CBD_RESERVOIR_COMPLETION_ABSOLUTE_TOLERANCE_MSOL, + CBD_RESERVOIR_COMPLETION_RELATIVE_TOLERANCE * std::max(initialReservoirMassMsol, 1.0)); const bool completedByMass = - utils::Compare(totalSuppliedMass, 0.0) > 0 && - utils::Compare(m_ActiveCircumbinaryDisk.remainingSuppliedMass, 0.0, completionTolerance) <= 0; + utils::Compare(initialReservoirMassMsol, 0.0) > 0 && + utils::Compare(m_ActiveCircumbinaryDisk.remainingReservoirMass, 0.0, completionToleranceMsol) <= 0; const bool completedByDuration = - utils::Compare(totalSuppliedMass, 0.0) > 0 && - utils::Compare(m_ActiveCircumbinaryDisk.supplyRate, 0.0) > 0 && - utils::Compare(m_ActiveCircumbinaryDisk.remainingDuration, 0.0) <= 0; + utils::Compare(initialReservoirMassMsol, 0.0) > 0 && + utils::Compare(m_ActiveCircumbinaryDisk.supplyRateMsolPerYear, 0.0) > 0 && + utils::Compare(m_ActiveCircumbinaryDisk.remainingLifetimeYears, 0.0) <= 0; const bool completed = completedByMass || completedByDuration; @@ -1906,13 +1732,16 @@ void BaseBinaryStar::FinaliseActiveCircumbinaryDisk() { // lifetime and exhausting the intended reservoir are the same physical // completion condition. Clamp away numerical residuals so the logged // supplied mass exactly matches the initial reservoir. - m_ActiveCircumbinaryDisk.remainingSuppliedMass = 0.0; - m_ActiveCircumbinaryDisk.remainingDuration = 0.0; + m_ActiveCircumbinaryDisk.remainingReservoirMass = 0.0; + m_ActiveCircumbinaryDisk.remainingLifetimeYears = 0.0; + m_ActiveCircumbinaryDisk.massSupplied = initialReservoirMassMsol; } - m_CircumbinaryDiskDetails.massSupplied = completed - ? totalSuppliedMass - : std::max(totalSuppliedMass - m_ActiveCircumbinaryDisk.remainingSuppliedMass, 0.0); + // The live stellar masses may already have been + // changed by the event ending the CBD. Use the tracked CBD increments. + m_CircumbinaryDiskDetails.massSupplied = std::max(m_ActiveCircumbinaryDisk.massSupplied, 0.0); + m_CircumbinaryDiskDetails.massRetained1 = m_ActiveCircumbinaryDisk.massRetained1; + m_CircumbinaryDiskDetails.massRetained2 = m_ActiveCircumbinaryDisk.massRetained2; m_ActiveCircumbinaryDisk.active = false; (void)PrintCircumbinaryDisk(); @@ -1940,68 +1769,69 @@ void BaseBinaryStar::EvolveActiveCircumbinaryDiskOneTimestep(const double p_Dt) if (!m_ActiveCircumbinaryDisk.active) return; - const double dtYears = std::min(p_Dt * MYR_TO_YEAR, m_ActiveCircumbinaryDisk.remainingDuration); - const double totalSuppliedMass = std::max(m_ActiveCircumbinaryDisk.totalSuppliedMass, 0.0); - const double completionTolerance = std::max(1.0e-12, 1.0e-10 * std::max(totalSuppliedMass, 1.0)); + const double dtYears = std::min(p_Dt * MYR_TO_YEAR, m_ActiveCircumbinaryDisk.remainingLifetimeYears); + const double initialReservoirMassMsol = std::max(m_ActiveCircumbinaryDisk.initialReservoirMass, 0.0); + const double completionToleranceMsol = std::max(CBD_RESERVOIR_COMPLETION_ABSOLUTE_TOLERANCE_MSOL, + CBD_RESERVOIR_COMPLETION_RELATIVE_TOLERANCE * std::max(initialReservoirMassMsol, 1.0)); - const bool reservoirExhausted = utils::Compare(m_ActiveCircumbinaryDisk.remainingSuppliedMass, 0.0, completionTolerance) <= 0; + const bool reservoirExhausted = utils::Compare(m_ActiveCircumbinaryDisk.remainingReservoirMass, 0.0, completionToleranceMsol) <= 0; if (utils::Compare(dtYears, 0.0) <= 0 || reservoirExhausted) { FinaliseActiveCircumbinaryDisk(); return; } - const double suppliedThisStep = std::min( - m_ActiveCircumbinaryDisk.supplyRate * dtYears, - m_ActiveCircumbinaryDisk.remainingSuppliedMass + const double suppliedMassThisStepMsol = std::min( + m_ActiveCircumbinaryDisk.supplyRateMsolPerYear * dtYears, + m_ActiveCircumbinaryDisk.remainingReservoirMass ); - if (utils::Compare(suppliedThisStep, 0.0) <= 0) { + if (utils::Compare(suppliedMassThisStepMsol, 0.0) <= 0) { FinaliseActiveCircumbinaryDisk(); return; } - const double mass1BeforeCBD = m_Star1->Mass(); - const double mass2BeforeCBD = m_Star2->Mass(); + const double mass1BeforeCBDMsol = m_Star1->Mass(); + const double mass2BeforeCBDMsol = m_Star2->Mass(); const CircumbinaryDisk::EvolutionOptions evolutionOptions{CircumbinaryDisk::MakeEvolutionOptionsFromCompasOptions()}; const CircumbinaryDisk::EvolutionInput evolutionInput{ - mass1BeforeCBD, - mass2BeforeCBD, + mass1BeforeCBDMsol, + mass2BeforeCBDMsol, m_Star1->Radius(), m_Star2->Radius(), m_Star1->StellarType(), m_Star2->StellarType(), m_Eccentricity, - suppliedThisStep, + suppliedMassThisStepMsol, dtYears, - CircumbinaryDisk::StarLabel::NONE, evolutionOptions }; const CircumbinaryDisk::EvolutionTrack track{CircumbinaryDisk::EvolveTrack(evolutionInput)}; - const double finalMass1 = track.mass1Msol; - const double finalMass2 = track.mass2Msol; + const double finalMass1Msol = track.mass1Msol; + const double finalMass2Msol = track.mass2Msol; - m_CircumbinaryDiskDetails.massRetained1 += finalMass1 - mass1BeforeCBD; - m_CircumbinaryDiskDetails.massRetained2 += finalMass2 - mass2BeforeCBD; + m_ActiveCircumbinaryDisk.massRetained1 += finalMass1Msol - mass1BeforeCBDMsol; + m_ActiveCircumbinaryDisk.massRetained2 += finalMass2Msol - mass2BeforeCBDMsol; m_SemiMajorAxis = m_SemiMajorAxis * track.semiMajorAxisFactor; m_Eccentricity = track.eccentricity; - ApplyCircumbinaryDiskMassChange(m_Star1, finalMass1); - ApplyCircumbinaryDiskMassChange(m_Star2, finalMass2); + ApplyCircumbinaryDiskMassChange(m_Star1, finalMass1Msol); + ApplyCircumbinaryDiskMassChange(m_Star2, finalMass2Msol); - m_ActiveCircumbinaryDisk.remainingDuration = std::max(m_ActiveCircumbinaryDisk.remainingDuration - dtYears, 0.0); - m_ActiveCircumbinaryDisk.remainingSuppliedMass = std::max(m_ActiveCircumbinaryDisk.remainingSuppliedMass - suppliedThisStep, 0.0); + m_ActiveCircumbinaryDisk.remainingLifetimeYears = std::max(m_ActiveCircumbinaryDisk.remainingLifetimeYears - dtYears, 0.0); + m_ActiveCircumbinaryDisk.remainingReservoirMass = std::max(m_ActiveCircumbinaryDisk.remainingReservoirMass - suppliedMassThisStepMsol, 0.0); + m_ActiveCircumbinaryDisk.massSupplied += suppliedMassThisStepMsol; - const bool completedByMass = utils::Compare(m_ActiveCircumbinaryDisk.remainingSuppliedMass, 0.0, completionTolerance) <= 0; - const bool completedByDuration = utils::Compare(m_ActiveCircumbinaryDisk.remainingDuration, 0.0) <= 0; + const bool completedByMass = utils::Compare(m_ActiveCircumbinaryDisk.remainingReservoirMass, 0.0, completionToleranceMsol) <= 0; + const bool completedByDuration = utils::Compare(m_ActiveCircumbinaryDisk.remainingLifetimeYears, 0.0) <= 0; - m_CircumbinaryDiskDetails.massSupplied = std::max( - m_ActiveCircumbinaryDisk.totalSuppliedMass - m_ActiveCircumbinaryDisk.remainingSuppliedMass, - 0.0 - ); + // Mirror the cumulative disk increments before an interrupting event. + m_CircumbinaryDiskDetails.massSupplied = std::max(m_ActiveCircumbinaryDisk.massSupplied, 0.0); + m_CircumbinaryDiskDetails.massRetained1 = m_ActiveCircumbinaryDisk.massRetained1; + m_CircumbinaryDiskDetails.massRetained2 = m_ActiveCircumbinaryDisk.massRetained2; m_CircumbinaryDiskDetails.semiMajorAxisPost = m_SemiMajorAxis * AU_TO_RSOL; m_CircumbinaryDiskDetails.eccentricityPost = m_Eccentricity; @@ -2075,12 +1905,9 @@ void BaseBinaryStar::ResolveCommonEnvelopeEvent() { const STELLAR_TYPE stellarType2PreCE = m_Star2->StellarType(); const double mass1PreCE = m_Star1->Mass(); const double mass2PreCE = m_Star2->Mass(); - const double radius1PreCERsol = m_Star1->Radius(); - const double radius2PreCERsol = m_Star2->Radius(); - // Clear stale CBD event state at the start of a fresh CE. TIMESTEPPED - // active-disk bookkeeping is preserved; this flag is only used here to - // tell EvaluateBinary() whether this CE produced an instantaneous CBD. + // Clear stale CBD event state at the start of a fresh CE. Any active + // disk has already been finalised at the start of this CE event. if (!m_ActiveCircumbinaryDisk.active) { m_CircumbinaryDiskDetails.formed = false; } @@ -2289,9 +2116,9 @@ void BaseBinaryStar::ResolveCommonEnvelopeEvent() { if ((!m_RLOFDetails.immediateRLOFPostCEE || allowImmediateRLOFPostCE) && OPTIONS->CircumbinaryDisk()) { // only evolve CBDs for CE survivors // The CBD framework is a post-CE process. It is applied only after // the ordinary CE calculation has produced a detached survivor; if - // the CBD then changes the orbit enough to create immediate RLOF, - // the same post-CE RLOF survival rule is checked again below. - ApplyCircumbinaryDiskAfterCommonEnvelope(stellarType1PreCE, stellarType2PreCE, mass1PreCE, mass2PreCE, radius1PreCERsol, radius2PreCERsol, envelopeFlag1, envelopeFlag2); + // the disk evolves during later timesteps, so the usual event + // checks handle any subsequent RLOF. + ApplyCircumbinaryDiskAfterCommonEnvelope(stellarType1PreCE, stellarType2PreCE, mass1PreCE, mass2PreCE, envelopeFlag1, envelopeFlag2); } if (m_RLOFDetails.immediateRLOFPostCEE && !allowImmediateRLOFPostCE) { @@ -2301,6 +2128,8 @@ void BaseBinaryStar::ResolveCommonEnvelopeEvent() { } + if (m_Flags.stellarMerger && m_ActiveCircumbinaryDisk.active) FinaliseActiveCircumbinaryDisk(); + (void)PrintCommonEnvelope(); // print (log) common envelope details } @@ -2405,6 +2234,8 @@ double BaseBinaryStar::CalculateGammaAngularMomentumLoss_Static(const double p_D case MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION::JEANS : gamma = p_AccretorMass / p_DonorMass; break; // vicinity of the donor case MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION::ISOTROPIC_RE_EMISSION: gamma = p_DonorMass / p_AccretorMass; break; // vicinity of the accretor + + case MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION::MIN: gamma = std::min(p_AccretorMass / p_DonorMass, p_DonorMass / p_AccretorMass); break; // the smaller of isotropic re-emission and Jeans mode mass loss case MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION::ARBITRARY : gamma = OPTIONS->MassTransferJloss(); break; @@ -2720,6 +2551,15 @@ void BaseBinaryStar::CalculateMassTransfer(const double p_Dt) { massDiffDonor = -envMassDonor; isEnvelopeRemoved = true; } + if (m_MassTransferTimescale == MT_TIMESCALE::THERMAL && OPTIONS->ExpelConvectiveEnvelopeAboveLuminosityThreshold() && m_Donor->DetermineEnvelopeType() == ENVELOPE::CONVECTIVE) { + // check if pulsations remove envelope in the middle of mass transfer; if so, only remove envelope up to that point during mass transfer, leave pulsation itself to next time step + double massPulsation = m_Donor->Luminosity() / PPOW(10.0, OPTIONS->LuminosityToMassThreshold()); // mass at which the pulsation threshold would be passed, log_10 (L/M) = LuminosityToMassThreshold, assumes unchanged L + if(massPulsation > m_Donor->CoreMass()) { + massDiffDonor = massPulsation - m_Donor->Mass(); + isEnvelopeRemoved = false; + } + } + else massDiffDonor = -massDiffDonor; // set mass difference } @@ -3192,7 +3032,7 @@ void BaseBinaryStar::ResolveMassChanges() { // assume the entire envelope was lost on timescales long relative to the orbit if (m_Star1->EnvelopeJustExpelledByPulsations() || m_Star2->EnvelopeJustExpelledByPulsations()) { // update separation in response to pulsational mass loss - m_SemiMajorAxis /= (2.0 - ((m_Star1->MassPrev() + m_Star2->MassPrev()) / (m_Star1->Mass() + m_Star2->Mass()))); + m_SemiMajorAxis *= ((m_Star1->MassPrev() + m_Star2->MassPrev()) / (m_Star1->Mass() + m_Star2->Mass())); // conserve a*M m_Star1->ResetEnvelopeExpulsationByPulsations(); m_Star2->ResetEnvelopeExpulsationByPulsations(); } @@ -3820,9 +3660,11 @@ double BaseBinaryStar::ChooseTimestep(const double p_Factor) { dt = std::max(std::round(dt / TIMESTEP_QUANTUM) * TIMESTEP_QUANTUM, TIDES_MINIMUM_FRACTIONAL_NUCLEAR_TIME * NUCLEAR_MINIMUM_TIMESTEP); // quantised and not less than minimum if (m_ActiveCircumbinaryDisk.active) { - dt = std::min(dt, m_ActiveCircumbinaryDisk.remainingDuration * YEAR_TO_MYR); - if (utils::Compare(m_ActiveCircumbinaryDisk.supplyRate, 0.0) > 0) { - dt = std::min(dt, CircumbinaryDisk::MAXIMUM_SUPPLIED_MASS_PER_TIMESTEP_MSOL / m_ActiveCircumbinaryDisk.supplyRate * YEAR_TO_MYR); + dt = std::min(dt, m_ActiveCircumbinaryDisk.remainingLifetimeYears * YEAR_TO_MYR); + if (utils::Compare(m_ActiveCircumbinaryDisk.supplyRateMsolPerYear, 0.0) > 0) { + const double binaryMassMsol = m_Star1->Mass() + m_Star2->Mass(); + dt = std::min(dt, CBD_MAXIMUM_SUPPLIED_MASS_FRACTION_PER_TIMESTEP * binaryMassMsol / + m_ActiveCircumbinaryDisk.supplyRateMsolPerYear * YEAR_TO_MYR); } } @@ -3875,10 +3717,7 @@ void BaseBinaryStar::EvaluateBinary(const double p_Dt) { && !HasOneOf({STELLAR_TYPE::MASSLESS_REMNANT}) ) { // yes - avoid CEE if CH+CH or one star is a massless remnant ResolveCommonEnvelopeEvent(); // resolve CEE - immediate event - const bool instantaneousCBDEvolved = // did this CE run a full instantaneous CBD? - OPTIONS->CircumbinaryDiskEvolutionMode() == CIRCUMBINARY_DISK_EVOLUTION_MODE::INSTANTANEOUS && - m_CircumbinaryDiskDetails.formed; - (void)PrintDetailedOutput(m_Id, instantaneousCBDEvolved ? BSE_DETAILED_RECORD_TYPE::POST_CBD : BSE_DETAILED_RECORD_TYPE::POST_CEE); // print (log) detailed output + (void)PrintDetailedOutput(m_Id, BSE_DETAILED_RECORD_TYPE::POST_CEE); // print (log) detailed output } else if (m_Star1->IsSNevent() || m_Star2->IsSNevent()) { const SN_EVENT supernovaEvents = // stash current SN types before EvaluateSupernovae() clears them @@ -4113,10 +3952,12 @@ EVOLUTION_STATUS BaseBinaryStar::Evolve() { // eventually, will want to implement a more careful prescription for the merger product, // perhaps allowing further evolution of the merger product (void)LogMergerToSwitchLog(); // log merger + if (m_ActiveCircumbinaryDisk.active) FinaliseActiveCircumbinaryDisk(); evolutionStatus = EVOLUTION_STATUS::STELLAR_MERGER; // stop evolution } } else if (HasStarsTouching()) { // binary components touching? (should usually be avoided as MT or CE or merger should happen prior to this) + if (m_ActiveCircumbinaryDisk.active) FinaliseActiveCircumbinaryDisk(); evolutionStatus = EVOLUTION_STATUS::STARS_TOUCHING; // yes - stop evolution } else if (IsUnbound()) { // binary is unbound? diff --git a/src/BaseBinaryStar.h b/src/BaseBinaryStar.h index 01d2b3308..41c3c54dc 100644 --- a/src/BaseBinaryStar.h +++ b/src/BaseBinaryStar.h @@ -169,7 +169,7 @@ class BaseBinaryStar { unsigned int CEEventCount() const { return m_CEDetails.CEEcount; } double CircularizationTimescale() const { return m_CircularizationTimescale; } bool CircumbinaryDiskFormed() const { return m_CircumbinaryDiskDetails.formed; } - double CircumbinaryDiskInitialMass() const { return m_CircumbinaryDiskDetails.initialMass; } + double CircumbinaryDiskInitialMass() const { return m_CircumbinaryDiskDetails.initialReservoirMass; } double CircumbinaryDiskMassSupplied() const { return m_CircumbinaryDiskDetails.massSupplied; } double CircumbinaryDiskMassRetained1() const { return m_CircumbinaryDiskDetails.massRetained1; } double CircumbinaryDiskMassRetained2() const { return m_CircumbinaryDiskDetails.massRetained2; } @@ -177,6 +177,11 @@ class BaseBinaryStar { double CircumbinaryDiskSemiMajorAxisPost() const { return m_CircumbinaryDiskDetails.semiMajorAxisPost; } double CircumbinaryDiskEccentricityPre() const { return m_CircumbinaryDiskDetails.eccentricityPre; } double CircumbinaryDiskEccentricityPost() const { return m_CircumbinaryDiskDetails.eccentricityPost; } + double CircumbinaryDiskFormationTime() const { return m_CircumbinaryDiskDetails.formationTime; } + double CircumbinaryDiskMass1AtFormation() const { return m_CircumbinaryDiskDetails.mass1AtFormation; } + double CircumbinaryDiskMass2AtFormation() const { return m_CircumbinaryDiskDetails.mass2AtFormation; } + STELLAR_TYPE CircumbinaryDiskStellarType1AtFormation() const { return m_CircumbinaryDiskDetails.stellarType1AtFormation; } + STELLAR_TYPE CircumbinaryDiskStellarType2AtFormation() const { return m_CircumbinaryDiskDetails.stellarType2AtFormation; } unsigned int CommonEnvelopeEventCount() const { return m_CEDetails.CEEcount; } bool Unbound() const { return m_Unbound; } bool DoubleCoreCE() const { return m_CEDetails.doubleCoreCE; } @@ -327,7 +332,7 @@ class BaseBinaryStar { // Cached initial and final quantities written to one CBD event record. struct CircumbinaryDiskDetailsT { bool formed = false; // A post-CE circumbinary disk formed and was evolved - double initialMass = DEFAULT_INITIAL_DOUBLE_VALUE; // Initial CBD reservoir intended to be supplied (Msol) + double initialReservoirMass = DEFAULT_INITIAL_DOUBLE_VALUE; // Initial CBD reservoir intended to be supplied (Msol) double massSupplied = DEFAULT_INITIAL_DOUBLE_VALUE; // Mass actually supplied to the binary through the CBD (Msol) double massRetained1 = DEFAULT_INITIAL_DOUBLE_VALUE; // Mass retained by star 1 during CBD accretion (Msol) double massRetained2 = DEFAULT_INITIAL_DOUBLE_VALUE; // Mass retained by star 2 during CBD accretion (Msol) @@ -335,16 +340,24 @@ class BaseBinaryStar { double semiMajorAxisPost = DEFAULT_INITIAL_DOUBLE_VALUE; // Semi-major axis after CBD evolution (Rsol) double eccentricityPre = DEFAULT_INITIAL_DOUBLE_VALUE; // Eccentricity before CBD evolution double eccentricityPost = DEFAULT_INITIAL_DOUBLE_VALUE; // Eccentricity after CBD evolution + double formationTime = DEFAULT_INITIAL_DOUBLE_VALUE; // COMPAS time at CBD formation (Myr) + double mass1AtFormation = DEFAULT_INITIAL_DOUBLE_VALUE; // Star 1 mass at CBD formation (Msol) + double mass2AtFormation = DEFAULT_INITIAL_DOUBLE_VALUE; // Star 2 mass at CBD formation (Msol) + STELLAR_TYPE stellarType1AtFormation = STELLAR_TYPE::NONE; // Star 1 type at CBD formation + STELLAR_TYPE stellarType2AtFormation = STELLAR_TYPE::NONE; // Star 2 type at CBD formation } m_CircumbinaryDiskDetails{}; - // Persistent reservoir and delivery state for a TIMESTEPPED CBD that is + // Persistent reservoir and delivery state for an active CBD that is // still being evolved alongside ordinary COMPAS timesteps. struct ActiveCircumbinaryDiskT { bool active = false; // CBD is currently draining over ordinary COMPAS timesteps - double totalSuppliedMass = 0.0; // Total CBD-supplied mass at formation (Msol) - double remainingSuppliedMass = 0.0; // Supplied mass still to be processed by the CBD (Msol) - double supplyRate = 0.0; // Uniform CBD supply rate (Msol yr^-1) - double remainingDuration = 0.0; // CBD lifetime still to be evolved (yr) + double initialReservoirMass = 0.0; // Intended mass of CBD reservoir at formation (Msol) + double remainingReservoirMass = 0.0; // CBD reservoir mass not yet supplied (Msol) + double supplyRateMsolPerYear = 0.0; // Uniform CBD supply rate (Msol yr^-1) + double remainingLifetimeYears = 0.0; // CBD lifetime still to be evolved (yr) + double massSupplied = 0.0; // Cumulative mass actually supplied through the CBD (Msol) + double massRetained1 = 0.0; // Cumulative CBD-supplied mass retained by star 1 (Msol) + double massRetained2 = 0.0; // Cumulative CBD-supplied mass retained by star 2 (Msol) } m_ActiveCircumbinaryDisk{}; bool m_RestartTimestepAfterImmediateEvent; // Restart the timestep before aging stars after an instantaneous event @@ -545,16 +558,10 @@ class BaseBinaryStar { const STELLAR_TYPE p_StellarType2PreCE, const double p_Mass1PreCE, const double p_Mass2PreCE, - const double p_Radius1PreCERsol, - const double p_Radius2PreCERsol, const bool p_EnvelopeFlag1, const bool p_EnvelopeFlag2); void EvolveActiveCircumbinaryDiskOneTimestep(const double p_Dt); void FinaliseActiveCircumbinaryDisk(); - void SetPostCBDValues(const double p_SemiMajorAxisAU, - const double p_EccentricityAfterCBD, - const double p_Mass1AfterCBD, - const double p_Mass2AfterCBD); void ApplyCircumbinaryDiskMassChange(BinaryConstituentStar *p_Star, const double p_FinalMass); diff --git a/src/CircumbinaryDisk.h b/src/CircumbinaryDisk.h index f7efb9ab5..d77fefcda 100644 --- a/src/CircumbinaryDisk.h +++ b/src/CircumbinaryDisk.h @@ -6,22 +6,6 @@ namespace CircumbinaryDisk { -enum class StarLabel : int { NONE, STAR_1, STAR_2 }; - -// Numerical control for TIMESTEPPED mode: limit each active-CBD substep by -// the amount of supplied mass processed, since the Spindler derivatives are -// applied per unit supplied mass. This is not a physical model parameter. -constexpr double MAXIMUM_SUPPLIED_MASS_PER_TIMESTEP_MSOL = 0.01; - -// Identifies whether a pre-CE binary matches the currently supported -// compact-object + envelope-donor channel and stores the pre-CE quantities -// needed by the optional synchronized-envelope angular-momentum estimate. -struct CommonEnvelopeChannel { - bool supported = false; - double reducedMassPreCEMsol = 0.0; - double envelopeDonorRadiusPreCERsol = 0.0; -}; - // Public API for the post-CE circumbinary-disk model. // // BaseBinaryStar owns COMPAS state, event ordering, logging, and mutation of @@ -32,7 +16,7 @@ struct CommonEnvelopeChannel { // Validity domain: the Spindler-based evolution treats the CBD as a // perturbative reservoir whose mass is dynamically negligible compared with // the central binary. The formalism therefore assumes m_CBD << M_binary. -// Here m_CBD is the initial intended reservoir (FormationResult::suppliedMassMsol +// Here m_CBD is the initial intended reservoir (FormationResult::initialReservoirMassMsol // and the logged Initial_CBD_Mass), M_binary is the post-CE central-binary mass. The code // does not impose a hard numerical cutoff on this asymptotic assumption, so // parameter choices outside this regime are extrapolations. @@ -53,11 +37,10 @@ struct CommonEnvelopeChannel { // from COMPAS options by MakeFormationOptionsFromCompasOptions(); this struct // intentionally carries no physical defaults. struct FormationOptions { - bool useSynchronizedEnvelopeAngularMomentum; double circumbinaryDiskBeta; double envelopeMassFractionSupplied; // Assumed to yield initial m_CBD << post-CE M_binary - double diskStructureAngularMomentumFactor; - double innerDiskRadiusOverSeparation; + double diskStructureFactor; + double diskInnerRadiusOverSeparation; }; // User/model parameters for the CBD evolution step. These are populated @@ -66,7 +49,6 @@ struct EvolutionOptions { CIRCUMBINARY_DISK_EDDINGTON_MODE eddingtonMode; double eddingtonCapFactor; double eddingtonGe23Factor; - double aicMassThresholdMsol; }; // Complete physical state needed for the CBD formation criterion. @@ -77,15 +59,13 @@ struct EvolutionOptions { // binary mass lost during CE. Thus J_CBD = beta * fM * J_available. The // formation criterion is evaluated as a total angular-momentum comparison in // COMPAS physical units. The available mass is calculated from the decrease -// in total binary mass across CE. The resulting supplied mass is assumed to +// in total binary mass across CE. The resulting supplied mass is assumed to // be much smaller than the post-CE binary mass in the subsequent Spindler evolution. struct FormationInput { - CommonEnvelopeChannel channel{}; // Pre-CE properties used by the synchronized-envelope option double binaryMassPreCEMsol; double binaryMassPostCEMsol; double semiMajorAxisPreRLOFRsol; double semiMajorAxisPostCERsol; - double eccentricityPreRLOF; double totalAngularMomentumPreRLOF; FormationOptions options{}; }; @@ -94,13 +74,13 @@ struct FormationInput { // intended reservoir when the angular-momentum criterion is satisfied. struct FormationResult { bool forms = false; - double suppliedMassMsol = 0.0; // Initial CBD reservoir; assumed to be << post-CE binary mass + double initialReservoirMassMsol = 0.0; // Intended initial CBD reservoir; assumed to be << post-CE binary mass }; // Complete physical state needed for one Spindler/CBD evolution step after a // CBD has formed. The supplied mass is the "bare" mass passed through the // disk model; Eddington limiting determines how much of it is retained by each -// star. +// star. struct EvolutionInput { double mass1Msol; double mass2Msol; @@ -111,42 +91,26 @@ struct EvolutionInput { double eccentricity; double suppliedMassMsol; double durationYears; - - // Optional event target. Use NONE to disable; otherwise use a COMPAS star label. - // The current caller uses this to stop the CBD integration when an ONeWD - // reaches the Chandrasekhar mass and should undergo AIC. - StarLabel aicTargetStar; EvolutionOptions options{}; }; -// COMPAS-labelled binary state and progress returned after evolving one -// requested CBD segment. semiMajorAxisFactor multiplies the input separation; -// the remaining fields report the final orbit, masses, elapsed time, supplied -// mass processed, and whether evolution stopped at the requested AIC threshold. +// COMPAS-labelled binary state returned after evolving one complete CBD +// increment. semiMajorAxisFactor multiplies the input separation. struct EvolutionTrack { double semiMajorAxisFactor = 1.0; double eccentricity = 0.0; double mass1Msol = 0.0; double mass2Msol = 0.0; - - // If evolution stops at the requested AIC threshold, the orbital and mass - // fields above already describe the state at the crossing. These fields - // report how much of the requested segment was completed. - bool aicOccurred = false; - double elapsedTimeYears = 0.0; - double suppliedMassMsol = 0.0; }; bool SupernovaEventsDisruptDisk(const SN_EVENT p_Events); -CommonEnvelopeChannel MakeCommonEnvelopeChannel(const STELLAR_TYPE p_StellarType1PreCE, - const STELLAR_TYPE p_StellarType2PreCE, - const double p_Mass1PreCE, - const double p_Mass2PreCE, - const double p_Radius1PreCERsol, - const double p_Radius2PreCERsol, - const bool p_EnvelopeFlag1, - const bool p_EnvelopeFlag2); +bool IsSupportedCommonEnvelopeChannel(const STELLAR_TYPE p_StellarType1PreCE, + const STELLAR_TYPE p_StellarType2PreCE, + const double p_Mass1PreCE, + const double p_Mass2PreCE, + const bool p_EnvelopeFlag1, + const bool p_EnvelopeFlag2); FormationOptions MakeFormationOptionsFromCompasOptions(); EvolutionOptions MakeEvolutionOptionsFromCompasOptions(); diff --git a/src/CircumbinaryDiskEvolutionSpindler.cpp b/src/CircumbinaryDiskEvolutionSpindler.cpp index 36afb9c76..69a5aeb9f 100644 --- a/src/CircumbinaryDiskEvolutionSpindler.cpp +++ b/src/CircumbinaryDiskEvolutionSpindler.cpp @@ -39,53 +39,48 @@ namespace odeint = boost::numeric::odeint; namespace { -enum class OrderedComponent { NONE, PRIMARY, SECONDARY }; +// Backend details and ODE solver settings are local to the Spindler implementation. +constexpr char CBD_SPINDLER_MODEL_NAME[] = "Siwek23"; +constexpr double CBD_SPINDLER_ODE_RELATIVE_TOLERANCE = 1.0E-4; +constexpr double CBD_SPINDLER_ODE_ABSOLUTE_TOLERANCE = 1.0E-5; // Physical and dimensionless inputs used by the internal Spindler integration. // suppliedMassFraction is the total mass supplied by the CBD in units of the // initial post-CE binary mass and is assumed to be much smaller than unity; a -// small TIMESTEPPED increment does not by itself make an initially large -// reservoir consistent with that assumption. q0 follows the ordered +// small integration increment does not by itself make an initially large +// reservoir consistent with that assumption. initialMassRatio follows the ordered // Spindler convention q = M2/M1 <= 1, not necessarily the original COMPAS -// star-2/star-1 label ratio. initialTotalMass converts between physical Msol +// star-2/star-1 label ratio. initialBinaryMassMsol converts between physical Msol // units and the dimensionless ODE variables. struct SpindlerEvolutionParams { double suppliedMassFraction; - double q0; - double e0; - double initialTotalMass; + double initialMassRatio; + double initialEccentricity; + double initialBinaryMassMsol; double durationYears; STELLAR_TYPE stellarType1 = STELLAR_TYPE::NONE; STELLAR_TYPE stellarType2 = STELLAR_TYPE::NONE; - double radius1 = 0.0; - double radius2 = 0.0; + double radius1Rsol = 0.0; + double radius2Rsol = 0.0; CircumbinaryDisk::EvolutionOptions options{}; - - // Optional stop condition for event-style AIC handling. The component - // label is in the ordered Spindler convention; the threshold comes from - // options.aicMassThresholdMsol. - OrderedComponent stopComponent; }; -// Final dimensionless state and integration progress produced by the internal -// Spindler solver before component ordering is converted back to COMPAS labels. +// Final dimensionless state produced by the internal Spindler solver before +// component ordering is converted back to COMPAS labels. struct SpindlerEvolutionResult { double semiMajorAxisFactor = 1.0; - double mass1 = 0.5; - double mass2 = 0.5; + double mass1Fraction = 0.5; + double mass2Fraction = 0.5; double eccentricity = 0.0; - double elapsedTimeYears = 0.0; - double suppliedMassFractionUsed = 0.0; - bool stoppedAtMassThreshold = false; }; // Owns one initialized spindler-c table set and evaluates CBD-driven binary // evolution with COMPAS Eddington-limit and angular-momentum-loss extensions. class SpindlerBackend { public: - explicit SpindlerBackend(const std::string& p_ModelName = "Siwek23"); + explicit SpindlerBackend(const std::string& p_ModelName = CBD_SPINDLER_MODEL_NAME); ~SpindlerBackend(); // The backend uniquely owns spindler-c table data, so copying and moving are disabled. @@ -100,18 +95,18 @@ class SpindlerBackend { // Spindler logarithmic orbital and mass-ratio derivatives returned for one // labelled binary state. struct Derivatives { - double Da; - double Dq; - double De; + double da; + double dq; + double de; }; Derivatives DerivativesForLabeledQ(double p_QLabeled, double p_Eccentricity) const; std::pair ComponentMassFractions(double p_QLabeled, double p_Eccentricity) const; double ComputeEddingtonRate( const STELLAR_TYPE p_StellarType, - double p_MassSpindlerUnits, - double p_InitialTotalMass, - double p_Radius + double p_MassFraction, + double p_InitialBinaryMassMsol, + double p_RadiusRsol ) const; static double ApplyEddingtonLimit( @@ -123,7 +118,7 @@ class SpindlerBackend { ); // Dimensionless Spindler-internal orbital angular momentum: G = 1, a0 = 1, and Mtot0 = 1. - static double SpindlerOrbitalAngularMomentum(double p_Mass1, double p_Mass2, double p_Eccentricity, double p_SemiMajorAxis); + static double SpindlerOrbitalAngularMomentum(double p_Mass1Fraction, double p_Mass2Fraction, double p_Eccentricity, double p_SemiMajorAxisFactor); struct spindler_data_t m_SpindlerData{}; }; @@ -132,33 +127,19 @@ class SpindlerBackend { #define SPINDLER_C_ROOT "" #endif -// Range of the Siwek23/Spindler tables used by spindler-c. Systems outside -// the table domain are evolved using the nearest tabulated boundary value, -// while the raw q/e values are retained in the derivative normalisations so the -// evolution remains continuous at the table edges. -constexpr double SIWEK23_Q_MIN = 0.1; -constexpr double SIWEK23_Q_MAX = 1.0; -constexpr double SIWEK23_E_MIN = 0.0; -constexpr double SIWEK23_E_MAX = 0.8; -constexpr double NS_REFERENCE_RADIUS_RSUN = 1.4374e-5; -constexpr double WD_EDDINGTON_RATE_PER_RADIUS = 2.08e-3 / 1.7; -constexpr double SPINDLER_ODE_RTOL = 1.0e-4; -constexpr double SPINDLER_ODE_ATOL = 1.0e-5; -constexpr double TINY = std::numeric_limits::min(); - /* * Validate the ordered initial mass ratio and eccentricity before constructing the ODE state * - * void ValidateCommonInputs(const double p_Q0, const double p_E0) + * void ValidateCommonInputs(const double p_InitialMassRatio, const double p_InitialEccentricity) * - * @param [IN] p_Q0 Initial ordered mass ratio, M2/M1 <= 1 - * @param [IN] p_E0 Initial eccentricity + * @param [IN] p_InitialMassRatio Initial ordered mass ratio, M2/M1 <= 1 + * @param [IN] p_InitialEccentricity Initial eccentricity */ -void ValidateCommonInputs(const double p_Q0, const double p_E0) { - if (utils::Compare(p_Q0, 0.0) <= 0 || !std::isfinite(p_Q0)) { +void ValidateCommonInputs(const double p_InitialMassRatio, const double p_InitialEccentricity) { + if (utils::Compare(p_InitialMassRatio, 0.0) <= 0 || !std::isfinite(p_InitialMassRatio)) { throw std::invalid_argument("q0 must be positive and finite"); } - if (!std::isfinite(p_E0) || utils::Compare(p_E0, 0.0) < 0 || utils::Compare(p_E0, 1.0) >= 0) { + if (!std::isfinite(p_InitialEccentricity) || utils::Compare(p_InitialEccentricity, 0.0) < 0 || utils::Compare(p_InitialEccentricity, 1.0) >= 0) { throw std::invalid_argument("e0 must satisfy 0 <= e0 < 1"); } } @@ -166,57 +147,20 @@ void ValidateCommonInputs(const double p_Q0, const double p_E0) { /* * Convert the dimensionless ODE state into the internal Spindler result * - * SpindlerEvolutionResult MakeResultFromState(const std::vector& p_State, - * const double p_ElapsedTimeYears, - * const double p_DurationYears, - * const double p_SuppliedMassFraction, - * const bool p_StoppedAtMassThreshold) + * SpindlerEvolutionResult MakeResultFromState(const std::vector& p_State) * * @param [IN] p_State ODE state [a/a0, M1/M0, M2/M0, e] - * @param [IN] p_ElapsedTimeYears Time evolved from the start of this CBD segment (yr) - * @param [IN] p_DurationYears Requested duration of this CBD segment (yr) - * @param [IN] p_SuppliedMassFraction Total supplied mass divided by the initial binary mass - * @param [IN] p_StoppedAtMassThreshold Whether integration stopped at the requested mass threshold - * @return Internal evolution result at p_ElapsedTimeYears + * @return Internal evolution result for this state */ -SpindlerEvolutionResult MakeResultFromState( - const std::vector& p_State, - const double p_ElapsedTimeYears, - const double p_DurationYears, - const double p_SuppliedMassFraction, - const bool p_StoppedAtMassThreshold -) { +SpindlerEvolutionResult MakeResultFromState(const std::vector& p_State) { SpindlerEvolutionResult result{}; result.semiMajorAxisFactor = p_State[0]; - result.mass1 = p_State[1]; - result.mass2 = p_State[2]; + result.mass1Fraction = p_State[1]; + result.mass2Fraction = p_State[2]; result.eccentricity = p_State[3]; - result.elapsedTimeYears = p_ElapsedTimeYears; - result.suppliedMassFractionUsed = p_SuppliedMassFraction * p_ElapsedTimeYears / p_DurationYears; - result.stoppedAtMassThreshold = p_StoppedAtMassThreshold; return result; } -/* - * Read the selected ordered-component mass from the ODE state - * - * double SelectedComponentMass(const std::vector& p_State, - * const OrderedComponent p_Component) - * - * @param [IN] p_State ODE state [a/a0, M1/M0, M2/M0, e] - * @param [IN] p_Component Ordered component to read, or NONE when no event target is active - * @return Selected dimensionless component mass; zero for NONE - */ -double SelectedComponentMass(const std::vector& p_State, const OrderedComponent p_Component) { - switch (p_Component) { - case OrderedComponent::PRIMARY: return p_State[1]; - case OrderedComponent::SECONDARY: return p_State[2]; - case OrderedComponent::NONE: return 0.0; - } - - return 0.0; -} - std::mutex spindlerInitMutex; // spindler_init() resolves its table paths relative to the process working @@ -335,19 +279,19 @@ SpindlerBackend::Derivatives SpindlerBackend::DerivativesForLabeledQ(double p_QL // evolution of the ordered mass ratio. If COMPAS's labelled mass ratio is // inverted relative to q <= 1, the sign of the q derivative must be inverted // before returning to the caller's labels. - const double qLookup = std::clamp(qOrderedRaw, SIWEK23_Q_MIN, SIWEK23_Q_MAX); - const double eccentricityLookup = std::clamp(eccentricityRaw, SIWEK23_E_MIN, SIWEK23_E_MAX); + const double qLookup = std::clamp(qOrderedRaw, CBD_SIWEK23_Q_MIN, CBD_SIWEK23_Q_MAX); + const double eccentricityLookup = std::clamp(eccentricityRaw, CBD_SIWEK23_E_MIN, CBD_SIWEK23_E_MAX); - Derivatives d{}; - d.Da = spindler_get_Da(qLookup, eccentricityLookup, const_cast(&m_SpindlerData)); + Derivatives derivatives{}; + derivatives.da = spindler_get_Da(qLookup, eccentricityLookup, const_cast(&m_SpindlerData)); - const double DeLookup = spindler_get_De(qLookup, eccentricityLookup, const_cast(&m_SpindlerData)); - d.De = utils::Compare(eccentricityRaw, 0.0) > 0 ? DeLookup * eccentricityLookup / eccentricityRaw : 0.0; + const double deLookup = spindler_get_De(qLookup, eccentricityLookup, const_cast(&m_SpindlerData)); + derivatives.de = utils::Compare(eccentricityRaw, 0.0) > 0 ? deLookup * eccentricityLookup / eccentricityRaw : 0.0; - const double DqLookup = spindler_get_Dq(qLookup, eccentricityLookup, const_cast(&m_SpindlerData)); - const double DqOrdered = DqLookup * qLookup / qOrderedRaw; - d.Dq = swapped ? -DqOrdered : DqOrdered; - return d; + const double dqLookup = spindler_get_Dq(qLookup, eccentricityLookup, const_cast(&m_SpindlerData)); + const double dqOrdered = dqLookup * qLookup / qOrderedRaw; + derivatives.dq = swapped ? -dqOrdered : dqOrdered; + return derivatives; } /* @@ -367,51 +311,51 @@ std::pair SpindlerBackend::ComponentMassFractions(double p_QLabe const bool swapped = utils::Compare(p_QLabeled, 1.0) > 0; const double qOrderedRaw = swapped ? 1.0 / p_QLabeled : p_QLabeled; const double eccentricityRaw = std::max(p_Eccentricity, 0.0); - const double qLookup = std::clamp(qOrderedRaw, SIWEK23_Q_MIN, SIWEK23_Q_MAX); - const double eccentricityLookup = std::clamp(eccentricityRaw, SIWEK23_E_MIN, SIWEK23_E_MAX); + const double qLookup = std::clamp(qOrderedRaw, CBD_SIWEK23_Q_MIN, CBD_SIWEK23_Q_MAX); + const double eccentricityLookup = std::clamp(eccentricityRaw, CBD_SIWEK23_E_MIN, CBD_SIWEK23_E_MAX); - const double DqLookup = spindler_get_Dq(qLookup, eccentricityLookup, const_cast(&m_SpindlerData)); - const double DqOrdered = DqLookup * qLookup / qOrderedRaw; + const double dqLookup = spindler_get_Dq(qLookup, eccentricityLookup, const_cast(&m_SpindlerData)); + const double dqOrdered = dqLookup * qLookup / qOrderedRaw; // Infer how the supplied CBD mass is split between the two components from // the tabulated q evolution. This keeps the mass growth consistent with the // same table derivative that drives the orbital response instead of imposing // an independent accretion-ratio prescription. - double fracSecondaryLookup = qOrderedRaw * (DqOrdered + 1.0 + qOrderedRaw) / std::pow(1.0 + qOrderedRaw, 2.0); - fracSecondaryLookup = std::clamp(fracSecondaryLookup, 0.0, 1.0); - const double fracPrimaryLookup = 1.0 - fracSecondaryLookup; + double secondaryAccretionFraction = qOrderedRaw * (dqOrdered + 1.0 + qOrderedRaw) / std::pow(1.0 + qOrderedRaw, 2.0); + secondaryAccretionFraction = std::clamp(secondaryAccretionFraction, 0.0, 1.0); + const double primaryAccretionFraction = 1.0 - secondaryAccretionFraction; if (swapped) { - return {fracSecondaryLookup, fracPrimaryLookup}; + return {secondaryAccretionFraction, primaryAccretionFraction}; } - return {fracPrimaryLookup, fracSecondaryLookup}; + return {primaryAccretionFraction, secondaryAccretionFraction}; } /* * Calculate the Eddington accretion rate for one component * * double ComputeEddingtonRate(const STELLAR_TYPE p_StellarType, - * double p_MassSpindlerUnits, - * double p_InitialTotalMass, - * double p_Radius) const + * double p_MassFraction, + * double p_InitialBinaryMassMsol, + * double p_RadiusRsol) const * * @param [IN] p_StellarType Current stellar type of the component - * @param [IN] p_MassSpindlerUnits Component mass divided by the initial binary mass - * @param [IN] p_InitialTotalMass Initial binary mass used for ODE normalisation (Msol) - * @param [IN] p_Radius Current component radius (Rsol) + * @param [IN] p_MassFraction Component mass divided by the initial binary mass + * @param [IN] p_InitialBinaryMassMsol Initial binary mass used for ODE normalisation (Msol) + * @param [IN] p_RadiusRsol Current component radius (Rsol) * @return Eddington rate in dimensionless Spindler mass units per year */ double SpindlerBackend::ComputeEddingtonRate( const STELLAR_TYPE p_StellarType, - double p_MassSpindlerUnits, - double p_InitialTotalMass, - double p_Radius + double p_MassFraction, + double p_InitialBinaryMassMsol, + double p_RadiusRsol ) const { if (p_StellarType == STELLAR_TYPE::BLACK_HOLE) { // Black-hole Eddington mass accretion rate = 4.42e-7 * (M_phys / 10) Msol/yr. Because the ODE masses // are normalised by the initial binary mass, this is returned in // dimensionless Spindler mass units per year. - return 4.42e-7 * (p_MassSpindlerUnits / 10.0); + return CBD_BH_EDDINGTON_RATE_AT_REFERENCE_MASS * (p_MassFraction / CBD_BH_EDDINGTON_REFERENCE_MASS_MSOL); } const bool isWhiteDwarf = p_StellarType == STELLAR_TYPE::HELIUM_WHITE_DWARF || @@ -419,20 +363,20 @@ double SpindlerBackend::ComputeEddingtonRate( p_StellarType == STELLAR_TYPE::OXYGEN_NEON_WHITE_DWARF; if (p_StellarType == STELLAR_TYPE::NEUTRON_STAR || isWhiteDwarf) { - if (utils::Compare(p_Radius, 0.0) <= 0 || !std::isfinite(p_Radius)) { + if (utils::Compare(p_RadiusRsol, 0.0) <= 0 || !std::isfinite(p_RadiusRsol)) { throw std::invalid_argument("radius must be positive and finite for radius-scaled Eddington limits"); } - if (utils::Compare(p_InitialTotalMass, 0.0) <= 0 || !std::isfinite(p_InitialTotalMass)) { - throw std::invalid_argument("initialTotalMass must be positive for radius-scaled Eddington limits"); + if (utils::Compare(p_InitialBinaryMassMsol, 0.0) <= 0 || !std::isfinite(p_InitialBinaryMassMsol)) { + throw std::invalid_argument("initialBinaryMassMsol must be positive for radius-scaled Eddington limits"); } // COMPAS uses a radius-scaled Eddington rate for white dwarfs and other // non-BH accretors. Preserve the existing CBD neutron-star normalisation // while applying the standard COMPAS/Hurley coefficient to white dwarfs. - const double mdotEddPhys = p_StellarType == STELLAR_TYPE::NEUTRON_STAR - ? 3.0e-8 * (p_Radius / NS_REFERENCE_RADIUS_RSUN) - : WD_EDDINGTON_RATE_PER_RADIUS * p_Radius; - return mdotEddPhys / p_InitialTotalMass; + const double eddingtonRateMsolPerYear = p_StellarType == STELLAR_TYPE::NEUTRON_STAR + ? CBD_NS_EDDINGTON_RATE_AT_REFERENCE_RADIUS * (p_RadiusRsol / CBD_NS_EDDINGTON_REFERENCE_RADIUS_RSOL) + : CBD_WD_EDDINGTON_RATE_PER_RADIUS * p_RadiusRsol; + return eddingtonRateMsolPerYear / p_InitialBinaryMassMsol; } // The Eddington limit is assumed to be irrelevant for non-compact accretors. @@ -474,8 +418,8 @@ double SpindlerBackend::ApplyEddingtonLimit( case CIRCUMBINARY_DISK_EDDINGTON_MODE::TM23: { if (std::isfinite(p_EddingtonRate) && utils::Compare(p_EddingtonRate, 0.0) > 0 && utils::Compare(p_RequestedRate, p_EddingtonRate) > 0) { const double ratio = p_RequestedRate / p_EddingtonRate; - const double fTM23 = std::min(1.0, std::pow(0.6 / ratio, 0.6)); - return p_RequestedRate * fTM23; + const double tm23RetentionFraction = std::min(1.0, std::pow(CBD_TM23_RETENTION_COEFFICIENT / ratio, CBD_TM23_RETENTION_EXPONENT)); + return p_RequestedRate * tm23RetentionFraction; } return p_RequestedRate; } @@ -491,22 +435,22 @@ double SpindlerBackend::ApplyEddingtonLimit( /* * Calculate dimensionless orbital angular momentum in the Spindler normalisation * - * double SpindlerOrbitalAngularMomentum(double p_Mass1, - * double p_Mass2, + * double SpindlerOrbitalAngularMomentum(double p_Mass1Fraction, + * double p_Mass2Fraction, * double p_Eccentricity, - * double p_SemiMajorAxis) + * double p_SemiMajorAxisFactor) * - * @param [IN] p_Mass1 Ordered primary mass in Spindler units - * @param [IN] p_Mass2 Ordered secondary mass in Spindler units + * @param [IN] p_Mass1Fraction Ordered primary mass in Spindler units + * @param [IN] p_Mass2Fraction Ordered secondary mass in Spindler units * @param [IN] p_Eccentricity Current eccentricity - * @param [IN] p_SemiMajorAxis Current semi-major axis divided by its initial value + * @param [IN] p_SemiMajorAxisFactor Current semi-major axis divided by its initial value * @return Orbital angular momentum for G = Mtot,0 = a0 = 1 */ -double SpindlerBackend::SpindlerOrbitalAngularMomentum(double p_Mass1, double p_Mass2, double p_Eccentricity, double p_SemiMajorAxis) { - const double totalMass = p_Mass1 + p_Mass2; - const double reducedMass = p_Mass1 * p_Mass2 / totalMass; - const double oneMinusE2 = std::max(1.0 - p_Eccentricity * p_Eccentricity, TINY); - return reducedMass * std::sqrt(totalMass * p_SemiMajorAxis * oneMinusE2); +double SpindlerBackend::SpindlerOrbitalAngularMomentum(double p_Mass1Fraction, double p_Mass2Fraction, double p_Eccentricity, double p_SemiMajorAxisFactor) { + const double totalMassFraction = p_Mass1Fraction + p_Mass2Fraction; + const double reducedMassFraction = p_Mass1Fraction * p_Mass2Fraction / totalMassFraction; + const double oneMinusE2 = std::max(1.0 - p_Eccentricity * p_Eccentricity, std::numeric_limits::min()); + return reducedMassFraction * std::sqrt(totalMassFraction * p_SemiMajorAxisFactor * oneMinusE2); } /* @@ -530,16 +474,16 @@ double SpindlerBackend::SpindlerOrbitalAngularMomentum(double p_Mass1, double p_ * SpindlerEvolutionResult Evolve(const SpindlerEvolutionParams& p_Params) * * @param [IN] p_Params Ordered, dimensionless initial state and model parameters - * @return State reached at the requested duration or mass-threshold crossing + * @return State reached at the requested duration */ SpindlerEvolutionResult SpindlerBackend::Evolve(const SpindlerEvolutionParams& p_Params) { - ValidateCommonInputs(p_Params.q0, p_Params.e0); + ValidateCommonInputs(p_Params.initialMassRatio, p_Params.initialEccentricity); if (utils::Compare(p_Params.suppliedMassFraction, 0.0) < 0 || !std::isfinite(p_Params.suppliedMassFraction)) { throw std::invalid_argument("suppliedMassFraction must be non-negative and finite"); } - if (utils::Compare(p_Params.initialTotalMass, 0.0) <= 0 || !std::isfinite(p_Params.initialTotalMass)) { - throw std::invalid_argument("initialTotalMass must be positive and finite"); + if (utils::Compare(p_Params.initialBinaryMassMsol, 0.0) <= 0 || !std::isfinite(p_Params.initialBinaryMassMsol)) { + throw std::invalid_argument("initialBinaryMassMsol must be positive and finite"); } if (utils::Compare(p_Params.durationYears, 0.0) <= 0 || !std::isfinite(p_Params.durationYears)) { throw std::invalid_argument("duration must be positive and finite"); @@ -552,50 +496,42 @@ SpindlerEvolutionResult SpindlerBackend::Evolve(const SpindlerEvolutionParams& p throw std::invalid_argument("eddingtonGe23Factor must satisfy 0 < f <= 1"); } - if (p_Params.stopComponent != OrderedComponent::NONE && utils::Compare(p_Params.options.aicMassThresholdMsol, 0.0) <= 0) { - throw std::invalid_argument("aicMassThresholdMsol must be positive when stopComponent is set"); - } - - const double stopMassThreshold = p_Params.stopComponent == OrderedComponent::NONE - ? 0.0 - : p_Params.options.aicMassThresholdMsol / p_Params.initialTotalMass; - using StateType = std::vector; - StateType state = {1.0, 1.0 / (1.0 + p_Params.q0), p_Params.q0 / (1.0 + p_Params.q0), p_Params.e0}; + StateType state = {1.0, 1.0 / (1.0 + p_Params.initialMassRatio), p_Params.initialMassRatio / (1.0 + p_Params.initialMassRatio), p_Params.initialEccentricity}; if (utils::Compare(p_Params.suppliedMassFraction, 0.0) == 0) { - return MakeResultFromState(state, 0.0, p_Params.durationYears, p_Params.suppliedMassFraction, false); + return MakeResultFromState(state); } - const double mdotSupply = p_Params.suppliedMassFraction / p_Params.durationYears; + const double supplyRateFractionPerYear = p_Params.suppliedMassFraction / p_Params.durationYears; // Define the ODE derivatives for orbital size, component masses, and // eccentricity under CBD torques plus non-conservative mass loss. - auto system = [this, &p_Params, mdotSupply](const StateType& p_XState, StateType& p_DxDt, const double /*p_Time*/) { + auto system = [this, &p_Params, supplyRateFractionPerYear](const StateType& p_XState, StateType& p_DxDt, const double /*p_Time*/) { p_DxDt.resize(4); - const double aState = p_XState[0]; - const double mass1 = p_XState[1]; - const double mass2 = p_XState[2]; - const double eState = p_XState[3]; + const double semiMajorAxisFactor = p_XState[0]; + const double mass1Fraction = p_XState[1]; + const double mass2Fraction = p_XState[2]; + const double eccentricity = p_XState[3]; - if (utils::Compare(aState, 0.0) <= 0 || utils::Compare(mass1, 0.0) <= 0 || utils::Compare(mass2, 0.0) <= 0) { + if (utils::Compare(semiMajorAxisFactor, 0.0) <= 0 || utils::Compare(mass1Fraction, 0.0) <= 0 || utils::Compare(mass2Fraction, 0.0) <= 0) { throw std::runtime_error("Non-positive a, M1, or M2 encountered during Spindler integration"); } - const double totalMass = mass1 + mass2; - const double qState = mass2 / mass1; - const double orbitalAngularMomentum = SpindlerOrbitalAngularMomentum(mass1, mass2, eState, aState); + const double totalMassFraction = mass1Fraction + mass2Fraction; + const double massRatio = mass2Fraction / mass1Fraction; + const double orbitalAngularMomentum = SpindlerOrbitalAngularMomentum(mass1Fraction, mass2Fraction, eccentricity, semiMajorAxisFactor); const double mdotEdd1 = ComputeEddingtonRate( - p_Params.stellarType1, mass1, p_Params.initialTotalMass, p_Params.radius1 + p_Params.stellarType1, mass1Fraction, p_Params.initialBinaryMassMsol, p_Params.radius1Rsol ); const double mdotEdd2 = ComputeEddingtonRate( - p_Params.stellarType2, mass2, p_Params.initialTotalMass, p_Params.radius2 + p_Params.stellarType2, mass2Fraction, p_Params.initialBinaryMassMsol, p_Params.radius2Rsol ); - const auto fractions = ComponentMassFractions(qState, eState); - const double mdotReq1 = fractions.first * mdotSupply; - const double mdotReq2 = fractions.second * mdotSupply; + const auto componentMassFractions = ComponentMassFractions(massRatio, eccentricity); + const double mdotReq1 = componentMassFractions.first * supplyRateFractionPerYear; + const double mdotReq2 = componentMassFractions.second * supplyRateFractionPerYear; const double mdotAcc1 = ApplyEddingtonLimit( mdotReq1, @@ -616,15 +552,15 @@ SpindlerEvolutionResult SpindlerBackend::Evolve(const SpindlerEvolutionParams& p // The Spindler tables give the CBD-driven response per unit supplied mass // through the disk/binary interaction. - const auto d = DerivativesForLabeledQ(qState, eState); - const double dadtDisk = d.Da * aState * mdotSupply / totalMass; - const double dedt = d.De * eState * mdotSupply / totalMass; + const auto derivatives = DerivativesForLabeledQ(massRatio, eccentricity); + const double dadtDisk = derivatives.da * semiMajorAxisFactor * supplyRateFractionPerYear / totalMassFraction; + const double dedt = derivatives.de * eccentricity * supplyRateFractionPerYear / totalMassFraction; - const double jBinary = orbitalAngularMomentum / totalMass; - const double j1 = qState * jBinary; - const double j2 = jBinary / qState; + const double jBinary = orbitalAngularMomentum / totalMassFraction; + const double j1 = massRatio * jBinary; + const double j2 = jBinary / massRatio; const double dJdtWind = -(j1 * mdotLost1 + j2 * mdotLost2); - const double dadtWind = utils::Compare(orbitalAngularMomentum, 0.0) > 0 ? 2.0 * aState * dJdtWind / orbitalAngularMomentum : 0.0; + const double dadtWind = utils::Compare(orbitalAngularMomentum, 0.0) > 0 ? 2.0 * semiMajorAxisFactor * dJdtWind / orbitalAngularMomentum : 0.0; p_DxDt[0] = dadtDisk + dadtWind; p_DxDt[1] = mdotAcc1; @@ -633,20 +569,14 @@ SpindlerEvolutionResult SpindlerBackend::Evolve(const SpindlerEvolutionParams& p }; auto stepper = odeint::make_controlled( - SPINDLER_ODE_ATOL, - SPINDLER_ODE_RTOL, + CBD_SPINDLER_ODE_ABSOLUTE_TOLERANCE, + CBD_SPINDLER_ODE_RELATIVE_TOLERANCE, odeint::runge_kutta_cash_karp54() ); double time = 0.0; double dt = std::max(p_Params.durationYears / 1000.0, 1.0e-8); - const bool stopOnMassThreshold = p_Params.stopComponent != OrderedComponent::NONE; - const double initialTargetMass = SelectedComponentMass(state, p_Params.stopComponent); - if (stopOnMassThreshold && utils::Compare(initialTargetMass, stopMassThreshold) >= 0) { - return MakeResultFromState(state, 0.0, p_Params.durationYears, p_Params.suppliedMassFraction, true); - } - // Deliberately use strict comparisons here rather than utils::Compare(): // the ODE controller must advance to, and clip exactly at, the requested // endpoint instead of treating a nearby time as equivalent. @@ -655,85 +585,13 @@ SpindlerEvolutionResult SpindlerBackend::Evolve(const SpindlerEvolutionParams& p dt = p_Params.durationYears - time; } - const StateType stateBeforeStep = state; - const double timeBeforeStep = time; - const double targetBeforeStep = SelectedComponentMass(stateBeforeStep, p_Params.stopComponent); - boost::numeric::odeint::controlled_step_result stepResult; do { stepResult = stepper.try_step(system, state, time, dt); } while (stepResult == boost::numeric::odeint::fail); - - if (stopOnMassThreshold) { - const double targetAfterStep = SelectedComponentMass(state, p_Params.stopComponent); - // Deliberately use strict comparisons here rather than utils::Compare(): - // this is a sign-change bracket for interpolation to the AIC mass - // crossing; tolerance-based equality can erase the bracket. - if (targetBeforeStep < stopMassThreshold && targetAfterStep >= stopMassThreshold) { - // Event-style AIC handling: do a refined integration to the - // mass-threshold crossing and return that intermediate state to - // COMPAS, rather than evolving past the stellar-type change. - const double fraction = (stopMassThreshold - targetBeforeStep) / (targetAfterStep - targetBeforeStep); - const double crossingTime = timeBeforeStep + fraction * (time - timeBeforeStep); - StateType crossingState = stateBeforeStep; - double crossingIntegrationTime = timeBeforeStep; - double crossingDt = std::max((crossingTime - timeBeforeStep) / 10.0, 1.0e-10); - auto crossingStepper = odeint::make_controlled( - SPINDLER_ODE_ATOL, - SPINDLER_ODE_RTOL, - odeint::runge_kutta_cash_karp54() - ); - odeint::integrate_adaptive( - crossingStepper, - system, - crossingState, - crossingIntegrationTime, - crossingTime, - crossingDt - ); - return MakeResultFromState( - crossingState, - crossingTime, - p_Params.durationYears, - p_Params.suppliedMassFraction, - true - ); - } - } - } - - return MakeResultFromState(state, p_Params.durationYears, p_Params.durationYears, p_Params.suppliedMassFraction, false); -} - -/* - * Map a COMPAS-labelled AIC target onto the ordered Spindler component label - * - * Spindler orders the components by initial mass so that q = M2/M1 <= 1, - * whereas the public CBD interface preserves the original COMPAS star labels. - * The mass ordering matters here only because it determines whether those labels - * were swapped during translation; the AIC criterion itself is not mass-order dependent. - * - * OrderedComponent AicTargetStarToOrderedComponent(const CircumbinaryDisk::StarLabel p_AicTargetStar, - * const bool p_ComponentsSwapped) - * - * @param [IN] p_AicTargetStar COMPAS-labelled component to monitor for AIC - * @param [IN] p_ComponentsSwapped Whether COMPAS star labels were swapped to obtain Spindler ordering - * @return Ordered component monitored by the ODE, or NONE - */ -OrderedComponent AicTargetStarToOrderedComponent( - const CircumbinaryDisk::StarLabel p_AicTargetStar, - const bool p_ComponentsSwapped -) { - switch (p_AicTargetStar) { - case CircumbinaryDisk::StarLabel::NONE: - return OrderedComponent::NONE; - case CircumbinaryDisk::StarLabel::STAR_1: - return p_ComponentsSwapped ? OrderedComponent::SECONDARY : OrderedComponent::PRIMARY; - case CircumbinaryDisk::StarLabel::STAR_2: - return p_ComponentsSwapped ? OrderedComponent::PRIMARY : OrderedComponent::SECONDARY; } - return OrderedComponent::NONE; + return MakeResultFromState(state); } /* @@ -744,47 +602,40 @@ OrderedComponent AicTargetStarToOrderedComponent( * * @param [IN] p_Input COMPAS-labelled physical input for one binary-CBD interaction segment * @param [IN] p_Spindler Initialised Spindler table backend - * @return Final COMPAS-labelled state and optional AIC-stop metadata + * @return Final COMPAS-labelled state after the requested increment */ CircumbinaryDisk::EvolutionTrack EvolveTrackWithBackend( const CircumbinaryDisk::EvolutionInput& p_Input, SpindlerBackend& p_Spindler ) { - const double binaryMass = p_Input.mass1Msol + p_Input.mass2Msol; + const double binaryMassMsol = p_Input.mass1Msol + p_Input.mass2Msol; const bool componentsSwapped = utils::Compare(p_Input.mass1Msol, p_Input.mass2Msol) < 0; - const double primaryMass = componentsSwapped ? p_Input.mass2Msol : p_Input.mass1Msol; - const double secondaryMass = componentsSwapped ? p_Input.mass1Msol : p_Input.mass2Msol; + const double primaryMassMsol = componentsSwapped ? p_Input.mass2Msol : p_Input.mass1Msol; + const double secondaryMassMsol = componentsSwapped ? p_Input.mass1Msol : p_Input.mass2Msol; // Convert the public COMPAS-labelled, physical-unit input into the ordered, // dimensionless variables expected by the Spindler ODE. componentsSwapped - // records whether this translation exchanged the COMPAS labels; it is used - // both to map the AIC target into ODE coordinates and to restore output labels. + // records whether this translation exchanged the COMPAS labels, so the + // output can be mapped back to the original star ordering. SpindlerEvolutionParams params{}; - params.suppliedMassFraction = p_Input.suppliedMassMsol / binaryMass; - params.q0 = secondaryMass / primaryMass; - params.e0 = p_Input.eccentricity; - params.initialTotalMass = binaryMass; + params.suppliedMassFraction = p_Input.suppliedMassMsol / binaryMassMsol; + params.initialMassRatio = secondaryMassMsol / primaryMassMsol; + params.initialEccentricity = p_Input.eccentricity; + params.initialBinaryMassMsol = binaryMassMsol; params.durationYears = p_Input.durationYears; params.stellarType1 = componentsSwapped ? p_Input.stellarType2 : p_Input.stellarType1; params.stellarType2 = componentsSwapped ? p_Input.stellarType1 : p_Input.stellarType2; - params.radius1 = componentsSwapped ? p_Input.radius2Rsol : p_Input.radius1Rsol; - params.radius2 = componentsSwapped ? p_Input.radius1Rsol : p_Input.radius2Rsol; + params.radius1Rsol = componentsSwapped ? p_Input.radius2Rsol : p_Input.radius1Rsol; + params.radius2Rsol = componentsSwapped ? p_Input.radius1Rsol : p_Input.radius2Rsol; params.options = p_Input.options; - params.stopComponent = AicTargetStarToOrderedComponent(p_Input.aicTargetStar, componentsSwapped); const SpindlerEvolutionResult spindlerResult{p_Spindler.Evolve(params)}; CircumbinaryDisk::EvolutionTrack track{}; track.semiMajorAxisFactor = spindlerResult.semiMajorAxisFactor; track.eccentricity = spindlerResult.eccentricity; - track.mass1Msol = (componentsSwapped ? spindlerResult.mass2 : spindlerResult.mass1) * binaryMass; - track.mass2Msol = (componentsSwapped ? spindlerResult.mass1 : spindlerResult.mass2) * binaryMass; - - if (spindlerResult.stoppedAtMassThreshold) { - track.aicOccurred = true; - track.elapsedTimeYears = spindlerResult.elapsedTimeYears; - track.suppliedMassMsol = spindlerResult.suppliedMassFractionUsed * binaryMass; - } + track.mass1Msol = (componentsSwapped ? spindlerResult.mass2Fraction : spindlerResult.mass1Fraction) * binaryMassMsol; + track.mass2Msol = (componentsSwapped ? spindlerResult.mass1Fraction : spindlerResult.mass2Fraction) * binaryMassMsol; return track; } @@ -804,10 +655,10 @@ namespace CircumbinaryDisk { * EvolutionTrack EvolveTrack(const EvolutionInput& p_Input) * * @param [IN] p_Input COMPAS-labelled physical input; per-call supplied mass is assumed to be << binary mass - * @return Final COMPAS-labelled state and optional AIC-stop metadata + * @return Final COMPAS-labelled state after the requested increment */ EvolutionTrack EvolveTrack(const EvolutionInput& p_Input) { - static SpindlerBackend spindler{"Siwek23"}; + static SpindlerBackend spindler{CBD_SPINDLER_MODEL_NAME}; return EvolveTrackWithBackend(p_Input, spindler); } diff --git a/src/CircumbinaryDiskFormation.cpp b/src/CircumbinaryDiskFormation.cpp index 9fca4fad0..a319991b5 100644 --- a/src/CircumbinaryDiskFormation.cpp +++ b/src/CircumbinaryDiskFormation.cpp @@ -6,54 +6,6 @@ #include -namespace { - -// File-local helpers for the Spindler-independent CBD formation criterion. -// These are deliberately kept out of the public CircumbinaryDisk namespace: -// the rest of COMPAS should see only the explicit input/result structs and -// EvaluateFormation(), not the implementation details of the available-AM -// estimate or the legacy synchronized-envelope comparison path. - -constexpr double SYNCHRONIZED_ENVELOPE_INERTIA_COEFFICIENT = 0.2; - -/* - * Calculate the legacy synchronized-envelope estimate of the available angular momentum - * - * The estimate assumes the donor envelope is synchronized with the pre-RLOF - * orbit and adds the envelope spin angular momentum to the pre-RLOF orbital - * angular momentum. The default formation path instead uses COMPAS's stored - * total pre-RLOF binary angular momentum. - * - * double SynchronizedEnvelopeAngularMomentumEstimate(const CircumbinaryDisk::FormationInput& p_Input, - * const double p_AvailableMassMsol) - * - * @param [IN] p_Input Physical state and model options for the formation criterion - * @param [IN] p_AvailableMassMsol Total binary mass lost during CE and available to the CBD model (Msol) - * @return Available angular momentum (Msol AU^2 yr^-1) - */ -double SynchronizedEnvelopeAngularMomentumEstimate(const CircumbinaryDisk::FormationInput& p_Input, const double p_AvailableMassMsol) { - const double totalMassPreRLOF = p_Input.binaryMassPreCEMsol; - const double reducedMassPreRLOF = p_Input.channel.reducedMassPreCEMsol; - const double semiMajorAxisPreRLOFAU = p_Input.semiMajorAxisPreRLOFRsol * RSOL_TO_AU; - const double envelopeDonorRadiusPreCEAU = p_Input.channel.envelopeDonorRadiusPreCERsol * RSOL_TO_AU; - const double angularVelocityPreRLOF = std::sqrt(G_AU_Msol_yr * totalMassPreRLOF / - std::pow(semiMajorAxisPreRLOFAU, 3)); - const double envelopeMomentOfInertia = SYNCHRONIZED_ENVELOPE_INERTIA_COEFFICIENT * - p_AvailableMassMsol * - envelopeDonorRadiusPreCEAU * - envelopeDonorRadiusPreCEAU; - const double envelopeSpinAngularMomentum = angularVelocityPreRLOF * envelopeMomentOfInertia; - const double orbitalAngularMomentumPreRLOF = reducedMassPreRLOF * - std::sqrt(G_AU_Msol_yr * - totalMassPreRLOF * - semiMajorAxisPreRLOFAU * - (1.0 - p_Input.eccentricityPreRLOF * p_Input.eccentricityPreRLOF)); - - return orbitalAngularMomentumPreRLOF + envelopeSpinAngularMomentum; -} - -} // namespace - namespace CircumbinaryDisk { @@ -66,7 +18,6 @@ namespace CircumbinaryDisk { */ FormationOptions MakeFormationOptionsFromCompasOptions() { return { - OPTIONS->CircumbinaryDiskUseSynchronizedEnvelopeAngularMomentum(), OPTIONS->CircumbinaryDiskBeta(), OPTIONS->CircumbinaryDiskEnvelopeMassFractionSupplied(), OPTIONS->CircumbinaryDiskStructureFactor(), @@ -85,8 +36,7 @@ EvolutionOptions MakeEvolutionOptionsFromCompasOptions() { return { OPTIONS->CircumbinaryDiskEddingtonMode(), OPTIONS->CircumbinaryDiskEddingtonCapFactor(), - OPTIONS->CircumbinaryDiskEddingtonGe23Factor(), - MCH + OPTIONS->CircumbinaryDiskEddingtonGe23Factor() }; } @@ -108,34 +58,27 @@ bool SupernovaEventsDisruptDisk(const SN_EVENT p_Events) { /* * Determine whether a CE has the supported compact-object plus envelope-donor geometry * - * CommonEnvelopeChannel MakeCommonEnvelopeChannel(const STELLAR_TYPE p_StellarType1PreCE, - * const STELLAR_TYPE p_StellarType2PreCE, - * const double p_Mass1PreCE, - * const double p_Mass2PreCE, - * const double p_Radius1PreCERsol, - * const double p_Radius2PreCERsol, - * const bool p_EnvelopeFlag1, - * const bool p_EnvelopeFlag2) + * bool IsSupportedCommonEnvelopeChannel(const STELLAR_TYPE p_StellarType1PreCE, + * const STELLAR_TYPE p_StellarType2PreCE, + * const double p_Mass1PreCE, + * const double p_Mass2PreCE, + * const bool p_EnvelopeFlag1, + * const bool p_EnvelopeFlag2) * * @param [IN] p_StellarType1PreCE Stellar type of star 1 immediately before CE * @param [IN] p_StellarType2PreCE Stellar type of star 2 immediately before CE * @param [IN] p_Mass1PreCE Mass of star 1 immediately before CE (Msol) * @param [IN] p_Mass2PreCE Mass of star 2 immediately before CE (Msol) - * @param [IN] p_Radius1PreCERsol Radius of star 1 immediately before CE (Rsol) - * @param [IN] p_Radius2PreCERsol Radius of star 2 immediately before CE (Rsol) * @param [IN] p_EnvelopeFlag1 Whether star 1 has an envelope immediately before CE * @param [IN] p_EnvelopeFlag2 Whether star 2 has an envelope immediately before CE - * @return Current channel support, pre-CE reduced mass, and donor radius for the synchronized-envelope option + * @return Whether the CE channel is supported */ -CommonEnvelopeChannel MakeCommonEnvelopeChannel(const STELLAR_TYPE p_StellarType1PreCE, - const STELLAR_TYPE p_StellarType2PreCE, - const double p_Mass1PreCE, - const double p_Mass2PreCE, - const double p_Radius1PreCERsol, - const double p_Radius2PreCERsol, - const bool p_EnvelopeFlag1, - const bool p_EnvelopeFlag2) { - CommonEnvelopeChannel channel{}; +bool IsSupportedCommonEnvelopeChannel(const STELLAR_TYPE p_StellarType1PreCE, + const STELLAR_TYPE p_StellarType2PreCE, + const double p_Mass1PreCE, + const double p_Mass2PreCE, + const bool p_EnvelopeFlag1, + const bool p_EnvelopeFlag2) { const STELLAR_TYPE_LIST supportedCompactObjects = { STELLAR_TYPE::HELIUM_WHITE_DWARF, @@ -147,24 +90,17 @@ CommonEnvelopeChannel MakeCommonEnvelopeChannel(const STELLAR_TYPE p_StellarType const bool star1IsCompactObject = utils::IsOneOf(p_StellarType1PreCE, supportedCompactObjects); const bool star2IsCompactObject = utils::IsOneOf(p_StellarType2PreCE, supportedCompactObjects); - if (star1IsCompactObject && p_EnvelopeFlag2 && !p_EnvelopeFlag1) { - channel.envelopeDonorRadiusPreCERsol = p_Radius2PreCERsol; - } - else if (star2IsCompactObject && p_EnvelopeFlag1 && !p_EnvelopeFlag2) { - channel.envelopeDonorRadiusPreCERsol = p_Radius1PreCERsol; - } - else { - return channel; + if (!((star1IsCompactObject && p_EnvelopeFlag2 && !p_EnvelopeFlag1) || + (star2IsCompactObject && p_EnvelopeFlag1 && !p_EnvelopeFlag2))) { + return false; } const double binaryMassPreCEMsol = p_Mass1PreCE + p_Mass2PreCE; if (utils::Compare(binaryMassPreCEMsol, 0.0) <= 0) { - return channel; + return false; } - channel.supported = true; - channel.reducedMassPreCEMsol = (p_Mass1PreCE * p_Mass2PreCE) / binaryMassPreCEMsol; - return channel; + return true; } /* @@ -187,37 +123,35 @@ CommonEnvelopeChannel MakeCommonEnvelopeChannel(const STELLAR_TYPE p_StellarType FormationResult EvaluateFormation(const FormationInput& p_Input) { FormationResult result{}; - const double availableMassMsol = p_Input.binaryMassPreCEMsol - p_Input.binaryMassPostCEMsol; - if (utils::Compare(availableMassMsol, 0.0) <= 0 || utils::Compare(p_Input.semiMajorAxisPreRLOFRsol, 0.0) <= 0) { + const double massLostDuringCEMsol = p_Input.binaryMassPreCEMsol - p_Input.binaryMassPostCEMsol; + if (utils::Compare(massLostDuringCEMsol, 0.0) <= 0 || utils::Compare(p_Input.semiMajorAxisPreRLOFRsol, 0.0) <= 0) { return result; } - result.suppliedMassMsol = p_Input.options.envelopeMassFractionSupplied * availableMassMsol; - if (utils::Compare(result.suppliedMassMsol, 0.0) <= 0) { + result.initialReservoirMassMsol = p_Input.options.envelopeMassFractionSupplied * massLostDuringCEMsol; + if (utils::Compare(result.initialReservoirMassMsol, 0.0) <= 0) { return result; } - const double availableAngularMomentum = p_Input.options.useSynchronizedEnvelopeAngularMomentum - ? SynchronizedEnvelopeAngularMomentumEstimate(p_Input, availableMassMsol) - : p_Input.totalAngularMomentumPreRLOF; + const double totalAngularMomentumPreRLOF = p_Input.totalAngularMomentumPreRLOF; // beta = fJ/fM, so the angular momentum assigned to the supplied CBD // reservoir is J_CBD = beta * fM * J_available. - const double diskAngularMomentum = p_Input.options.circumbinaryDiskBeta * - p_Input.options.envelopeMassFractionSupplied * - availableAngularMomentum; + const double suppliedDiskAngularMomentum = p_Input.options.circumbinaryDiskBeta * + p_Input.options.envelopeMassFractionSupplied * + totalAngularMomentumPreRLOF; // The adopted inner CBD radius scales with the post-CE separation because // the disk is assumed to orbit the post-CE binary, not the // larger pre-CE orbit. Formation is allowed when the assigned angular // momentum meets or exceeds the threshold. - const double innerDiskRadiusAU = p_Input.options.innerDiskRadiusOverSeparation * p_Input.semiMajorAxisPostCERsol * RSOL_TO_AU; - const double thresholdAngularMomentum = result.suppliedMassMsol * - p_Input.options.diskStructureAngularMomentumFactor * - std::sqrt(G_AU_Msol_yr * - p_Input.binaryMassPostCEMsol * - innerDiskRadiusAU); - - result.forms = utils::Compare(diskAngularMomentum, thresholdAngularMomentum) >= 0; + const double diskInnerRadiusAU = p_Input.options.diskInnerRadiusOverSeparation * p_Input.semiMajorAxisPostCERsol * RSOL_TO_AU; + const double minimumDiskAngularMomentum = result.initialReservoirMassMsol * + p_Input.options.diskStructureFactor * + std::sqrt(G_AU_Msol_yr * + p_Input.binaryMassPostCEMsol * + diskInnerRadiusAU); + + result.forms = utils::Compare(suppliedDiskAngularMomentum, minimumDiskAngularMomentum) >= 0; return result; } diff --git a/src/EnumHash.h b/src/EnumHash.h index 47f7a8aaf..559991006 100644 --- a/src/EnumHash.h +++ b/src/EnumHash.h @@ -1,26 +1,26 @@ -#ifndef __EnumHash_h__ -#define __EnumHash_h__ - -// functor object to calculate hash for enum class -// note: this was written because c++11 didn't allow the use of enum hashes, -// but I believe it was considered a defect and has been fixed in c++14 -// check http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2148 -// we may be able to remove this -struct EnumClassHash -{ - template - std::size_t operator()(T t) const - { - return static_cast(t); - } -}; - -template -using HashType = typename std::conditional::value, EnumClassHash, std::hash>::type; - -// type alias for unordered map with enum hash -template -using COMPASUnorderedMap = std::unordered_map>; - - -#endif // __EnumHash_h__ +#ifndef __EnumHash_h__ +#define __EnumHash_h__ + +// functor object to calculate hash for enum class +// note: this was written because c++11 didn't allow the use of enum hashes, +// but I believe it was considered a defect and has been fixed in c++14 +// check http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2148 +// we may be able to remove this +struct EnumClassHash +{ + template + std::size_t operator()(T t) const + { + return static_cast(t); + } +}; + +template +using HashType = typename std::conditional::value, EnumClassHash, std::hash>::type; + +// type alias for unordered map with enum hash +template +using COMPASUnorderedMap = std::unordered_map>; + + +#endif // __EnumHash_h__ diff --git a/src/ErrorCatalog.h b/src/ErrorCatalog.h index 8a28a7c06..6cbd0417b 100644 --- a/src/ErrorCatalog.h +++ b/src/ErrorCatalog.h @@ -1,387 +1,387 @@ -#ifndef __ErrorCatalog_h__ -#define __ErrorCatalog_h__ - - -// This is the COMPAS error catalogue. The error catalogue defines symbolic names for all COMPAS errors, -// and corresponding error strings for those errors. -// -// To add a new error, add the symbolic name to the ERROR enum class, and the corresponding error string -// to the ERROR_CATALOG map. -// -// The key to the ERROR_CATALOG map is the symbolic name in the ERROR enum class. The map entry is a -// tuple containing the ERROR_SCOPE associated with the error (see below), and the error string. - -#include "constants.h" -#include "EnumHash.h" - -#define ERR_MSG(x) std::get<1>(ERROR_CATALOG.at(x)) // for convenience - - -// The ERROR_SCOPE enum class, defined below, allows developers to specify when, if at all, a particular -// error/warning should be displayed by the SHOW_WARN* and SHOW_ERROR* macros defined in ErrorsMacros.h -// (and by the ERRORS-SHowIt() function defined in Errors.h, which is used by the aforementioned macros): -// -// NEVER : the error/warning should never be displayed -// ALWAYS : the error/warning should always be displayed -// FIRST : the error/warning should only be displayed the first time it is encountered -// FIRST_IN_FUNCTION : the error/warning should only be displayed the first time it is encountered for a function -// FIRST_IN_STELLAR_TYPE: the error/warning should only be displayed the first time it is encountered for a stellar type (see enum class STELLAR_TYPE in typedefs.h) -// FIRST_IN_OBJECT_TYPE : the error/warning should only be displayed the first time it is encountered for an object type (see enum class OBJECT_TYPE in typedefs.h) -// FIRST_IN_OBJECT_ID : the error/warning should only be displayed the first time it is encountered for an object id (each object is assigned a unique object id - e.g. a star or binary, each constituent star of a binary) -// -// The THROW_ERROR* macros defined in ErrorsMacros.h are not affected by ERROR_SCOPE - -enum class ERROR_SCOPE: int { NEVER, ALWAYS, FIRST, FIRST_IN_FUNCTION, FIRST_IN_STELLAR_TYPE, FIRST_IN_OBJECT_TYPE, FIRST_IN_OBJECT_ID }; - - -// enum class ERROR -// Symbolic names for errors and warnings (error strings below in ERRORLabel map) -// Listed alphabetically (except for 'NONE' - first so ERROR = 0 = NONE) -enum class ERROR: int { - NONE, // no error - ADDED_EXCESS_AM_TO_STARS, // attempted to add more angular momentum to stars than was available in a binary - AMBIGUOUS_REMNANT_MASS_PRESCRIPTION, // remnant mass unclear from available parameters - ARGUMENT_RANGE_COUNT_EXPECTED_ULINT, // expected an unsigned long integer for range count for option - ARGUMENT_RANGE_NOT_SUPPORTED, // argument range not supported for option - ARGUMENT_RANGE_NUM_PARMS, // argument range requires exactly three parameters - ARGUMENT_RANGE_PARMS_EXPECTED_FP, // expected a floating point number for range start and increment for option - ARGUMENT_RANGE_PARMS_EXPECTED_INT, // expected an integer for range parameters for option - ARGUMENT_RANGE_PARMS_EXPECTED_LFP, // expected a long double number for range start and increment for option - ARGUMENT_RANGE_PARMS_EXPECTED_LINT, // expected an long integer for range parameters for option - ARGUMENT_RANGE_PARMS_EXPECTED_ULINT, // expected an unsigned long integer for range parameters for option - ARGUMENT_SET_EXPECTED_BOOL, // all parameters of argument set must be boolean for option - ARGUMENT_SET_EXPECTED_NUMERIC, // all parameters of argument set must be numeric for option - ARGUMENT_SET_NOT_SUPPORTED, // argument set not supported for option - BAD_LOGFILE_RECORD_SPECIFICATIONS, // error in logfile record specifications - BINARY_EVOLUTION_STOPPED, // evolution of current binary stopped - BINARY_SIMULATION_STOPPED, // binary simulation stopped - BOOST_OPTION_CMDLINE, // failed to initialise Boost options descriptions for commandline options - BOOST_OPTION_GRIDLINE, // failed to initialise Boost options descriptions for grid line options - BOOST_OPTION_INTERNAL_ERROR, // Boost option internal error - DIRECTORY_NOT_EMPTY, // Directory not empty - EMPTY_FILE, // file is empty (contains no content) - EMPTY_FILENAME, // filename is an empty string - ERROR, // unspecified error - ERROR_PROCESSING_CMDLINE_OPTIONS, // an error occurred while processing commandline options - ERROR_PROCESSING_GRIDLINE_OPTIONS, // an error occurred while processing grid file options - EXPECTED_3D_VECTOR, // expected a vector of size 3 - EXPECTED_ASSIGNMENT_OPERATOR, // expected assignment operator - EXPECTED_BINARY_PROPERTY, // expected a binary property (STAR_1_, STAR_2_, SUPERNOVA_, COMPANION_, or BINARY_PROPERTY) - EXPECTED_COMMA_OR_CLOSE_BRACE, // expected a comma or close brace - EXPECTED_INTEGER, // expected an integer - EXPECTED_LOGFILE_RECORD_NAME, // expected logfile record name - EXPECTED_NON_NEGATIVE_INTEGER, // expected a non-negative integer - EXPECTED_OPEN_BRACE, // expected an open brace - EXPECTED_POSITIVE_INTEGER, // expected a positive integer - EXPECTED_PROPERTY_SPECIFIER, // expected a valid property specifier - EXPECTED_SN_EVENT, // expected a supernova event - EXPECTED_STELLAR_PROPERTY, // expected a stellar property (STAR_PROPERTY) - FILE_DOES_NOT_EXIST, // file does not exist - FILE_NOT_CLOSED, // error closing file - file not closed - FILE_OPEN_ERROR, // error opening file - FILE_READ_ERROR, // error reading from file - data not read - FILE_WRITE_ERROR, // error writing to file - data not written - FLOATING_POINT_ERROR, // unspecified floating-point error - FLOATING_POINT_DIVBYZERO, // floating-point divide-by-zero - FLOATING_POINT_INVALID_ARGUMENT, // floating-point invalid - FLOATING_POINT_OVERFLOW, // floating-point overflow - FLOATING_POINT_UNDERFLOW, // floating-point underflow - GRID_OPTIONS_ERROR, // grid file options error - HIGH_TEFF_WINDS, // winds being used at high temperature - INDEX_OUT_OF_RANGE, // index supplied is out of range - INVALID_DATA_TYPE, // invalid data type - INVALID_INITIAL_ATTRIBUTES, // initial values of stellar or binary attributes are not valid - can't evolve star or binary - INVALID_MASS_TRANSFER_DONOR, // mass transfer from NS, BH or Massless Remnant - INVALID_TYPE_EDDINGTON_RATE, // invalid stellar type for Eddington critical rate calculation - INVALID_TYPE_MT_MASS_RATIO, // invalid stellar type for mass ratio calculation - INVALID_TYPE_MT_THERMAL_TIMESCALE, // invalid stellar type for thermal timescale calculation - INVALID_TYPE_ZETA_CALCULATION, // invalid stellar type for Zeta calculation - INVALID_VALUE_FOR_BOOLEAN_OPTION, // invalid value specified for boolean option - INVALID_VALUE_IN_FILE, // invalid value in file - LAMBDA_NOT_POSITIVE, // lambda is <= 0.0 - invalid - LOW_GAMMA, // very massive mass-loss prescription being extrapolated to low gamma (<0.5) - LOW_TEFF_WINDS, // winds being used at low temperature - MAXIMUM_MASS_LOST, // (WARNING) maximum mass lost during mass loss calculations - MISSING_VALUE, // missing value (e.g. for program option) - MISSING_RIGHT_BRACKET, // missing right bracket (e.g. for program option range or set specification) - NO_CONVERGENCE, // iterative process did not converge - NO_LAMBDA_DEWI, // Dewi lambda calculation not supported for stellar type - NO_LAMBDA_NANJING, // Nanjing lambda calculation not supported for stellar type - NO_REAL_ROOTS, // equation has no real roots - NO_TIMESTEPS_READ, // no user timesteps read - NOT_INITIALISED, // object not initialised - OPTION_NOT_SUPPORTED_IN_GRID_FILE, // option not supported in grid file - OUT_OF_BOUNDS, // value out of bounds - PROGRAM_OPTIONS_ERROR, // program options error - RADIUS_NOT_POSITIVE, // radius is <= 0.0 - invalid - REVERT_FAILED, // revert to previous state failed - ROOT_FINDER_FAILED, // root finder threw an exception - STELLAR_EVOLUTION_STOPPED, // evolution of current star stopped - STELLAR_SIMULATION_STOPPED, // stellar simulation stopped - STEPS_UP, // allowed evolution timesteps exceeded - SWITCH_NOT_TAKEN, // switch to new stellar type not performed - TIMESTEP_BELOW_MINIMUM, // timestep too small - below minimum - TIMESTEPS_EXHAUSTED, // timesteps provided exhausted, but evolution not complete - TIMESTEPS_NOT_CONSUMED, // evolution complete, but provided timesteps not consumed - TIMES_UP, // allowed evolution time exceeded - TOO_MANY_MASS0_ITERATIONS, // too many iterations in MASS0 root finder - TOO_MANY_MASS0_TRIES, // too many tries in MASS0 root finder - TOO_MANY_OMEGA_ITERATIONS, // too many iterations in OMEGA root finder - TOO_MANY_OMEGA_TRIES, // too many tries in OMEGA root finder - TOO_MANY_PULSAR_SPIN_ITERATIONS, // too many iterations calculating the pulsar birth spin period - TOO_MANY_PULSAR_MAG_ITERATIONS, // too many iterations calculating the pulsar birth magnetic field - TOO_MANY_RETRIES, // generic too many retries - TOO_MANY_RLOF_ITERATIONS, // too many iterations in RLOF root finder - TOO_MANY_RLOF_TRIES, // too many tries in RLOF root finder - TOO_MANY_RV_ITERATIONS, // too many iterations in rotational velocity root finder - TOO_MANY_RV_TRIES, // too many tries in rotational velocity root finder - TOO_MANY_TIMESTEPS_IN_TIMESTEPS_FILE, // too many timesteps in timesteps file (exceeds maximum) - UNABLE_TO_CREATE_DIRECTORY, // unable to create directory - UNABLE_TO_REMOVE_DIRECTORY, // unable to remove directory - UNEXPECTED_ACCRETION_REGIME, // unexpected accretion regime - UNEXPECTED_BINARY_PROPERTY, // unexpected binary property - UNEXPECTED_BINARY_PROPERTY_TYPE, // unexpected binary property type - UNEXPECTED_END_OF_FILE, // unexpected end of file - UNEXPECTED_LOG_FILE_TYPE, // unexpected log file type - UNEXPECTED_PROGRAM_OPTION, // unexpected program option - UNEXPECTED_PROPERTY, // unexpected property - UNEXPECTED_PROPERTY_TYPE, // unexpected property type - UNEXPECTED_ROOT_FINDER_FAILURE, // unexpected root finder failure - UNEXPECTED_SN_EVENT, // unexpected supernova event in this context - UNEXPECTED_STELLAR_PROPERTY, // unexpected stellar property - UNEXPECTED_STELLAR_PROPERTY_TYPE, // unexpected stellar property type - UNEXPECTED_STELLAR_TYPE, // unexpected stellar type - UNHANDLED_EXCEPTION, // unhandled exception - UNKNOWN_A_DISTRIBUTION, // unknown a-distribution - UNKNOWN_ACCRETION_REGIME, // unknown accretion regime - UNKNOWN_BH_KICK_MODE, // unknown black hole kick mode - UNKNOWN_BINARY_PROPERTY, // unknown binary property - UNKNOWN_CASE_BB_STABILITY_PRESCRIPTION, // unknown case BB/BC mass transfer stability prescription - UNKNOWN_CE_ACCRETION_PRESCRIPTION, // unknown common envelope accretion prescription - UNKNOWN_CE_FORMALISM, // unknown common envelope formalism - UNKNOWN_CE_LAMBDA_PRESCRIPTION, // unknown common envelope Lambda prescription - UNKNOWN_DATA_TYPE, // unknown data type - UNKNOWN_ENVELOPE_STATE_PRESCRIPTION, // unknown envelope state prescription - UNKNOWN_ENVELOPE_TYPE, // unknown envelope type - UNKNOWN_INITIAL_MASS_FUNCTION, // unknown initial mass function - UNKNOWN_KICK_DIRECTION_DISTRIBUTION, // unknown kick direction distribution - UNKNOWN_KICK_MAGNITUDE_DISTRIBUTION, // unknown kick magnitude distribution - UNKNOWN_LOGFILE, // unknown log file - UNKNOWN_LBV_MASS_LOSS_PRESCRIPTION, // unknown LBV mass loss prescription - UNKNOWN_MALTSEV_MODE, // unknown maltsev mode - UNKNOWN_MT_ACCRETION_EFFICIENCY_PRESCRIPTION, // unknown mass transfer accretion efficiency prescription - UNKNOWN_MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION, // unknown mass transfer angular momentum loss prescription - UNKNOWN_MASS_LOSS_PRESCRIPTION, // unknown mass loss prescription - UNKNOWN_MT_CASE, // unknown mass transfer case - UNKNOWN_MT_REJUVENATION_PRESCRIPTION, // unknown mass transfer rejuvenation prescription - UNKNOWN_MT_THERMALLY_LIMITED_VARIATION, // unknown mass transfer thermally limited variation - UNKNOWN_NEUTRINO_MASS_LOSS_PRESCRIPTION, // unknown neutrino mass loss prescription - UNKNOWN_NS_ACCRETION_IN_CE, // unknown NS accretion in common envelope - UNKNOWN_NS_EOS, // unknown NS equation-of-state - UNKNOWN_OB_MASS_LOSS_PRESCRIPTION, // unknown OB mass loss prescription - UNKNOWN_PPI_PRESCRIPTION, // unknown pulsational pair instability prescription - UNKNOWN_PROGRAM_OPTION, // unknown program option - UNKNOWN_PROPERTY_TYPE, // unknown property type - UNKNOWN_PULSAR_BIRTH_MAGNETIC_FIELD_DISTRIBUTION, // unknown pulsar birth magnetic field distribution - UNKNOWN_PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION, // unknown pulsar birth spin period distribution - UNKNOWN_Q_DISTRIBUTION, // unknown q-distribution - UNKNOWN_QCRIT_PRESCRIPTION, // Unknown QCRIT prescription - UNKNOWN_REMNANT_MASS_PRESCRIPTION, // unknown remnant mass prescriptrion - UNKNOWN_RESPONSE_TO_SPIN_UP, // unknown common prescription for responding to excessive spin-up - UNKNOWN_RSG_MASS_LOSS_PRESCRIPTION, // unknown RSG mass loss prescription - UNKNOWN_SEMI_MAJOR_AXIS_DISTRIBUTION, // unknown sem-major axis distribution - UNKNOWN_SN_ENGINE, // unknown supernova engine - UNKNOWN_SN_EVENT, // unknown supernova event encountered - UNKNOWN_STELLAR_POPULATION, // unknown stellar population - UNKNOWN_STELLAR_PROPERTY, // unknown stellar property - UNKNOWN_STELLAR_TYPE, // unknown stellar type - UNKNOWN_TIDES_PRESCRIPTION, // unknown tides prescription - UNKNOWN_VMS_MASS_LOSS_PRESCRIPTION, // unknown VMS mass loss prescription - UNKNOWN_VROT_PRESCRIPTION, // unknown rorational velocity prescription - UNKNOWN_WR_MASS_LOSS_PRESCRIPTION, // unknown WR mass loss prescription - UNKNOWN_ZETA_PRESCRIPTION, // unknown stellar ZETA prescription - WARNING, // unspecified warning - WHITE_DWARF_TOO_MASSIVE, // a white dwarf exceeds the Chandrasekhar mass limit - - // not alphabetical - here to keep "real" error numbers consecutive - SUGGEST_HELP // suggest using --help -}; - - -// message catalog -// for now we'll just define it here - one day we might want to have it in a -// file and read it in at program start - that way we can be more flexible -// (i.e. change messages without recompiling, internationalise etc.) -// -// unordered_map - key is integer message number (from enum class ERROR above) -// listed alphabetically - -const COMPASUnorderedMap> ERROR_CATALOG = { - { ERROR::ADDED_EXCESS_AM_TO_STARS, { ERROR_SCOPE::ALWAYS, "Attempted to add more angular momentum to stars than was available in the binary" }}, - { ERROR::AMBIGUOUS_REMNANT_MASS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Insufficient information to prescribe remnant mass" }}, - { ERROR::ARGUMENT_RANGE_PARMS_EXPECTED_FP, { ERROR_SCOPE::ALWAYS, "Expected a floating point number for range start and increment for option" }}, - { ERROR::ARGUMENT_RANGE_COUNT_EXPECTED_ULINT, { ERROR_SCOPE::ALWAYS, "Expected an unsigned long integer for range count for option" }}, - { ERROR::ARGUMENT_RANGE_PARMS_EXPECTED_INT, { ERROR_SCOPE::ALWAYS, "Expected an integer for range parameters for option" }}, - { ERROR::ARGUMENT_RANGE_PARMS_EXPECTED_LFP, { ERROR_SCOPE::ALWAYS, "Expected a long double number for range start and increment for option" }}, - { ERROR::ARGUMENT_RANGE_PARMS_EXPECTED_LINT, { ERROR_SCOPE::ALWAYS, "Expected an long integer for range parameters for option" }}, - { ERROR::ARGUMENT_RANGE_PARMS_EXPECTED_ULINT, { ERROR_SCOPE::ALWAYS, "Expected an unsigned long integer for range parameters for option" }}, - { ERROR::ARGUMENT_RANGE_NOT_SUPPORTED, { ERROR_SCOPE::ALWAYS, "Argument range not supported for option" }}, - { ERROR::ARGUMENT_RANGE_NUM_PARMS, { ERROR_SCOPE::ALWAYS, "Argument range requires exactly three parameters" }}, - { ERROR::ARGUMENT_SET_EXPECTED_BOOL, { ERROR_SCOPE::ALWAYS, "All parameters of argument set must be boolean for option" }}, - { ERROR::ARGUMENT_SET_EXPECTED_NUMERIC, { ERROR_SCOPE::ALWAYS, "All parameters of argument set must be numeric for option" }}, - { ERROR::ARGUMENT_SET_NOT_SUPPORTED, { ERROR_SCOPE::ALWAYS, "Argument set not supported for option" }}, - { ERROR::BAD_LOGFILE_RECORD_SPECIFICATIONS, { ERROR_SCOPE::ALWAYS, "Logfile record specifications error" }}, - { ERROR::BINARY_EVOLUTION_STOPPED, { ERROR_SCOPE::ALWAYS, "Evolution of current binary stopped" }}, - { ERROR::BINARY_SIMULATION_STOPPED, { ERROR_SCOPE::ALWAYS, "Binaries simulation stopped" }}, - { ERROR::BOOST_OPTION_CMDLINE, { ERROR_SCOPE::ALWAYS, "Failed to initialise Boost options descriptions for commandline options" }}, - { ERROR::BOOST_OPTION_GRIDLINE, { ERROR_SCOPE::ALWAYS, "Failed to initialise Boost options descriptions for grid line options" }}, - { ERROR::BOOST_OPTION_INTERNAL_ERROR, { ERROR_SCOPE::ALWAYS, "Internal error: Boost vm, option" }}, - { ERROR::DIRECTORY_NOT_EMPTY, { ERROR_SCOPE::ALWAYS, "Directory not empty" }}, - { ERROR::EMPTY_FILE, { ERROR_SCOPE::ALWAYS, "File is empty" }}, - { ERROR::EMPTY_FILENAME, { ERROR_SCOPE::ALWAYS, "Filename is an empty string" }}, - { ERROR::ERROR, { ERROR_SCOPE::ALWAYS, "Error!" }}, - { ERROR::ERROR_PROCESSING_CMDLINE_OPTIONS, { ERROR_SCOPE::ALWAYS, "An error occurred while processing commandline options" }}, - { ERROR::ERROR_PROCESSING_GRIDLINE_OPTIONS, { ERROR_SCOPE::ALWAYS, "An error occurred while processing grid file options" }}, - { ERROR::EXPECTED_3D_VECTOR, { ERROR_SCOPE::ALWAYS, "Expected a vector of size 3" }}, - { ERROR::EXPECTED_ASSIGNMENT_OPERATOR, { ERROR_SCOPE::ALWAYS, "Expected assignment operator: one of { '=', '-=', '+=' }" }}, - { ERROR::EXPECTED_BINARY_PROPERTY, { ERROR_SCOPE::ALWAYS, "Expected binary logfile property: one of { (STAR_1|STAR_2|SUPERNOVA|COMPANION|BINARY)_PROPERTY, PROGRAM_OPTION }" }}, - { ERROR::EXPECTED_COMMA_OR_CLOSE_BRACE, { ERROR_SCOPE::ALWAYS, "Expected a comma ',' or close brace '}'" }}, - { ERROR::EXPECTED_INTEGER, { ERROR_SCOPE::ALWAYS, "Expected an integer" }}, - { ERROR::EXPECTED_LOGFILE_RECORD_NAME, { ERROR_SCOPE::ALWAYS, "Expected logfile record specifier" }}, - { ERROR::EXPECTED_NON_NEGATIVE_INTEGER, { ERROR_SCOPE::ALWAYS, "Expected an integer >= 0" }}, - { ERROR::EXPECTED_OPEN_BRACE, { ERROR_SCOPE::ALWAYS, "Expected open brace '{'" }}, - { ERROR::EXPECTED_POSITIVE_INTEGER, { ERROR_SCOPE::ALWAYS, "Expected an integer > 0" }}, - { ERROR::EXPECTED_PROPERTY_SPECIFIER, { ERROR_SCOPE::ALWAYS, "Expected a property specifier or close brace '}'" }}, - { ERROR::EXPECTED_SN_EVENT, { ERROR_SCOPE::ALWAYS, "Expected a supernova event" }}, - { ERROR::EXPECTED_STELLAR_PROPERTY, { ERROR_SCOPE::ALWAYS, "Expected stellar logfile property: one of { STAR_PROPERTY, PROGRAM_OPTION }" }}, - { ERROR::FILE_DOES_NOT_EXIST, { ERROR_SCOPE::ALWAYS, "File does not exist" }}, - { ERROR::FILE_NOT_CLOSED, { ERROR_SCOPE::ALWAYS, "Error closing file - file not closed" }}, - { ERROR::FILE_OPEN_ERROR, { ERROR_SCOPE::ALWAYS, "Error opening file" }}, - { ERROR::FILE_READ_ERROR, { ERROR_SCOPE::ALWAYS, "Error reading from file - data not read" }}, - { ERROR::FILE_WRITE_ERROR, { ERROR_SCOPE::ALWAYS, "Error writing to file - data not written" }}, - { ERROR::FLOATING_POINT_ERROR, { ERROR_SCOPE::ALWAYS, "Unspecified floating-point error" }}, - { ERROR::FLOATING_POINT_DIVBYZERO, { ERROR_SCOPE::ALWAYS, "Floating-point divide-by-zero" }}, - { ERROR::FLOATING_POINT_INVALID_ARGUMENT, { ERROR_SCOPE::ALWAYS, "Floating-point invalid argument" }}, - { ERROR::FLOATING_POINT_OVERFLOW, { ERROR_SCOPE::ALWAYS, "Floating-point overflow" }}, - { ERROR::FLOATING_POINT_UNDERFLOW, { ERROR_SCOPE::ALWAYS, "Floating-point underflow" }}, - { ERROR::GRID_OPTIONS_ERROR, { ERROR_SCOPE::ALWAYS, "Grid File Options error" }}, - { ERROR::HIGH_TEFF_WINDS, { ERROR_SCOPE::FIRST_IN_OBJECT_ID, "Winds being used at high temperature" }}, - { ERROR::INDEX_OUT_OF_RANGE, { ERROR_SCOPE::ALWAYS, "Index out of range" }}, - { ERROR::INVALID_DATA_TYPE, { ERROR_SCOPE::ALWAYS, "Invalid data type" }}, - { ERROR::INVALID_INITIAL_ATTRIBUTES, { ERROR_SCOPE::ALWAYS, "Initial attributes are not valid - evolution not possible" }}, - { ERROR::INVALID_MASS_TRANSFER_DONOR, { ERROR_SCOPE::ALWAYS, "Mass transfer from NS, BH, or Massless Remnant" }}, - { ERROR::INVALID_TYPE_EDDINGTON_RATE, { ERROR_SCOPE::ALWAYS, "Invalid stellar type for Eddington critical rate calculation" }}, - { ERROR::INVALID_TYPE_MT_MASS_RATIO, { ERROR_SCOPE::ALWAYS, "Invalid stellar type for mass ratio calculation" }}, - { ERROR::INVALID_TYPE_MT_THERMAL_TIMESCALE, { ERROR_SCOPE::ALWAYS, "Invalid stellar type for thermal timescale calculation" }}, - { ERROR::INVALID_TYPE_ZETA_CALCULATION, { ERROR_SCOPE::ALWAYS, "Invalid stellar type for Zeta calculation" }}, - { ERROR::INVALID_VALUE_FOR_BOOLEAN_OPTION, { ERROR_SCOPE::ALWAYS, "Invalid value specified for BOOLEAN option" }}, - { ERROR::INVALID_VALUE_IN_FILE, { ERROR_SCOPE::ALWAYS, "Invalid value in file" }}, - { ERROR::LAMBDA_NOT_POSITIVE, { ERROR_SCOPE::FIRST_IN_OBJECT_ID, "Lambda <= 0.0" }}, - { ERROR::LOW_GAMMA, { ERROR_SCOPE::ALWAYS, "Very massive prescription being extrapolated to low gamma (<0.5)" }}, - { ERROR::LOW_TEFF_WINDS, { ERROR_SCOPE::ALWAYS, "Winds being used at low temperature" }}, - { ERROR::MAXIMUM_MASS_LOST, { ERROR_SCOPE::FIRST_IN_OBJECT_ID, "Maximum mass lost during mass loss calculations" }}, - { ERROR::MISSING_VALUE, { ERROR_SCOPE::ALWAYS, "Missing value" }}, - { ERROR::MISSING_RIGHT_BRACKET, { ERROR_SCOPE::ALWAYS, "Missing ']'" }}, - { ERROR::NO_CONVERGENCE, { ERROR_SCOPE::ALWAYS, "No convergence" }}, - { ERROR::NO_LAMBDA_DEWI, { ERROR_SCOPE::ALWAYS, "Dewi lambda calculation not supported for stellar type" }}, - { ERROR::NO_LAMBDA_NANJING, { ERROR_SCOPE::ALWAYS, "Nanjing lambda calculation not supported for stellar type" }}, - { ERROR::NO_REAL_ROOTS, { ERROR_SCOPE::ALWAYS, "No real roots" }}, - { ERROR::NO_TIMESTEPS_READ, { ERROR_SCOPE::ALWAYS, "No user timesteps read" }}, - { ERROR::NONE, { ERROR_SCOPE::NEVER, "No error" }}, - { ERROR::NOT_INITIALISED, { ERROR_SCOPE::ALWAYS, "Object not initialised" }}, - { ERROR::OPTION_NOT_SUPPORTED_IN_GRID_FILE, { ERROR_SCOPE::ALWAYS, "Option not supported in grid file" }}, - { ERROR::OUT_OF_BOUNDS, { ERROR_SCOPE::ALWAYS, "Value out of bounds" }}, - { ERROR::PROGRAM_OPTIONS_ERROR, { ERROR_SCOPE::ALWAYS, "Commandline Options error" }}, - { ERROR::RADIUS_NOT_POSITIVE, { ERROR_SCOPE::ALWAYS, "Radius <= 0.0" }}, - { ERROR::REVERT_FAILED, { ERROR_SCOPE::ALWAYS, "Revert to previous state failed" }}, - { ERROR::ROOT_FINDER_FAILED, { ERROR_SCOPE::ALWAYS, "Exception encountered in root finder" }}, - { ERROR::STELLAR_EVOLUTION_STOPPED, { ERROR_SCOPE::ALWAYS, "Evolution of current star stopped" }}, - { ERROR::STELLAR_SIMULATION_STOPPED, { ERROR_SCOPE::ALWAYS, "Stellar simulation stopped" }}, - { ERROR::STEPS_UP, { ERROR_SCOPE::ALWAYS, "Allowed evolution timesteps exceeded" }}, - { ERROR::SUGGEST_HELP, { ERROR_SCOPE::ALWAYS, "Use option '-h' (or '--help') to see (descriptions of) available options" }}, - { ERROR::SWITCH_NOT_TAKEN, { ERROR_SCOPE::ALWAYS, "Switch to new stellar type not performed" }}, - { ERROR::TIMESTEP_BELOW_MINIMUM, { ERROR_SCOPE::ALWAYS, "Timestep below minimum - timestep taken" }}, - { ERROR::TIMESTEPS_EXHAUSTED, { ERROR_SCOPE::ALWAYS, "Provided timesteps exhausted, but evolution not complete" }}, - { ERROR::TIMESTEPS_NOT_CONSUMED, { ERROR_SCOPE::ALWAYS, "Evolution complete, but provided timesteps not consumed" }}, - { ERROR::TIMES_UP, { ERROR_SCOPE::ALWAYS, "Allowed evolution time exceeded" }}, - { ERROR::TOO_MANY_MASS0_ITERATIONS, { ERROR_SCOPE::ALWAYS, "Reached maximum number of iterations when looking for effective initial mass Mass_0 to match desired stellar core of HG star following case A mass transfer" }}, - { ERROR::TOO_MANY_MASS0_TRIES, { ERROR_SCOPE::ALWAYS, "Reached maximum number of tries when looking for effective initial mass Mass_0 to match desired stellar core of HG star following case A mass transfer" }}, - { ERROR::TOO_MANY_OMEGA_ITERATIONS, { ERROR_SCOPE::ALWAYS, "Reached maximum number of iterations when looking for omega when circularising and synchronising for tides" }}, - { ERROR::TOO_MANY_OMEGA_TRIES, { ERROR_SCOPE::ALWAYS, "Reached maximum number of tries when looking for omega when circularising and synchronising for tides" }}, - { ERROR::TOO_MANY_PULSAR_SPIN_ITERATIONS, { ERROR_SCOPE::ALWAYS, "Reached maximum number of iterations calculating the pulsar birth spin period" }}, - { ERROR::TOO_MANY_RETRIES, { ERROR_SCOPE::ALWAYS, "Too many retries" }}, - { ERROR::TOO_MANY_RLOF_ITERATIONS, { ERROR_SCOPE::ALWAYS, "Reached maximum number of iterations when fitting star inside Roche Lobe in RLOF" }}, - { ERROR::TOO_MANY_RLOF_TRIES, { ERROR_SCOPE::ALWAYS, "Reached maximum number of tries when fitting star inside Roche Lobe in RLOF" }}, - { ERROR::TOO_MANY_RV_ITERATIONS, { ERROR_SCOPE::ALWAYS, "Reached maximum number of tries when inverting the CDF of rotational velocitiesF" }}, - { ERROR::TOO_MANY_RV_TRIES, { ERROR_SCOPE::ALWAYS, "Reached maximum number of tries when inverting the CDF of rotational velocities" }}, - { ERROR::TOO_MANY_TIMESTEPS_IN_TIMESTEPS_FILE, { ERROR_SCOPE::ALWAYS, "Number of timesteps in timestpes file exceeds maximum timesteps" }}, - { ERROR::UNABLE_TO_CREATE_DIRECTORY, { ERROR_SCOPE::ALWAYS, "Unable to create directory" }}, - { ERROR::UNABLE_TO_REMOVE_DIRECTORY, { ERROR_SCOPE::ALWAYS, "Unable to remove directory" }}, - { ERROR::UNEXPECTED_ACCRETION_REGIME, { ERROR_SCOPE::ALWAYS, "Unexpected accretion regime" }}, - { ERROR::UNEXPECTED_BINARY_PROPERTY, { ERROR_SCOPE::ALWAYS, "Unexpected binary property" }}, - { ERROR::UNEXPECTED_BINARY_PROPERTY_TYPE, { ERROR_SCOPE::ALWAYS, "Unexpected binary property type" }}, - { ERROR::UNEXPECTED_END_OF_FILE, { ERROR_SCOPE::ALWAYS, "Unexpected end of file" }}, - { ERROR::UNEXPECTED_LOG_FILE_TYPE, { ERROR_SCOPE::ALWAYS, "Unexpected log file type" }}, - { ERROR::UNEXPECTED_PROGRAM_OPTION, { ERROR_SCOPE::ALWAYS, "Unexpected program option" }}, - { ERROR::UNEXPECTED_PROPERTY, { ERROR_SCOPE::ALWAYS, "Unexpected property" }}, - { ERROR::UNEXPECTED_PROPERTY_TYPE, { ERROR_SCOPE::ALWAYS, "Unexpected property type" }}, - { ERROR::UNEXPECTED_ROOT_FINDER_FAILURE, { ERROR_SCOPE::ALWAYS, "Unexpected root finder failure" }}, - { ERROR::UNEXPECTED_SN_EVENT, { ERROR_SCOPE::ALWAYS, "Unexpected supernova event in this context" }}, - { ERROR::UNEXPECTED_STELLAR_PROPERTY, { ERROR_SCOPE::ALWAYS, "Unexpected stellar property" }}, - { ERROR::UNEXPECTED_STELLAR_PROPERTY_TYPE, { ERROR_SCOPE::ALWAYS, "Unexpected stellar property type" }}, - { ERROR::UNEXPECTED_STELLAR_TYPE, { ERROR_SCOPE::ALWAYS, "Unexpected stellar type" }}, - { ERROR::UNHANDLED_EXCEPTION, { ERROR_SCOPE::ALWAYS, "Unhandled exception" }}, - { ERROR::UNKNOWN_A_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown semi-major-axis distribution" }}, - { ERROR::UNKNOWN_ACCRETION_REGIME, { ERROR_SCOPE::ALWAYS, "Unknown accretion regime" }}, - { ERROR::UNKNOWN_BH_KICK_MODE, { ERROR_SCOPE::ALWAYS, "Unknown black hole kicks mode" }}, - { ERROR::UNKNOWN_BINARY_PROPERTY, { ERROR_SCOPE::ALWAYS, "Unknown binary property" }}, - { ERROR::UNKNOWN_CASE_BB_STABILITY_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown case BB/BC mass transfer stability prescription" }}, - { ERROR::UNKNOWN_CE_ACCRETION_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown common envelope accretion prescription" }}, - { ERROR::UNKNOWN_CE_FORMALISM, { ERROR_SCOPE::ALWAYS, "Unknown common envelope formalism" }}, - { ERROR::UNKNOWN_CE_LAMBDA_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown common envelope lambda prescription" }}, - { ERROR::UNKNOWN_DATA_TYPE, { ERROR_SCOPE::ALWAYS, "Unknown data type" }}, - { ERROR::UNKNOWN_ENVELOPE_STATE_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown envelope state prescription" }}, - { ERROR::UNKNOWN_ENVELOPE_TYPE, { ERROR_SCOPE::ALWAYS, "Unknown envelope type" }}, - { ERROR::UNKNOWN_INITIAL_MASS_FUNCTION, { ERROR_SCOPE::ALWAYS, "Unknown initial mass function (IMF)" }}, - { ERROR::UNKNOWN_KICK_DIRECTION_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown kick direction distribution" }}, - { ERROR::UNKNOWN_KICK_MAGNITUDE_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown kick magnitude distribution" }}, - { ERROR::UNKNOWN_LBV_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown LBV mass loss prescription" }}, - { ERROR::UNKNOWN_LOGFILE, { ERROR_SCOPE::ALWAYS, "Unknown log file" }}, - { ERROR::UNKNOWN_MALTSEV_MODE, { ERROR_SCOPE::ALWAYS, "Unknown Maltsev remnant mass mode" }}, - { ERROR::UNKNOWN_MT_CASE, { ERROR_SCOPE::ALWAYS, "Unknown mass transfer case" }}, - { ERROR::UNKNOWN_MT_ACCRETION_EFFICIENCY_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown mass transfer accretion efficiency prescription" }}, - { ERROR::UNKNOWN_MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown mass transfer angular momentum loss prescription" }}, - { ERROR::UNKNOWN_MT_REJUVENATION_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown mass transfer rejuvenation prescription" }}, - { ERROR::UNKNOWN_MT_THERMALLY_LIMITED_VARIATION, { ERROR_SCOPE::ALWAYS, "Unknown mass transfer thermally limited variation" }}, - { ERROR::UNKNOWN_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown mass loss prescription" }}, - { ERROR::UNKNOWN_NEUTRINO_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown neutrino mass loss prescription" }}, - { ERROR::UNKNOWN_NS_ACCRETION_IN_CE, { ERROR_SCOPE::ALWAYS, "Unknown NS accretion in common envelope" }}, - { ERROR::UNKNOWN_NS_EOS, { ERROR_SCOPE::ALWAYS, "Unknown NS equation-of-state" }}, - { ERROR::UNKNOWN_OB_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown OB mass loss prescription" }}, - { ERROR::UNKNOWN_PPI_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown pulsational pair instability prescription" }}, - { ERROR::UNKNOWN_PROGRAM_OPTION, { ERROR_SCOPE::ALWAYS, "Unknown program option" }}, - { ERROR::UNKNOWN_PROPERTY_TYPE, { ERROR_SCOPE::ALWAYS, "Unknown property type" }}, - { ERROR::UNKNOWN_PULSAR_BIRTH_MAGNETIC_FIELD_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown pulsar birth magnetic field distribution" }}, - { ERROR::UNKNOWN_PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown pulsar birth spin period distribution" }}, - { ERROR::UNKNOWN_Q_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown q-distribution" }}, - { ERROR::UNKNOWN_QCRIT_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown QCRIT prescription" }}, - { ERROR::UNKNOWN_REMNANT_MASS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown remnant mass prescription" }}, - { ERROR::UNKNOWN_RESPONSE_TO_SPIN_UP, { ERROR_SCOPE::ALWAYS, "Unknown response-to-spin-up prescription" }}, - { ERROR::UNKNOWN_RSG_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown RSG mass loss prescription" }}, - { ERROR::UNKNOWN_SEMI_MAJOR_AXIS_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown semi-major axis distribution" }}, - { ERROR::UNKNOWN_SN_ENGINE, { ERROR_SCOPE::ALWAYS, "Unknown supernova engine" }}, - { ERROR::UNKNOWN_SN_EVENT, { ERROR_SCOPE::ALWAYS, "Unknown supernova event" }}, - { ERROR::UNKNOWN_STELLAR_POPULATION, { ERROR_SCOPE::ALWAYS, "Unknown stellar population" }}, - { ERROR::UNKNOWN_STELLAR_PROPERTY, { ERROR_SCOPE::ALWAYS, "Unknown stellar property" }}, - { ERROR::UNKNOWN_STELLAR_TYPE, { ERROR_SCOPE::ALWAYS, "Unknown stellar type" }}, - { ERROR::UNKNOWN_TIDES_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown tides prescription" }}, - { ERROR::UNKNOWN_VMS_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown VMS mass loss prescription" }}, - { ERROR::UNKNOWN_VROT_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown rotational velocity prescription" }}, - { ERROR::UNKNOWN_ZETA_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown stellar ZETA prescription" }}, - { ERROR::WARNING, { ERROR_SCOPE::ALWAYS, "Warning!" }}, - { ERROR::WHITE_DWARF_TOO_MASSIVE, { ERROR_SCOPE::ALWAYS, "This white dwarf exceeds the Chandrasekhar mass limit" }}, - { ERROR::UNKNOWN_WR_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown WR mass loss prescription" }} -}; - - -#endif // __ErrorCatalog_h__ +#ifndef __ErrorCatalog_h__ +#define __ErrorCatalog_h__ + + +// This is the COMPAS error catalogue. The error catalogue defines symbolic names for all COMPAS errors, +// and corresponding error strings for those errors. +// +// To add a new error, add the symbolic name to the ERROR enum class, and the corresponding error string +// to the ERROR_CATALOG map. +// +// The key to the ERROR_CATALOG map is the symbolic name in the ERROR enum class. The map entry is a +// tuple containing the ERROR_SCOPE associated with the error (see below), and the error string. + +#include "constants.h" +#include "EnumHash.h" + +#define ERR_MSG(x) std::get<1>(ERROR_CATALOG.at(x)) // for convenience + + +// The ERROR_SCOPE enum class, defined below, allows developers to specify when, if at all, a particular +// error/warning should be displayed by the SHOW_WARN* and SHOW_ERROR* macros defined in ErrorsMacros.h +// (and by the ERRORS-SHowIt() function defined in Errors.h, which is used by the aforementioned macros): +// +// NEVER : the error/warning should never be displayed +// ALWAYS : the error/warning should always be displayed +// FIRST : the error/warning should only be displayed the first time it is encountered +// FIRST_IN_FUNCTION : the error/warning should only be displayed the first time it is encountered for a function +// FIRST_IN_STELLAR_TYPE: the error/warning should only be displayed the first time it is encountered for a stellar type (see enum class STELLAR_TYPE in typedefs.h) +// FIRST_IN_OBJECT_TYPE : the error/warning should only be displayed the first time it is encountered for an object type (see enum class OBJECT_TYPE in typedefs.h) +// FIRST_IN_OBJECT_ID : the error/warning should only be displayed the first time it is encountered for an object id (each object is assigned a unique object id - e.g. a star or binary, each constituent star of a binary) +// +// The THROW_ERROR* macros defined in ErrorsMacros.h are not affected by ERROR_SCOPE + +enum class ERROR_SCOPE: int { NEVER, ALWAYS, FIRST, FIRST_IN_FUNCTION, FIRST_IN_STELLAR_TYPE, FIRST_IN_OBJECT_TYPE, FIRST_IN_OBJECT_ID }; + + +// enum class ERROR +// Symbolic names for errors and warnings (error strings below in ERRORLabel map) +// Listed alphabetically (except for 'NONE' - first so ERROR = 0 = NONE) +enum class ERROR: int { + NONE, // no error + ADDED_EXCESS_AM_TO_STARS, // attempted to add more angular momentum to stars than was available in a binary + AMBIGUOUS_REMNANT_MASS_PRESCRIPTION, // remnant mass unclear from available parameters + ARGUMENT_RANGE_COUNT_EXPECTED_ULINT, // expected an unsigned long integer for range count for option + ARGUMENT_RANGE_NOT_SUPPORTED, // argument range not supported for option + ARGUMENT_RANGE_NUM_PARMS, // argument range requires exactly three parameters + ARGUMENT_RANGE_PARMS_EXPECTED_FP, // expected a floating point number for range start and increment for option + ARGUMENT_RANGE_PARMS_EXPECTED_INT, // expected an integer for range parameters for option + ARGUMENT_RANGE_PARMS_EXPECTED_LFP, // expected a long double number for range start and increment for option + ARGUMENT_RANGE_PARMS_EXPECTED_LINT, // expected an long integer for range parameters for option + ARGUMENT_RANGE_PARMS_EXPECTED_ULINT, // expected an unsigned long integer for range parameters for option + ARGUMENT_SET_EXPECTED_BOOL, // all parameters of argument set must be boolean for option + ARGUMENT_SET_EXPECTED_NUMERIC, // all parameters of argument set must be numeric for option + ARGUMENT_SET_NOT_SUPPORTED, // argument set not supported for option + BAD_LOGFILE_RECORD_SPECIFICATIONS, // error in logfile record specifications + BINARY_EVOLUTION_STOPPED, // evolution of current binary stopped + BINARY_SIMULATION_STOPPED, // binary simulation stopped + BOOST_OPTION_CMDLINE, // failed to initialise Boost options descriptions for commandline options + BOOST_OPTION_GRIDLINE, // failed to initialise Boost options descriptions for grid line options + BOOST_OPTION_INTERNAL_ERROR, // Boost option internal error + DIRECTORY_NOT_EMPTY, // Directory not empty + EMPTY_FILE, // file is empty (contains no content) + EMPTY_FILENAME, // filename is an empty string + ERROR, // unspecified error + ERROR_PROCESSING_CMDLINE_OPTIONS, // an error occurred while processing commandline options + ERROR_PROCESSING_GRIDLINE_OPTIONS, // an error occurred while processing grid file options + EXPECTED_3D_VECTOR, // expected a vector of size 3 + EXPECTED_ASSIGNMENT_OPERATOR, // expected assignment operator + EXPECTED_BINARY_PROPERTY, // expected a binary property (STAR_1_, STAR_2_, SUPERNOVA_, COMPANION_, or BINARY_PROPERTY) + EXPECTED_COMMA_OR_CLOSE_BRACE, // expected a comma or close brace + EXPECTED_INTEGER, // expected an integer + EXPECTED_LOGFILE_RECORD_NAME, // expected logfile record name + EXPECTED_NON_NEGATIVE_INTEGER, // expected a non-negative integer + EXPECTED_OPEN_BRACE, // expected an open brace + EXPECTED_POSITIVE_INTEGER, // expected a positive integer + EXPECTED_PROPERTY_SPECIFIER, // expected a valid property specifier + EXPECTED_SN_EVENT, // expected a supernova event + EXPECTED_STELLAR_PROPERTY, // expected a stellar property (STAR_PROPERTY) + FILE_DOES_NOT_EXIST, // file does not exist + FILE_NOT_CLOSED, // error closing file - file not closed + FILE_OPEN_ERROR, // error opening file + FILE_READ_ERROR, // error reading from file - data not read + FILE_WRITE_ERROR, // error writing to file - data not written + FLOATING_POINT_ERROR, // unspecified floating-point error + FLOATING_POINT_DIVBYZERO, // floating-point divide-by-zero + FLOATING_POINT_INVALID_ARGUMENT, // floating-point invalid + FLOATING_POINT_OVERFLOW, // floating-point overflow + FLOATING_POINT_UNDERFLOW, // floating-point underflow + GRID_OPTIONS_ERROR, // grid file options error + HIGH_TEFF_WINDS, // winds being used at high temperature + INDEX_OUT_OF_RANGE, // index supplied is out of range + INVALID_DATA_TYPE, // invalid data type + INVALID_INITIAL_ATTRIBUTES, // initial values of stellar or binary attributes are not valid - can't evolve star or binary + INVALID_MASS_TRANSFER_DONOR, // mass transfer from NS, BH or Massless Remnant + INVALID_TYPE_EDDINGTON_RATE, // invalid stellar type for Eddington critical rate calculation + INVALID_TYPE_MT_MASS_RATIO, // invalid stellar type for mass ratio calculation + INVALID_TYPE_MT_THERMAL_TIMESCALE, // invalid stellar type for thermal timescale calculation + INVALID_TYPE_ZETA_CALCULATION, // invalid stellar type for Zeta calculation + INVALID_VALUE_FOR_BOOLEAN_OPTION, // invalid value specified for boolean option + INVALID_VALUE_IN_FILE, // invalid value in file + LAMBDA_NOT_POSITIVE, // lambda is <= 0.0 - invalid + LOW_GAMMA, // very massive mass-loss prescription being extrapolated to low gamma (<0.5) + LOW_TEFF_WINDS, // winds being used at low temperature + MAXIMUM_MASS_LOST, // (WARNING) maximum mass lost during mass loss calculations + MISSING_VALUE, // missing value (e.g. for program option) + MISSING_RIGHT_BRACKET, // missing right bracket (e.g. for program option range or set specification) + NO_CONVERGENCE, // iterative process did not converge + NO_LAMBDA_DEWI, // Dewi lambda calculation not supported for stellar type + NO_LAMBDA_NANJING, // Nanjing lambda calculation not supported for stellar type + NO_REAL_ROOTS, // equation has no real roots + NO_TIMESTEPS_READ, // no user timesteps read + NOT_INITIALISED, // object not initialised + OPTION_NOT_SUPPORTED_IN_GRID_FILE, // option not supported in grid file + OUT_OF_BOUNDS, // value out of bounds + PROGRAM_OPTIONS_ERROR, // program options error + RADIUS_NOT_POSITIVE, // radius is <= 0.0 - invalid + REVERT_FAILED, // revert to previous state failed + ROOT_FINDER_FAILED, // root finder threw an exception + STELLAR_EVOLUTION_STOPPED, // evolution of current star stopped + STELLAR_SIMULATION_STOPPED, // stellar simulation stopped + STEPS_UP, // allowed evolution timesteps exceeded + SWITCH_NOT_TAKEN, // switch to new stellar type not performed + TIMESTEP_BELOW_MINIMUM, // timestep too small - below minimum + TIMESTEPS_EXHAUSTED, // timesteps provided exhausted, but evolution not complete + TIMESTEPS_NOT_CONSUMED, // evolution complete, but provided timesteps not consumed + TIMES_UP, // allowed evolution time exceeded + TOO_MANY_MASS0_ITERATIONS, // too many iterations in MASS0 root finder + TOO_MANY_MASS0_TRIES, // too many tries in MASS0 root finder + TOO_MANY_OMEGA_ITERATIONS, // too many iterations in OMEGA root finder + TOO_MANY_OMEGA_TRIES, // too many tries in OMEGA root finder + TOO_MANY_PULSAR_SPIN_ITERATIONS, // too many iterations calculating the pulsar birth spin period + TOO_MANY_PULSAR_MAG_ITERATIONS, // too many iterations calculating the pulsar birth magnetic field + TOO_MANY_RETRIES, // generic too many retries + TOO_MANY_RLOF_ITERATIONS, // too many iterations in RLOF root finder + TOO_MANY_RLOF_TRIES, // too many tries in RLOF root finder + TOO_MANY_RV_ITERATIONS, // too many iterations in rotational velocity root finder + TOO_MANY_RV_TRIES, // too many tries in rotational velocity root finder + TOO_MANY_TIMESTEPS_IN_TIMESTEPS_FILE, // too many timesteps in timesteps file (exceeds maximum) + UNABLE_TO_CREATE_DIRECTORY, // unable to create directory + UNABLE_TO_REMOVE_DIRECTORY, // unable to remove directory + UNEXPECTED_ACCRETION_REGIME, // unexpected accretion regime + UNEXPECTED_BINARY_PROPERTY, // unexpected binary property + UNEXPECTED_BINARY_PROPERTY_TYPE, // unexpected binary property type + UNEXPECTED_END_OF_FILE, // unexpected end of file + UNEXPECTED_LOG_FILE_TYPE, // unexpected log file type + UNEXPECTED_PROGRAM_OPTION, // unexpected program option + UNEXPECTED_PROPERTY, // unexpected property + UNEXPECTED_PROPERTY_TYPE, // unexpected property type + UNEXPECTED_ROOT_FINDER_FAILURE, // unexpected root finder failure + UNEXPECTED_SN_EVENT, // unexpected supernova event in this context + UNEXPECTED_STELLAR_PROPERTY, // unexpected stellar property + UNEXPECTED_STELLAR_PROPERTY_TYPE, // unexpected stellar property type + UNEXPECTED_STELLAR_TYPE, // unexpected stellar type + UNHANDLED_EXCEPTION, // unhandled exception + UNKNOWN_A_DISTRIBUTION, // unknown a-distribution + UNKNOWN_ACCRETION_REGIME, // unknown accretion regime + UNKNOWN_BH_KICK_MODE, // unknown black hole kick mode + UNKNOWN_BINARY_PROPERTY, // unknown binary property + UNKNOWN_CASE_BB_STABILITY_PRESCRIPTION, // unknown case BB/BC mass transfer stability prescription + UNKNOWN_CE_ACCRETION_PRESCRIPTION, // unknown common envelope accretion prescription + UNKNOWN_CE_FORMALISM, // unknown common envelope formalism + UNKNOWN_CE_LAMBDA_PRESCRIPTION, // unknown common envelope Lambda prescription + UNKNOWN_DATA_TYPE, // unknown data type + UNKNOWN_ENVELOPE_STATE_PRESCRIPTION, // unknown envelope state prescription + UNKNOWN_ENVELOPE_TYPE, // unknown envelope type + UNKNOWN_INITIAL_MASS_FUNCTION, // unknown initial mass function + UNKNOWN_KICK_DIRECTION_DISTRIBUTION, // unknown kick direction distribution + UNKNOWN_KICK_MAGNITUDE_DISTRIBUTION, // unknown kick magnitude distribution + UNKNOWN_LOGFILE, // unknown log file + UNKNOWN_LBV_MASS_LOSS_PRESCRIPTION, // unknown LBV mass loss prescription + UNKNOWN_MALTSEV_MODE, // unknown maltsev mode + UNKNOWN_MT_ACCRETION_EFFICIENCY_PRESCRIPTION, // unknown mass transfer accretion efficiency prescription + UNKNOWN_MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION, // unknown mass transfer angular momentum loss prescription + UNKNOWN_MASS_LOSS_PRESCRIPTION, // unknown mass loss prescription + UNKNOWN_MT_CASE, // unknown mass transfer case + UNKNOWN_MT_REJUVENATION_PRESCRIPTION, // unknown mass transfer rejuvenation prescription + UNKNOWN_MT_THERMALLY_LIMITED_VARIATION, // unknown mass transfer thermally limited variation + UNKNOWN_NEUTRINO_MASS_LOSS_PRESCRIPTION, // unknown neutrino mass loss prescription + UNKNOWN_NS_ACCRETION_IN_CE, // unknown NS accretion in common envelope + UNKNOWN_NS_EOS, // unknown NS equation-of-state + UNKNOWN_OB_MASS_LOSS_PRESCRIPTION, // unknown OB mass loss prescription + UNKNOWN_PPI_PRESCRIPTION, // unknown pulsational pair instability prescription + UNKNOWN_PROGRAM_OPTION, // unknown program option + UNKNOWN_PROPERTY_TYPE, // unknown property type + UNKNOWN_PULSAR_BIRTH_MAGNETIC_FIELD_DISTRIBUTION, // unknown pulsar birth magnetic field distribution + UNKNOWN_PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION, // unknown pulsar birth spin period distribution + UNKNOWN_Q_DISTRIBUTION, // unknown q-distribution + UNKNOWN_QCRIT_PRESCRIPTION, // Unknown QCRIT prescription + UNKNOWN_REMNANT_MASS_PRESCRIPTION, // unknown remnant mass prescriptrion + UNKNOWN_RESPONSE_TO_SPIN_UP, // unknown common prescription for responding to excessive spin-up + UNKNOWN_RSG_MASS_LOSS_PRESCRIPTION, // unknown RSG mass loss prescription + UNKNOWN_SEMI_MAJOR_AXIS_DISTRIBUTION, // unknown sem-major axis distribution + UNKNOWN_SN_ENGINE, // unknown supernova engine + UNKNOWN_SN_EVENT, // unknown supernova event encountered + UNKNOWN_STELLAR_POPULATION, // unknown stellar population + UNKNOWN_STELLAR_PROPERTY, // unknown stellar property + UNKNOWN_STELLAR_TYPE, // unknown stellar type + UNKNOWN_TIDES_PRESCRIPTION, // unknown tides prescription + UNKNOWN_VMS_MASS_LOSS_PRESCRIPTION, // unknown VMS mass loss prescription + UNKNOWN_VROT_PRESCRIPTION, // unknown rorational velocity prescription + UNKNOWN_WR_MASS_LOSS_PRESCRIPTION, // unknown WR mass loss prescription + UNKNOWN_ZETA_PRESCRIPTION, // unknown stellar ZETA prescription + WARNING, // unspecified warning + WHITE_DWARF_TOO_MASSIVE, // a white dwarf exceeds the Chandrasekhar mass limit + + // not alphabetical - here to keep "real" error numbers consecutive + SUGGEST_HELP // suggest using --help +}; + + +// message catalog +// for now we'll just define it here - one day we might want to have it in a +// file and read it in at program start - that way we can be more flexible +// (i.e. change messages without recompiling, internationalise etc.) +// +// unordered_map - key is integer message number (from enum class ERROR above) +// listed alphabetically + +const COMPASUnorderedMap> ERROR_CATALOG = { + { ERROR::ADDED_EXCESS_AM_TO_STARS, { ERROR_SCOPE::ALWAYS, "Attempted to add more angular momentum to stars than was available in the binary" }}, + { ERROR::AMBIGUOUS_REMNANT_MASS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Insufficient information to prescribe remnant mass" }}, + { ERROR::ARGUMENT_RANGE_PARMS_EXPECTED_FP, { ERROR_SCOPE::ALWAYS, "Expected a floating point number for range start and increment for option" }}, + { ERROR::ARGUMENT_RANGE_COUNT_EXPECTED_ULINT, { ERROR_SCOPE::ALWAYS, "Expected an unsigned long integer for range count for option" }}, + { ERROR::ARGUMENT_RANGE_PARMS_EXPECTED_INT, { ERROR_SCOPE::ALWAYS, "Expected an integer for range parameters for option" }}, + { ERROR::ARGUMENT_RANGE_PARMS_EXPECTED_LFP, { ERROR_SCOPE::ALWAYS, "Expected a long double number for range start and increment for option" }}, + { ERROR::ARGUMENT_RANGE_PARMS_EXPECTED_LINT, { ERROR_SCOPE::ALWAYS, "Expected an long integer for range parameters for option" }}, + { ERROR::ARGUMENT_RANGE_PARMS_EXPECTED_ULINT, { ERROR_SCOPE::ALWAYS, "Expected an unsigned long integer for range parameters for option" }}, + { ERROR::ARGUMENT_RANGE_NOT_SUPPORTED, { ERROR_SCOPE::ALWAYS, "Argument range not supported for option" }}, + { ERROR::ARGUMENT_RANGE_NUM_PARMS, { ERROR_SCOPE::ALWAYS, "Argument range requires exactly three parameters" }}, + { ERROR::ARGUMENT_SET_EXPECTED_BOOL, { ERROR_SCOPE::ALWAYS, "All parameters of argument set must be boolean for option" }}, + { ERROR::ARGUMENT_SET_EXPECTED_NUMERIC, { ERROR_SCOPE::ALWAYS, "All parameters of argument set must be numeric for option" }}, + { ERROR::ARGUMENT_SET_NOT_SUPPORTED, { ERROR_SCOPE::ALWAYS, "Argument set not supported for option" }}, + { ERROR::BAD_LOGFILE_RECORD_SPECIFICATIONS, { ERROR_SCOPE::ALWAYS, "Logfile record specifications error" }}, + { ERROR::BINARY_EVOLUTION_STOPPED, { ERROR_SCOPE::ALWAYS, "Evolution of current binary stopped" }}, + { ERROR::BINARY_SIMULATION_STOPPED, { ERROR_SCOPE::ALWAYS, "Binaries simulation stopped" }}, + { ERROR::BOOST_OPTION_CMDLINE, { ERROR_SCOPE::ALWAYS, "Failed to initialise Boost options descriptions for commandline options" }}, + { ERROR::BOOST_OPTION_GRIDLINE, { ERROR_SCOPE::ALWAYS, "Failed to initialise Boost options descriptions for grid line options" }}, + { ERROR::BOOST_OPTION_INTERNAL_ERROR, { ERROR_SCOPE::ALWAYS, "Internal error: Boost vm, option" }}, + { ERROR::DIRECTORY_NOT_EMPTY, { ERROR_SCOPE::ALWAYS, "Directory not empty" }}, + { ERROR::EMPTY_FILE, { ERROR_SCOPE::ALWAYS, "File is empty" }}, + { ERROR::EMPTY_FILENAME, { ERROR_SCOPE::ALWAYS, "Filename is an empty string" }}, + { ERROR::ERROR, { ERROR_SCOPE::ALWAYS, "Error!" }}, + { ERROR::ERROR_PROCESSING_CMDLINE_OPTIONS, { ERROR_SCOPE::ALWAYS, "An error occurred while processing commandline options" }}, + { ERROR::ERROR_PROCESSING_GRIDLINE_OPTIONS, { ERROR_SCOPE::ALWAYS, "An error occurred while processing grid file options" }}, + { ERROR::EXPECTED_3D_VECTOR, { ERROR_SCOPE::ALWAYS, "Expected a vector of size 3" }}, + { ERROR::EXPECTED_ASSIGNMENT_OPERATOR, { ERROR_SCOPE::ALWAYS, "Expected assignment operator: one of { '=', '-=', '+=' }" }}, + { ERROR::EXPECTED_BINARY_PROPERTY, { ERROR_SCOPE::ALWAYS, "Expected binary logfile property: one of { (STAR_1|STAR_2|SUPERNOVA|COMPANION|BINARY)_PROPERTY, PROGRAM_OPTION }" }}, + { ERROR::EXPECTED_COMMA_OR_CLOSE_BRACE, { ERROR_SCOPE::ALWAYS, "Expected a comma ',' or close brace '}'" }}, + { ERROR::EXPECTED_INTEGER, { ERROR_SCOPE::ALWAYS, "Expected an integer" }}, + { ERROR::EXPECTED_LOGFILE_RECORD_NAME, { ERROR_SCOPE::ALWAYS, "Expected logfile record specifier" }}, + { ERROR::EXPECTED_NON_NEGATIVE_INTEGER, { ERROR_SCOPE::ALWAYS, "Expected an integer >= 0" }}, + { ERROR::EXPECTED_OPEN_BRACE, { ERROR_SCOPE::ALWAYS, "Expected open brace '{'" }}, + { ERROR::EXPECTED_POSITIVE_INTEGER, { ERROR_SCOPE::ALWAYS, "Expected an integer > 0" }}, + { ERROR::EXPECTED_PROPERTY_SPECIFIER, { ERROR_SCOPE::ALWAYS, "Expected a property specifier or close brace '}'" }}, + { ERROR::EXPECTED_SN_EVENT, { ERROR_SCOPE::ALWAYS, "Expected a supernova event" }}, + { ERROR::EXPECTED_STELLAR_PROPERTY, { ERROR_SCOPE::ALWAYS, "Expected stellar logfile property: one of { STAR_PROPERTY, PROGRAM_OPTION }" }}, + { ERROR::FILE_DOES_NOT_EXIST, { ERROR_SCOPE::ALWAYS, "File does not exist" }}, + { ERROR::FILE_NOT_CLOSED, { ERROR_SCOPE::ALWAYS, "Error closing file - file not closed" }}, + { ERROR::FILE_OPEN_ERROR, { ERROR_SCOPE::ALWAYS, "Error opening file" }}, + { ERROR::FILE_READ_ERROR, { ERROR_SCOPE::ALWAYS, "Error reading from file - data not read" }}, + { ERROR::FILE_WRITE_ERROR, { ERROR_SCOPE::ALWAYS, "Error writing to file - data not written" }}, + { ERROR::FLOATING_POINT_ERROR, { ERROR_SCOPE::ALWAYS, "Unspecified floating-point error" }}, + { ERROR::FLOATING_POINT_DIVBYZERO, { ERROR_SCOPE::ALWAYS, "Floating-point divide-by-zero" }}, + { ERROR::FLOATING_POINT_INVALID_ARGUMENT, { ERROR_SCOPE::ALWAYS, "Floating-point invalid argument" }}, + { ERROR::FLOATING_POINT_OVERFLOW, { ERROR_SCOPE::ALWAYS, "Floating-point overflow" }}, + { ERROR::FLOATING_POINT_UNDERFLOW, { ERROR_SCOPE::ALWAYS, "Floating-point underflow" }}, + { ERROR::GRID_OPTIONS_ERROR, { ERROR_SCOPE::ALWAYS, "Grid File Options error" }}, + { ERROR::HIGH_TEFF_WINDS, { ERROR_SCOPE::FIRST_IN_OBJECT_ID, "Winds being used at high temperature" }}, + { ERROR::INDEX_OUT_OF_RANGE, { ERROR_SCOPE::ALWAYS, "Index out of range" }}, + { ERROR::INVALID_DATA_TYPE, { ERROR_SCOPE::ALWAYS, "Invalid data type" }}, + { ERROR::INVALID_INITIAL_ATTRIBUTES, { ERROR_SCOPE::ALWAYS, "Initial attributes are not valid - evolution not possible" }}, + { ERROR::INVALID_MASS_TRANSFER_DONOR, { ERROR_SCOPE::ALWAYS, "Mass transfer from NS, BH, or Massless Remnant" }}, + { ERROR::INVALID_TYPE_EDDINGTON_RATE, { ERROR_SCOPE::ALWAYS, "Invalid stellar type for Eddington critical rate calculation" }}, + { ERROR::INVALID_TYPE_MT_MASS_RATIO, { ERROR_SCOPE::ALWAYS, "Invalid stellar type for mass ratio calculation" }}, + { ERROR::INVALID_TYPE_MT_THERMAL_TIMESCALE, { ERROR_SCOPE::ALWAYS, "Invalid stellar type for thermal timescale calculation" }}, + { ERROR::INVALID_TYPE_ZETA_CALCULATION, { ERROR_SCOPE::ALWAYS, "Invalid stellar type for Zeta calculation" }}, + { ERROR::INVALID_VALUE_FOR_BOOLEAN_OPTION, { ERROR_SCOPE::ALWAYS, "Invalid value specified for BOOLEAN option" }}, + { ERROR::INVALID_VALUE_IN_FILE, { ERROR_SCOPE::ALWAYS, "Invalid value in file" }}, + { ERROR::LAMBDA_NOT_POSITIVE, { ERROR_SCOPE::FIRST_IN_OBJECT_ID, "Lambda <= 0.0" }}, + { ERROR::LOW_GAMMA, { ERROR_SCOPE::ALWAYS, "Very massive prescription being extrapolated to low gamma (<0.5)" }}, + { ERROR::LOW_TEFF_WINDS, { ERROR_SCOPE::ALWAYS, "Winds being used at low temperature" }}, + { ERROR::MAXIMUM_MASS_LOST, { ERROR_SCOPE::FIRST_IN_OBJECT_ID, "Maximum mass lost during mass loss calculations" }}, + { ERROR::MISSING_VALUE, { ERROR_SCOPE::ALWAYS, "Missing value" }}, + { ERROR::MISSING_RIGHT_BRACKET, { ERROR_SCOPE::ALWAYS, "Missing ']'" }}, + { ERROR::NO_CONVERGENCE, { ERROR_SCOPE::ALWAYS, "No convergence" }}, + { ERROR::NO_LAMBDA_DEWI, { ERROR_SCOPE::ALWAYS, "Dewi lambda calculation not supported for stellar type" }}, + { ERROR::NO_LAMBDA_NANJING, { ERROR_SCOPE::ALWAYS, "Nanjing lambda calculation not supported for stellar type" }}, + { ERROR::NO_REAL_ROOTS, { ERROR_SCOPE::ALWAYS, "No real roots" }}, + { ERROR::NO_TIMESTEPS_READ, { ERROR_SCOPE::ALWAYS, "No user timesteps read" }}, + { ERROR::NONE, { ERROR_SCOPE::NEVER, "No error" }}, + { ERROR::NOT_INITIALISED, { ERROR_SCOPE::ALWAYS, "Object not initialised" }}, + { ERROR::OPTION_NOT_SUPPORTED_IN_GRID_FILE, { ERROR_SCOPE::ALWAYS, "Option not supported in grid file" }}, + { ERROR::OUT_OF_BOUNDS, { ERROR_SCOPE::ALWAYS, "Value out of bounds" }}, + { ERROR::PROGRAM_OPTIONS_ERROR, { ERROR_SCOPE::ALWAYS, "Commandline Options error" }}, + { ERROR::RADIUS_NOT_POSITIVE, { ERROR_SCOPE::ALWAYS, "Radius <= 0.0" }}, + { ERROR::REVERT_FAILED, { ERROR_SCOPE::ALWAYS, "Revert to previous state failed" }}, + { ERROR::ROOT_FINDER_FAILED, { ERROR_SCOPE::ALWAYS, "Exception encountered in root finder" }}, + { ERROR::STELLAR_EVOLUTION_STOPPED, { ERROR_SCOPE::ALWAYS, "Evolution of current star stopped" }}, + { ERROR::STELLAR_SIMULATION_STOPPED, { ERROR_SCOPE::ALWAYS, "Stellar simulation stopped" }}, + { ERROR::STEPS_UP, { ERROR_SCOPE::ALWAYS, "Allowed evolution timesteps exceeded" }}, + { ERROR::SUGGEST_HELP, { ERROR_SCOPE::ALWAYS, "Use option '-h' (or '--help') to see (descriptions of) available options" }}, + { ERROR::SWITCH_NOT_TAKEN, { ERROR_SCOPE::ALWAYS, "Switch to new stellar type not performed" }}, + { ERROR::TIMESTEP_BELOW_MINIMUM, { ERROR_SCOPE::ALWAYS, "Timestep below minimum - timestep taken" }}, + { ERROR::TIMESTEPS_EXHAUSTED, { ERROR_SCOPE::ALWAYS, "Provided timesteps exhausted, but evolution not complete" }}, + { ERROR::TIMESTEPS_NOT_CONSUMED, { ERROR_SCOPE::ALWAYS, "Evolution complete, but provided timesteps not consumed" }}, + { ERROR::TIMES_UP, { ERROR_SCOPE::ALWAYS, "Allowed evolution time exceeded" }}, + { ERROR::TOO_MANY_MASS0_ITERATIONS, { ERROR_SCOPE::ALWAYS, "Reached maximum number of iterations when looking for effective initial mass Mass_0 to match desired stellar core of HG star following case A mass transfer" }}, + { ERROR::TOO_MANY_MASS0_TRIES, { ERROR_SCOPE::ALWAYS, "Reached maximum number of tries when looking for effective initial mass Mass_0 to match desired stellar core of HG star following case A mass transfer" }}, + { ERROR::TOO_MANY_OMEGA_ITERATIONS, { ERROR_SCOPE::ALWAYS, "Reached maximum number of iterations when looking for omega when circularising and synchronising for tides" }}, + { ERROR::TOO_MANY_OMEGA_TRIES, { ERROR_SCOPE::ALWAYS, "Reached maximum number of tries when looking for omega when circularising and synchronising for tides" }}, + { ERROR::TOO_MANY_PULSAR_SPIN_ITERATIONS, { ERROR_SCOPE::ALWAYS, "Reached maximum number of iterations calculating the pulsar birth spin period" }}, + { ERROR::TOO_MANY_RETRIES, { ERROR_SCOPE::ALWAYS, "Too many retries" }}, + { ERROR::TOO_MANY_RLOF_ITERATIONS, { ERROR_SCOPE::ALWAYS, "Reached maximum number of iterations when fitting star inside Roche Lobe in RLOF" }}, + { ERROR::TOO_MANY_RLOF_TRIES, { ERROR_SCOPE::ALWAYS, "Reached maximum number of tries when fitting star inside Roche Lobe in RLOF" }}, + { ERROR::TOO_MANY_RV_ITERATIONS, { ERROR_SCOPE::ALWAYS, "Reached maximum number of tries when inverting the CDF of rotational velocitiesF" }}, + { ERROR::TOO_MANY_RV_TRIES, { ERROR_SCOPE::ALWAYS, "Reached maximum number of tries when inverting the CDF of rotational velocities" }}, + { ERROR::TOO_MANY_TIMESTEPS_IN_TIMESTEPS_FILE, { ERROR_SCOPE::ALWAYS, "Number of timesteps in timestpes file exceeds maximum timesteps" }}, + { ERROR::UNABLE_TO_CREATE_DIRECTORY, { ERROR_SCOPE::ALWAYS, "Unable to create directory" }}, + { ERROR::UNABLE_TO_REMOVE_DIRECTORY, { ERROR_SCOPE::ALWAYS, "Unable to remove directory" }}, + { ERROR::UNEXPECTED_ACCRETION_REGIME, { ERROR_SCOPE::ALWAYS, "Unexpected accretion regime" }}, + { ERROR::UNEXPECTED_BINARY_PROPERTY, { ERROR_SCOPE::ALWAYS, "Unexpected binary property" }}, + { ERROR::UNEXPECTED_BINARY_PROPERTY_TYPE, { ERROR_SCOPE::ALWAYS, "Unexpected binary property type" }}, + { ERROR::UNEXPECTED_END_OF_FILE, { ERROR_SCOPE::ALWAYS, "Unexpected end of file" }}, + { ERROR::UNEXPECTED_LOG_FILE_TYPE, { ERROR_SCOPE::ALWAYS, "Unexpected log file type" }}, + { ERROR::UNEXPECTED_PROGRAM_OPTION, { ERROR_SCOPE::ALWAYS, "Unexpected program option" }}, + { ERROR::UNEXPECTED_PROPERTY, { ERROR_SCOPE::ALWAYS, "Unexpected property" }}, + { ERROR::UNEXPECTED_PROPERTY_TYPE, { ERROR_SCOPE::ALWAYS, "Unexpected property type" }}, + { ERROR::UNEXPECTED_ROOT_FINDER_FAILURE, { ERROR_SCOPE::ALWAYS, "Unexpected root finder failure" }}, + { ERROR::UNEXPECTED_SN_EVENT, { ERROR_SCOPE::ALWAYS, "Unexpected supernova event in this context" }}, + { ERROR::UNEXPECTED_STELLAR_PROPERTY, { ERROR_SCOPE::ALWAYS, "Unexpected stellar property" }}, + { ERROR::UNEXPECTED_STELLAR_PROPERTY_TYPE, { ERROR_SCOPE::ALWAYS, "Unexpected stellar property type" }}, + { ERROR::UNEXPECTED_STELLAR_TYPE, { ERROR_SCOPE::ALWAYS, "Unexpected stellar type" }}, + { ERROR::UNHANDLED_EXCEPTION, { ERROR_SCOPE::ALWAYS, "Unhandled exception" }}, + { ERROR::UNKNOWN_A_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown semi-major-axis distribution" }}, + { ERROR::UNKNOWN_ACCRETION_REGIME, { ERROR_SCOPE::ALWAYS, "Unknown accretion regime" }}, + { ERROR::UNKNOWN_BH_KICK_MODE, { ERROR_SCOPE::ALWAYS, "Unknown black hole kicks mode" }}, + { ERROR::UNKNOWN_BINARY_PROPERTY, { ERROR_SCOPE::ALWAYS, "Unknown binary property" }}, + { ERROR::UNKNOWN_CASE_BB_STABILITY_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown case BB/BC mass transfer stability prescription" }}, + { ERROR::UNKNOWN_CE_ACCRETION_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown common envelope accretion prescription" }}, + { ERROR::UNKNOWN_CE_FORMALISM, { ERROR_SCOPE::ALWAYS, "Unknown common envelope formalism" }}, + { ERROR::UNKNOWN_CE_LAMBDA_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown common envelope lambda prescription" }}, + { ERROR::UNKNOWN_DATA_TYPE, { ERROR_SCOPE::ALWAYS, "Unknown data type" }}, + { ERROR::UNKNOWN_ENVELOPE_STATE_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown envelope state prescription" }}, + { ERROR::UNKNOWN_ENVELOPE_TYPE, { ERROR_SCOPE::ALWAYS, "Unknown envelope type" }}, + { ERROR::UNKNOWN_INITIAL_MASS_FUNCTION, { ERROR_SCOPE::ALWAYS, "Unknown initial mass function (IMF)" }}, + { ERROR::UNKNOWN_KICK_DIRECTION_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown kick direction distribution" }}, + { ERROR::UNKNOWN_KICK_MAGNITUDE_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown kick magnitude distribution" }}, + { ERROR::UNKNOWN_LBV_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown LBV mass loss prescription" }}, + { ERROR::UNKNOWN_LOGFILE, { ERROR_SCOPE::ALWAYS, "Unknown log file" }}, + { ERROR::UNKNOWN_MALTSEV_MODE, { ERROR_SCOPE::ALWAYS, "Unknown Maltsev remnant mass mode" }}, + { ERROR::UNKNOWN_MT_CASE, { ERROR_SCOPE::ALWAYS, "Unknown mass transfer case" }}, + { ERROR::UNKNOWN_MT_ACCRETION_EFFICIENCY_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown mass transfer accretion efficiency prescription" }}, + { ERROR::UNKNOWN_MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown mass transfer angular momentum loss prescription" }}, + { ERROR::UNKNOWN_MT_REJUVENATION_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown mass transfer rejuvenation prescription" }}, + { ERROR::UNKNOWN_MT_THERMALLY_LIMITED_VARIATION, { ERROR_SCOPE::ALWAYS, "Unknown mass transfer thermally limited variation" }}, + { ERROR::UNKNOWN_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown mass loss prescription" }}, + { ERROR::UNKNOWN_NEUTRINO_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown neutrino mass loss prescription" }}, + { ERROR::UNKNOWN_NS_ACCRETION_IN_CE, { ERROR_SCOPE::ALWAYS, "Unknown NS accretion in common envelope" }}, + { ERROR::UNKNOWN_NS_EOS, { ERROR_SCOPE::ALWAYS, "Unknown NS equation-of-state" }}, + { ERROR::UNKNOWN_OB_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown OB mass loss prescription" }}, + { ERROR::UNKNOWN_PPI_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown pulsational pair instability prescription" }}, + { ERROR::UNKNOWN_PROGRAM_OPTION, { ERROR_SCOPE::ALWAYS, "Unknown program option" }}, + { ERROR::UNKNOWN_PROPERTY_TYPE, { ERROR_SCOPE::ALWAYS, "Unknown property type" }}, + { ERROR::UNKNOWN_PULSAR_BIRTH_MAGNETIC_FIELD_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown pulsar birth magnetic field distribution" }}, + { ERROR::UNKNOWN_PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown pulsar birth spin period distribution" }}, + { ERROR::UNKNOWN_Q_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown q-distribution" }}, + { ERROR::UNKNOWN_QCRIT_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown QCRIT prescription" }}, + { ERROR::UNKNOWN_REMNANT_MASS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown remnant mass prescription" }}, + { ERROR::UNKNOWN_RESPONSE_TO_SPIN_UP, { ERROR_SCOPE::ALWAYS, "Unknown response-to-spin-up prescription" }}, + { ERROR::UNKNOWN_RSG_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown RSG mass loss prescription" }}, + { ERROR::UNKNOWN_SEMI_MAJOR_AXIS_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown semi-major axis distribution" }}, + { ERROR::UNKNOWN_SN_ENGINE, { ERROR_SCOPE::ALWAYS, "Unknown supernova engine" }}, + { ERROR::UNKNOWN_SN_EVENT, { ERROR_SCOPE::ALWAYS, "Unknown supernova event" }}, + { ERROR::UNKNOWN_STELLAR_POPULATION, { ERROR_SCOPE::ALWAYS, "Unknown stellar population" }}, + { ERROR::UNKNOWN_STELLAR_PROPERTY, { ERROR_SCOPE::ALWAYS, "Unknown stellar property" }}, + { ERROR::UNKNOWN_STELLAR_TYPE, { ERROR_SCOPE::ALWAYS, "Unknown stellar type" }}, + { ERROR::UNKNOWN_TIDES_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown tides prescription" }}, + { ERROR::UNKNOWN_VMS_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown VMS mass loss prescription" }}, + { ERROR::UNKNOWN_VROT_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown rotational velocity prescription" }}, + { ERROR::UNKNOWN_ZETA_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown stellar ZETA prescription" }}, + { ERROR::WARNING, { ERROR_SCOPE::ALWAYS, "Warning!" }}, + { ERROR::WHITE_DWARF_TOO_MASSIVE, { ERROR_SCOPE::ALWAYS, "This white dwarf exceeds the Chandrasekhar mass limit" }}, + { ERROR::UNKNOWN_WR_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown WR mass loss prescription" }} +}; + + +#endif // __ErrorCatalog_h__ diff --git a/src/HeMS.cpp b/src/HeMS.cpp index a7420e3ab..96e7f0580 100755 --- a/src/HeMS.cpp +++ b/src/HeMS.cpp @@ -719,13 +719,13 @@ double HeMS::InterpolateGeEtAlQCrit() { double logRadius = log10(m_Radius); double qCritLowerMass = (logRadius < lowerLogRadiusLowerMass) ? qLowLow : (logRadius > upperLogRadiusLowerMass) ? qLowUpp - : qLowLow + (upperLogRadiusLowerMass - logRadius) / (upperLogRadiusLowerMass - lowerLogRadiusLowerMass) * (qLowUpp - qLowLow); + : qLowLow + (logRadius - lowerLogRadiusLowerMass) / (upperLogRadiusLowerMass - lowerLogRadiusLowerMass) * (qLowUpp - qLowLow); double qCritUpperMass = (logRadius < lowerLogRadiusUpperMass) ? qUppLow : (logRadius > upperLogRadiusUpperMass) ? qUppUpp - : qUppLow + (upperLogRadiusUpperMass - logRadius) / (upperLogRadiusUpperMass - lowerLogRadiusUpperMass) * (qUppUpp - qUppLow); + : qUppLow + (logRadius - lowerLogRadiusUpperMass) / (upperLogRadiusUpperMass - lowerLogRadiusUpperMass) * (qUppUpp - qUppLow); double logMass = log10(m_Mass); return (logMass < logLowerMass) ? qCritLowerMass : (logMass > logUpperMass) ? qCritUpperMass - : qCritLowerMass + (logUpperMass - logMass) / (logUpperMass - logLowerMass) * (qCritUpperMass - qCritLowerMass); + : qCritLowerMass + (logMass - logLowerMass) / (logUpperMass - logLowerMass) * (qCritUpperMass - qCritLowerMass); } diff --git a/src/LogTypedefs.h b/src/LogTypedefs.h index 1f6ca952c..adad0d82c 100644 --- a/src/LogTypedefs.h +++ b/src/LogTypedefs.h @@ -478,6 +478,11 @@ enum class BINARY_PROPERTY: int { NONE, CIRCULARIZATION_TIMESCALE, CIRCUMBINARY_DISK_FORMED, + CIRCUMBINARY_DISK_FORMATION_TIME, + CIRCUMBINARY_DISK_MASS_1_AT_FORMATION, + CIRCUMBINARY_DISK_MASS_2_AT_FORMATION, + CIRCUMBINARY_DISK_STELLAR_TYPE_1_AT_FORMATION, + CIRCUMBINARY_DISK_STELLAR_TYPE_2_AT_FORMATION, CIRCUMBINARY_DISK_INITIAL_MASS, CIRCUMBINARY_DISK_MASS_RETAINED_1, CIRCUMBINARY_DISK_MASS_RETAINED_2, @@ -645,6 +650,11 @@ const COMPASUnorderedMap BINARY_PROPERTY_LABEL = { { BINARY_PROPERTY::NONE, "NONE" }, { BINARY_PROPERTY::CIRCULARIZATION_TIMESCALE, "CIRCULARIZATION_TIMESCALE" }, { BINARY_PROPERTY::CIRCUMBINARY_DISK_FORMED, "CIRCUMBINARY_DISK_FORMED" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_FORMATION_TIME, "CIRCUMBINARY_DISK_FORMATION_TIME" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_1_AT_FORMATION, "CIRCUMBINARY_DISK_MASS_1_AT_FORMATION" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_2_AT_FORMATION, "CIRCUMBINARY_DISK_MASS_2_AT_FORMATION" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_STELLAR_TYPE_1_AT_FORMATION, "CIRCUMBINARY_DISK_STELLAR_TYPE_1_AT_FORMATION" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_STELLAR_TYPE_2_AT_FORMATION, "CIRCUMBINARY_DISK_STELLAR_TYPE_2_AT_FORMATION" }, { BINARY_PROPERTY::CIRCUMBINARY_DISK_INITIAL_MASS, "CIRCUMBINARY_DISK_INITIAL_MASS" }, { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_1, "CIRCUMBINARY_DISK_MASS_RETAINED_1" }, { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_2, "CIRCUMBINARY_DISK_MASS_RETAINED_2" }, @@ -833,7 +843,6 @@ enum class PROGRAM_OPTION: int { CIRCULARISE_BINARY_DURING_MT, CIRCUMBINARY_DISK, - CIRCUMBINARY_DISK_USE_SYNCHRONIZED_ENVELOPE_ANGULAR_MOMENTUM, CIRCUMBINARY_DISK_BETA, CIRCUMBINARY_DISK_EDDINGTON_CAP_FACTOR, CIRCUMBINARY_DISK_EDDINGTON_GE23_FACTOR, @@ -842,7 +851,6 @@ enum class PROGRAM_OPTION: int { CIRCUMBINARY_DISK_LIFETIME, CIRCUMBINARY_DISK_STRUCTURE_FACTOR, CIRCUMBINARY_DISK_ENVELOPE_MASS_FRACTION_SUPPLIED, - CIRCUMBINARY_DISK_EVOLUTION_MODE, POST_COMMON_ENVELOPE_ECCENTRICITY_CAP, POST_COMMON_ENVELOPE_ECCENTRICITY_FRACTION, POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION, @@ -1085,7 +1093,6 @@ const COMPASUnorderedMap PROGRAM_OPTION_LABEL = { { PROGRAM_OPTION::CIRCULARISE_BINARY_DURING_MT, "CIRCULARISE_BINARY_DURING_MT" }, { PROGRAM_OPTION::CIRCUMBINARY_DISK, "CIRCUMBINARY_DISK" }, - { PROGRAM_OPTION::CIRCUMBINARY_DISK_USE_SYNCHRONIZED_ENVELOPE_ANGULAR_MOMENTUM, "CIRCUMBINARY_DISK_USE_SYNCHRONIZED_ENVELOPE_ANGULAR_MOMENTUM" }, { PROGRAM_OPTION::CIRCUMBINARY_DISK_BETA, "CIRCUMBINARY_DISK_BETA" }, { PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_CAP_FACTOR, "CIRCUMBINARY_DISK_EDDINGTON_CAP_FACTOR" }, { PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_GE23_FACTOR, "CIRCUMBINARY_DISK_EDDINGTON_GE23_FACTOR" }, @@ -1094,7 +1101,6 @@ const COMPASUnorderedMap PROGRAM_OPTION_LABEL = { { PROGRAM_OPTION::CIRCUMBINARY_DISK_LIFETIME, "CIRCUMBINARY_DISK_LIFETIME" }, { PROGRAM_OPTION::CIRCUMBINARY_DISK_STRUCTURE_FACTOR, "CIRCUMBINARY_DISK_STRUCTURE_FACTOR" }, { PROGRAM_OPTION::CIRCUMBINARY_DISK_ENVELOPE_MASS_FRACTION_SUPPLIED, "CIRCUMBINARY_DISK_ENVELOPE_MASS_FRACTION_SUPPLIED" }, - { PROGRAM_OPTION::CIRCUMBINARY_DISK_EVOLUTION_MODE, "CIRCUMBINARY_DISK_EVOLUTION_MODE" }, { PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_CAP, "POST_COMMON_ENVELOPE_ECCENTRICITY_CAP" }, { PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_FRACTION, "POST_COMMON_ENVELOPE_ECCENTRICITY_FRACTION" }, { PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION, "POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION" }, @@ -1512,6 +1518,11 @@ const std::map ANY_STAR_PROPERTY_DETAIL = { const std::map BINARY_PROPERTY_DETAIL = { { BINARY_PROPERTY::CIRCULARIZATION_TIMESCALE, { TYPENAME::DOUBLE, "Tau_Circ", "Myr", 24, 15}}, { BINARY_PROPERTY::CIRCUMBINARY_DISK_FORMED, { TYPENAME::BOOL, "CBD", "Event", 0, 0 }}, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_FORMATION_TIME, { TYPENAME::DOUBLE, "Time", "Myr", 24, 15}}, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_1_AT_FORMATION, { TYPENAME::DOUBLE, "Mass(1)", "Msol", 24, 15}}, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_2_AT_FORMATION, { TYPENAME::DOUBLE, "Mass(2)", "Msol", 24, 15}}, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_STELLAR_TYPE_1_AT_FORMATION, { TYPENAME::STELLAR_TYPE, "Stellar_Type(1)", "-", 4, 1 }}, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_STELLAR_TYPE_2_AT_FORMATION, { TYPENAME::STELLAR_TYPE, "Stellar_Type(2)", "-", 4, 1 }}, { BINARY_PROPERTY::CIRCUMBINARY_DISK_INITIAL_MASS, { TYPENAME::DOUBLE, "Initial_CBD_Mass", "Msol", 24, 15}}, { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_1, { TYPENAME::DOUBLE, "CBD_Mass_Retained(1)", "Msol", 24, 15}}, { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_2, { TYPENAME::DOUBLE, "CBD_Mass_Retained(2)", "Msol", 24, 15}}, @@ -1700,8 +1711,6 @@ const std::map PROGRAM_OPTION_DETAIL = { { PROGRAM_OPTION::CIRCULARISE_BINARY_DURING_MT, { TYPENAME::BOOL, "PO_Circularise@MT", "Flag", 0, 0 }}, { PROGRAM_OPTION::CIRCUMBINARY_DISK, { TYPENAME::BOOL, "PO_CBD", "Flag", 0, 0 }}, - { PROGRAM_OPTION::CIRCUMBINARY_DISK_USE_SYNCHRONIZED_ENVELOPE_ANGULAR_MOMENTUM, { TYPENAME::BOOL, "PO_CBD_Use_Synchronized_Envelope_AM", "Flag", 0, 0 }}, - { PROGRAM_OPTION::CIRCUMBINARY_DISK_EVOLUTION_MODE, { TYPENAME::INT, "PO_CBD_Evolution_Mode", "-", 4, 1 }}, { PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_MODE, { TYPENAME::INT, "PO_CBD_Eddington_Mode", "-", 4, 1 }}, { PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_CAP_FACTOR, { TYPENAME::DOUBLE, "PO_CBD_Eddington_Cap_Factor", "-", 24, 15}}, { PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_GE23_FACTOR, { TYPENAME::DOUBLE, "PO_CBD_Eddington_GE23_Factor", "-", 24, 15}}, @@ -1981,12 +1990,11 @@ enum class BSE_DETAILED_RECORD_TYPE: unsigned int { STELLAR_TYPE_CHANGE_DURING_CHE_EQUILIBRATION, // 9 - record was logged immediately following a stellar type change during mass equilibration for CHE POST_MT, // 10 - record was logged immediately following a mass transfer event POST_WINDS, // 11 - record was logged immediately following winds mass loss - POST_CEE, // 12 - record was logged immediately following a common envelope event, before any instantaneous circumbinary disk interaction + POST_CEE, // 12 - record was logged immediately following a common envelope event POST_SN, // 13 - record was logged immediately following a supernova event POST_MASS_RESOLUTION, // 14 - record was logged immediately following mass resolution (i.e. after winds mass loss & mass transfer complete) POST_MASS_RESOLUTION_MERGER, // 15 - record was logged immediately following a merger after mass resolution - PRE_STELLAR_TIMESTEP, // 16 - record was logged immediately prior to stellar timestep (i.e. the evolution of the constituent stars for a single timestep) - POST_CBD // 17 - record was logged immediately following instantaneous circumbinary disk evolution after a common envelope event + PRE_STELLAR_TIMESTEP // 16 - record was logged immediately prior to stellar timestep (i.e. the evolution of the constituent stars for a single timestep) }; enum class SSE_DETAILED_RECORD_TYPE: unsigned int { // SSE_DETAILED_OUTPUT file record type @@ -2236,13 +2244,16 @@ const ANY_PROPERTY_VECTOR BSE_DETAILED_OUTPUT_REC = { // Default record definition for the BSE Circumbinary Disks logfile. // // This file is event-based: one row is written for each CBD that forms. -// INSTANTANEOUS mode writes the row after the full interaction. TIMESTEPPED -// mode writes the row when the active disk is exhausted or truncated by an -// ordinary COMPAS termination/event boundary. +// The row is written when the active disk is exhausted or truncated by an +// ordinary COMPAS termination/event boundary. Time, Mass(1/2), and +// Stellar_Type(1/2) are cached at CBD formation rather than sampled at write time. +// Initial_CBD_Mass is the disk +// reservoir defined at formation; CBD_Mass_Supplied is the amount actually +// processed before the row is written. // const ANY_PROPERTY_VECTOR BSE_CIRCUMBINARY_DISKS_REC = { BINARY_PROPERTY::RANDOM_SEED, - BINARY_PROPERTY::TIME, + BINARY_PROPERTY::CIRCUMBINARY_DISK_FORMATION_TIME, BINARY_PROPERTY::CIRCUMBINARY_DISK_INITIAL_MASS, BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_SUPPLIED, BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_1, @@ -2251,10 +2262,10 @@ const ANY_PROPERTY_VECTOR BSE_CIRCUMBINARY_DISKS_REC = { BINARY_PROPERTY::CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_POST, BINARY_PROPERTY::CIRCUMBINARY_DISK_ECCENTRICITY_PRE, BINARY_PROPERTY::CIRCUMBINARY_DISK_ECCENTRICITY_POST, - STAR_1_PROPERTY::MASS, - STAR_1_PROPERTY::STELLAR_TYPE, - STAR_2_PROPERTY::MASS, - STAR_2_PROPERTY::STELLAR_TYPE + BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_1_AT_FORMATION, + BINARY_PROPERTY::CIRCUMBINARY_DISK_STELLAR_TYPE_1_AT_FORMATION, + BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_2_AT_FORMATION, + BINARY_PROPERTY::CIRCUMBINARY_DISK_STELLAR_TYPE_2_AT_FORMATION }; // BSE_DOUBLE_COMPACT_OBJECT_REC // diff --git a/src/MainSequence.cpp b/src/MainSequence.cpp index 6315b0ae7..fd04da585 100644 --- a/src/MainSequence.cpp +++ b/src/MainSequence.cpp @@ -1305,26 +1305,28 @@ double MainSequence::InterpolateGeEtAlQCrit(const QCRIT_PRESCRIPTION p_qCritPres double logRadius = log10(m_Radius); double qCritUpperEffLowerMass = (logRadius < lowerLogRadiusLowerMass) ? qUppLowLow : (logRadius > upperLogRadiusLowerMass) ? qUppLowUpp - : qUppLowLow + (upperLogRadiusLowerMass - logRadius) / (upperLogRadiusLowerMass - lowerLogRadiusLowerMass) * (qUppLowUpp - qUppLowLow); + : qUppLowLow + (logRadius - lowerLogRadiusLowerMass) / (upperLogRadiusLowerMass - lowerLogRadiusLowerMass) * (qUppLowUpp - qUppLowLow); double qCritUpperEffUpperMass = (logRadius < lowerLogRadiusUpperMass) ? qUppUppLow : (logRadius > upperLogRadiusUpperMass) ? qUppUppUpp - : qUppUppLow + (upperLogRadiusUpperMass - logRadius) / (upperLogRadiusUpperMass - lowerLogRadiusUpperMass) * (qUppUppUpp - qUppUppLow); + : qUppUppLow + (logRadius - lowerLogRadiusUpperMass) / (upperLogRadiusUpperMass - lowerLogRadiusUpperMass) * (qUppUppUpp - qUppUppLow); double qCritLowerEffLowerMass = (logRadius < lowerLogRadiusLowerMass) ? qLowLowLow : (logRadius > upperLogRadiusLowerMass) ? qLowLowUpp - : qLowLowLow + (upperLogRadiusLowerMass - logRadius) / (upperLogRadiusLowerMass - lowerLogRadiusLowerMass) * (qLowLowUpp - qLowLowLow); + : qLowLowLow + (logRadius - lowerLogRadiusLowerMass) / (upperLogRadiusLowerMass - lowerLogRadiusLowerMass) * (qLowLowUpp - qLowLowLow); double qCritLowerEffUpperMass = (logRadius < lowerLogRadiusUpperMass) ? qLowUppLow : (logRadius > upperLogRadiusUpperMass) ? qLowUppUpp - : qLowUppLow + (upperLogRadiusUpperMass - logRadius) / (upperLogRadiusUpperMass - lowerLogRadiusUpperMass) * (qLowUppUpp - qLowUppLow); + : qLowUppLow + (logRadius - lowerLogRadiusUpperMass) / (upperLogRadiusUpperMass - lowerLogRadiusUpperMass) * (qLowUppUpp - qLowUppLow); double logMass = log10(m_Mass); double interpolatedQCritUpperEff = (logMass < logLowerMass) ? qCritUpperEffLowerMass : (logMass > logUpperMass) ? qCritUpperEffUpperMass - : qCritUpperEffLowerMass + (logUpperMass - logMass) / (logUpperMass - logLowerMass) * (qCritUpperEffUpperMass - qCritUpperEffLowerMass); + : qCritUpperEffLowerMass + (logMass - logLowerMass) / (logUpperMass - logLowerMass) * (qCritUpperEffUpperMass - qCritUpperEffLowerMass); double interpolatedQCritLowerEff = (logMass < logLowerMass) ? qCritLowerEffLowerMass : (logMass > logUpperMass) ? qCritLowerEffUpperMass - : qCritLowerEffLowerMass + (logUpperMass - logMass) / (logUpperMass - logLowerMass) * (qCritLowerEffUpperMass - qCritLowerEffLowerMass); - - double interpolatedQCritForZ = p_massTransferEfficiencyBeta * interpolatedQCritUpperEff + (1.0 - p_massTransferEfficiencyBeta) * interpolatedQCritLowerEff; // Don't need to use nearest neighbor for this, beta is always between 0 and 1 + : qCritLowerEffLowerMass + (logMass - logLowerMass) / (logUpperMass - logLowerMass) * (qCritLowerEffUpperMass - qCritLowerEffLowerMass); + + double fBeta = (p_massTransferEfficiencyBeta > 0.5) ? (p_massTransferEfficiencyBeta - 0.5) / 0.5 //define a local interpolation factor from 0 to 1 within the selected beta interval + : p_massTransferEfficiencyBeta / 0.5; + double interpolatedQCritForZ = fBeta * interpolatedQCritUpperEff + (1.0 - fBeta) * interpolatedQCritLowerEff; // Don't need to use nearest neighbor for this, beta is always between 0 and 1 qCritPerMetallicity[ii] = interpolatedQCritForZ; } double logZlo = -3; // log10(0.001) diff --git a/src/Makefile b/src/Makefile index 86da33d02..cb5481f55 100644 --- a/src/Makefile +++ b/src/Makefile @@ -97,7 +97,7 @@ BOOSTLIBDIR ?= /lib # hdf5 directories HDF5INCDIR ?= /usr/include/hdf5/serial -HDF5LIBDIR ?= /usr/lib/x86_64-linux-gnu/hdf5/serial +HDF5LIBDIR ?= /usr/lib/$(shell $(CPP) -print-multiarch)/hdf5/serial # spindler-c include/link flags are populated only when SPINDLER_C_ROOT is # nonempty. diff --git a/src/Options.cpp b/src/Options.cpp index 893129154..c61a5e72e 100644 --- a/src/Options.cpp +++ b/src/Options.cpp @@ -560,7 +560,6 @@ void Options::OptionValues::Initialise() { m_PostCommonEnvelopeEccentricityCap = 0.1; m_PostCommonEnvelopeEccentricityFraction = 0.1; m_CircumbinaryDisk = false; - m_CircumbinaryDiskUseSynchronizedEnvelopeAngularMomentum = false; m_CircumbinaryDiskBeta = 3.0; m_CircumbinaryDiskEddingtonMode.type = CIRCUMBINARY_DISK_EDDINGTON_MODE::GE23; m_CircumbinaryDiskEddingtonMode.typeString = CIRCUMBINARY_DISK_EDDINGTON_MODE_LABEL.at(m_CircumbinaryDiskEddingtonMode.type); @@ -570,8 +569,6 @@ void Options::OptionValues::Initialise() { m_CircumbinaryDiskLifetime = 1.0e5; m_CircumbinaryDiskStructureFactor = 4.0; m_CircumbinaryDiskEnvelopeMassFractionSupplied = 0.05; - m_CircumbinaryDiskEvolutionMode.type = CIRCUMBINARY_DISK_EVOLUTION_MODE::INSTANTANEOUS; - m_CircumbinaryDiskEvolutionMode.typeString = CIRCUMBINARY_DISK_EVOLUTION_MODE_LABEL.at(m_CircumbinaryDiskEvolutionMode.type); m_CommonEnvelopeFormalism.type = CE_FORMALISM::ENERGY; m_CommonEnvelopeFormalism.typeString = CE_FORMALISM_LABEL.at(m_CommonEnvelopeFormalism.type); @@ -873,11 +870,6 @@ bool Options::AddOptions(OptionValues *p_Options, po::options_description *p_Opt po::value(&p_Options->m_CircumbinaryDisk)->default_value(p_Options->m_CircumbinaryDisk)->implicit_value(true), ("Apply post-common-envelope circumbinary-disk evolution where the CBD formation criterion is satisfied (default = " + std::string(p_Options->m_CircumbinaryDisk ? "TRUE" : "FALSE") + ")").c_str() ) - ( - "circumbinary-disk-use-synchronized-envelope-angular-momentum", - po::value(&p_Options->m_CircumbinaryDiskUseSynchronizedEnvelopeAngularMomentum)->default_value(p_Options->m_CircumbinaryDiskUseSynchronizedEnvelopeAngularMomentum)->implicit_value(true), - ("Use the synchronized-envelope angular-momentum estimate in the CBD formation criterion instead of COMPAS total angular momentum (default = " + std::string(p_Options->m_CircumbinaryDiskUseSynchronizedEnvelopeAngularMomentum ? "TRUE" : "FALSE") + ")").c_str() - ) ( "common-envelope-allow-immediate-RLOF-post-CE-survive", po::value(&p_Options->m_AllowImmediateRLOFpostCEToSurviveCommonEnvelope)->default_value(p_Options->m_AllowImmediateRLOFpostCEToSurviveCommonEnvelope)->implicit_value(true), @@ -1206,11 +1198,6 @@ bool Options::AddOptions(OptionValues *p_Options, po::options_description *p_Opt po::value(&p_Options->m_PostCommonEnvelopeEccentricityPrescription.typeString)->default_value(p_Options->m_PostCommonEnvelopeEccentricityPrescription.typeString), ("Post-common-envelope eccentricity prescription: CIRCULAR, PRE_RLOF_CAP, or PRE_RLOF_FRACTION (default = " + p_Options->m_PostCommonEnvelopeEccentricityPrescription.typeString + ")").c_str() ) - ( - "circumbinary-disk-evolution-mode", - po::value(&p_Options->m_CircumbinaryDiskEvolutionMode.typeString)->default_value(p_Options->m_CircumbinaryDiskEvolutionMode.typeString), - ("Circumbinary-disk evolution mode: INSTANTANEOUS applies the full disk interaction immediately after CE; TIMESTEPPED stores an active reservoir and evolves it over later COMPAS timesteps until the reservoir/lifetime is exhausted or an ordinary binary event terminates the active CBD (default = " + p_Options->m_CircumbinaryDiskEvolutionMode.typeString + ")").c_str() - ) ( "circumbinary-disk-eddington-mode", po::value(&p_Options->m_CircumbinaryDiskEddingtonMode.typeString)->default_value(p_Options->m_CircumbinaryDiskEddingtonMode.typeString), @@ -2470,11 +2457,6 @@ std::string Options::OptionValues::CheckAndSetOptions() { COMPLAIN_IF(!found, "Unknown circumbinary disk Eddington mode: use CAP, GE23, or TM23"); } - if (!DEFAULTED("circumbinary-disk-evolution-mode")) { - std::tie(found, m_CircumbinaryDiskEvolutionMode.type) = utils::GetMapKey(m_CircumbinaryDiskEvolutionMode.typeString, CIRCUMBINARY_DISK_EVOLUTION_MODE_LABEL, m_CircumbinaryDiskEvolutionMode.type); - COMPLAIN_IF(!found, "Unknown circumbinary disk evolution mode: use INSTANTANEOUS or TIMESTEPPED"); - } - if (!DEFAULTED("post-common-envelope-eccentricity-prescription")) { std::tie(found, m_PostCommonEnvelopeEccentricityPrescription.type) = utils::GetMapKey(m_PostCommonEnvelopeEccentricityPrescription.typeString, POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION_LABEL, m_PostCommonEnvelopeEccentricityPrescription.type); COMPLAIN_IF(!found, "Unknown post-CE eccentricity prescription (--post-common-envelope-eccentricity-prescription). Allowed: CIRCULAR, PRE_RLOF_CAP, PRE_RLOF_FRACTION"); @@ -2681,7 +2663,7 @@ std::string Options::OptionValues::CheckAndSetOptions() { "CBD Eddington CAP factor (--circumbinary-disk-eddington-cap-factor) must be > 0"); COMPLAIN_IF(utils::Compare(m_CircumbinaryDiskEddingtonGe23Factor, 0.0) <= 0 || utils::Compare(m_CircumbinaryDiskEddingtonGe23Factor, 1.0) > 0, "CBD Eddington GE23 factor (--circumbinary-disk-eddington-ge23-factor) must satisfy 0 < f <= 1"); - COMPLAIN_IF(utils::Compare(m_CircumbinaryDiskEnvelopeMassFractionSupplied, 0.0) < 0 || utils::Compare(m_CircumbinaryDiskEnvelopeMassFractionSupplied, 0.2) > 0, + COMPLAIN_IF(utils::Compare(m_CircumbinaryDiskEnvelopeMassFractionSupplied, 0.0) < 0 || utils::Compare(m_CircumbinaryDiskEnvelopeMassFractionSupplied, CBD_MAXIMUM_ENVELOPE_MASS_FRACTION_SUPPLIED) > 0, "CBD CE mass-loss fraction supplied (--circumbinary-disk-envelope-mass-fraction-supplied) must be between 0 and 0.2"); COMPLAIN_IF(utils::Compare(m_CircumbinaryDiskBeta * m_CircumbinaryDiskEnvelopeMassFractionSupplied, 1.0) > 0, "CBD beta * CE mass-loss fraction supplied must be <= 1"); @@ -2949,7 +2931,6 @@ STR_VECTOR Options::AllowedOptionValues(const std::string p_OptionString) { case _("chemically-homogeneous-evolution-mode") : POPULATE_RET(CHE_MODE_LABEL); break; case _("common-envelope-formalism") : POPULATE_RET(CE_FORMALISM_LABEL); break; case _("common-envelope-lambda-prescription") : POPULATE_RET(CE_LAMBDA_PRESCRIPTION_LABEL); break; - case _("circumbinary-disk-evolution-mode") : POPULATE_RET(CIRCUMBINARY_DISK_EVOLUTION_MODE_LABEL); break; case _("circumbinary-disk-eddington-mode") : POPULATE_RET(CIRCUMBINARY_DISK_EDDINGTON_MODE_LABEL); break; case _("post-common-envelope-eccentricity-prescription") : POPULATE_RET(POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION_LABEL); break; case _("common-envelope-mass-accretion-prescription") : POPULATE_RET(CE_ACCRETION_PRESCRIPTION_LABEL); break; @@ -5063,7 +5044,6 @@ COMPAS_VARIABLE Options::OptionValue(const T_ANY_PROPERTY p_Property) const { case PROGRAM_OPTION::CIRCULARISE_BINARY_DURING_MT : value = CirculariseBinaryDuringMassTransfer(); break; case PROGRAM_OPTION::CIRCUMBINARY_DISK : value = CircumbinaryDisk(); break; - case PROGRAM_OPTION::CIRCUMBINARY_DISK_USE_SYNCHRONIZED_ENVELOPE_ANGULAR_MOMENTUM : value = CircumbinaryDiskUseSynchronizedEnvelopeAngularMomentum(); break; case PROGRAM_OPTION::CIRCUMBINARY_DISK_BETA : value = CircumbinaryDiskBeta(); break; case PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_CAP_FACTOR : value = CircumbinaryDiskEddingtonCapFactor(); break; case PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_GE23_FACTOR : value = CircumbinaryDiskEddingtonGe23Factor(); break; @@ -5072,7 +5052,6 @@ COMPAS_VARIABLE Options::OptionValue(const T_ANY_PROPERTY p_Property) const { case PROGRAM_OPTION::CIRCUMBINARY_DISK_LIFETIME : value = CircumbinaryDiskLifetime(); break; case PROGRAM_OPTION::CIRCUMBINARY_DISK_STRUCTURE_FACTOR : value = CircumbinaryDiskStructureFactor(); break; case PROGRAM_OPTION::CIRCUMBINARY_DISK_ENVELOPE_MASS_FRACTION_SUPPLIED : value = CircumbinaryDiskEnvelopeMassFractionSupplied(); break; - case PROGRAM_OPTION::CIRCUMBINARY_DISK_EVOLUTION_MODE : value = static_cast(CircumbinaryDiskEvolutionMode()); break; case PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_CAP : value = PostCommonEnvelopeEccentricityCap(); break; case PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_FRACTION : value = PostCommonEnvelopeEccentricityFraction(); break; case PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION : value = static_cast(PostCommonEnvelopeEccentricityPrescription()); break; diff --git a/src/Options.h b/src/Options.h index 0f31d0036..0e288a298 100755 --- a/src/Options.h +++ b/src/Options.h @@ -474,11 +474,9 @@ class Options { "circumbinary-disk-eddington-ge23-factor", "circumbinary-disk-eddington-mode", "circumbinary-disk-envelope-mass-fraction-supplied", - "circumbinary-disk-evolution-mode", "circumbinary-disk-inner-radius-over-separation", "circumbinary-disk-lifetime", "circumbinary-disk-structure-factor", - "circumbinary-disk-use-synchronized-envelope-angular-momentum", "common-envelope-allow-main-sequence-survive", "common-envelope-alpha", "common-envelope-alpha-thermal", @@ -609,11 +607,9 @@ class Options { "circumbinary-disk-eddington-ge23-factor", "circumbinary-disk-eddington-mode", "circumbinary-disk-envelope-mass-fraction-supplied", - "circumbinary-disk-evolution-mode", "circumbinary-disk-inner-radius-over-separation", "circumbinary-disk-lifetime", "circumbinary-disk-structure-factor", - "circumbinary-disk-use-synchronized-envelope-angular-momentum", "common-envelope-allow-main-sequence-survive", "common-envelope-formalism", "common-envelope-lambda-prescription", @@ -1132,7 +1128,6 @@ class Options { double m_PostCommonEnvelopeEccentricityCap; // Eccentricity cap assigned after common envelope evolution when requested double m_PostCommonEnvelopeEccentricityFraction; // Fraction of the pre-RLOF eccentricity retained after common envelope evolution when requested bool m_CircumbinaryDisk; // Whether to apply post-CE CBD evolution where the formation criterion is satisfied - bool m_CircumbinaryDiskUseSynchronizedEnvelopeAngularMomentum; // Whether to use the synchronized-envelope angular-momentum estimate for CBD formation double m_CircumbinaryDiskBeta; // CBD angular-momentum parameter beta = fJ/fM ENUM_OPT m_CircumbinaryDiskEddingtonMode; // CBD Eddington-limited accretion mode: CAP, GE23, or TM23 double m_CircumbinaryDiskEddingtonCapFactor; // CAP-mode multiplier applied to the Eddington rate @@ -1141,7 +1136,6 @@ class Options { double m_CircumbinaryDiskLifetime; // CBD lifetime in yr double m_CircumbinaryDiskStructureFactor; // Disk-structure factor multiplying the CBD angular-momentum threshold double m_CircumbinaryDiskEnvelopeMassFractionSupplied; // Fraction of CE mass loss supplied through a CBD; assumed to yield initial m_CBD << post-CE binary mass - ENUM_OPT m_CircumbinaryDiskEvolutionMode; // INSTANTANEOUS evolves the full CBD during CE; TIMESTEPPED evolves it over later COMPAS timesteps // Common Envelope options double m_CommonEnvelopeAlpha; // Common envelope efficiency alpha parameter @@ -1474,7 +1468,6 @@ class Options { bool CommandLineGrid() const { return m_CmdLine.complexOptionValues.size() != 0; } bool CircumbinaryDisk() const { return OPT_VALUE("circumbinary-disk", m_CircumbinaryDisk, true); } - bool CircumbinaryDiskUseSynchronizedEnvelopeAngularMomentum() const { return OPT_VALUE("circumbinary-disk-use-synchronized-envelope-angular-momentum", m_CircumbinaryDiskUseSynchronizedEnvelopeAngularMomentum, true); } double CircumbinaryDiskBeta() const { return OPT_VALUE("circumbinary-disk-beta", m_CircumbinaryDiskBeta, true); } CIRCUMBINARY_DISK_EDDINGTON_MODE CircumbinaryDiskEddingtonMode() const { return OPT_VALUE("circumbinary-disk-eddington-mode", m_CircumbinaryDiskEddingtonMode.type, true); } double CircumbinaryDiskEddingtonCapFactor() const { return OPT_VALUE("circumbinary-disk-eddington-cap-factor", m_CircumbinaryDiskEddingtonCapFactor, true); } @@ -1483,7 +1476,6 @@ class Options { double CircumbinaryDiskLifetime() const { return OPT_VALUE("circumbinary-disk-lifetime", m_CircumbinaryDiskLifetime, true); } double CircumbinaryDiskStructureFactor() const { return OPT_VALUE("circumbinary-disk-structure-factor", m_CircumbinaryDiskStructureFactor, true); } double CircumbinaryDiskEnvelopeMassFractionSupplied() const { return OPT_VALUE("circumbinary-disk-envelope-mass-fraction-supplied", m_CircumbinaryDiskEnvelopeMassFractionSupplied, true); } - CIRCUMBINARY_DISK_EVOLUTION_MODE CircumbinaryDiskEvolutionMode() const { return OPT_VALUE("circumbinary-disk-evolution-mode", m_CircumbinaryDiskEvolutionMode.type, true); } double PostCommonEnvelopeEccentricityCap() const { return OPT_VALUE("post-common-envelope-eccentricity-cap", m_PostCommonEnvelopeEccentricityCap, true); } double PostCommonEnvelopeEccentricityFraction() const { return OPT_VALUE("post-common-envelope-eccentricity-fraction", m_PostCommonEnvelopeEccentricityFraction, true); } POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION PostCommonEnvelopeEccentricityPrescription() const { return OPT_VALUE("post-common-envelope-eccentricity-prescription", m_PostCommonEnvelopeEccentricityPrescription.type, true); } diff --git a/src/WhiteDwarfs.h b/src/WhiteDwarfs.h index 4868a10b6..dd6048f9b 100644 --- a/src/WhiteDwarfs.h +++ b/src/WhiteDwarfs.h @@ -1,113 +1,113 @@ -#ifndef __WhiteDwarfs_h__ -#define __WhiteDwarfs_h__ - -#include "constants.h" -#include "typedefs.h" -#include "profiling.h" -#include "utils.h" - -#include "Remnants.h" - - -class BaseStar; -class Remnants; - -class WhiteDwarfs: virtual public BaseStar, public Remnants { - -public: - - WhiteDwarfs(){}; - - WhiteDwarfs(const BaseStar &p_BaseStar) : BaseStar(p_BaseStar), Remnants(p_BaseStar) {} - - - // member functions - static double CalculateLuminosityOnPhase_Static(const double p_Mass, - const double p_Time, - const double p_Metallicity, - const double p_BaryonNumber); - - static double CalculateRadiusOnPhase_Static(const double p_Mass); - - MT_CASE DetermineMassTransferTypeAsDonor() const { return MT_CASE::OTHER; } // Not A, B, C, or NONE - - ACCRETION_REGIME DetermineAccretionRegime(const double p_DonorThermalMassLossRate, const bool p_HeRich); // Get the current accretion regime. Can also change m_HeShellDetonation and m_OffCenterIgnition flags. - - void ResolveShellChange(const double p_AccretedMass); - - -protected: - // member variables - - bool m_HeShellDetonation; // Flag to initialize He-Shell detonation (i.e. as described in Wang. 2018, sect 5 2018RAA....18...49W) - double m_HeShell; // Current WD He-shell size (Msol). Increases through accretion. - double m_HShell; // Current WD H-shell size (Msol). Increases through accretion. - double m_L0Ritter; // Parameter from numerical calculations, see Ritter 1999, section 3. Eqs 10 and 12, as well as table 2. Corresponds to L0. - double m_LambdaRitter; // Parameter from numerical calculations, see Ritter 1999, section 3. Eqs 10 and 12, as well as table 2. - bool m_OffCenterIgnition; // Flag for CO WD evolution into ONe WD - bool m_ShouldRejuvenate; // Flag for evolution of HeWD back into HeMS - bool m_IsSubChandrasekharTypeIa; // Flag for SubCh SN of HeWD - double m_XRitter; // Assumed hydrogen-mass fraction of material being accreted by He WD, as in Ritter 1999, table 2. - ACCRETION_REGIME m_AccretionRegime; - - // member functions - alphabetically - double CalculateAccretionRegime(const bool p_DonorIsHeRich, - const bool p_DonorIsGiant, - const double p_DonorThermalMassLossRate, - const double p_MassLostByDonor); - - double CalculateCriticalMassRatio(const bool p_AccretorIsDegenerate, - const double p_massTransferEfficiencyBeta) { return CalculateCriticalMassRatioHurleyHjellmingWebbink(); } - double CalculateCriticalMassRatioClaeys14(const bool p_AccretorIsDegenerate) const { return CalculateCriticalMassRatioHurleyHjellmingWebbink(); } - double CalculateCriticalMassRatioGeEtAl(const QCRIT_PRESCRIPTION p_qCritPrescription, - const double p_massTransferEfficiencyBeta) { return CalculateCriticalMassRatioHurleyHjellmingWebbink(); } - double CalculateCriticalMassRatioHurleyHjellmingWebbink() const { return HURLEY_HJELLMING_WEBBINK_QCRIT_WD; } - - double CalculateCOCoreMassOnPhase() const { return m_COCoreMass; } // NO-OP - - double CalculateHeCoreMassOnPhase() const { return m_HeCoreMass; } // NO-OP - - double CalculateHeliumAbundanceCoreOnPhase() const { return 0.0; } - double CalculateHeliumAbundanceSurfaceOnPhase() const { return 0.0; } - - double CalculateHydrogenAbundanceCoreOnPhase() const { return 0.0; } - double CalculateHydrogenAbundanceSurfaceOnPhase() const { return 0.0; } - - double CalculateEtaH(const double p_MassIntakeRate); - - double CalculateEtaHe(const double p_MassIntakeRate); - - double CalculateEtaPTY(const double p_MassIntakeRate); - - double Calculatel0Ritter() const { return (m_Metallicity > 0.01) ? L0_RITTER_HIGH_Z : L0_RITTER_LOW_Z; } - - DBL_DBL CalculateMassAcceptanceRate(const double p_DonorMassRate, - const bool p_IsHeRich); - DBL_DBL CalculateMassAcceptanceRate(const double p_DonorMassRate, - const double p_AccretorMassRate, - const bool p_IsHeRich) { return CalculateMassAcceptanceRate(p_DonorMassRate, p_IsHeRich); } - - double CalculateXRitter() const { return utils::Compare(m_Metallicity, 0.01) > 0 ? 0.7 : 0.8; } // Assumed Hydrogen-mass fraction - - double CalculateLambdaRitter() const { return utils::Compare(m_Metallicity, 0.01) > 0 ? 8.0 : 5.0; } // Exponent for the assumed core-mass and luminosity relationship in Ritter 1999 - - double CalculateInitialSupernovaMass() const { return 0.0; } - - double CalculateRadiusOnPhase(const double p_Mass) const { return CalculateRadiusOnPhase_Static(p_Mass); } - double CalculateRadiusOnPhase(double p_Mass, double p_Luminosity) const { return CalculateRadiusOnPhase(p_Mass); } // Ignore luminosity argument for WDs - double CalculateRadiusOnPhase() const { return CalculateRadiusOnPhase(m_Mass); } // Use class member variables - - ENVELOPE DetermineEnvelopeType() const { return ENVELOPE::CONVECTIVE; } // Always CONVECTIVE - - bool IsMassAboveChandrasekhar() const { return (utils::Compare(m_Mass, MCH) > 0); } // Mass exceeds Chandrasekhar limit - - STELLAR_TYPE ResolveAIC(); - STELLAR_TYPE ResolveSNIa(); - STELLAR_TYPE ResolveHeSD(); - STELLAR_TYPE ResolveSupernova() { return EvolveToNextPhase(); } // SNe for WDs are handled internally to each WD type - - ACCRETION_REGIME WhiteDwarfAccretionRegime() const { return m_AccretionRegime; } - -}; - -#endif // __WhiteDwarfs_h__ +#ifndef __WhiteDwarfs_h__ +#define __WhiteDwarfs_h__ + +#include "constants.h" +#include "typedefs.h" +#include "profiling.h" +#include "utils.h" + +#include "Remnants.h" + + +class BaseStar; +class Remnants; + +class WhiteDwarfs: virtual public BaseStar, public Remnants { + +public: + + WhiteDwarfs(){}; + + WhiteDwarfs(const BaseStar &p_BaseStar) : BaseStar(p_BaseStar), Remnants(p_BaseStar) {} + + + // member functions + static double CalculateLuminosityOnPhase_Static(const double p_Mass, + const double p_Time, + const double p_Metallicity, + const double p_BaryonNumber); + + static double CalculateRadiusOnPhase_Static(const double p_Mass); + + MT_CASE DetermineMassTransferTypeAsDonor() const { return MT_CASE::OTHER; } // Not A, B, C, or NONE + + ACCRETION_REGIME DetermineAccretionRegime(const double p_DonorThermalMassLossRate, const bool p_HeRich); // Get the current accretion regime. Can also change m_HeShellDetonation and m_OffCenterIgnition flags. + + void ResolveShellChange(const double p_AccretedMass); + + +protected: + // member variables + + bool m_HeShellDetonation; // Flag to initialize He-Shell detonation (i.e. as described in Wang. 2018, sect 5 2018RAA....18...49W) + double m_HeShell; // Current WD He-shell size (Msol). Increases through accretion. + double m_HShell; // Current WD H-shell size (Msol). Increases through accretion. + double m_L0Ritter; // Parameter from numerical calculations, see Ritter 1999, section 3. Eqs 10 and 12, as well as table 2. Corresponds to L0. + double m_LambdaRitter; // Parameter from numerical calculations, see Ritter 1999, section 3. Eqs 10 and 12, as well as table 2. + bool m_OffCenterIgnition; // Flag for CO WD evolution into ONe WD + bool m_ShouldRejuvenate; // Flag for evolution of HeWD back into HeMS + bool m_IsSubChandrasekharTypeIa; // Flag for SubCh SN of HeWD + double m_XRitter; // Assumed hydrogen-mass fraction of material being accreted by He WD, as in Ritter 1999, table 2. + ACCRETION_REGIME m_AccretionRegime; + + // member functions - alphabetically + double CalculateAccretionRegime(const bool p_DonorIsHeRich, + const bool p_DonorIsGiant, + const double p_DonorThermalMassLossRate, + const double p_MassLostByDonor); + + double CalculateCriticalMassRatio(const bool p_AccretorIsDegenerate, + const double p_massTransferEfficiencyBeta) { return CalculateCriticalMassRatioHurleyHjellmingWebbink(); } + double CalculateCriticalMassRatioClaeys14(const bool p_AccretorIsDegenerate) const { return CalculateCriticalMassRatioHurleyHjellmingWebbink(); } + double CalculateCriticalMassRatioGeEtAl(const QCRIT_PRESCRIPTION p_qCritPrescription, + const double p_massTransferEfficiencyBeta) { return CalculateCriticalMassRatioHurleyHjellmingWebbink(); } + double CalculateCriticalMassRatioHurleyHjellmingWebbink() const { return HURLEY_HJELLMING_WEBBINK_QCRIT_WD; } + + double CalculateCOCoreMassOnPhase() const { return m_COCoreMass; } // NO-OP + + double CalculateHeCoreMassOnPhase() const { return m_HeCoreMass; } // NO-OP + + double CalculateHeliumAbundanceCoreOnPhase() const { return 0.0; } + double CalculateHeliumAbundanceSurfaceOnPhase() const { return 0.0; } + + double CalculateHydrogenAbundanceCoreOnPhase() const { return 0.0; } + double CalculateHydrogenAbundanceSurfaceOnPhase() const { return 0.0; } + + double CalculateEtaH(const double p_MassIntakeRate); + + double CalculateEtaHe(const double p_MassIntakeRate); + + double CalculateEtaPTY(const double p_MassIntakeRate); + + double Calculatel0Ritter() const { return (m_Metallicity > 0.01) ? L0_RITTER_HIGH_Z : L0_RITTER_LOW_Z; } + + DBL_DBL CalculateMassAcceptanceRate(const double p_DonorMassRate, + const bool p_IsHeRich); + DBL_DBL CalculateMassAcceptanceRate(const double p_DonorMassRate, + const double p_AccretorMassRate, + const bool p_IsHeRich) { return CalculateMassAcceptanceRate(p_DonorMassRate, p_IsHeRich); } + + double CalculateXRitter() const { return utils::Compare(m_Metallicity, 0.01) > 0 ? 0.7 : 0.8; } // Assumed Hydrogen-mass fraction + + double CalculateLambdaRitter() const { return utils::Compare(m_Metallicity, 0.01) > 0 ? 8.0 : 5.0; } // Exponent for the assumed core-mass and luminosity relationship in Ritter 1999 + + double CalculateInitialSupernovaMass() const { return 0.0; } + + double CalculateRadiusOnPhase(const double p_Mass) const { return CalculateRadiusOnPhase_Static(p_Mass); } + double CalculateRadiusOnPhase(double p_Mass, double p_Luminosity) const { return CalculateRadiusOnPhase(p_Mass); } // Ignore luminosity argument for WDs + double CalculateRadiusOnPhase() const { return CalculateRadiusOnPhase(m_Mass); } // Use class member variables + + ENVELOPE DetermineEnvelopeType() const { return ENVELOPE::CONVECTIVE; } // Always CONVECTIVE + + bool IsMassAboveChandrasekhar() const { return (utils::Compare(m_Mass, MCH) > 0); } // Mass exceeds Chandrasekhar limit + + STELLAR_TYPE ResolveAIC(); + STELLAR_TYPE ResolveSNIa(); + STELLAR_TYPE ResolveHeSD(); + STELLAR_TYPE ResolveSupernova() { return EvolveToNextPhase(); } // SNe for WDs are handled internally to each WD type + + ACCRETION_REGIME WhiteDwarfAccretionRegime() const { return m_AccretionRegime; } + +}; + +#endif // __WhiteDwarfs_h__ diff --git a/src/changelog.h b/src/changelog.h index 2f6138f23..b01127338 100644 --- a/src/changelog.h +++ b/src/changelog.h @@ -1703,9 +1703,16 @@ // - Fixed HeSDs not being recorded in the Supernovae logs (mentioned in issue 1350). // 03.29.04 IM - April 19, 2026 - Enhancement: // - Corrected the M&M NS remnant mass prescription to never return a remnant mass larger than the CO core mass (see issue #1468) -// 03.29.05 AG - May 26, 2026 - Defect repair: -// - Fix for generalized issue #1378: reinstate "false" fallback option for SN kick angle options (mistakenly changed to "true" in v03.00.00) -// 03.30.00 AG - June 05, 2026 - Enhancement: +// 03.29.05 AG - May 26, 2026 - Defect repair: +// - Fix for generalized issue #1378: reinstate "false" fallback option for SN kick angle options (mistakenly changed to "true" in v03.00.00) +// 03.29.06 DH - September 23, 2026 - Defect repair: +// - Fix for issue #1484: reversed interpolation factors for mass transfer stability with Ge's model q_crit, in MainSequence and HeMS +// 03.30.00 IM - Sep 23, 2026 - Enhancement: +// - Include the possibility of pulsational (L/M threshold) mass loss in the middle of a thermal-timescale mass transfer episode that removes entire envelope +// - Add option (MIN) to lose specific angular momentum during non-conservative mass transfer that is the smaller of isotropic re-emission and Jeans mode mass loss +// - Defect repair: +// - Corrected orbital separation re-computation following pulsational (L/M threshold) mass loss +// 03.31.00 AG - November 01, 2026 - Enhancement: // Added a post-common-envelope circumbinary disk (CBD) framework – disabled by default - based on the formalism // described in Grichener et al. (2026). The framework assumes that after common-envelope // evolution (CEE), a fraction of the pre-RLOF envelope mass and the binary's total angular @@ -1733,7 +1740,7 @@ // if MM is incremented, set mm and rr to 00, even if defect repairs and minor enhancements were also made // if mm is incremented, set rr to 00, even if defect repairs were also made -const std::string VERSION_STRING = "03.30.00"; +const std::string VERSION_STRING = "03.31.00"; # endif // __changelog_h__ diff --git a/src/constants.h b/src/constants.h index ddfb8ec3e..ddb789d34 100755 --- a/src/constants.h +++ b/src/constants.h @@ -255,6 +255,26 @@ constexpr unsigned int ABSOLUTE_MAXIMUM_TIMESTEPS = 1000000; constexpr int MAX_BSE_INITIAL_CONDITIONS_ITERATIONS = 100; // Maximum loop iterations looking for initial conditions for binary systems constexpr int MAX_TIMESTEP_RETRIES = 30; // Maximum retries to find a good timestep for stellar evolution +// Circumbinary disk (CBD) model limits and physical prescription coefficients. +// General timestep and option bounds are kept here, as for tides and mass loss. +constexpr double CBD_MAXIMUM_SUPPLIED_MASS_FRACTION_PER_TIMESTEP = 1.0E-3; // Maximum CBD mass supplied per timestep as a fraction of current binary mass +constexpr double CBD_MAXIMUM_ENVELOPE_MASS_FRACTION_SUPPLIED = 0.2; // Maximum fraction of CE mass lost allowed for the CBD reservoir + +// Siwek23 lookup-table domain (values outside the domain are clamped). +constexpr double CBD_SIWEK23_Q_MIN = 0.1; +constexpr double CBD_SIWEK23_Q_MAX = 1.0; +constexpr double CBD_SIWEK23_E_MIN = 0.0; +constexpr double CBD_SIWEK23_E_MAX = 0.8; + +// CBD-specific Eddington normalizations and TM23 retention prescription. +constexpr double CBD_BH_EDDINGTON_RATE_AT_REFERENCE_MASS = 4.42E-7; +constexpr double CBD_BH_EDDINGTON_REFERENCE_MASS_MSOL = 10.0; +constexpr double CBD_NS_EDDINGTON_REFERENCE_RADIUS_RSOL = 1.4374E-5; +constexpr double CBD_NS_EDDINGTON_RATE_AT_REFERENCE_RADIUS = 3.0E-8; +constexpr double CBD_WD_EDDINGTON_RATE_PER_RADIUS = 2.08E-3 / 1.7; +constexpr double CBD_TM23_RETENTION_COEFFICIENT = 0.6; +constexpr double CBD_TM23_RETENTION_EXPONENT = 0.6; + constexpr double MAXIMUM_MASS_LOSS_FRACTION = 0.001; // Maximum allowable mass loss - 0.1% (of mass) expressed as a fraction constexpr double MAXIMUM_RADIAL_CHANGE = 0.1; // Maximum allowable radial change - 10% (of radius) expressed as a fraction constexpr double MAXIMUM_WIND_MASS_LOSS_RATE = 0.1; // Maximum wind mass loss rates (in solar masses per year) to avoid convergence issues diff --git a/src/profiling.cpp b/src/profiling.cpp index 0ab6a3903..c77ddae30 100644 --- a/src/profiling.cpp +++ b/src/profiling.cpp @@ -1,249 +1,249 @@ -// This is the profiling namespace, and exists to provide profiling of function calls -// (e.g. pow(), sqrt() etc., but not limited to system functions - user defined functions can be -// profiled here too). -// -// See the "#define PROFILING" statement in profiling.h to learn how to turn profiling on and off - - -#include -#include "profiling.h" - -#ifdef DOPROFILING - - -namespace profiling { - - std::unordered_map m_CallMap; // map to record call signatures and counts - - - // put any variables here that are to be reported by the profiling code - // namespace variables need to be declared and initialised here - - double m_PowBaseMin = __DBL_MAX__; // minimum value of 'base' in calls to std::pow(base, exponent) - double m_PowBaseMax = -__DBL_MAX__; // maximum value of 'base' in calls to std::pow(base, exponent) - double m_PowExponentMin = __DBL_MAX__; // minimum value of 'exponent' in calls to std::pow(base, exponent) - double m_PowExponentMax = -__DBL_MAX__; // maximum value of 'exponent' in calls to std::pow(base, exponent) - - int m_PowCallCount = 0; // Total (accumulated) call count for std::pow() - - - // member functions - - /* - * Initialises profiling functionality - * - * Put any code here required for initialisation of profiling functionality - * This function should be called once immediately after program start - * - * - * void Initialise() - * - */ - void Initialise() { - InitialisePow(); - } - - /* - * Report profiling outcomes - * - * Put any code here required for reporting of profiling functionality - * This function should be called once immediately prior to program termination - * - * - * void Report() - * - */ - void Report() { - - std::cout << "\n"; - std::cout << "========== BEGIN PROFILING OUTCOMES ==========\n"; - std::cout << "\n"; - - ReportPow(); - - std::cout << "=========== END PROFILING OUTCOMES ===========\n"; - } - - - - /* - * Initialises variables used for profiling std::pow() - * - * - * void InitialisePow() - * - */ - void InitialisePow() { - - m_PowBaseMin = __DBL_MAX__; // minimum value of 'base' in calls to std::pow(base, exponent) - m_PowBaseMax = -__DBL_MAX__; // maximum value of 'base' in calls to std::pow(base, exponent) - m_PowExponentMin = __DBL_MAX__; // minimum value of 'exponent' in calls to std::pow(base, exponent) - m_PowExponentMax = -__DBL_MAX__; // maximum value of 'exponent' in calls to std::pow(base, exponent) - - m_PowCallCount = 0; // Total (accumulated) call count for std::pow() - } - - - /* - * Check call map to determine if specified signature and call count exists - * - * This function ostensibly checks the call map for a signature and call count, and returns - * true if an entry exists that matches both. The map is checked - for the same thing - - * a number of times in a loop (number determined by call count). This is purely to chew up - * CPU cycles. - * - * The real purpose of this function is to expend some CPU time so this call is identified - * by an external profiling tool so the full stack trace can be identified. This can be - * disabled if all we want is the immediate calling function and call count. - * - * The function could really be named 'expendCPU', but it does actually check the map for - * duplicate calls and the return value is valid, so 'CheckDuplicate' is appropriate (even - * though it really only does the check to prevent the code from being optimised away by - * the compiler - a plain loop that did nothing other than spin to soak up CPU cycles - * would be optimised out of the code by a good compiler). - * - * - * bool CheckDuplicate(const std::string &p_Signature, const int p_Count) - * - * @param [IN] p_Signature The signature of the call we're profiling - * @param [IN] p_Count The call clount we're checking for - * @return Boolean flag indicating if the signature and call count were found in the map - * - */ - bool CheckDuplicate(const std::string &p_Signature, const int p_Count) { - - bool duplicate = false; // result - - #ifndef PROFILING_COUNTS_ONLY // counts only? (i.e. no CPU spinning...) - - int cycles = 0; // measure of CPU cycles to expend - - // soak up some CPU cycles - // the CPU time expended depends on the call count - // p_Count should never be < 1, but just in case we include it with < 5 - // (previously it was being included with <100) - - if (p_Count < 5) cycles = 0; - else if (p_Count < 10) cycles = p_Count; - else if (p_Count < 100) cycles = 10; - else if (p_Count < 500) cycles = 20; - else if (p_Count < 1000) cycles = 100; - else if (p_Count < 5000) cycles = 200; - else if (p_Count < 10000) cycles = 1000; - else cycles = 2000; - - for (int i = 0; i < cycles; i++) { // spin some CPU cycles - duplicate = (m_CallMap[p_Signature] == p_Count); // and don't get optimised away... - } - - #endif - - return duplicate; - } - - - /* - * Profiling function to replace std::pow when profiling is enabled - * - * Gathers profiling statistics for calls to std::pow(base, exponent), - * and returns the valued of std::pow(base, exponent) - * - * Statistics gathered/recorded are: - * - * - minimum value of 'base' - * - maximum value of 'base' - * - minimum value of 'exponent' - * - maximum value of 'exponent' - * - call signatures - * - counts for call signatures - * - * - * double pow(const double p_Base, const double p_Exponent) (if PROFILING_CALLER_NAME is not #defined) - * double pow(const double p_Base, const double p_Exponent, const std::string &p_CallerName) (if PROFILING_CALLER_NAME is #defined) - * - * @param [IN] p_Base Floating point number to be raised to a power - * @param [IN] p_Exponent Floating point exponent to which p_Base is to be raised - * @param [IN] p_CallerName String containing the name of the calling function (if PROFILING_CALLER_NAME is #defined) - * @return Value of std::pow(p_Base, p_Exponent) - * - */ - #ifdef PROFILING_CALLER_NAME // add caller name to signature? - double pow(const double p_Base, const double p_Exponent, const std::string &p_CallerName) { // yes - #else - double pow(const double p_Base, const double p_Exponent) { // no - #endif - - // update minimums and maximums for parameters - m_PowBaseMin = std::min(p_Base, m_PowBaseMin); // minimum value of 'base' - m_PowBaseMax = std::max(p_Base, m_PowBaseMax); // maximum value of 'base' - m_PowExponentMin = std::min(p_Exponent, m_PowExponentMin); // minimum value of 'exponent' - m_PowExponentMax = std::max(p_Exponent, m_PowExponentMax); // maximum value of 'exponent' - - m_PowCallCount++; // increment accumulated call count - - std::string signature = ""; // call signature - - #ifdef PROFILING_CALLER_NAME // add caller name to signature? - signature = p_CallerName + "->"; // yes - #endif - - signature += "pow(" + std::to_string(p_Base) + "," + std::to_string(p_Exponent) + ")"; // call signature - - auto index = m_CallMap.find(signature); // look for signature map - if (index == m_CallMap.end()) { // found? - m_CallMap[signature] = 1; // no - insert it - first call - } - else { // yes - found - int count = m_CallMap[signature]++; // increment call count - (void)CheckDuplicate(signature, count); // check for duplicates - actually spin some CPU cycles - } - - return std::pow(p_Base, p_Exponent); // and return the actual value - } - - - /* - * Report profiling statistics for std::pow() - * - * Minimamly formatted for machine parsing. If the record contains a ":", then - * the ": " is the delimiter, the LHS is the identifier, and the RHS is the value - * associated with the identifier - * - * - * void ReportPow() - * - */ - void ReportPow() { - - std::cout << "Begin profiling outcomes for std::pow()\n"; - std::cout << "---------------------------------------\n"; - std::cout << "Total accumulated call count: " << m_PowCallCount << "\n"; - std::cout << "\n"; - std::cout << "Minimum base passed : " << m_PowBaseMin << "\n"; - std::cout << "Maximum base passed : " << m_PowBaseMax << "\n"; - std::cout << "Minimum exponent passed : " << m_PowExponentMin << "\n"; - std::cout << "Maximum exponent passed : " << m_PowExponentMax << "\n"; - - std::cout << "\n"; - std::cout << "---------------------------------------\n"; - std::cout << "\n"; - - // print the call map entries - std::unordered_map::iterator it = m_CallMap.begin(); - while (it != m_CallMap.end()) - { - std::string signature = it->first; // call signature - int count = it->second; // call count - std::cout << signature << ": " << count << "\n"; // print it - it++; // next map entry - } - - std::cout << "\n"; - std::cout << "End profiling outcomes for std::pow()\n"; - std::cout << "---------------------------------------\n"; - std::cout << "\n"; - } - -} - -#endif // DOPROFILING +// This is the profiling namespace, and exists to provide profiling of function calls +// (e.g. pow(), sqrt() etc., but not limited to system functions - user defined functions can be +// profiled here too). +// +// See the "#define PROFILING" statement in profiling.h to learn how to turn profiling on and off + + +#include +#include "profiling.h" + +#ifdef DOPROFILING + + +namespace profiling { + + std::unordered_map m_CallMap; // map to record call signatures and counts + + + // put any variables here that are to be reported by the profiling code + // namespace variables need to be declared and initialised here + + double m_PowBaseMin = __DBL_MAX__; // minimum value of 'base' in calls to std::pow(base, exponent) + double m_PowBaseMax = -__DBL_MAX__; // maximum value of 'base' in calls to std::pow(base, exponent) + double m_PowExponentMin = __DBL_MAX__; // minimum value of 'exponent' in calls to std::pow(base, exponent) + double m_PowExponentMax = -__DBL_MAX__; // maximum value of 'exponent' in calls to std::pow(base, exponent) + + int m_PowCallCount = 0; // Total (accumulated) call count for std::pow() + + + // member functions + + /* + * Initialises profiling functionality + * + * Put any code here required for initialisation of profiling functionality + * This function should be called once immediately after program start + * + * + * void Initialise() + * + */ + void Initialise() { + InitialisePow(); + } + + /* + * Report profiling outcomes + * + * Put any code here required for reporting of profiling functionality + * This function should be called once immediately prior to program termination + * + * + * void Report() + * + */ + void Report() { + + std::cout << "\n"; + std::cout << "========== BEGIN PROFILING OUTCOMES ==========\n"; + std::cout << "\n"; + + ReportPow(); + + std::cout << "=========== END PROFILING OUTCOMES ===========\n"; + } + + + + /* + * Initialises variables used for profiling std::pow() + * + * + * void InitialisePow() + * + */ + void InitialisePow() { + + m_PowBaseMin = __DBL_MAX__; // minimum value of 'base' in calls to std::pow(base, exponent) + m_PowBaseMax = -__DBL_MAX__; // maximum value of 'base' in calls to std::pow(base, exponent) + m_PowExponentMin = __DBL_MAX__; // minimum value of 'exponent' in calls to std::pow(base, exponent) + m_PowExponentMax = -__DBL_MAX__; // maximum value of 'exponent' in calls to std::pow(base, exponent) + + m_PowCallCount = 0; // Total (accumulated) call count for std::pow() + } + + + /* + * Check call map to determine if specified signature and call count exists + * + * This function ostensibly checks the call map for a signature and call count, and returns + * true if an entry exists that matches both. The map is checked - for the same thing - + * a number of times in a loop (number determined by call count). This is purely to chew up + * CPU cycles. + * + * The real purpose of this function is to expend some CPU time so this call is identified + * by an external profiling tool so the full stack trace can be identified. This can be + * disabled if all we want is the immediate calling function and call count. + * + * The function could really be named 'expendCPU', but it does actually check the map for + * duplicate calls and the return value is valid, so 'CheckDuplicate' is appropriate (even + * though it really only does the check to prevent the code from being optimised away by + * the compiler - a plain loop that did nothing other than spin to soak up CPU cycles + * would be optimised out of the code by a good compiler). + * + * + * bool CheckDuplicate(const std::string &p_Signature, const int p_Count) + * + * @param [IN] p_Signature The signature of the call we're profiling + * @param [IN] p_Count The call clount we're checking for + * @return Boolean flag indicating if the signature and call count were found in the map + * + */ + bool CheckDuplicate(const std::string &p_Signature, const int p_Count) { + + bool duplicate = false; // result + + #ifndef PROFILING_COUNTS_ONLY // counts only? (i.e. no CPU spinning...) + + int cycles = 0; // measure of CPU cycles to expend + + // soak up some CPU cycles + // the CPU time expended depends on the call count + // p_Count should never be < 1, but just in case we include it with < 5 + // (previously it was being included with <100) + + if (p_Count < 5) cycles = 0; + else if (p_Count < 10) cycles = p_Count; + else if (p_Count < 100) cycles = 10; + else if (p_Count < 500) cycles = 20; + else if (p_Count < 1000) cycles = 100; + else if (p_Count < 5000) cycles = 200; + else if (p_Count < 10000) cycles = 1000; + else cycles = 2000; + + for (int i = 0; i < cycles; i++) { // spin some CPU cycles + duplicate = (m_CallMap[p_Signature] == p_Count); // and don't get optimised away... + } + + #endif + + return duplicate; + } + + + /* + * Profiling function to replace std::pow when profiling is enabled + * + * Gathers profiling statistics for calls to std::pow(base, exponent), + * and returns the valued of std::pow(base, exponent) + * + * Statistics gathered/recorded are: + * + * - minimum value of 'base' + * - maximum value of 'base' + * - minimum value of 'exponent' + * - maximum value of 'exponent' + * - call signatures + * - counts for call signatures + * + * + * double pow(const double p_Base, const double p_Exponent) (if PROFILING_CALLER_NAME is not #defined) + * double pow(const double p_Base, const double p_Exponent, const std::string &p_CallerName) (if PROFILING_CALLER_NAME is #defined) + * + * @param [IN] p_Base Floating point number to be raised to a power + * @param [IN] p_Exponent Floating point exponent to which p_Base is to be raised + * @param [IN] p_CallerName String containing the name of the calling function (if PROFILING_CALLER_NAME is #defined) + * @return Value of std::pow(p_Base, p_Exponent) + * + */ + #ifdef PROFILING_CALLER_NAME // add caller name to signature? + double pow(const double p_Base, const double p_Exponent, const std::string &p_CallerName) { // yes + #else + double pow(const double p_Base, const double p_Exponent) { // no + #endif + + // update minimums and maximums for parameters + m_PowBaseMin = std::min(p_Base, m_PowBaseMin); // minimum value of 'base' + m_PowBaseMax = std::max(p_Base, m_PowBaseMax); // maximum value of 'base' + m_PowExponentMin = std::min(p_Exponent, m_PowExponentMin); // minimum value of 'exponent' + m_PowExponentMax = std::max(p_Exponent, m_PowExponentMax); // maximum value of 'exponent' + + m_PowCallCount++; // increment accumulated call count + + std::string signature = ""; // call signature + + #ifdef PROFILING_CALLER_NAME // add caller name to signature? + signature = p_CallerName + "->"; // yes + #endif + + signature += "pow(" + std::to_string(p_Base) + "," + std::to_string(p_Exponent) + ")"; // call signature + + auto index = m_CallMap.find(signature); // look for signature map + if (index == m_CallMap.end()) { // found? + m_CallMap[signature] = 1; // no - insert it - first call + } + else { // yes - found + int count = m_CallMap[signature]++; // increment call count + (void)CheckDuplicate(signature, count); // check for duplicates - actually spin some CPU cycles + } + + return std::pow(p_Base, p_Exponent); // and return the actual value + } + + + /* + * Report profiling statistics for std::pow() + * + * Minimamly formatted for machine parsing. If the record contains a ":", then + * the ": " is the delimiter, the LHS is the identifier, and the RHS is the value + * associated with the identifier + * + * + * void ReportPow() + * + */ + void ReportPow() { + + std::cout << "Begin profiling outcomes for std::pow()\n"; + std::cout << "---------------------------------------\n"; + std::cout << "Total accumulated call count: " << m_PowCallCount << "\n"; + std::cout << "\n"; + std::cout << "Minimum base passed : " << m_PowBaseMin << "\n"; + std::cout << "Maximum base passed : " << m_PowBaseMax << "\n"; + std::cout << "Minimum exponent passed : " << m_PowExponentMin << "\n"; + std::cout << "Maximum exponent passed : " << m_PowExponentMax << "\n"; + + std::cout << "\n"; + std::cout << "---------------------------------------\n"; + std::cout << "\n"; + + // print the call map entries + std::unordered_map::iterator it = m_CallMap.begin(); + while (it != m_CallMap.end()) + { + std::string signature = it->first; // call signature + int count = it->second; // call count + std::cout << signature << ": " << count << "\n"; // print it + it++; // next map entry + } + + std::cout << "\n"; + std::cout << "End profiling outcomes for std::pow()\n"; + std::cout << "---------------------------------------\n"; + std::cout << "\n"; + } + +} + +#endif // DOPROFILING diff --git a/src/profiling.h b/src/profiling.h index 923f1ecbe..3fa6cb437 100644 --- a/src/profiling.h +++ b/src/profiling.h @@ -1,75 +1,75 @@ -#ifndef __profiling_h__ -#define __profiling_h__ - -// configure the profiling functionality here by defining or undefining these variables - -#define DOPROFILING // comment this line out, or #undef DOPROFILING, to build production executable (i.e. no PROFILING code) -#undef DOPROFILING - -#ifdef DOPROFILING // profiling enabled? - // yes - profiling enabled - -#define PROFILING_COUNTS_ONLY // comment this line out, or #undef PROFILING_COUNTS_ONLY, to include CPU penalties for calls to profiling functions (for use with external profiling tools) -#define PROFILING_CALLER_NAME // comment this line out, or #undef PROFILING_CALLER_NAME, to NOT include the name of the calling function in the call signature of the function being profiled - - -#include "constants.h" - - -// Put any definitions of functions to be profiled here - and ensure that their "real", -// non-profiling definitions are in the "else" section below. -// Supporting functions for the functions being profiled go inside the namespace below. - -#define InitialiseProfiling profiling::Initialise() // initialise profiling functionality -#define ReportProfiling profiling::Report() // report profiling outcomes - -// define profiler calls to std::pow() -#ifdef PROFILING_CALLER_NAME // add caller name to signature? -#define PPOW(base, exponent) profiling::pow(base, exponent, __PRETTY_FUNCTION__) // yes -#else -#define PPOW(base, exponent) profiling::pow(base, exponent) // no -#endif - - -namespace profiling { - - - // object identifiers - all classes have these (adding here (no class) for error handling) - inline OBJECT_ID ObjectId() { return static_cast(OBJECT_TYPE::PROFILING); } // object id for profiling - ordinal value from enum - inline OBJECT_TYPE ObjectType() { return OBJECT_TYPE::PROFILING; } // object type for profiling - always "PROFILING" - inline OBJECT_PERSISTENCE ObjectPersistence() { return OBJECT_PERSISTENCE::PERMANENT; } // object persistence for profiling - always "PERMANENT" - inline STELLAR_TYPE StellarType() { return STELLAR_TYPE::NONE; } // stellar type for profiling - always "NONE" - - - // namespace functions - void Initialise(); // should be called once immediately after program start - void Report(); // should be called once immediately prior to program termination - - - // put any functions here that are to be reported on by the profiling code - - // std::pow() related functions - void InitialisePow(); // initialisation function for std::pow() profiling - void ReportPow(); // reporting function for std::pow() profiling - - bool CheckDuplicate(const std::string &p_Signature, const int p_Count); // checks for duplicate calls to std::pow() - - // profiling function for std::pow() - #ifdef PROFILING_CALLER_NAME // add caller name to signature? - double pow(const double p_Base, const double p_Exponent, const std::string &p_CallerName); // yes - #else - double pow(const double p_Base, const double p_Exponent); // no - #endif - -} - -#else // no - profiling not enabled - -#define InitialiseProfiling {} // initialise profiling functionality -#define ReportProfiling {} // report profiling outcomes - -#define PPOW(base, exponent) std::pow(base, exponent) // not profiling calls to pow() - -#endif // DOPROFILING - -#endif // __profiling_h__ +#ifndef __profiling_h__ +#define __profiling_h__ + +// configure the profiling functionality here by defining or undefining these variables + +#define DOPROFILING // comment this line out, or #undef DOPROFILING, to build production executable (i.e. no PROFILING code) +#undef DOPROFILING + +#ifdef DOPROFILING // profiling enabled? + // yes - profiling enabled + +#define PROFILING_COUNTS_ONLY // comment this line out, or #undef PROFILING_COUNTS_ONLY, to include CPU penalties for calls to profiling functions (for use with external profiling tools) +#define PROFILING_CALLER_NAME // comment this line out, or #undef PROFILING_CALLER_NAME, to NOT include the name of the calling function in the call signature of the function being profiled + + +#include "constants.h" + + +// Put any definitions of functions to be profiled here - and ensure that their "real", +// non-profiling definitions are in the "else" section below. +// Supporting functions for the functions being profiled go inside the namespace below. + +#define InitialiseProfiling profiling::Initialise() // initialise profiling functionality +#define ReportProfiling profiling::Report() // report profiling outcomes + +// define profiler calls to std::pow() +#ifdef PROFILING_CALLER_NAME // add caller name to signature? +#define PPOW(base, exponent) profiling::pow(base, exponent, __PRETTY_FUNCTION__) // yes +#else +#define PPOW(base, exponent) profiling::pow(base, exponent) // no +#endif + + +namespace profiling { + + + // object identifiers - all classes have these (adding here (no class) for error handling) + inline OBJECT_ID ObjectId() { return static_cast(OBJECT_TYPE::PROFILING); } // object id for profiling - ordinal value from enum + inline OBJECT_TYPE ObjectType() { return OBJECT_TYPE::PROFILING; } // object type for profiling - always "PROFILING" + inline OBJECT_PERSISTENCE ObjectPersistence() { return OBJECT_PERSISTENCE::PERMANENT; } // object persistence for profiling - always "PERMANENT" + inline STELLAR_TYPE StellarType() { return STELLAR_TYPE::NONE; } // stellar type for profiling - always "NONE" + + + // namespace functions + void Initialise(); // should be called once immediately after program start + void Report(); // should be called once immediately prior to program termination + + + // put any functions here that are to be reported on by the profiling code + + // std::pow() related functions + void InitialisePow(); // initialisation function for std::pow() profiling + void ReportPow(); // reporting function for std::pow() profiling + + bool CheckDuplicate(const std::string &p_Signature, const int p_Count); // checks for duplicate calls to std::pow() + + // profiling function for std::pow() + #ifdef PROFILING_CALLER_NAME // add caller name to signature? + double pow(const double p_Base, const double p_Exponent, const std::string &p_CallerName); // yes + #else + double pow(const double p_Base, const double p_Exponent); // no + #endif + +} + +#else // no - profiling not enabled + +#define InitialiseProfiling {} // initialise profiling functionality +#define ReportProfiling {} // report profiling outcomes + +#define PPOW(base, exponent) std::pow(base, exponent) // not profiling calls to pow() + +#endif // DOPROFILING + +#endif // __profiling_h__ diff --git a/src/typedefs.h b/src/typedefs.h index b452e5e0f..278d9b886 100755 --- a/src/typedefs.h +++ b/src/typedefs.h @@ -364,16 +364,6 @@ const COMPASUnorderedMap CIRCUMBI { CIRCUMBINARY_DISK_EDDINGTON_MODE::TM23, "TM23" } }; -// circumbinary disk evolution modes -// INSTANTANEOUS applies the full CBD interaction immediately after CE; -// TIMESTEPPED stores an active disk reservoir and evolves it over later -// COMPAS timesteps. -enum class CIRCUMBINARY_DISK_EVOLUTION_MODE: int { INSTANTANEOUS, TIMESTEPPED }; -const COMPASUnorderedMap CIRCUMBINARY_DISK_EVOLUTION_MODE_LABEL = { - { CIRCUMBINARY_DISK_EVOLUTION_MODE::INSTANTANEOUS, "INSTANTANEOUS" }, - { CIRCUMBINARY_DISK_EVOLUTION_MODE::TIMESTEPPED, "TIMESTEPPED" } -}; - // common envelope cccretion prescriptions enum class CE_ACCRETION_PRESCRIPTION: int { ZERO, CONSTANT, UNIFORM, MACLEOD, CHEVALIER }; const COMPASUnorderedMap CE_ACCRETION_PRESCRIPTION_LABEL = { @@ -673,14 +663,15 @@ const COMPASUnorderedMap MT_A }; // mass transfer angular momentum loss prescriptions -enum class MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION: int { JEANS, ISOTROPIC_RE_EMISSION, CIRCUMBINARY_RING, MACLEOD_LINEAR, KLENCKI_LINEAR, ARBITRARY }; +enum class MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION: int { JEANS, ISOTROPIC_RE_EMISSION, CIRCUMBINARY_RING, MACLEOD_LINEAR, KLENCKI_LINEAR, ARBITRARY, MIN }; const COMPASUnorderedMap MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION_LABEL = { { MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION::JEANS, "JEANS" }, { MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION::ISOTROPIC_RE_EMISSION, "ISOTROPIC" }, { MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION::CIRCUMBINARY_RING, "CIRCUMBINARY" }, { MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION::MACLEOD_LINEAR, "MACLEOD_LINEAR" }, { MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION::KLENCKI_LINEAR, "KLENCKI_LINEAR" }, - { MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION::ARBITRARY, "ARBITRARY" } + { MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION::ARBITRARY, "ARBITRARY" }, + { MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION::MIN, "MIN" } }; // mass transfer cases diff --git a/src/yaml.cpp b/src/yaml.cpp index 557e5ea72..787e6c622 100644 --- a/src/yaml.cpp +++ b/src/yaml.cpp @@ -1,568 +1,568 @@ -#include -#include -#include -#include -#include - -#include "Options.h" -#include "yaml.h" -#include "utils.h" - - -/* - * YAML file creation - * - * Code to create a new YAML file based on current COMPAS defaults and any user-input option values. - * See yaml.h for description of the YAML template. - * - * There is no doubt that some of the code here is not the most efficient way of doing this, but realistically - * this will be run once or twice every not very often - and it runs in a fraction of a second - so I'm not going - * to engage in premature optimisation... - */ - -namespace yaml { - - /* - * Read content from YAML template file - * - * Read YAML template from file passed in p_YAMLtemplateName. - * Replace content of default template 'yamlTemplate' declared in yaml.h if read ok. - * - * - * int ReadYAMLtemplate(const std::string p_YAMLtemplateName) - * - * @param [IN] p_YAMLtemplateName Filename to be read - should be fully qualified - * @return Integer result: - * -1 indicates IO error - * 0 indicates non-existent file - * 1 indicates file exists but contains no content - * 2 indicates contents read ok (and replace the default template declared in yaml.h) - */ - int ReadYAMLtemplate(const std::string p_YAMLtemplateName) { - int result = -1; // result - initially error - - if (utils::FileExists(p_YAMLtemplateName)) { // template file exists? - - std::ifstream yamlTemplateFile(p_YAMLtemplateName); // yes - open the file - if (yamlTemplateFile.is_open()) { // open ok? - - std::vector yamlTemplateContent; // yes - file content - - std::string rec; // record read from file - while (std::getline(yamlTemplateFile, rec)) { // for all records in file - get record from template file - yamlTemplateContent.push_back(rec); // add record to content vector - } - - result = 1; // template file read ok - no content - if (yamlTemplateContent.size() > 0) { // template file has content? - yamlTemplate = yamlTemplateContent; // yes - replace yamlTemplate content - result = 2; // template file read ok - content ok - } - } - } - else result = 0; // no - YAML template file does not exist - - return result; - } - - - /* - * Write YAML content to YAML file - * - * Writes YAML file content passed in p_YAMLcontent to file passed in p_YAMLname. - * Will prompt user for overwrite if file already exists. - * - * - * int WriteYAMLfile(const std::string p_YAMLname, const std::vector p_YAMLcontent) - * - * @param [IN] p_YAMLname Filename to be written - should be fully qualified - * @param [IN] p_YAMLcontent YAML content to be written - vector of strings - * @return Integer result: - * -1 indicates IO error - * 0 indicates file already exists - no overwrite - * 1 indicates success - file written (possibly overwritten) ok - */ - int WriteYAMLfile(const std::string p_YAMLname, const std::vector p_YAMLcontent) { - int result = -1; // result - initially error - - bool doWrite = true; // should write (overwrite)? - if (utils::FileExists(p_YAMLname)) { // file exists? - // yes - ask user whether to overwrite - std::string prompt = "YAML file '" + p_YAMLname + "' already exists - overwrite (Y/N)?"; // set prompt string for overwrite - std::string response = ""; // user response - - do { - std::cout << prompt << std::flush; // prompt use for input - std::string ch = ""; // user response character - std::string lastCh = ""; // last user response character (will always be newline) - size_t charsInput = 0; // number of characters input (including newline) - do { - lastCh = ch; // set last response character - ch = std::cin.get(); // get response character (one character at a time) - charsInput++; // count of characters input - } while (ch != "\n"); // while not newline - ch = charsInput == 2 ? lastCh : ""; // we want just 1 character + newline - character prior to newline - if (!ch.empty()) response = utils::ToLower(ch); // set user response - } while (response != "y" && response != "n"); // while not valid response - doWrite = response == "y"; // set write flag - } - - result = 0; // file not written (no overwrite) result - if (doWrite) { // should write? - result = 1; // yes - set file written result - std::ofstream yamlFile(p_YAMLname); // open the file - if (yamlFile.is_open()) { // open ok? - for (std::size_t i = 0; i < p_YAMLcontent.size(); i++) { // yes - for each record - if (!yamlFile.write(p_YAMLcontent[i].substr(3).c_str(), p_YAMLcontent[i].length() - 3)) { // remove the marker ("HDR" / "OPT") and write - result = false; // failed - set result ... - break; // ... and stop - } - } - } - else result = -1; // no - not open ok - set IO error - } - return result; - } - - - /* - * Construct YAML file content and write to file passed in p_YAMLfilename - * - * Constructs YAML file content based on YAML template read from file passed in - * p_YAMLtemplateName. If no filename passed in p_YAMLtemplateName, the default - * template from yaml.h is used. - * - * Constructed content is written to file passed in p_YAMLfilename. - * - * - * void MakeYAMLfile(const std::string p_YAMLfilename, const std::string p_YAMLtemplateName) - * - * @param [IN] p_YAMLfilename Filename to be written - should be fully qualified - * @param [IN] p_YAMLtemplateName Template filename to be read - should be fully qualified - */ - - void MakeYAMLfile(const std::string p_YAMLfilename, const std::string p_YAMLtemplateName) { - // following macro is for convenience and readability - undefined at end of function - // sets strings to be written to the new YAML file - #define SET_STRINGS(preamble, option, value, allowed, dfault, comment) { \ - yamlPreambleStrings.push_back(preamble); \ - yamlOptionStrings.push_back(option); \ - yamlValueStrings.push_back(value); \ - yamlAllowedStrings.push_back(allowed); \ - yamlDefaultStrings.push_back(dfault); \ - yamlCommentStrings.push_back(comment); } - - - std::vector yamlPreambleStrings; // new YAML file content - preamble strings - std::vector yamlOptionStrings; // new YAML file content - option name strings - std::vector yamlValueStrings; // new YAML file content - option value strings - std::vector yamlAllowedStrings; // new YAML file content - allowed values strings - std::vector yamlDefaultStrings; // new YAML file content - default values strings - std::vector yamlCommentStrings; // new YAML file content - comment strings - - - // process the option - // - format strings as required and populate the yaml vectors (declared above) - auto ProcessOption = [&] (const std::string p_OptionStr, // option name string - const std::string p_ValueStr, // option value string - const std::vector p_AllowedStr, // option allowed value strings - const std::string p_DefaultStr, // option default string - const std::string p_CommentStr, // comment string - const bool p_UserSpecified, // user specified option value? - const TYPENAME p_DataType, // short data type - const std::string p_TypeStr) { // detailed data type - - // format option value/default string - // fix floating point precision - // fix bool for python (0/true, 1/false -> True, False) - // add '' for string options if not already present - // not all data types need to be formatted - some just pass through - auto FormatString = [&] (const std::string p_Str, // string to be formatted - const TYPENAME p_shortType, // short data type - const std::string p_detailedType) { // detailed data type - std::stringstream ss; - switch (p_shortType) { - case TYPENAME::FLOAT : { float v = std::stof(p_Str); ss << std::fixed << std::setprecision(v < 100 ? 6 : 2) << v; } break; - case TYPENAME::DOUBLE : { double v = std::stod(p_Str); ss << std::fixed << std::setprecision(v < 100 ? 6 : 2) << v; } break; - case TYPENAME::LONGDOUBLE: { long double v = std::stold(p_Str); ss << std::fixed << std::setprecision(v < 100 ? 6 : 2) << v; } break; - case TYPENAME::BOOL : { std::string s = p_Str; s = utils::trim(s); ss << (s == "1" || utils::Equals(s, "true") ? "True" : "False"); } break; - case TYPENAME::STRING : { - bool vecType = (p_detailedType == "VECTOR"); // vector of strings? - size_t len = p_Str.length(); // str length - if (len == 0) { // empty str? - ss << (vecType ? "{ }" : "''"); // yes - just quotes/braces (for vector) - } - else { // no - str not empty - // add quotes if necessary - // the assumption here is that if the string already has opening and closing quotes - // then we're good - do nothing, but if it has only an opening quote or a closing quote, - // or neither, then we need to add both opening and closing quotes - // (same assumption for open and close brace for vector strings - if it has braces we leave it alone) - - if (!vecType) { // VECTOR ? - if (p_Str[0] != '\'' || p_Str[len - 1] != '\'') { ss << "'"; ss << p_Str; ss << "'"; } // no - add quotes if necessary - else ss << p_Str; // has quotes - just pass through - } - else { // yes - string vector - parse and format string - std::string str = p_Str; // string to be formatted - str = utils::trim(str); // trim whitespace both ends - if (str[0] != '{' || str[len - 1] != '}') { // has open and close brace? - ss << "{ "; // no - add open brace - size_t start = str[0] == '{' ? 1 : 0; // start position for find - size_t end = 0; // found position - bool first = true; // for comma placement - while ((end = p_Str.find(' ', start)) != std::string::npos) { // find space - std::string v = p_Str.substr(start, end - start); // got it - extract the substring - if (v.length() > 0) { // skip empty substring - if (!first) ss << ", "; // add comma if not first element - if (v[0] != '\'' || v[len - 1] != '\'') { ss << "'"; ss << v; ss << "'"; } // add quotes if necessary - else ss << v; // has quotes - just pass through - } - start = end + 1; // for next space - first = false; // not first element - } - std::string v = p_Str.substr(start, end - start); // extract (possible) last substring - if (v.length() > 0) { // anything there? - if (!first) ss << ", "; // yes - add comma if not first element (shouldn't be, but just in case...) - if (v[0] != '\'' || v[len - 1] != '\'') { ss << "'"; ss << v; ss << "'"; } // add quotes if necessary - else ss << v; // has quotes - just pass through - } - if (str[0] != '{' || str[len - 1] != '}') ss << " }"; // add close brace if necessary - } - else ss << p_Str; // has braces - just pass it through - } - } - } break; - default: ss << p_Str; // just pass it through - } - return ss.str(); // formatted string - }; - - std::string valueStr = FormatString(p_ValueStr, p_DataType, p_TypeStr); - std::string defaultStr = FormatString(p_DefaultStr, p_DataType, p_TypeStr); - - std::string preamble = p_UserSpecified ? " --" : "# --"; // preamble - all option records are commented, except options that are user specified - - if (p_AllowedStr.size() == 0) { // multiple option values? - SET_STRINGS(preamble, p_OptionStr, valueStr, "", defaultStr, p_CommentStr); // no - record for YAML file output - value set - } - else { // yes - multiple option values - // We list the allowed values in the order they are stored in the COMPASUnorderedMap - // in constants.h. We could instead list in alphabetical order, but the assumption - // is that the order in constants.h was deliberate, so we'll maintain it - if that's - // not true then we could just sort alphabetically here - std::string allowedValuesStr = "Options: ["; // records allowed option values - for (size_t idx = 0; idx < p_AllowedStr.size(); idx++) { // for each allowed value - allowedValuesStr += p_AllowedStr[idx]; // show allowed value - if (idx < p_AllowedStr.size() - 1) allowedValuesStr += ","; // add delimiter if necessary - } - allowedValuesStr += "]"; // close bracket - SET_STRINGS(preamble, p_OptionStr, valueStr, allowedValuesStr, defaultStr, p_CommentStr); // option record for YAML file output - } - }; - - - // begin MakeYAMLfile() body - - // get COMPAS option details - std::vector optionDetails = OPTIONS->CmdLineOptionsDetails(); - - if (optionDetails.empty()) { // have COMPAS option details? - std::cerr << "Unable to access COMPAS option details - no YAML file created.\n"; // no - announce error - } - else { // yes - have options - // process options/create YAML file - auto wallTime = std::chrono::system_clock::now(); // get wall time - std::time_t timeNow = std::chrono::system_clock::to_time_t(wallTime); // current time and date ... - std::string currentTime = std::string(std::ctime(&timeNow)); // ... as a string ... - currentTime = utils::trim(currentTime); // ... trimmed of whitespace (including newline etc.) - - // read YAML template file if supplied - - if (p_YAMLtemplateName.length() > 0) { // have YAML template filename? - int readResult = ReadYAMLtemplate(p_YAMLtemplateName); // yes - read YAML template file - std::string preamble = "*WARNING* File '" + p_YAMLtemplateName + "' "; // preamble for warnings - std::string warn = ""; // warning string - if (readResult < 0) warn += "not read: IO error. COMPAS default template will be used."; // IO error - else if (readResult == 0) warn += "not read: file does not exist. COMPAS default template will be used."; // file not found - else if (readResult == 1) warn += "is empty. COMPAS default template will be used."; // no content in file - if (warn.length() > 0) std::cout << preamble << warn << "\n"; // announce warning if necessary - } - - // add default records (file headers) - - SET_STRINGS("##~!!~## COMPAS option values", "", "", "", "", ""); // header record for YAML file output - - std::string s = "##~!!~## File Created " + currentTime + " by COMPAS v" + VERSION_STRING; // time and version stamp - if (s[23] == ' ') s[23] = '0'; // add leading zero for day if necessary - SET_STRINGS(s, "", "", "", "", ""); // time and version stamp record for YAML file output - - SET_STRINGS("##~!!~##", "", "", "", "", ""); // Blank header line - SET_STRINGS("##~!!~## The default COMPAS YAML file (``compasConfigDefault.yaml``), as distributed, has", "", "", "", "", ""); // Notice regarding commented line in default YAML // time and version stamp record for YAML file output - SET_STRINGS("##~!!~## all COMPAS option entries commented so that the COMPAS default value for the", "", "", "", "", ""); // Notice regarding commented line in default YAML // time and version stamp record for YAML file output - SET_STRINGS("##~!!~## option is used by default. To use a value other than the COMPAS default value,", "", "", "", "", ""); // Notice regarding commented line in default YAML // time and version stamp record for YAML file output - SET_STRINGS("##~!!~## users must uncomment the entry and change the option value to the desired value.", "", "", "", "", ""); // Notice regarding commented line in default YAML // time and version stamp record for YAML file output - - size_t numTemplateRecords = yamlTemplate.size(); // number of records in the YAML template - - // create YAML content - - if (numTemplateRecords == 0) { // have YAML template? - // no... - // we have no template - this should never happen (we've got a default template in the code, - // but we need to deal with that being missing just in case) - so we'll just write the COMPAS - // options alphabetically within the datatype categories (booleanChoices, numericalChoices, - // stringChoices, listChoices) - - std::cerr << "*WARNING* No YAML template - will write COMPAS options alphabetically.\n"; // announce warning - - // this is not pretty - we're going to iterate over the COMPAS options 4 times - once - // for each of the datatype categories mentioned above (see note about premature optimisation - // at the top of this file) - - std::vector categories { "booleanChoices", "numericalChoices", "stringChoices", "listChoices" }; // category names for headers - - for (size_t idx = 0; idx < categories.size(); idx++) { // for each category - - std::string category = categories[idx]; // which category? - SET_STRINGS("", "", "", "", "", ""); // blank record for YAML file output - SET_STRINGS(category + ":", "", "", "", "", ""); // category header for YAML file output - - for (size_t optionIdx = 0; optionIdx < optionDetails.size(); optionIdx++) { // for each COMPAS option - - if (optionDetails[optionIdx].dataType == TYPENAME::BOOL) { // boolean option? - if (category != "booleanChoices") continue; // skip if this category is not booleanChoices - } - else if (optionDetails[optionIdx].dataType == TYPENAME::STRING) { // string, or vector of strings, option? - if (optionDetails[optionIdx].typeStr == "VECTOR") { // ... vector of strings - if (category != "listChoices") continue; // skip if this category is not listChoices - } - else { // ... string - if (category != "stringChoices") continue; // skip if this category is not stringChoices - } - } - else { // assume numerical option - if (category != "numericalChoices") continue; // skip if this category is not numericalChoices - } - - // process the option - ProcessOption(optionDetails[optionIdx].optionStr, // option name string - optionDetails[optionIdx].valueStr, // option value string - optionDetails[optionIdx].allowedStr, // option allowed value strings - optionDetails[optionIdx].defaultStr, // option default string - "", // no comment - utils::Equals(optionDetails[optionIdx].sourceStr, "user_supplied"), // user specified option value? - optionDetails[optionIdx].dataType, // option (short) data type - optionDetails[optionIdx].typeStr); // option (detailed) data type - } - } - } - else { // yes - have YAML template - // use template to format YAML file - for (size_t rec = 0; rec < numTemplateRecords; rec++) { // for each template record - - std::string thisRec = yamlTemplate[rec]; // template record ... - thisRec = utils::trim(thisRec); // ... trimmed of whitespace - - // need to allow for commented options in template, especially since the template - // might be an existing YAML file. Since the template may have the hash character - // ("#") throughout, I'll refer to the hash at the start of the record (or as the - // first non-whitespace character) as the "leading hash" to differentiate it from - // other instances of the hash character in a template record - bool optRec = false; // option template record? - size_t startPos = 0; // where to start looking for non-leading hash - - if (thisRec.length() > 3) { // record long enough to be option record? - if (thisRec.substr(0, 2) == "--") { // yes - has leading "--"? - optRec = true; // yes - assume option record - } - else if (thisRec[0] == '#') { // no - not leading "--": leading hash? - optRec = false; // for now... - if (thisRec.length() > 4) { // enough characters to be option record? - std::string s = thisRec.substr(1); // yes... strip leading hash - s = utils::ltrim(s); // trim whitespace from start - if (s.length() > 2 && s.substr(0, 2) == "--") { // more than 2 characters, and option indicater? - optRec = true; // yes - looks like it might be an option record - startPos = 1; // skip over leading hash in later searches - } - } - } - } - - // parse template record - if (!optRec) { // option record? - if (yamlTemplate[rec].length() < 8 || yamlTemplate[rec].substr(0, 8) != "##~!!~##") { // no - skip COMPAS generated headers, and ... - SET_STRINGS(yamlTemplate[rec], "", "", "", "", ""); // ... output the record as is - } - } - else { // yes - option record - - // look for a comment on the option record and, if present, preserve it. - // I refer to the hash indication comment on the option record as the - // "comment hash" to differentiate it from all the other hashes that might - // be there... Because the template might be an existing YAML file, one or - // both of the (special) strings "# Default:" and "# Options:" may be present, - // and if so we just skip over them looking for any comment on the option record - - size_t hashStart = startPos; // where to start looking for the comment hash - size_t p; // position in string - if ((p = yamlTemplate[rec].find("# Default:", hashStart)) != std::string::npos) { // "# Default:" present? - if (p > hashStart) hashStart = p + 1; // yes - adjust starting position for comment hash search - } - - if ((p = yamlTemplate[rec].find("# Options:", hashStart)) != std::string::npos) { // "# Options:" present? - if (p > hashStart) hashStart = p + 1; // yes - adjust starting position for comment hash search - } - - std::string optionStr; // string to hold option name and value - std::string commentStr; // string to hold optional comment - size_t hashLoc = yamlTemplate[rec].find_first_of("#", hashStart); // find the comment if there is one - if (hashLoc == std::string::npos) { // found hash? - optionStr = yamlTemplate[rec].substr(startPos); // no - no comment present - option string is the record (from startPos) - commentStr = ""; // no comment - } - else { // yes - hash (comment present) - optionStr = yamlTemplate[rec].substr(startPos, hashLoc); // option string is the record up to hash - commentStr = yamlTemplate[rec].substr(hashLoc); // comment string (includes "#") - } - - optionStr = utils::trim(optionStr); // trim whitespace from both ends of option string - - // need to allow for option values in template, especially since the template might - // be an existing YAML file. Values in the template are not preserved - we only use - // the template to preserve header records, blank records, option groupings, and comments. - size_t colonLoc = optionStr.find_first_of(":"); // find the first colon if there is one - if (colonLoc != std::string::npos) { // found colon? - optionStr = optionStr.substr(0, colonLoc); // option string is everything prior to the ":"" - } - - // Find the value for the option (COMPAS value, not any value present in the template) - // - note: could be user supplied - size_t pos = optionStr.find_first_not_of("\t -"); // find option indicator - std::string templateOptionStr = optionStr.substr(pos); // strip "--" from template option string - - bool found = false; // matching COMPAS option string found? Not initially... - for (std::size_t optionIdx = 0; optionIdx < optionDetails.size(); optionIdx++) { // for each COMPAS option - - std::string compasOptionStr = optionDetails[optionIdx].optionStr; // COMPAS option name string - if (utils::Equals(optionDetails[optionIdx].sourceStr, "calculated")) continue; // ignore calculated options - if (utils::Equals(compasOptionStr, templateOptionStr)) { // match? - - found = true; // yes - ProcessOption(templateOptionStr, // option name string (as written in the YAML template) - optionDetails[optionIdx].valueStr, // option (COMPAS) value string - optionDetails[optionIdx].allowedStr, // option allowed value strings - optionDetails[optionIdx].defaultStr, // option default string - commentStr, // comment string (as written in the YAML template) - utils::Equals(optionDetails[optionIdx].sourceStr, "user_supplied"), // user specified option value? - optionDetails[optionIdx].dataType, // option (short) data type - optionDetails[optionIdx].typeStr); // option (detailed) data type - break; // we're done - } - } - - if (!found) { // matching COMPAS option string found? - std::cerr << "*WARNING* Option '" - << templateOptionStr - << "' in YAML template is not a valid COMPAS option - ignored.\n"; // no - announce warning - } - } - } - } - - // add any COMPAS options not in the YAML template - alphabetically at end - - bool extra = false; // extra records? Initially false - for (std::size_t optionIdx = 0; optionIdx < optionDetails.size(); optionIdx++) { // for each COMPAS option - - std::string compasOptionStr = optionDetails[optionIdx].optionStr; // option name string - - if (utils::Equals(optionDetails[optionIdx].sourceStr, "calculated")) continue; // ignore calculated options - if (utils::Equals(compasOptionStr, "help")) continue; // ignore 'help' option - if (utils::Equals(compasOptionStr, "version")) continue; // ignore 'version' option - if (utils::Equals(compasOptionStr, "create-YAML-file")) continue; // ignore 'create-yaml-file' option - if (utils::Equals(compasOptionStr, "YAML-template")) continue; // ignore 'YAML-template' option - - bool match = false; - for (size_t yamlIdx = 0; yamlIdx < yamlOptionStrings.size(); yamlIdx++) { // for each YAML option name - if (utils::Equals(compasOptionStr, yamlOptionStrings[yamlIdx])) { // match? - match = true; // yes - flag it - break; // no need to look further - } - } - - if (!match) { // COMPAS option in YAML options? - if (!extra) { // no - first extra record? - extra = true; // yes - flag it - SET_STRINGS("\n\n### Additional COMPAS options not found in YAML template ###", "", "", "", "", "");// header record for YAML file output - } - ProcessOption(compasOptionStr, // option name string (as written in the COMPAS OPTIONS class) - optionDetails[optionIdx].valueStr, // option value string - optionDetails[optionIdx].allowedStr, // option allowed value strings - optionDetails[optionIdx].defaultStr, // option default string - "", // no comment - utils::Equals(optionDetails[optionIdx].sourceStr, "user supplied"), // user specified option value? - optionDetails[optionIdx].dataType, // option (short) data type - optionDetails[optionIdx].typeStr); // option (detailed) data type - } - } - - // partially build new YAML file records - // for now, just any header or blank records, and preamble, option name, and option value - // for option records set maximum default str length and maximum allowed str length - std::vector yamlRecords; // new YAML file records - size_t maxOptionStrLen = 0; // maximum length of option strings (to locate default string) - size_t maxDefaultStrLen = 0; // maximum length of default strings (to locate allowed string) - size_t maxAllowedStrLen = 0; // maximum length of allowed strings (to locate comment string) - for (std::size_t yamlIdx = 0; yamlIdx < yamlPreambleStrings.size(); yamlIdx++) { // for each YAML option - if (yamlOptionStrings[yamlIdx].empty()) { // header or blank record? - yamlRecords.push_back("HDR" + yamlPreambleStrings[yamlIdx]); // yes - marker and just preamble - } - else { // no - not header or blank record - std::string s = "OPT" + yamlPreambleStrings[yamlIdx] + yamlOptionStrings[yamlIdx] + ": " + yamlValueStrings[yamlIdx]; // construct string including value - if (s.length() > maxOptionStrLen) maxOptionStrLen = s.length(); // get maximum length of YAML option strings - yamlRecords.push_back(s); // partial record for YAML file output - } - if (yamlDefaultStrings[yamlIdx].length() > maxDefaultStrLen) maxDefaultStrLen = yamlDefaultStrings[yamlIdx].length(); // maximum length of default strings - if (yamlAllowedStrings[yamlIdx].length() > maxAllowedStrLen) maxAllowedStrLen = yamlAllowedStrings[yamlIdx].length(); // maximum length of allowed strings - } - - // add default values, allowed values, and template comment as necessary - - size_t defaultPos = maxOptionStrLen + 2; // position of default string - size_t allowedPos = defaultPos + maxDefaultStrLen + 13; // position of allowed strings - size_t commentPos = allowedPos + maxAllowedStrLen + 4; // position of comment string - for (size_t idx = 0; idx < yamlRecords.size(); idx++) { // for each YAML record - std::string s = yamlRecords[idx]; // start with partially constructed record - - if (yamlRecords[idx].substr(0, 3) == "OPT") { // option record? - // yes - header and blank records skipped here - size_t len = s.length(); // current length of record - for (size_t pos = len; pos < defaultPos; pos++) s += " "; // pad with spaces up to option default field - s += "# Default: " + yamlDefaultStrings[idx]; // yes add default values string - - if (!yamlAllowedStrings[idx].empty()) { // have allowed values? - size_t len = s.length(); // yes - current length of record - for (size_t pos = len; pos < allowedPos; pos++) s += " "; // pad with spaces up to allowed strings field - s += "# " + yamlAllowedStrings[idx]; // yes add allowed values string - } - - if (!yamlCommentStrings[idx].empty()) { // have comment? - size_t len = s.length(); // yes - current length of record - for (size_t pos = len; pos < commentPos; pos++) s += " "; // pad with space ups to comment strings field - s += " " + yamlCommentStrings[idx]; // yes add comment string - } - } - yamlRecords[idx] = s + "\n"; // set YAML file record - } - - // write new YAML file - - int writeResult = WriteYAMLfile(p_YAMLfilename, yamlRecords); // write records to file - if (writeResult < 0) std::cerr << "*ERROR* File '" << p_YAMLfilename << "' not written: IO error.\n"; // announce IO error - else if (writeResult == 0) std::cout << "File '" << p_YAMLfilename << "' not written - file already exists.\n"; // announce already exists - else std::cout << "File '" << p_YAMLfilename << "' written.\n"; // announce success - } - } - #undef SET_STRINGS -} +#include +#include +#include +#include +#include + +#include "Options.h" +#include "yaml.h" +#include "utils.h" + + +/* + * YAML file creation + * + * Code to create a new YAML file based on current COMPAS defaults and any user-input option values. + * See yaml.h for description of the YAML template. + * + * There is no doubt that some of the code here is not the most efficient way of doing this, but realistically + * this will be run once or twice every not very often - and it runs in a fraction of a second - so I'm not going + * to engage in premature optimisation... + */ + +namespace yaml { + + /* + * Read content from YAML template file + * + * Read YAML template from file passed in p_YAMLtemplateName. + * Replace content of default template 'yamlTemplate' declared in yaml.h if read ok. + * + * + * int ReadYAMLtemplate(const std::string p_YAMLtemplateName) + * + * @param [IN] p_YAMLtemplateName Filename to be read - should be fully qualified + * @return Integer result: + * -1 indicates IO error + * 0 indicates non-existent file + * 1 indicates file exists but contains no content + * 2 indicates contents read ok (and replace the default template declared in yaml.h) + */ + int ReadYAMLtemplate(const std::string p_YAMLtemplateName) { + int result = -1; // result - initially error + + if (utils::FileExists(p_YAMLtemplateName)) { // template file exists? + + std::ifstream yamlTemplateFile(p_YAMLtemplateName); // yes - open the file + if (yamlTemplateFile.is_open()) { // open ok? + + std::vector yamlTemplateContent; // yes - file content + + std::string rec; // record read from file + while (std::getline(yamlTemplateFile, rec)) { // for all records in file - get record from template file + yamlTemplateContent.push_back(rec); // add record to content vector + } + + result = 1; // template file read ok - no content + if (yamlTemplateContent.size() > 0) { // template file has content? + yamlTemplate = yamlTemplateContent; // yes - replace yamlTemplate content + result = 2; // template file read ok - content ok + } + } + } + else result = 0; // no - YAML template file does not exist + + return result; + } + + + /* + * Write YAML content to YAML file + * + * Writes YAML file content passed in p_YAMLcontent to file passed in p_YAMLname. + * Will prompt user for overwrite if file already exists. + * + * + * int WriteYAMLfile(const std::string p_YAMLname, const std::vector p_YAMLcontent) + * + * @param [IN] p_YAMLname Filename to be written - should be fully qualified + * @param [IN] p_YAMLcontent YAML content to be written - vector of strings + * @return Integer result: + * -1 indicates IO error + * 0 indicates file already exists - no overwrite + * 1 indicates success - file written (possibly overwritten) ok + */ + int WriteYAMLfile(const std::string p_YAMLname, const std::vector p_YAMLcontent) { + int result = -1; // result - initially error + + bool doWrite = true; // should write (overwrite)? + if (utils::FileExists(p_YAMLname)) { // file exists? + // yes - ask user whether to overwrite + std::string prompt = "YAML file '" + p_YAMLname + "' already exists - overwrite (Y/N)?"; // set prompt string for overwrite + std::string response = ""; // user response + + do { + std::cout << prompt << std::flush; // prompt use for input + std::string ch = ""; // user response character + std::string lastCh = ""; // last user response character (will always be newline) + size_t charsInput = 0; // number of characters input (including newline) + do { + lastCh = ch; // set last response character + ch = std::cin.get(); // get response character (one character at a time) + charsInput++; // count of characters input + } while (ch != "\n"); // while not newline + ch = charsInput == 2 ? lastCh : ""; // we want just 1 character + newline - character prior to newline + if (!ch.empty()) response = utils::ToLower(ch); // set user response + } while (response != "y" && response != "n"); // while not valid response + doWrite = response == "y"; // set write flag + } + + result = 0; // file not written (no overwrite) result + if (doWrite) { // should write? + result = 1; // yes - set file written result + std::ofstream yamlFile(p_YAMLname); // open the file + if (yamlFile.is_open()) { // open ok? + for (std::size_t i = 0; i < p_YAMLcontent.size(); i++) { // yes - for each record + if (!yamlFile.write(p_YAMLcontent[i].substr(3).c_str(), p_YAMLcontent[i].length() - 3)) { // remove the marker ("HDR" / "OPT") and write + result = false; // failed - set result ... + break; // ... and stop + } + } + } + else result = -1; // no - not open ok - set IO error + } + return result; + } + + + /* + * Construct YAML file content and write to file passed in p_YAMLfilename + * + * Constructs YAML file content based on YAML template read from file passed in + * p_YAMLtemplateName. If no filename passed in p_YAMLtemplateName, the default + * template from yaml.h is used. + * + * Constructed content is written to file passed in p_YAMLfilename. + * + * + * void MakeYAMLfile(const std::string p_YAMLfilename, const std::string p_YAMLtemplateName) + * + * @param [IN] p_YAMLfilename Filename to be written - should be fully qualified + * @param [IN] p_YAMLtemplateName Template filename to be read - should be fully qualified + */ + + void MakeYAMLfile(const std::string p_YAMLfilename, const std::string p_YAMLtemplateName) { + // following macro is for convenience and readability - undefined at end of function + // sets strings to be written to the new YAML file + #define SET_STRINGS(preamble, option, value, allowed, dfault, comment) { \ + yamlPreambleStrings.push_back(preamble); \ + yamlOptionStrings.push_back(option); \ + yamlValueStrings.push_back(value); \ + yamlAllowedStrings.push_back(allowed); \ + yamlDefaultStrings.push_back(dfault); \ + yamlCommentStrings.push_back(comment); } + + + std::vector yamlPreambleStrings; // new YAML file content - preamble strings + std::vector yamlOptionStrings; // new YAML file content - option name strings + std::vector yamlValueStrings; // new YAML file content - option value strings + std::vector yamlAllowedStrings; // new YAML file content - allowed values strings + std::vector yamlDefaultStrings; // new YAML file content - default values strings + std::vector yamlCommentStrings; // new YAML file content - comment strings + + + // process the option + // - format strings as required and populate the yaml vectors (declared above) + auto ProcessOption = [&] (const std::string p_OptionStr, // option name string + const std::string p_ValueStr, // option value string + const std::vector p_AllowedStr, // option allowed value strings + const std::string p_DefaultStr, // option default string + const std::string p_CommentStr, // comment string + const bool p_UserSpecified, // user specified option value? + const TYPENAME p_DataType, // short data type + const std::string p_TypeStr) { // detailed data type + + // format option value/default string + // fix floating point precision + // fix bool for python (0/true, 1/false -> True, False) + // add '' for string options if not already present + // not all data types need to be formatted - some just pass through + auto FormatString = [&] (const std::string p_Str, // string to be formatted + const TYPENAME p_shortType, // short data type + const std::string p_detailedType) { // detailed data type + std::stringstream ss; + switch (p_shortType) { + case TYPENAME::FLOAT : { float v = std::stof(p_Str); ss << std::fixed << std::setprecision(v < 100 ? 6 : 2) << v; } break; + case TYPENAME::DOUBLE : { double v = std::stod(p_Str); ss << std::fixed << std::setprecision(v < 100 ? 6 : 2) << v; } break; + case TYPENAME::LONGDOUBLE: { long double v = std::stold(p_Str); ss << std::fixed << std::setprecision(v < 100 ? 6 : 2) << v; } break; + case TYPENAME::BOOL : { std::string s = p_Str; s = utils::trim(s); ss << (s == "1" || utils::Equals(s, "true") ? "True" : "False"); } break; + case TYPENAME::STRING : { + bool vecType = (p_detailedType == "VECTOR"); // vector of strings? + size_t len = p_Str.length(); // str length + if (len == 0) { // empty str? + ss << (vecType ? "{ }" : "''"); // yes - just quotes/braces (for vector) + } + else { // no - str not empty + // add quotes if necessary + // the assumption here is that if the string already has opening and closing quotes + // then we're good - do nothing, but if it has only an opening quote or a closing quote, + // or neither, then we need to add both opening and closing quotes + // (same assumption for open and close brace for vector strings - if it has braces we leave it alone) + + if (!vecType) { // VECTOR ? + if (p_Str[0] != '\'' || p_Str[len - 1] != '\'') { ss << "'"; ss << p_Str; ss << "'"; } // no - add quotes if necessary + else ss << p_Str; // has quotes - just pass through + } + else { // yes - string vector - parse and format string + std::string str = p_Str; // string to be formatted + str = utils::trim(str); // trim whitespace both ends + if (str[0] != '{' || str[len - 1] != '}') { // has open and close brace? + ss << "{ "; // no - add open brace + size_t start = str[0] == '{' ? 1 : 0; // start position for find + size_t end = 0; // found position + bool first = true; // for comma placement + while ((end = p_Str.find(' ', start)) != std::string::npos) { // find space + std::string v = p_Str.substr(start, end - start); // got it - extract the substring + if (v.length() > 0) { // skip empty substring + if (!first) ss << ", "; // add comma if not first element + if (v[0] != '\'' || v[len - 1] != '\'') { ss << "'"; ss << v; ss << "'"; } // add quotes if necessary + else ss << v; // has quotes - just pass through + } + start = end + 1; // for next space + first = false; // not first element + } + std::string v = p_Str.substr(start, end - start); // extract (possible) last substring + if (v.length() > 0) { // anything there? + if (!first) ss << ", "; // yes - add comma if not first element (shouldn't be, but just in case...) + if (v[0] != '\'' || v[len - 1] != '\'') { ss << "'"; ss << v; ss << "'"; } // add quotes if necessary + else ss << v; // has quotes - just pass through + } + if (str[0] != '{' || str[len - 1] != '}') ss << " }"; // add close brace if necessary + } + else ss << p_Str; // has braces - just pass it through + } + } + } break; + default: ss << p_Str; // just pass it through + } + return ss.str(); // formatted string + }; + + std::string valueStr = FormatString(p_ValueStr, p_DataType, p_TypeStr); + std::string defaultStr = FormatString(p_DefaultStr, p_DataType, p_TypeStr); + + std::string preamble = p_UserSpecified ? " --" : "# --"; // preamble - all option records are commented, except options that are user specified + + if (p_AllowedStr.size() == 0) { // multiple option values? + SET_STRINGS(preamble, p_OptionStr, valueStr, "", defaultStr, p_CommentStr); // no - record for YAML file output - value set + } + else { // yes - multiple option values + // We list the allowed values in the order they are stored in the COMPASUnorderedMap + // in constants.h. We could instead list in alphabetical order, but the assumption + // is that the order in constants.h was deliberate, so we'll maintain it - if that's + // not true then we could just sort alphabetically here + std::string allowedValuesStr = "Options: ["; // records allowed option values + for (size_t idx = 0; idx < p_AllowedStr.size(); idx++) { // for each allowed value + allowedValuesStr += p_AllowedStr[idx]; // show allowed value + if (idx < p_AllowedStr.size() - 1) allowedValuesStr += ","; // add delimiter if necessary + } + allowedValuesStr += "]"; // close bracket + SET_STRINGS(preamble, p_OptionStr, valueStr, allowedValuesStr, defaultStr, p_CommentStr); // option record for YAML file output + } + }; + + + // begin MakeYAMLfile() body + + // get COMPAS option details + std::vector optionDetails = OPTIONS->CmdLineOptionsDetails(); + + if (optionDetails.empty()) { // have COMPAS option details? + std::cerr << "Unable to access COMPAS option details - no YAML file created.\n"; // no - announce error + } + else { // yes - have options + // process options/create YAML file + auto wallTime = std::chrono::system_clock::now(); // get wall time + std::time_t timeNow = std::chrono::system_clock::to_time_t(wallTime); // current time and date ... + std::string currentTime = std::string(std::ctime(&timeNow)); // ... as a string ... + currentTime = utils::trim(currentTime); // ... trimmed of whitespace (including newline etc.) + + // read YAML template file if supplied + + if (p_YAMLtemplateName.length() > 0) { // have YAML template filename? + int readResult = ReadYAMLtemplate(p_YAMLtemplateName); // yes - read YAML template file + std::string preamble = "*WARNING* File '" + p_YAMLtemplateName + "' "; // preamble for warnings + std::string warn = ""; // warning string + if (readResult < 0) warn += "not read: IO error. COMPAS default template will be used."; // IO error + else if (readResult == 0) warn += "not read: file does not exist. COMPAS default template will be used."; // file not found + else if (readResult == 1) warn += "is empty. COMPAS default template will be used."; // no content in file + if (warn.length() > 0) std::cout << preamble << warn << "\n"; // announce warning if necessary + } + + // add default records (file headers) + + SET_STRINGS("##~!!~## COMPAS option values", "", "", "", "", ""); // header record for YAML file output + + std::string s = "##~!!~## File Created " + currentTime + " by COMPAS v" + VERSION_STRING; // time and version stamp + if (s[23] == ' ') s[23] = '0'; // add leading zero for day if necessary + SET_STRINGS(s, "", "", "", "", ""); // time and version stamp record for YAML file output + + SET_STRINGS("##~!!~##", "", "", "", "", ""); // Blank header line + SET_STRINGS("##~!!~## The default COMPAS YAML file (``compasConfigDefault.yaml``), as distributed, has", "", "", "", "", ""); // Notice regarding commented line in default YAML // time and version stamp record for YAML file output + SET_STRINGS("##~!!~## all COMPAS option entries commented so that the COMPAS default value for the", "", "", "", "", ""); // Notice regarding commented line in default YAML // time and version stamp record for YAML file output + SET_STRINGS("##~!!~## option is used by default. To use a value other than the COMPAS default value,", "", "", "", "", ""); // Notice regarding commented line in default YAML // time and version stamp record for YAML file output + SET_STRINGS("##~!!~## users must uncomment the entry and change the option value to the desired value.", "", "", "", "", ""); // Notice regarding commented line in default YAML // time and version stamp record for YAML file output + + size_t numTemplateRecords = yamlTemplate.size(); // number of records in the YAML template + + // create YAML content + + if (numTemplateRecords == 0) { // have YAML template? + // no... + // we have no template - this should never happen (we've got a default template in the code, + // but we need to deal with that being missing just in case) - so we'll just write the COMPAS + // options alphabetically within the datatype categories (booleanChoices, numericalChoices, + // stringChoices, listChoices) + + std::cerr << "*WARNING* No YAML template - will write COMPAS options alphabetically.\n"; // announce warning + + // this is not pretty - we're going to iterate over the COMPAS options 4 times - once + // for each of the datatype categories mentioned above (see note about premature optimisation + // at the top of this file) + + std::vector categories { "booleanChoices", "numericalChoices", "stringChoices", "listChoices" }; // category names for headers + + for (size_t idx = 0; idx < categories.size(); idx++) { // for each category + + std::string category = categories[idx]; // which category? + SET_STRINGS("", "", "", "", "", ""); // blank record for YAML file output + SET_STRINGS(category + ":", "", "", "", "", ""); // category header for YAML file output + + for (size_t optionIdx = 0; optionIdx < optionDetails.size(); optionIdx++) { // for each COMPAS option + + if (optionDetails[optionIdx].dataType == TYPENAME::BOOL) { // boolean option? + if (category != "booleanChoices") continue; // skip if this category is not booleanChoices + } + else if (optionDetails[optionIdx].dataType == TYPENAME::STRING) { // string, or vector of strings, option? + if (optionDetails[optionIdx].typeStr == "VECTOR") { // ... vector of strings + if (category != "listChoices") continue; // skip if this category is not listChoices + } + else { // ... string + if (category != "stringChoices") continue; // skip if this category is not stringChoices + } + } + else { // assume numerical option + if (category != "numericalChoices") continue; // skip if this category is not numericalChoices + } + + // process the option + ProcessOption(optionDetails[optionIdx].optionStr, // option name string + optionDetails[optionIdx].valueStr, // option value string + optionDetails[optionIdx].allowedStr, // option allowed value strings + optionDetails[optionIdx].defaultStr, // option default string + "", // no comment + utils::Equals(optionDetails[optionIdx].sourceStr, "user_supplied"), // user specified option value? + optionDetails[optionIdx].dataType, // option (short) data type + optionDetails[optionIdx].typeStr); // option (detailed) data type + } + } + } + else { // yes - have YAML template + // use template to format YAML file + for (size_t rec = 0; rec < numTemplateRecords; rec++) { // for each template record + + std::string thisRec = yamlTemplate[rec]; // template record ... + thisRec = utils::trim(thisRec); // ... trimmed of whitespace + + // need to allow for commented options in template, especially since the template + // might be an existing YAML file. Since the template may have the hash character + // ("#") throughout, I'll refer to the hash at the start of the record (or as the + // first non-whitespace character) as the "leading hash" to differentiate it from + // other instances of the hash character in a template record + bool optRec = false; // option template record? + size_t startPos = 0; // where to start looking for non-leading hash + + if (thisRec.length() > 3) { // record long enough to be option record? + if (thisRec.substr(0, 2) == "--") { // yes - has leading "--"? + optRec = true; // yes - assume option record + } + else if (thisRec[0] == '#') { // no - not leading "--": leading hash? + optRec = false; // for now... + if (thisRec.length() > 4) { // enough characters to be option record? + std::string s = thisRec.substr(1); // yes... strip leading hash + s = utils::ltrim(s); // trim whitespace from start + if (s.length() > 2 && s.substr(0, 2) == "--") { // more than 2 characters, and option indicater? + optRec = true; // yes - looks like it might be an option record + startPos = 1; // skip over leading hash in later searches + } + } + } + } + + // parse template record + if (!optRec) { // option record? + if (yamlTemplate[rec].length() < 8 || yamlTemplate[rec].substr(0, 8) != "##~!!~##") { // no - skip COMPAS generated headers, and ... + SET_STRINGS(yamlTemplate[rec], "", "", "", "", ""); // ... output the record as is + } + } + else { // yes - option record + + // look for a comment on the option record and, if present, preserve it. + // I refer to the hash indication comment on the option record as the + // "comment hash" to differentiate it from all the other hashes that might + // be there... Because the template might be an existing YAML file, one or + // both of the (special) strings "# Default:" and "# Options:" may be present, + // and if so we just skip over them looking for any comment on the option record + + size_t hashStart = startPos; // where to start looking for the comment hash + size_t p; // position in string + if ((p = yamlTemplate[rec].find("# Default:", hashStart)) != std::string::npos) { // "# Default:" present? + if (p > hashStart) hashStart = p + 1; // yes - adjust starting position for comment hash search + } + + if ((p = yamlTemplate[rec].find("# Options:", hashStart)) != std::string::npos) { // "# Options:" present? + if (p > hashStart) hashStart = p + 1; // yes - adjust starting position for comment hash search + } + + std::string optionStr; // string to hold option name and value + std::string commentStr; // string to hold optional comment + size_t hashLoc = yamlTemplate[rec].find_first_of("#", hashStart); // find the comment if there is one + if (hashLoc == std::string::npos) { // found hash? + optionStr = yamlTemplate[rec].substr(startPos); // no - no comment present - option string is the record (from startPos) + commentStr = ""; // no comment + } + else { // yes - hash (comment present) + optionStr = yamlTemplate[rec].substr(startPos, hashLoc); // option string is the record up to hash + commentStr = yamlTemplate[rec].substr(hashLoc); // comment string (includes "#") + } + + optionStr = utils::trim(optionStr); // trim whitespace from both ends of option string + + // need to allow for option values in template, especially since the template might + // be an existing YAML file. Values in the template are not preserved - we only use + // the template to preserve header records, blank records, option groupings, and comments. + size_t colonLoc = optionStr.find_first_of(":"); // find the first colon if there is one + if (colonLoc != std::string::npos) { // found colon? + optionStr = optionStr.substr(0, colonLoc); // option string is everything prior to the ":"" + } + + // Find the value for the option (COMPAS value, not any value present in the template) + // - note: could be user supplied + size_t pos = optionStr.find_first_not_of("\t -"); // find option indicator + std::string templateOptionStr = optionStr.substr(pos); // strip "--" from template option string + + bool found = false; // matching COMPAS option string found? Not initially... + for (std::size_t optionIdx = 0; optionIdx < optionDetails.size(); optionIdx++) { // for each COMPAS option + + std::string compasOptionStr = optionDetails[optionIdx].optionStr; // COMPAS option name string + if (utils::Equals(optionDetails[optionIdx].sourceStr, "calculated")) continue; // ignore calculated options + if (utils::Equals(compasOptionStr, templateOptionStr)) { // match? + + found = true; // yes + ProcessOption(templateOptionStr, // option name string (as written in the YAML template) + optionDetails[optionIdx].valueStr, // option (COMPAS) value string + optionDetails[optionIdx].allowedStr, // option allowed value strings + optionDetails[optionIdx].defaultStr, // option default string + commentStr, // comment string (as written in the YAML template) + utils::Equals(optionDetails[optionIdx].sourceStr, "user_supplied"), // user specified option value? + optionDetails[optionIdx].dataType, // option (short) data type + optionDetails[optionIdx].typeStr); // option (detailed) data type + break; // we're done + } + } + + if (!found) { // matching COMPAS option string found? + std::cerr << "*WARNING* Option '" + << templateOptionStr + << "' in YAML template is not a valid COMPAS option - ignored.\n"; // no - announce warning + } + } + } + } + + // add any COMPAS options not in the YAML template - alphabetically at end + + bool extra = false; // extra records? Initially false + for (std::size_t optionIdx = 0; optionIdx < optionDetails.size(); optionIdx++) { // for each COMPAS option + + std::string compasOptionStr = optionDetails[optionIdx].optionStr; // option name string + + if (utils::Equals(optionDetails[optionIdx].sourceStr, "calculated")) continue; // ignore calculated options + if (utils::Equals(compasOptionStr, "help")) continue; // ignore 'help' option + if (utils::Equals(compasOptionStr, "version")) continue; // ignore 'version' option + if (utils::Equals(compasOptionStr, "create-YAML-file")) continue; // ignore 'create-yaml-file' option + if (utils::Equals(compasOptionStr, "YAML-template")) continue; // ignore 'YAML-template' option + + bool match = false; + for (size_t yamlIdx = 0; yamlIdx < yamlOptionStrings.size(); yamlIdx++) { // for each YAML option name + if (utils::Equals(compasOptionStr, yamlOptionStrings[yamlIdx])) { // match? + match = true; // yes - flag it + break; // no need to look further + } + } + + if (!match) { // COMPAS option in YAML options? + if (!extra) { // no - first extra record? + extra = true; // yes - flag it + SET_STRINGS("\n\n### Additional COMPAS options not found in YAML template ###", "", "", "", "", "");// header record for YAML file output + } + ProcessOption(compasOptionStr, // option name string (as written in the COMPAS OPTIONS class) + optionDetails[optionIdx].valueStr, // option value string + optionDetails[optionIdx].allowedStr, // option allowed value strings + optionDetails[optionIdx].defaultStr, // option default string + "", // no comment + utils::Equals(optionDetails[optionIdx].sourceStr, "user supplied"), // user specified option value? + optionDetails[optionIdx].dataType, // option (short) data type + optionDetails[optionIdx].typeStr); // option (detailed) data type + } + } + + // partially build new YAML file records + // for now, just any header or blank records, and preamble, option name, and option value + // for option records set maximum default str length and maximum allowed str length + std::vector yamlRecords; // new YAML file records + size_t maxOptionStrLen = 0; // maximum length of option strings (to locate default string) + size_t maxDefaultStrLen = 0; // maximum length of default strings (to locate allowed string) + size_t maxAllowedStrLen = 0; // maximum length of allowed strings (to locate comment string) + for (std::size_t yamlIdx = 0; yamlIdx < yamlPreambleStrings.size(); yamlIdx++) { // for each YAML option + if (yamlOptionStrings[yamlIdx].empty()) { // header or blank record? + yamlRecords.push_back("HDR" + yamlPreambleStrings[yamlIdx]); // yes - marker and just preamble + } + else { // no - not header or blank record + std::string s = "OPT" + yamlPreambleStrings[yamlIdx] + yamlOptionStrings[yamlIdx] + ": " + yamlValueStrings[yamlIdx]; // construct string including value + if (s.length() > maxOptionStrLen) maxOptionStrLen = s.length(); // get maximum length of YAML option strings + yamlRecords.push_back(s); // partial record for YAML file output + } + if (yamlDefaultStrings[yamlIdx].length() > maxDefaultStrLen) maxDefaultStrLen = yamlDefaultStrings[yamlIdx].length(); // maximum length of default strings + if (yamlAllowedStrings[yamlIdx].length() > maxAllowedStrLen) maxAllowedStrLen = yamlAllowedStrings[yamlIdx].length(); // maximum length of allowed strings + } + + // add default values, allowed values, and template comment as necessary + + size_t defaultPos = maxOptionStrLen + 2; // position of default string + size_t allowedPos = defaultPos + maxDefaultStrLen + 13; // position of allowed strings + size_t commentPos = allowedPos + maxAllowedStrLen + 4; // position of comment string + for (size_t idx = 0; idx < yamlRecords.size(); idx++) { // for each YAML record + std::string s = yamlRecords[idx]; // start with partially constructed record + + if (yamlRecords[idx].substr(0, 3) == "OPT") { // option record? + // yes - header and blank records skipped here + size_t len = s.length(); // current length of record + for (size_t pos = len; pos < defaultPos; pos++) s += " "; // pad with spaces up to option default field + s += "# Default: " + yamlDefaultStrings[idx]; // yes add default values string + + if (!yamlAllowedStrings[idx].empty()) { // have allowed values? + size_t len = s.length(); // yes - current length of record + for (size_t pos = len; pos < allowedPos; pos++) s += " "; // pad with spaces up to allowed strings field + s += "# " + yamlAllowedStrings[idx]; // yes add allowed values string + } + + if (!yamlCommentStrings[idx].empty()) { // have comment? + size_t len = s.length(); // yes - current length of record + for (size_t pos = len; pos < commentPos; pos++) s += " "; // pad with space ups to comment strings field + s += " " + yamlCommentStrings[idx]; // yes add comment string + } + } + yamlRecords[idx] = s + "\n"; // set YAML file record + } + + // write new YAML file + + int writeResult = WriteYAMLfile(p_YAMLfilename, yamlRecords); // write records to file + if (writeResult < 0) std::cerr << "*ERROR* File '" << p_YAMLfilename << "' not written: IO error.\n"; // announce IO error + else if (writeResult == 0) std::cout << "File '" << p_YAMLfilename << "' not written - file already exists.\n"; // announce already exists + else std::cout << "File '" << p_YAMLfilename << "' written.\n"; // announce success + } + } + #undef SET_STRINGS +} diff --git a/src/yaml.h b/src/yaml.h index d0f3219d4..2ffa15da3 100644 --- a/src/yaml.h +++ b/src/yaml.h @@ -121,7 +121,6 @@ namespace yaml { "", " ### CIRCUMBINARY DISK", " --circumbinary-disk", - " --circumbinary-disk-use-synchronized-envelope-angular-momentum", "", " ### SUPERNOVAE, KICKS AND REMNANTS", " --allow-non-stripped-ECSN", @@ -360,7 +359,6 @@ namespace yaml { "", " ### CIRCUMBINARY DISK", " --circumbinary-disk-eddington-mode", - " --circumbinary-disk-evolution-mode", "", " ### TIDES", " --tides-prescription", From bd14bbec52ff0dafe78b6077809596a2a2d606cd Mon Sep 17 00:00:00 2001 From: Aldana Grichener <110453835+AldanaGrichener@users.noreply.github.com> Date: Mon, 2 Nov 2026 13:11:20 -0800 Subject: [PATCH 08/10] Restore README.md --- README.md | 113 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 111 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 470d35f0f..cd2e05955 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,114 @@ -# Research version with circumbinary-disk (CBD) evolution +[//]: ## (grip -b README.md) -This fork contains the CBD implementation used in Grichener et al. (2026), which is currently being integrated into [COMPAS](https://github.com/TeamCOMPAS/COMPAS). +![COMPASlogo](misc/COMPAS_logos/COMPAS_banner.png) +# Compact Object Mergers: Population Astrophysics & Statistics +[//]: ## (Outline features) +COMPAS is a publicly available rapid binary population synthesis code (https://compas.science/) that is designed so that evolution prescriptions and model parameters are easily +adjustable. COMPAS draws properties for a binary star system from a set of initial distributions, and evolves it from zero-age main sequence to the end of its life as two compact +remnants. It has been used for inference from observations of gravitational-wave mergers, Galactic neutron stars, X-ray binaries, and luminous red novae. + +## Documentation +https://compas.science/docs + +## Contact +Please email your queries to compas-user@googlegroups.com. You are also welcome to join the [COMPAS User Google Group](https://groups.google.com/forum/#!members/compas-user) to engage in discussions with COMPAS users and developers. + +## Acknowledgements +If you use this code or parts of this code for results presented in a scientific publication, we would greatly appreciate if you send us your paper reference and make your input settings and output data +publicly available by uploading it to the [COMPAS Zenodo community](https://zenodo.org/communities/compas/). Please also kindly include citations to our COMPAS methods papers +https://ui.adsabs.harvard.edu/abs/2022ApJS..258...34R +and +https://ui.adsabs.harvard.edu/abs/2025ApJS..280...43T . +As the public COMPAS code is a product of work by the entire COMPAS collaboration over many years, we kindly request that, in recognition of +this team effort, the papers are cited as “Team COMPAS: J. Riley et al. (2021)” and "Team COMPAS: I. Mandel et al. (2025). Example bibtex codes are: + +``` +@ARTICLE{compas2021, + author = {{Team COMPAS: Riley}, Jeff and {Agrawal}, Poojan and {Barrett}, Jim W. and {Boyett}, Kristan N.~K. and {Broekgaarden}, Floor S. and {Chattopadhyay}, Debatri and {Gaebel}, Sebastian M. and {Gittins}, Fabian and {Hirai}, Ryosuke and {Howitt}, George and {Justham}, Stephen and {Khandelwal}, Lokesh and {Kummer}, Floris and {Lau}, Mike Y.~M. and {Mandel}, Ilya and {de Mink}, Selma E. and {Neijssel}, Coenraad and {Riley}, Tim and {van Son}, Lieke and {Stevenson}, Simon and {Vigna-G{\'o}mez}, Alejandro and {Vinciguerra}, Serena and {Wagg}, Tom and {Willcox}, Reinhold}, + title = "{Rapid Stellar and Binary Population Synthesis with COMPAS}", + journal = {\apjs}, + keywords = {1622, 154, 1108, 162}, + year = 2022, + month = feb, + volume = {258}, + number = {2}, + eid = {34}, + pages = {34}, + doi = {10.3847/1538-4365/ac416c}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2022ApJS..258...34R}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} +``` + +``` +@ARTICLE{compas2025, + author = {{Team COMPAS: Mandel}, Ilya and {Riley}, Jeff and {Boesky}, Adam and {Brcek}, Adam and {Hirai}, Ryosuke and {Kapil}, Veome and {Lau}, Mike Y.~M. and {Merritt}, JD and {Rodr{\'\i}guez-Segovia}, Nicol{\'a}s and {Romero-Shaw}, Isobel and {Song}, Yuzhe and {Stevenson}, Simon and {Vajpeyi}, Avi and {van Son}, L.~A.~C. and {Vigna-G{\'o}mez}, Alejandro and {Willcox}, Reinhold}, + title = "{Rapid Stellar and Binary Population Synthesis with COMPAS: Methods Paper II}", + journal = {\apjs}, + keywords = {Binary stars, Stellar populations, Stellar evolution, Stellar evolutionary models, Stellar remnants, 154, 1622, 1599, 2046, 1627, Solar and Stellar Astrophysics, High Energy Astrophysical Phenomena, Instrumentation and Methods for Astrophysics}, + year = 2025, + month = sep, + volume = {280}, + number = {1}, + eid = {43}, + pages = {43}, + doi = {10.3847/1538-4365/adf8d0}, +archivePrefix = {arXiv}, + eprint = {2506.02316}, + primaryClass = {astro-ph.SR}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2025ApJS..280...43T}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} +``` + +Note that the preferred acknowledgement relies on `\noopsort` and cites the paper as TEAM COMPAS; Riley et al.; to make it work, you'll have to include the following line at the start of your bibtex file: + +`@PREAMBLE{ {\providecommand{\noopsort}[1]{}} }` + +and change the author line in the bib entry to: + +``` +author = {{\noopsort{Team COMPAS}}{Team COMPAS: Riley, J.} and {Agrawal}, Poojan and {Barrett}, Jim W. and {Boyett}, Kristan N.~K. and {Broekgaarden}, Floor S. and {Chattopadhyay}, Debatri and {Gaebel}, Sebastian M. and {Gittins}, Fabian and {Hirai}, Ryosuke and {Howitt}, George and {Justham}, Stephen and {Khandelwal}, Lokesh and {Kummer}, Floris and {Lau}, Mike Y.~M. and {Mandel}, Ilya and {de Mink}, Selma E. and {Neijssel}, Coenraad and {Riley}, Tim and {van Son}, Lieke and {Stevenson}, Simon and {Vigna-Gomez}, Alejandro and {Vinciguerra}, Serena and {Wagg}, Tom and {Willcox}, Reinhold} +``` + + + +In addition, we suggest to kindly include the two following papers: + +1. Stevenson S., Vigna-Gómez A., Mandel I., Barrett J. W., Neijssel C. J., Perkins D., de Mink S. E., 2017, [Nature Communications, 8, 14906](https://ui.adsabs.harvard.edu/abs/2017NatCo...814906S/abstract) +2. Vigna-Gómez A., Neijssel C. J., Stevenson S., Barrett J. W., Belczynski K., Justham S., de Mink S., Müller B., Podsiadlowski Ph., Renzo M., Szécsi D., Mandel I., 2018, [MNRAS, 481, 4009](https://ui.adsabs.harvard.edu/abs/2018MNRAS.481.4009V/abstract) + +We also greatly appreciate an acknowledgement of the form: + +>_Simulations in this paper made use of the COMPAS rapid binary population synthesis code (version X.X.X), which is freely available at http://github.com/TeamCOMPAS/COMPAS_. + +Furthermore, + + * If you use COMPAS's importance sampling algorithm STROOPWAFEL, please cite + + Broekgaarden F. S., Justham S., de Mink S. E., Gair J., Mandel I., Stevenson S., Barrett J. W., Vigna-Gómez A., Neijssel C. J., 2019, [MNRAS, 490, 5228](https://ui.adsabs.harvard.edu/abs/2019MNRAS.490.5228B/abstract) + + * If using the COMPAS model of gravitational wave selection effects, please cite + + Barrett J. W., Gaebel S. M., Neijssel C. J., Vigna-Gómez A., Stevenson S., Berry C. P. L., Farr W. M., Mandel I., 2018, [MNRAS, 477, 4685](https://ui.adsabs.harvard.edu/abs/2018MNRAS.477.4685B/abstract) + + * If using COMPAS's integration over cosmic star formation history, please cite + + Neijssel C. J., Vigna-Gómez A., Stevenson S., Barrett J. W., Gaebel S. M., Broekgaarden F. S., de Mink S. E., Szécsi D., Vinciguerra S., Mandel I., 2019, [MNRAS, 490, 3740](https://ui.adsabs.harvard.edu/abs/2019MNRAS.490.3740N/abstract) + + * If using the COMPAS model of (pulsational) pair instability supernova, please cite + + Stevenson S., Sampson M., Powell J., Vigna-Gómez A., Neijssel C. J., Szécsi D., Mandel I., 2019, [ApJ, 882, 121](https://ui.adsabs.harvard.edu/abs/2019ApJ...882..121S/abstract) + + * If evolving pulsar spins and magnetic fields with COMPAS, please cite + + Chattopadhyay D., Stevenson S., Hurley J. R., Rossi L. J., Flynn C., 2020, [MNRAS](https://ui.adsabs.harvard.edu/abs/2020MNRAS.tmp..697C/abstract) + +## License +[MIT](https://choosealicense.com/licenses/mit/) + + + +### Highlighted papers that have made use of COMPAS are listed at https://compas.science/science.html ; see https://ui.adsabs.harvard.edu/public-libraries/gzRk1qpbRUy4cP2GydR36Q for a full ADS library From 4b52df335d062b1730343c5090966411f3bd5184 Mon Sep 17 00:00:00 2001 From: Aldana Grichener <110453835+AldanaGrichener@users.noreply.github.com> Date: Mon, 2 Nov 2026 13:21:05 -0800 Subject: [PATCH 09/10] Update whats-new.rst --- online-docs/whats-new.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/online-docs/whats-new.rst b/online-docs/whats-new.rst index 8ab90a0ad..30ca591bd 100644 --- a/online-docs/whats-new.rst +++ b/online-docs/whats-new.rst @@ -3,7 +3,7 @@ What's new Following is a brief list of important updates to the COMPAS code. A complete record of changes can be found in the file ``changelog.h``. -**XX.XX.XX June 5, 2026** +**03.31.00 November 2, 2026** * Added post-common-envelope circumbinary disk formation and evolution following Grichener et al. (2026), including new CBD program options and the ``BSE_Circumbinary_Disks`` logfile. From 43ff987f4eb56f96a8b6d0d2a080cf7256ed726a Mon Sep 17 00:00:00 2001 From: Aldana Grichener Date: Mon, 2 Nov 2026 18:12:29 -0800 Subject: [PATCH 10/10] Line endings cleanup (hopefully) --- .../pages/Getting started/getting-started.rst | 358 +- ...logfiles-default-record-specifications.rst | 70 +- ...d-logfiles-record-specification-binary.rst | 2 +- ...-logfiles-record-specification-options.rst | 4612 +++++++------- ...standard-logfiles-record-specification.rst | 274 +- .../standard-logfiles-record-types.rst | 138 +- .../COMPAS output/standard-logfiles.rst | 128 +- .../program-options-list-defaults.rst | 2 +- online-docs/pages/whats-new.rst | 2 +- online-docs/whats-new.rst | 551 -- src/EnumHash.h | 52 +- src/ErrorCatalog.h | 774 +-- src/LogTypedefs.h | 5464 ++++++++--------- src/WhiteDwarfs.h | 226 +- src/changelog.h | 12 +- src/profiling.cpp | 498 +- src/profiling.h | 150 +- src/yaml.cpp | 1136 ++-- 18 files changed, 6949 insertions(+), 7500 deletions(-) delete mode 100644 online-docs/whats-new.rst diff --git a/online-docs/pages/Getting started/getting-started.rst b/online-docs/pages/Getting started/getting-started.rst index 59a9ab673..b59e9e203 100644 --- a/online-docs/pages/Getting started/getting-started.rst +++ b/online-docs/pages/Getting started/getting-started.rst @@ -1,173 +1,173 @@ -Getting started -=============== - -To start using COMPAS, `git clone` the code, install dependencies and build COMPAS: - -:: - - git clone https://github.com/TeamCOMPAS/COMPAS - - -Install dependencies --------------------- - -COMPAS requires a ``C++`` compiler, and the ``gsl``, ``boost``, and ``hdf5`` libraries. ``Python`` is required for the COMPAS post-processing tools. Use of the circumbinary disk module requires installing `spindler-c `_. - - -.. tabs:: - - .. tab:: Linux - - For Ubuntu, type:: - - sudo apt-get install g++ libboost-all-dev libgsl-dev libhdf5-serial-dev - - For Fedora:: - - sudo dnf install gcc boost-devel gsl gsl-devel hdf5-devel - - For RHEL or CentOS:: - - sudo yum install gcc boost-devel gsl gsl-devel hdf5-devel - - - .. tab:: MacOS - - It is strongly recommended to update to the latest version of macOS through the App Store. You can find what macOS version you are - using by clicking on the Apple symbol on the top left of your screen and clicking "About This Mac". - - The next step is to install or update Xcode. You can find it directly in the App Store or at `Xcode `__\ . - Note: Xcode installation requires around 20 GB of disk space. If you are low on disk space, you may consider installing a ``C++`` - compiler directly. - - Once Xcode is installed, open a Terminal, and execute the following command to install the required command line developer tools:: - - xcode-select --install - - Next, you need to install several extra libraries and python modules. Popular ways of installing them are via package managers MacPorts and Homebrew. - We give instructions for installing ``gsl``, ``boost``, and ``hdf5`` with Homebrew. To install Homebrew, run:: - - /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - - If the installation was successful, the following should run without error:: - - brew --version - - Now install ``gsl``, ``boost``, and ``hdf5`` using Homebrew by running:: - - brew install gsl - brew install boost - brew install hdf5 - - -Building COMPAS ---------------- - -We first need to define an environment variable for the root directory of COMPAS in your shell start-up file for COMPAS to run properly. For example, -if you use bash as your shell, open `~/.bashrc` with a text editor and put in the following:: - - export COMPAS_ROOT_DIR=~/codes/COMPAS - -where `~/codes` should be replaced with the path to the directory where you cloned the COMPAS repository. For this to take effect, either restart your -bash session or run:: - - source ~/.bashrc - -If your shell is ``zsh`` (which is the default of macOS 10.15), set the environment variable as above in `~/.zshrc` instead of `~/.bashrc`. If your shell -is ``csh``, set the environment variable in `~/.cshrc` using:: - - setenv COMPAS_ROOT_DIR ~/codes/COMPAS - -Tip: you can check whether you have correctly defined the environment variable and whether its been active by typing into your terminal the command:: - - ECHO $COMPAS_ROOT_DIR - -This should return the directory location of the COMPAS folder (i.e. "~/codes/COMPAS"). - - - -Now go to the COMPAS source code directory:: - - cd $COMPAS_ROOT_DIR/src - -In this directory you will find the file ``Makefile``, which includes the following text to inform the compiler of the location of header files, and -the linker of the location of library files, for each of the dependencies ``gsl``, ``boost``, and ``hdf5``: - -:: - - # gsl directories - GSLINCDIR := /include - GSLLIBDIR := /lib - - # boost directories - BOOSTINCDIR := /include - BOOSTLIBDIR := /lib - - # hdf5 directories - HDF5INCDIR := /usr/include/hdf5/serial - HDF5LIBDIR := /usr/lib/x86_64-linux-gnu/hdf5/serial - -The locations given in ``Makefile`` may not match the locations of the files on your system. - - -If you installed the packages with Homebrew, the package files are likely to be found in /usr/local/opt (in directories gsl, boost, and hdf5 respectively), -but if they are not found there you will need to use Homebrew, or some other method, to locate the files. e.g. for ``boost`` using Homebrew:: - - brew info boost - boost: stable 1.72.0 (bottled), HEAD - Collection of portable C++ source libraries - https://www.boost.org/ - /usr/local/Cellar/boost/1.72.0 (14,466 files, 648.5MB) * - ... - -Note the path, which in this case is `/usr/local/Cellar/boost/1.72.0` - you will use it when you build the COMPAS executable. Repeat this for ``gsl`` and -``hdf5``, ensuring you locate the paths to the header files and library files. - -Assuming here that the locations of the header and library files in ``Makefile`` for ``gsl`` and ``hdf5`` are correct for your system, but the locations for -``boost`` are not, build the COMPAS executable (compile and link) by typing:: - - make -f Makefile BOOSTINCDIR=/usr/local/Cellar/boost/1.72.0/include BOOSTLIBDIR=/usr/local/Cellar/boost/1.72.0/lib - -The build process will run much faster if multiple processors/cores are available. To build the COMPAS executable using (e.g.) 4 cores, type:: - - make -j 4 -f Makefile BOOSTINCDIR=/usr/local/Cellar/boost/1.72.0/include BOOSTLIBDIR=/usr/local/Cellar/boost/1.72.0/lib - -Note that both ``make`` commands shown above will conduct incremental builds: they will only compile source files that have changed. To ensure a clean build -in which all source files are compiled, type:: - - make clean - make -j 4 -f Makefile BOOSTINCDIR=/usr/local/Cellar/boost/1.72.0/include BOOSTLIBDIR=/usr/local/Cellar/boost/1.72.0/lib - -The `clean` option instructs ``make`` to remove all existing object files (.o), and the COMPAS executable. A subsequent ``make`` is then forced to compile -all source files and link the resultant object files (and external libraries) into a new executable. - -Note that rather than type the ``make`` command each time you want to build COMPAS, you could create a file containing the ``make`` command, and execute that -file to build COMPAS. - -Once built, the executable can be tested with, e.g.:: - - ./COMPAS -v - -which will display the code version. - -See :doc:`../Developer guide/Developer build/COMPAS-local-build` for a detailed description of ``Makefile`` functionality. - - -:bolditalictext:`A note for Mac users:` - -If you are using MacOS and running into linking issues with the boost libraries, try:: - - make clean - make CPP=clang++ -j$(sysctl -n hw.ncpu) - -In some Mac installations, the GNU C++ compiler is not installed how we might expect, so trying to compile and link with ``clang++`` might help. - - +Getting started +=============== + +To start using COMPAS, `git clone` the code, install dependencies and build COMPAS: + +:: + + git clone https://github.com/TeamCOMPAS/COMPAS + + +Install dependencies +-------------------- + +COMPAS requires a ``C++`` compiler, and the ``gsl``, ``boost``, and ``hdf5`` libraries. ``Python`` is required for the COMPAS post-processing tools. Use of the circumbinary disk module requires installing `spindler-c `_. + + +.. tabs:: + + .. tab:: Linux + + For Ubuntu, type:: + + sudo apt-get install g++ libboost-all-dev libgsl-dev libhdf5-serial-dev + + For Fedora:: + + sudo dnf install gcc boost-devel gsl gsl-devel hdf5-devel + + For RHEL or CentOS:: + + sudo yum install gcc boost-devel gsl gsl-devel hdf5-devel + + + .. tab:: MacOS + + It is strongly recommended to update to the latest version of macOS through the App Store. You can find what macOS version you are + using by clicking on the Apple symbol on the top left of your screen and clicking "About This Mac". + + The next step is to install or update Xcode. You can find it directly in the App Store or at `Xcode `__\ . + Note: Xcode installation requires around 20 GB of disk space. If you are low on disk space, you may consider installing a ``C++`` + compiler directly. + + Once Xcode is installed, open a Terminal, and execute the following command to install the required command line developer tools:: + + xcode-select --install + + Next, you need to install several extra libraries and python modules. Popular ways of installing them are via package managers MacPorts and Homebrew. + We give instructions for installing ``gsl``, ``boost``, and ``hdf5`` with Homebrew. To install Homebrew, run:: + + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + + If the installation was successful, the following should run without error:: + + brew --version + + Now install ``gsl``, ``boost``, and ``hdf5`` using Homebrew by running:: + + brew install gsl + brew install boost + brew install hdf5 + + +Building COMPAS +--------------- + +We first need to define an environment variable for the root directory of COMPAS in your shell start-up file for COMPAS to run properly. For example, +if you use bash as your shell, open `~/.bashrc` with a text editor and put in the following:: + + export COMPAS_ROOT_DIR=~/codes/COMPAS + +where `~/codes` should be replaced with the path to the directory where you cloned the COMPAS repository. For this to take effect, either restart your +bash session or run:: + + source ~/.bashrc + +If your shell is ``zsh`` (which is the default of macOS 10.15), set the environment variable as above in `~/.zshrc` instead of `~/.bashrc`. If your shell +is ``csh``, set the environment variable in `~/.cshrc` using:: + + setenv COMPAS_ROOT_DIR ~/codes/COMPAS + +Tip: you can check whether you have correctly defined the environment variable and whether its been active by typing into your terminal the command:: + + ECHO $COMPAS_ROOT_DIR + +This should return the directory location of the COMPAS folder (i.e. "~/codes/COMPAS"). + + + +Now go to the COMPAS source code directory:: + + cd $COMPAS_ROOT_DIR/src + +In this directory you will find the file ``Makefile``, which includes the following text to inform the compiler of the location of header files, and +the linker of the location of library files, for each of the dependencies ``gsl``, ``boost``, and ``hdf5``: + +:: + + # gsl directories + GSLINCDIR := /include + GSLLIBDIR := /lib + + # boost directories + BOOSTINCDIR := /include + BOOSTLIBDIR := /lib + + # hdf5 directories + HDF5INCDIR := /usr/include/hdf5/serial + HDF5LIBDIR := /usr/lib/x86_64-linux-gnu/hdf5/serial + +The locations given in ``Makefile`` may not match the locations of the files on your system. + + +If you installed the packages with Homebrew, the package files are likely to be found in /usr/local/opt (in directories gsl, boost, and hdf5 respectively), +but if they are not found there you will need to use Homebrew, or some other method, to locate the files. e.g. for ``boost`` using Homebrew:: + + brew info boost + boost: stable 1.72.0 (bottled), HEAD + Collection of portable C++ source libraries + https://www.boost.org/ + /usr/local/Cellar/boost/1.72.0 (14,466 files, 648.5MB) * + ... + +Note the path, which in this case is `/usr/local/Cellar/boost/1.72.0` - you will use it when you build the COMPAS executable. Repeat this for ``gsl`` and +``hdf5``, ensuring you locate the paths to the header files and library files. + +Assuming here that the locations of the header and library files in ``Makefile`` for ``gsl`` and ``hdf5`` are correct for your system, but the locations for +``boost`` are not, build the COMPAS executable (compile and link) by typing:: + + make -f Makefile BOOSTINCDIR=/usr/local/Cellar/boost/1.72.0/include BOOSTLIBDIR=/usr/local/Cellar/boost/1.72.0/lib + +The build process will run much faster if multiple processors/cores are available. To build the COMPAS executable using (e.g.) 4 cores, type:: + + make -j 4 -f Makefile BOOSTINCDIR=/usr/local/Cellar/boost/1.72.0/include BOOSTLIBDIR=/usr/local/Cellar/boost/1.72.0/lib + +Note that both ``make`` commands shown above will conduct incremental builds: they will only compile source files that have changed. To ensure a clean build +in which all source files are compiled, type:: + + make clean + make -j 4 -f Makefile BOOSTINCDIR=/usr/local/Cellar/boost/1.72.0/include BOOSTLIBDIR=/usr/local/Cellar/boost/1.72.0/lib + +The `clean` option instructs ``make`` to remove all existing object files (.o), and the COMPAS executable. A subsequent ``make`` is then forced to compile +all source files and link the resultant object files (and external libraries) into a new executable. + +Note that rather than type the ``make`` command each time you want to build COMPAS, you could create a file containing the ``make`` command, and execute that +file to build COMPAS. + +Once built, the executable can be tested with, e.g.:: + + ./COMPAS -v + +which will display the code version. + +See :doc:`../Developer guide/Developer build/COMPAS-local-build` for a detailed description of ``Makefile`` functionality. + + +:bolditalictext:`A note for Mac users:` + +If you are using MacOS and running into linking issues with the boost libraries, try:: + + make clean + make CPP=clang++ -j$(sysctl -n hw.ncpu) + +In some Mac installations, the GNU C++ compiler is not installed how we might expect, so trying to compile and link with ``clang++`` might help. + + Installing python utilities --------------------------- You can use pip to install the `compas_python_utils` - + :: pip install . @@ -182,16 +182,16 @@ executable and the commonly used Python analysis dependencies. Use `-e .[dev]` to install in development mode (i.e. editable mode) and include the development dependencies. - -:: - - pip install -e .[dev] - - - -Next steps ----------- -Once you have completed the steps shown above, you're ready to run COMPAS. The :doc:`COMPAS User Guide <../User guide/user-guide>` -explains in detail how to run COMPAS, but to check that COMPAS is installed correctly, and to get a taste of what running COMPAS looks -like, you could try the :doc:`COMPAS Tutorial <../User guide/Running COMPAS/running-compas>`. - + +:: + + pip install -e .[dev] + + + +Next steps +---------- +Once you have completed the steps shown above, you're ready to run COMPAS. The :doc:`COMPAS User Guide <../User guide/user-guide>` +explains in detail how to run COMPAS, but to check that COMPAS is installed correctly, and to get a taste of what running COMPAS looks +like, you could try the :doc:`COMPAS Tutorial <../User guide/Running COMPAS/running-compas>`. + diff --git a/online-docs/pages/User guide/COMPAS output/standard-logfiles-default-record-specifications.rst b/online-docs/pages/User guide/COMPAS output/standard-logfiles-default-record-specifications.rst index ab1975569..fb3d9566d 100644 --- a/online-docs/pages/User guide/COMPAS output/standard-logfiles-default-record-specifications.rst +++ b/online-docs/pages/User guide/COMPAS output/standard-logfiles-default-record-specifications.rst @@ -1,35 +1,35 @@ -Default log file record specifications -====================================== - -Following are the default log file record specifications for each of the standard log files. These specifications -can be overridden by the use of a log file specifications file via the ``logfile-definitions`` program option. - -For Single Star Evolution (SSE): - -.. toctree:: - :maxdepth: 1 - - standard-logfiles-default-record-specifications-SSE-system-snapshot - standard-logfiles-default-record-specifications-SSE-sysparms - standard-logfiles-default-record-specifications-SSE-detailed-output - standard-logfiles-default-record-specifications-SSE-supernovae - standard-logfiles-default-record-specifications-SSE-pulsars - standard-logfiles-default-record-specifications-SSE-switchlog - -For Binary Star Evolution (BSE): - -.. toctree:: - :maxdepth: 1 - - standard-logfiles-default-record-specifications-BSE-system-snapshot - standard-logfiles-default-record-specifications-BSE-sysparms - standard-logfiles-default-record-specifications-BSE-detailed-output - standard-logfiles-default-record-specifications-BSE-supernovae - standard-logfiles-default-record-specifications-BSE-dco - standard-logfiles-default-record-specifications-BSE-ce - standard-logfiles-default-record-specifications-BSE-circumbinary-disks - standard-logfiles-default-record-specifications-BSE-pulsars - standard-logfiles-default-record-specifications-BSE-rlof - standard-logfiles-default-record-specifications-BSE-switchlog - - +Default log file record specifications +====================================== + +Following are the default log file record specifications for each of the standard log files. These specifications +can be overridden by the use of a log file specifications file via the ``logfile-definitions`` program option. + +For Single Star Evolution (SSE): + +.. toctree:: + :maxdepth: 1 + + standard-logfiles-default-record-specifications-SSE-system-snapshot + standard-logfiles-default-record-specifications-SSE-sysparms + standard-logfiles-default-record-specifications-SSE-detailed-output + standard-logfiles-default-record-specifications-SSE-supernovae + standard-logfiles-default-record-specifications-SSE-pulsars + standard-logfiles-default-record-specifications-SSE-switchlog + +For Binary Star Evolution (BSE): + +.. toctree:: + :maxdepth: 1 + + standard-logfiles-default-record-specifications-BSE-system-snapshot + standard-logfiles-default-record-specifications-BSE-sysparms + standard-logfiles-default-record-specifications-BSE-detailed-output + standard-logfiles-default-record-specifications-BSE-supernovae + standard-logfiles-default-record-specifications-BSE-dco + standard-logfiles-default-record-specifications-BSE-ce + standard-logfiles-default-record-specifications-BSE-circumbinary-disks + standard-logfiles-default-record-specifications-BSE-pulsars + standard-logfiles-default-record-specifications-BSE-rlof + standard-logfiles-default-record-specifications-BSE-switchlog + + diff --git a/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-binary.rst b/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-binary.rst index 92ad89e8f..851c67241 100644 --- a/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-binary.rst +++ b/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-binary.rst @@ -49,7 +49,7 @@ Binary Properties * - Header String: - Tau_Circ - + .. flat-table:: :widths: 25 75 1 1 :header-rows: 0 diff --git a/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-options.rst b/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-options.rst index 1259536c3..c11c29f7d 100644 --- a/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-options.rst +++ b/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-options.rst @@ -1,2306 +1,2306 @@ -Program option properties -========================= - -When specifying known properties in a log file record specification record, the property name must be prefixed with -the property type. Currently there is a single binary property type available for use: PROGRAM_OPTION. - -For example, to specify the program option property ``RANDOM_SEED``, use:: - - PROGRAM OPTION::RANDOM_SEED - - -.. _spec-options-props-top: - -Following is an alphabetical list of program option properties available for inclusion in log file record specifiers. - -**Jump to** -:ref:`A ` :ref:`B ` :ref:`C ` :ref:`D ` -:ref:`E ` :ref:`F ` :ref:`G ` :ref:`H ` -:ref:`I ` :ref:`J ` :ref:`K ` :ref:`L ` -:ref:`M ` :ref:`N ` :ref:`O ` :ref:`P ` -:ref:`Q ` :ref:`R ` :ref:`S ` :ref:`T ` -:ref:`U ` :ref:`V ` :ref:`W ` :ref:`X ` -:ref:`Y ` :ref:`Z ` - -.. _spec-options-props-A: - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ADD_OPTIONS_TO_SYSPARMS** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_AddOptionsToSysParms - * - Description: - - Value of program option ``--add-options-to-sysparms`` - * - Header String: - - PO_Add_Options_To_SysParms - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ALLOW_MS_STAR_TO_SURVIVE_COMMON_ENVELOPE** - - - * - Data type: - - BOOL - * - COMPAS variable: - - Options::m_AllowMainSequenceStarToSurviveCommonEnvelope - * - Description: - - Value of program option ``--common-envelope-allow-main-sequence-survive`` - * - Header String: - - PO_Allow_MS_To_Survive_CE - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ALLOW_RLOF_AT_BIRTH** - - - * - Data type: - - BOOL - * - COMPAS variable: - - Options::m_AllowRLOFAtBirth - * - Description: - - Value of program option ``--allow-rlof-at-birth`` - * - Header String: - - PO_Allow_RLOF@\ Birth - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ALLOW_TOUCHING_AT_BIRTH** - - - * - Data type: - - BOOL - * - COMPAS variable: - - Options::m_AllowTouchingAtBirth - * - Description: - - Value of program option ``--allow-touching-at-birth`` - * - Header String: - - PO_Allow_Touching@\ Birth - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ANG_MOM_CONSERVATION_DURING_CIRCULARISATION** - - - * - Data type: - - BOOL - * - COMPAS variable: - - Options::m_AngularMomentumConservationDuringCircularisation - * - Description: - - Value of program option ``--angular-momentum-conservation-during-circularisation`` - * - Header String: - - PO_Conserve_AngMom@\ Circ - -.. _spec-options-props-B: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **BLACK_HOLE_KICKS** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_BlackHoleKicks - * - Description: - - Value of program option ``--black-hole-kicks`` |br| - * - Header String: - - PO_BH_Kicks - -DEPRECATION NOTICE: property ``BLACK_HOLE_KICKS`` has been deprecated and will soon be removed. Please use ``BLACK_HOLE_KICKS_MODE`` in future. - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **BLACK_HOLE_KICKS_MODE** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_BlackHoleKicks - * - Description: - - Value of program option ``--black-hole-kicks-mode`` |br| - * - Header String: - - PO_BH_Kicks - -.. _spec-options-props-C: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **CASE_BB_STABILITY_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_CaseBBStabilityPrescription - * - Description: - - Value of program option ``--case-BB-stability-prescription`` - * - Header String: - - PO_BB_Mass_xFer_Stblty_Prscrptn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **CHE_MODE** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_CheMode - * - Description: - - Value of program option ``--chemically-homogeneous-evolution`` - * - Header String: - - PO_CHE_Mode - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **CIRCULARISE_BINARY_DURING_MT** - - - * - Data type: - - BOOL - * - COMPAS variable: - - Options::m_CirculariseBinaryDuringMassTransfer - * - Description: - - Value of program option ``--circularise-binary-during-mass-transfer`` - * - Header String: - - PO_Circularise@\ MT - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **CIRCUMBINARY_DISK** - - - * - Data type: - - BOOL - * - COMPAS variable: - - Options::m_CircumbinaryDisk - * - Description: - - Value of program option ``--circumbinary-disk`` - * - Header String: - - PO_CBD - - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **CIRCUMBINARY_DISK_BETA** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CircumbinaryDiskBeta - * - Description: - - Value of program option ``--circumbinary-disk-beta`` - * - Header String: - - PO_CBD_Beta - - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **CIRCUMBINARY_DISK_ENVELOPE_MASS_FRACTION_SUPPLIED** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CircumbinaryDiskEnvelopeMassFractionSupplied - * - Description: - - Value of program option ``--circumbinary-disk-envelope-mass-fraction-supplied`` - * - Header String: - - PO_CBD_Envelope_Mass_Fraction_Supplied - - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **CIRCUMBINARY_DISK_INNER_RADIUS_OVER_SEPARATION** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CircumbinaryDiskInnerRadiusOverSeparation - * - Description: - - Value of program option ``--circumbinary-disk-inner-radius-over-separation`` - * - Header String: - - PO_CBD_Inner_Radius_Over_Separation - - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **CIRCUMBINARY_DISK_LIFETIME** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CircumbinaryDiskLifetime - * - Description: - - Value of program option ``--circumbinary-disk-lifetime`` - * - Header String: - - PO_CBD_Lifetime - - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **CIRCUMBINARY_DISK_STRUCTURE_FACTOR** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CircumbinaryDiskStructureFactor - * - Description: - - Value of program option ``--circumbinary-disk-structure-factor`` - * - Header String: - - PO_CBD_Structure_Factor - - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **CIRCUMBINARY_DISK_EDDINGTON_MODE** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_CircumbinaryDiskEddingtonMode - * - Description: - - Value of program option ``--circumbinary-disk-eddington-mode`` - * - Header String: - - PO_CBD_Eddington_Mode - - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **CIRCUMBINARY_DISK_EDDINGTON_CAP_FACTOR** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CircumbinaryDiskEddingtonCapFactor - * - Description: - - Value of program option ``--circumbinary-disk-eddington-cap-factor`` - * - Header String: - - PO_CBD_Eddington_Cap_Factor - - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **CIRCUMBINARY_DISK_EDDINGTON_GE23_FACTOR** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CircumbinaryDiskEddingtonGe23Factor - * - Description: - - Value of program option ``--circumbinary-disk-eddington-ge23-factor`` - * - Header String: - - PO_CBD_Eddington_GE23_Factor - - - - - - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **COMMON_ENVELOPE_ALPHA** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CommonEnvelopeAlpha - * - Description: - - Value of program option ``--common-envelope-alpha`` - * - Header String: - - PO_CE_Alpha - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **COMMON_ENVELOPE_ALPHA_THERMAL** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CommonEnvelopeAlphaThermal - * - Description: - - Value of program option ``--common-envelope-alpha-thermal`` - * - Header String: - - PO_CE_Alpha_Thermal - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **COMMON_ENVELOPE_LAMBDA** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CommonEnvelopeLambda - * - Description: - - Value of program option ``--common-envelope-lambda`` - * - Header String: - - PO_CE_Lambda - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **COMMON_ENVELOPE_LAMBDA_MULTIPLIER** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CommonEnvelopeLambdaMultiplier - * - Description: - - Value of program option ``--common-envelope-lambda-multiplier`` - * - Header String: - - PO_CE_Lambda_Multiplier - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **COMMON_ENVELOPE_LAMBDA_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_CommonEnvelopeLambdaPrescription - * - Description: - - Value of program option ``--common-envelope-lambda-prescription`` - * - Header String: - - PO_CE_Lambda_Prscrptn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **COMMON_ENVELOPE_MASS_ACCRETION_CONSTANT** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CommonEnvelopeMassAccretionConstant - * - Description: - - Value of program option ``--common-envelope-mass-accretion-constant`` - * - Header String: - - PO_CE_Mass_Accr_Constant - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **COMMON_ENVELOPE_MASS_ACCRETION_MAX** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CommonEnvelopeMassAccretionMax - * - Description: - - Value of program option ``--common-envelope-mass-accretion-max`` - * - Header String: - - PO_CE_Mass_Accr_Max - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **COMMON_ENVELOPE_MASS_ACCRETION_MIN** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CommonEnvelopeMassAccretionMin - * - Description: - - Value of program option ``--common-envelope-mass-accretion-min`` - * - Header String: - - PO_CE_Mass_Accr_Min - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **COMMON_ENVELOPE_MASS_ACCRETION_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_CommonEnvelopeMassAccretionPrescription - * - Description: - - Value of program option ``--common-envelope-mass-accretion-prescription`` - * - Header String: - - PO_CE_Mass_Accr_Prscrptn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **COMMON_ENVELOPE_RECOMBINATION_ENERGY_DENSITY** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CommonEnvelopeRecombinationEnergyDensity - * - Description: - - Value of program option ``--common-envelope-recombination-energy-density`` - * - Header String: - - PO_CE_Recomb_Enrgy_Dnsty - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **COMMON_ENVELOPE_SLOPE_KRUCKOW** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_CommonEnvelopeSlopeKruckow - * - Description: - - Value of program option ``--common-envelope-slope-kruckow`` - * - Header String: - - PO_CE_Slope_Kruckow - -.. _spec-options-props-D: - -.. _spec-options-props-E: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ECCENTRICITY** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_Eccentricity - * - Description: - - Value of program option ``--eccentricity`` - * - Header String: - - PO_Eccentricity - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ECCENTRICITY_DISTRIBUTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_EccentricityDistribution - * - Description: - - Value of program option ``--eccentricity-distribution`` - * - Header String: - - PO_Eccentricity_Dstrbtn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ECCENTRICITY_DISTRIBUTION_MAX** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_EccentricityDistributionMax - * - Description: - - Value of program option ``--eccentricity-max`` - * - Header String: - - PO_Eccentricity_Dstrbtn_Max - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ECCENTRICITY_DISTRIBUTION_MIN** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_EccentricityDistributionMin - * - Description: - - Value of program option ``--eccentricity-min`` - * - Header String: - - PO_Eccentricity_Dstrbtn_Min - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **EDDINGTON_ACCRETION_FACTOR** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_EddingtonAccretionFactor - * - Description: - - Value of program option ``--eddington-accretion-factor`` - * - Header String: - - PO_Eddington_Accr_Factor - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ENVELOPE_STATE_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_EnvelopeStatePrescription - * - Description: - - Value of program option ``--envelope-state-prescription`` - * - Header String: - - PO_Envelope_State_Prscrptn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ENABLE_ROTATIONALLY_ENHANCED_MASS_LOSS** - - - * - Data type: - - BOOL - * - COMPAS variable: - - Options::m_EnableRotationallyEnhancedMassLoss - * - Description: - - Value of program option ``--enable-rotationally-enhanced-mass-loss`` - * - Header String: - - PO_Enable_Rotationally_Enhanced_Mass_Loss - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ENHANCE_CHE_LIFETIMES_LUMINOSITIES** - - - * - Data type: - - BOOL - * - COMPAS variable: - - Options::m_EnhanceCHELifetimesLuminosities - * - Description: - - Value of program option ``--enhance-CHE-lifetimes-luminosities`` - * - Header String: - - PO_Enhance_CHE_lifetimes_luminosities - -.. _spec-options-props-F: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **FRYER_SUPERNOVA_ENGINE** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_FryerSupernovaEngine - * - Description: - - Value of program option ``--fryer-supernova-engine`` - * - Header String: - - PO_Fryer_SN_Engine - -.. _spec-options-props-G: - -.. _spec-options-props-H: - -.. _spec-options-props-I: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **INITIAL_MASS** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_InitialMass - * - Description: - - Value of program option ``--initial-mass`` - * - Header String: - - PO_Initial_Mass - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **INITIAL_MASS_1** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_InitialMass1 - * - Description: - - Value of program option ``--initial-mass-1`` - * - Header String: - - PO_Initial_Mass(1) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **INITIAL_MASS_2** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_InitialMass2 - * - Description: - - Value of program option ``--initial-mass-2`` - * - Header String: - - PO_Initial_Mass(2) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **INITIAL_MASS_FUNCTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_InitialMassFunction - * - Description: - - Value of program option ``--initial-mass-function`` - * - Header String: - - PO_Initial_Mass_Function - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **INITIAL_MASS_FUNCTION_MAX** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_InitialMassFunctionMax - * - Description: - - Value of program option ``--initial-mass-function-max`` - * - Header String: - - PO_Initial_Mass_Func_Max - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **INITIAL_MASS_FUNCTION_MIN** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_InitialMassFunctionMin - * - Description: - - Value of program option ``--initial-mass-function-min`` - * - Header String: - - PO_Initial_Mass_Func_Min - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **INITIAL_MASS_FUNCTION_POWER** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_InitialMassFunctionPower - * - Description: - - Value of program option ``--initial-mass-power`` - * - Header String: - - PO_Initial_Mass_Func_Power - -.. _spec-options-props-J: - -.. _spec-options-props-K: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_DIRECTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_KickDirectionDistribution - * - Description: - - Value of program option ``--kick-direction`` - * - Header String: - - PO_Kick_Direction_Dstrbtn - -DEPRECATION NOTICE: property ``KICK_DIRECTION`` has been deprecated and will soon be removed. Please use ``KICK_DIRECTION_DISTRIBUTION`` in future. - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_DIRECTION_DISTRIBUTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_KickDirectionDistribution - * - Description: - - Value of program option ``--kick-direction-distribution`` - * - Header String: - - PO_Kick_Direction_Dstrbtn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_DIRECTION_POWER** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickDirectionPower - * - Description: - - Value of program option ``--kick-direction-power`` - * - Header String: - - PO_Kick_Direction_Power - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_SCALING_FACTOR** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickScalingFactor - * - Description: - - Value of program option ``--kick-scaling-factor`` - * - Header String: - - PO_Kick_Scaling_Factor - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MAGNITUDE** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickMagnitude - * - Description: - - Value of program option ``--kick-magnitude`` - * - Header String: - - PO_Kick_Magnitude - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MAGNITUDE_1** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickMagnitude1 - * - Description: - - Value of program option ``--kick-magnitude-1`` - * - Header String: - - PO_Kick_Magnitude(1) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MAGNITUDE_2** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickMagnitude2 - * - Description: - - Value of program option ``--kick-magnitude-2`` - * - Header String: - - PO_Kick_Magnitude(2) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MAGNITUDE_DISTRIBUTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_KickMagnitudeDistribution - * - Description: - - Value of program option ``--kick-magnitude-distribution`` - * - Header String: - - PO_Kick_Magnitude_Dstrbtn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MAGNITUDE_DISTRIBUTION_MAXIMUM** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickMagnitudeDistributionMaximum - * - Description: - - Value of program option ``--kick-magnitude-max`` - * - Header String: - - PO_Kick_Magnitude_Dstrbtn_Max - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_kickMagnitudeDistributionSigmaCCSN BH - * - Description: - - Value of program option ``--kick-magnitude-sigma-CCSN-BH`` - * - Header String: - - PO_Sigma_Kick_CCSN_BH - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_kickMagnitudeDistributionSigmaCCSN NS - * - Description: - - Value of program option ``--kick-magnitude-sigma-CCSN-NS`` - * - Header String: - - PO_Sigma_Kick_CCSN_NS - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_kickMagnitudeDistributionSigmaForECSN - * - Description: - - Value of program option ``--kick-magnitude-sigma-ECSN`` - * - Header String: - - PO_Sigma_Kick_ECSN - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_kickMagnitudeDistributionSigmaForUSSN - * - Description: - - Value of program option ``--kick-magnitude-sigma-USSN`` - * - Header String: - - PO_Sigma_Kick_USSN - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MEAN_ANOMALY_1** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickMeanAnomaly1 - * - Description: - - Value of program option ``--kick-mean-anomaly-1`` - * - Header String: - - PO_Kick_Mean_Anomaly(1) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MEAN_ANOMALY_2** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickMeanAnomaly2 - * - Description: - - Value of program option ``--kick-mean-anomaly-2`` - * - Header String: - - PO_Kick_Mean_Anomaly(2) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MAGNITUDE_RANDOM** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickMagnitudeRandom - * - Description: - - Value of program option ``--kick-magnitude-random`` - * - Header String: - - PO_Kick_Magnitude_Random - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MAGNITUDE_RANDOM_1** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickMagnitudeRandom1 - * - Description: - - Value of program option ``--kick-magnitude-random-1`` - * - Header String: - - PO_Kick_Magnitude_Random(1) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_MAGNITUDE_RANDOM_2** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickMagnitudeRandom2 - * - Description: - - Value of program option ``--kick-magnitude-random-2`` - * - Header String: - - PO_Kick_Magnitude_Random(2) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_PHI_1** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickPhi1 - * - Description: - - Value of program option ``--kick-phi-1`` - * - Header String: - - PO_Kick_Mean_Phi(1) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_PHI_2** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickPhi2 - * - Description: - - Value of program option ``--kick-phi-2`` - * - Header String: - - PO_Kick_Mean_Phi(2) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_THETA_1** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickTheta1 - * - Description: - - Value of program option ``--kick-theta-1`` - * - Header String: - - PO_Kick_Mean_Theta(1) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **KICK_THETA_2** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_KickTheta2 - * - Description: - - Value of program option ``--kick-theta-2`` - * - Header String: - - PO_Kick_Mean_Theta(2) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **LBV_FACTOR** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_LuminousBlueVariableFactor - * - Description: - - Value of program option ``--luminous-blue-variable-multiplier`` - * - Header String: - - PO_LBV_Factor - -.. _spec-options-props-L: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **LBV_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_LuminousBlueVariablePrescription - * - Description: - - Value of program option ``--luminous-blue-variable-prescription`` - * - Header String: - - PO_LBV_Mass_Loss_Prscrptn - -DEPRECATION NOTICE: property ``LBV_PRESCRIPTION`` has been deprecated and will soon be removed. Please use ``LBV_MASS_LOSS_PRESCRIPTION`` in future. - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **LBV_MASS_LOSS_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_LuminousBlueVariablePrescription - * - Description: - - Value of program option ``--LBV-mass-loss-prescription`` - * - Header String: - - PO_LBV_Mass_Loss_Prscrptn - -:ref:`Back to Top ` - -.. _spec-options-props-M: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MASS_LOSS_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_MassLossPrescription - * - Description: - - Value of program option ``--mass-loss-prescription`` - * - Header String: - - PO_Mass_Loss_Prscrptn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MASS_RATIO** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MassRatio - * - Description: - - Value of program option ``-``-mass-ratio`` - * - Header String: - - PO_Mass_Ratio - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MASS_RATIO_DISTRIBUTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_MassRatioDistribution - * - Description: - - Value of program option ``--mass-ratio-distribution`` - * - Header String: - - PO_Mass_Ratio_Dstrbtn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MASS_RATIO_DISTRIBUTION_MAX** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MassRatioDistributionMax - * - Description: - - Value of program option ``--mass-ratio-max`` - * - Header String: - - PO_Mass_Ratio_Dstrbtn_Max - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MASS_RATIO_DISTRIBUTION_MIN** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MassRatioDistributionMin - * - Description: - - Value of program option ``--mass-ratio-min`` - * - Header String: - - PO_Mass_Ratio_Dstrbtn_Min - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MAXIMUM_EVOLUTION_TIME** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MaxEvolutionTime - * - Description: - - Value of program option ``--maximum-evolution-time`` - * - Header String: - - PO_Max_Evolution_Time - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MAXIMUM_DONOR_MASS** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MaximumMassDonorNandezIvanova - * - Description: - - Value of program option ``--maximum-mass-donor-nandez-ivanova`` - * - Header String: - - PO_Max_Donor_Mass - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MAXIMUM_NEUTRON_STAR_MASS** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MaximumNeutronStarMass - * - Description: - - Value of program option ``--maximum-neutron-star-mass`` - * - Header String: - - PO_Max_NS_Mass - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MAXIMUM_TIMESTEPS** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_MaxNumberOfTimestepIterations - * - Description: - - Value of program option ``--maximum-number-timestep-iterations`` - * - Header String: - - PO_Max_Timesteps - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MCBUR1** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_mCBUR1 - * - Description: - - Value of program option ``--mcbur1`` - * - Header String: - - PO_MCBUR1 - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **METALLICITY** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_Metallicity - * - Description: - - Value of program option ``--metallicity`` - * - Header String: - - PO_Metallicity - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **METALLICITY_DISTRIBUTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_MetallicityDistribution - * - Description: - - Value of program option ``--metallicity-distribution`` - * - Header String: - - PO_Metallicity_Dstrbtn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **METALLICITY_DISTRIBUTION_MAX** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MetallicityDistributionMax - * - Description: - - Value of program option ``--metallicity-max`` - * - Header String: - - PO_Metallicity_Dstrbtn_Max - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **METALLICITY_DISTRIBUTION_MIN** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MetallicityDistributionMin - * - Description: - - Value of program option ``--metallicity-min`` - * - Header String: - - PO_Metallicity_Dstrbtn_Min - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MINIMUM_SAMPLED_SECONDARY_MASS** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MinimumSampledSecondaryMass - * - Description: - - Value of program option ``--minimum-sampled-secondary-mass`` - * - Header String: - - PO_Min_Secondary_Mass - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MT_ACCRETION_EFFICIENCY_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_MassTransferAccretionEfficiencyPrescription - * - Description: - - Value of program option ``--mass-transfer-accretion-efficiency-prescription`` - * - Header String: - - PO_MT_Acc_Efficiency_Prscrptn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MT_ANG_MOM_LOSS_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_MassTransferAngularMomentumLossPrescription - * - Description: - - Value of program option ``--mass-transfer-angular-momentum-loss-prescription`` - * - Header String: - - PO_MT_AngMom_Loss_Prscrptn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MT_FRACTION_ACCRETED** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MassTransferFractionAccreted - * - Description: - - Value of program option ``--mass-transfer-fa`` - * - Header String: - - PO_MT_Fraction_Accreted - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MT_JLOSS** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MassTransferJloss - * - Description: - - Value of program option ``--mass-transfer-jloss`` - * - Header String: - - PO_MT_JLoss - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MT_THERMAL_LIMIT_C** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MassTransferCParameter - * - Description: - - Value of program option ``--mass-transfer-thermal-limit-C`` - * - Header String: - - PO_MT_Thermal_Limit_C - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MT_REJUVENATION_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_MassTransferRejuvenationPrescription - * - Description: - - Value of program option ``--mass-transfer-rejuvenation-prescription`` - * - Header String: - - PO_MT_Rejuvenation_Prscrptn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MT_THERMALLY_LIMITED_VARIATION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_MassTransferThermallyLimitedVariation - * - Description: - - Value of program option ``--mass-transfer-thermal-limit-accretor`` - * - Header String: - - PO_MT_Thermally_Lmtd_Variation - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MULLER_MANDEL_KICK_MULTIPLIER_BH** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MullerMandelKickBH - * - Description: - - Value of program option ``--muller-mandel-kick-multiplier-BH`` - * - Header String: - - PO_MM_Kick_Multiplier_BH - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **MULLER_MANDEL_KICK_MULTIPLIER_NS** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_MullerMandelKickNS - * - Description: - - Value of program option ``--muller-mandel-kick-multiplier-NS`` - * - Header String: - - PO_MM_Kick_Multiplier_NS - -.. _spec-options-props-N: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **NEUTRINO_MASS_LOSS_ASSUMPTION_BH** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_NeutrinoMassLossAssumptionBH - * - Description: - - Value of program option ``--neutrino-mass-loss-BH-formation`` - * - Header String: - - PO_Neutrino_Mass_Loss_Assmptn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **NEUTRINO_MASS_LOSS_VALUE_BH** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_NeutrinoMassLossValueBH - * - Description: - - Value of program option ``--neutrino-mass-loss-BH-formation-value`` - * - Header String: - - PO_Neutrino_Mass_Loss_Value - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **NOTES** - - - * - Data type: - - STRING - * - COMPAS variable: - - Options::m_Notes - * - Description: - - Value of program option ``--notes`` - * - Header String: - - as specified by program option ``--Notes-Hdrs`` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **NS_EOS** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_NeutronStarEquationOfState - * - Description: - - Value of program option ``--neutron-star-equation-of-state`` - * - Header String: - - PO_NS_EOS - -.. _spec-options-props-O: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ORBITAL_PERIOD** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_OrbitalPeriod - * - Description: - - Value of program option ``--orbital-period`` - * - Header String: - - PO_Orbital_Period - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ORBITAL_PERIOD_DISTRIBUTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_OrbitalPeriodDistribution - * - Description: - - Value of program option ``--orbital-period-distribution`` - * - Header String: - - PO_Orbital_Period_Dstrbtn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ORBITAL_PERIOD_DISTRIBUTION_MAX** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_OrbitalPeriodDistributionMax - * - Description: - - Value of program option ``--orbital-period-max`` - * - Header String: - - PO_Orbital_Period_Max - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ORBITAL_PERIOD_DISTRIBUTION_MIN** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_OrbitalPeriodDistributionMin - * - Description: - - Value of program option ``--orbital-period-min`` - * - Header String: - - PO_Orbital_Period_Min - -.. _spec-options-props-P: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PISN_LOWER_LIMIT** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_PairInstabilityLowerLimit - * - Description: - - Value of program option ``--PISN-lower-limit`` - * - Header String: - - PO_PISN_Lower_Limit - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PISN_UPPER_LIMIT** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_PairInstabilityUpperLimit - * - Description: - - Value of program option ``--PISN-upper-limit`` - * - Header String: - - PO_PISN_Upper_Limit - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_PostCommonEnvelopeEccentricityPrescription - * - Description: - - Value of program option ``--post-common-envelope-eccentricity-prescription`` - * - Header String: - - PO_Post_CE_Eccentricity_Prescription - - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **POST_COMMON_ENVELOPE_ECCENTRICITY_CAP** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_PostCommonEnvelopeEccentricityCap - * - Description: - - Value of program option ``--post-common-envelope-eccentricity-cap`` - * - Header String: - - PO_Post_CE_Eccentricity_Cap - - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **POST_COMMON_ENVELOPE_ECCENTRICITY_FRACTION** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_PostCommonEnvelopeEccentricityFraction - * - Description: - - Value of program option ``--post-common-envelope-eccentricity-fraction`` - * - Header String: - - PO_Post_CE_Eccentricity_Fraction - - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PPI_CO_CORE_SHIFT_HENDRIKS** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_PulsationalPairInstabilityCOCoreShiftHendriks - * - Description: - - Value of program option ``--PPI-CO-Core-Shift-Hendriks`` - * - Header String: - - PO_PPI_CO_CORE_SHIFT_HENDRIKS - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PPI_LOWER_LIMIT** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_PulsationalPairInstabilityLowerLimit - * - Description: - - Value of program option ``--PPI-lower-limit`` - * - Header String: - - PO_PPI_Lower_Limit - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PPI_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_PulsationalPairInstabilityPrescription - * - Description: - - Value of program option ``--pulsational-pair-instability-prescription`` - * - Header String: - - PO_PPI_Prscrptn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PPI_UPPER_LIMIT** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_PulsationalPairInstabilityUpperLimit - * - Description: - - Value of program option ``--PPI-upper-limit`` - * - Header String: - - PO_PPI_Upper_Limit - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PULSAR_MAGNETIC_FIELD_DISTRIBUTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_PulsarBirthMagneticFieldDistribution - * - Description: - - Value of program option ``--pulsar-birth-magnetic-field-distribution`` - * - Header String: - - PO_Pulsar_Mag_Field_Dstrbtn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MAX** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_PulsarBirthMagneticFieldDistributionMax - * - Description: - - Value of program option ``--pulsar-birth-magnetic-field-distribution-max`` - * - Header String: - - PO_Pulsar_Mag_Field_Dstrbtn_Max - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MIN** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_PulsarBirthMagneticFieldDistributionMin - * - Description: - - Value of program option ``--pulsar-birth-magnetic-field-distribution-min`` - * - Header String: - - PO_Pulsar_Mag_Field_Dstrbtn_Min - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_PulsarBirthSpinPeriodDistribution - * - Description: - - Value of program option ``--pulsar-birth-spin-period-distribution`` - * - Header String: - - PO_Pulsar_Spin_Period_Dstrbtn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PULSAR_BIRTH_SPIN_DISTRIBUTION_MAX** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_PulsarBirthSpinPeriodDistributionMax - * - Description: - - Value of program option ``--pulsar-birth-spin-period-distribution-max`` - * - Header String: - - PO_Pulsar_Spin_Period_Dstrbtn_Max - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PULSAR_BIRTH_SPIN_DISTRIBUTION_MIN** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_PulsarBirthSpinPeriodDistributionMin - * - Description: - - Value of program option ``--pulsar-birth-spin-period-distribution-min`` - * - Header String: - - PO_Pulsar_Spin_Period_Dstrbtn_Min - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PULSAR_MAGNETIC_FIELD_DECAY_MASS_SCALE** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options:m_PulsarMagneticFieldDecayMassscale - * - Description: - - Value of program option ``--pulsar-magnetic-field-decay-massscale`` - * - Header String: - - PO_Pulsar_Mag_Field_Decay_mScale - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PULSAR_MAGNETIC_FIELD_DECAY_TIME_SCALE** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options:m_PulsarMagneticFieldDecayTimescale - * - Description: - - Value of program option ``--pulsar-magnetic-field-decay-timescale`` - * - Header String: - - PO_Pulsar_Mag_Field_Decay_tScale - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **PULSAR_MINIMUM_MAGNETIC_FIELD** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_PulsarLog10MinimumMagneticField - * - Description: - - Value of program option ``--pulsar-minimum-magnetic-field`` - * - Header String: - - PO_Pulsar_Minimum_Mag_Field - -.. _spec-options-props-Q: - -.. _spec-options-props-R: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **RANDOM_SEED** - - - * - Data type: - - UNSIGNED LONG INT - * - COMPAS variable: - - Options::m_RandomSeed - * - Description: - - Value of program option ``--random-seed`` - * - Header String: - - PO_SEED(OPTION) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **RANDOM_SEED_CMDLINE** - - - * - Data type: - - UNSIGNED LONG INT - * - COMPAS variable: - - Options::m_FixedRandomSeed - * - Description: - - Value of program option ``--random-seed`` (specified on the commandline) - * - Header String: - - PO_SEED(CMDLINE) - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **REMNANT_MASS_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_RemnantMassPrescription - * - Description: - - Value of program option ``--remnant-mass-prescription`` - * - Header String: - - PO_Remnant_Mass_Prscrptn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ROTATIONAL_VELOCITY_DISTRIBUTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_RotationalVelocityDistribution - * - Description: - - Value of program option ``--rotational-velocity-distribution`` - * - Header String: - - PO_Rotational_Velocity_Dstrbtn - -.. _spec-options-props-S: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **SCALE_CHE_MASS_LOSS_SURF_HE_ABUNDANCE** - - - * - Data type: - - BOOL - * - COMPAS variable: - - Options::m_ScaleCHEMassLossWithSurfaceHeliumAbundance - * - Description: - - Value of program option ``--scale-CHE-mass-loss-with-surface-helium-abundance`` - * - Header String: - - PO_Scale_CHE_Mass_Loss_Surf_He_Abundance - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **SCALE_TERMINAL_WIND_VEL_METALLICITY_POWER** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_ScaleTerminalWindVelocityWithMetallicityPower - * - Description: - - Value of program option ``--scale-terminal-wind-velocity-with-metallicity-power`` - * - Header String: - - PO_Scale_Terminal_Wind_Vel_Metallicity_Power - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **SEMI_MAJOR_AXIS** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_SemiMajorAxis - * - Description: - - Value of program option ``--semi-major-axis`` - * - Header String: - - PO_Semi-Major_Axis - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **SEMI_MAJOR_AXIS_DISTRIBUTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_SemiMajorAxisDistribution - * - Description: - - Value of program option ``--semi-major-axis-distribution`` - * - Header String: - - PO_Semi-Major_Axis_Dstrbtn - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **SEMI_MAJOR_AXIS_DISTRIBUTION_MAX** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_SemiMajorAxisDistributionMax - * - Description: - - Value of program option ``--semi-major-axis-max`` - * - Header String: - - PO_Semi-Major_Axis_Dstrbtn_Max - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **SEMI_MAJOR_AXIS_DISTRIBUTION_MIN** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_SemiMajorAxisDistributionMin - * - Description: - - Value of program option ``--semi-major-axis-min`` - * - Header String: - - PO_Semi-Major_Axis_Dstrbtn_Min - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **STELLAR_ZETA_PRESCRIPTION** - - - * - Data type: - - INT - * - COMPAS variable: - - Options::m_StellarZetaPrescription - * - Description: - - Value of program option ``--stellar-zeta-prescription`` - * - Header String: - - PO_Stellar_Zeta_Prscrptn - -.. _spec-options-props-T: - -.. _spec-options-props-U: - -.. _spec-options-props-V: - -.. _spec-options-props-W: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **WR_FACTOR** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_WolfRayetFactor - * - Description: - - Value of program option ``--wolf-rayet-multiplier`` - * - Header String: - - PO_WR_Factor - -.. _spec-options-props-X: - -.. _spec-options-props-Y: - -.. _spec-options-props-Z: - -:ref:`Back to Top ` - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ZETA_ADIABATIC_ARBITRARY** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_ZetaAdiabaticArbitrary - * - Description: - - Value of program option ``--zeta-adiabatic-arbitrary`` - * - Header String: - - PO_Zeta_Adiabatic_Arbitrary - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ZETA_MS** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_ZetaMainSequence - * - Description: - - Value of program option ``--zeta-main-sequence`` - * - Header String: - - PO_Zeta_Main_Sequence_Giant - -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **ZETA_RADIATIVE_ENVELOPE_GIANT** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - Options::m_ZetaRadiativeEnvelopeGiant - * - Description: - - Value of program option ``--zeta-radiative-envelope-giant`` - * - Header String: - - PO_Zeta_Radiative_Envelope_Giant - +Program option properties +========================= + +When specifying known properties in a log file record specification record, the property name must be prefixed with +the property type. Currently there is a single binary property type available for use: PROGRAM_OPTION. + +For example, to specify the program option property ``RANDOM_SEED``, use:: + + PROGRAM OPTION::RANDOM_SEED + + +.. _spec-options-props-top: + +Following is an alphabetical list of program option properties available for inclusion in log file record specifiers. + +**Jump to** +:ref:`A ` :ref:`B ` :ref:`C ` :ref:`D ` +:ref:`E ` :ref:`F ` :ref:`G ` :ref:`H ` +:ref:`I ` :ref:`J ` :ref:`K ` :ref:`L ` +:ref:`M ` :ref:`N ` :ref:`O ` :ref:`P ` +:ref:`Q ` :ref:`R ` :ref:`S ` :ref:`T ` +:ref:`U ` :ref:`V ` :ref:`W ` :ref:`X ` +:ref:`Y ` :ref:`Z ` + +.. _spec-options-props-A: + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ADD_OPTIONS_TO_SYSPARMS** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_AddOptionsToSysParms + * - Description: + - Value of program option ``--add-options-to-sysparms`` + * - Header String: + - PO_Add_Options_To_SysParms + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ALLOW_MS_STAR_TO_SURVIVE_COMMON_ENVELOPE** + - + * - Data type: + - BOOL + * - COMPAS variable: + - Options::m_AllowMainSequenceStarToSurviveCommonEnvelope + * - Description: + - Value of program option ``--common-envelope-allow-main-sequence-survive`` + * - Header String: + - PO_Allow_MS_To_Survive_CE + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ALLOW_RLOF_AT_BIRTH** + - + * - Data type: + - BOOL + * - COMPAS variable: + - Options::m_AllowRLOFAtBirth + * - Description: + - Value of program option ``--allow-rlof-at-birth`` + * - Header String: + - PO_Allow_RLOF@\ Birth + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ALLOW_TOUCHING_AT_BIRTH** + - + * - Data type: + - BOOL + * - COMPAS variable: + - Options::m_AllowTouchingAtBirth + * - Description: + - Value of program option ``--allow-touching-at-birth`` + * - Header String: + - PO_Allow_Touching@\ Birth + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ANG_MOM_CONSERVATION_DURING_CIRCULARISATION** + - + * - Data type: + - BOOL + * - COMPAS variable: + - Options::m_AngularMomentumConservationDuringCircularisation + * - Description: + - Value of program option ``--angular-momentum-conservation-during-circularisation`` + * - Header String: + - PO_Conserve_AngMom@\ Circ + +.. _spec-options-props-B: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **BLACK_HOLE_KICKS** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_BlackHoleKicks + * - Description: + - Value of program option ``--black-hole-kicks`` |br| + * - Header String: + - PO_BH_Kicks + +DEPRECATION NOTICE: property ``BLACK_HOLE_KICKS`` has been deprecated and will soon be removed. Please use ``BLACK_HOLE_KICKS_MODE`` in future. + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **BLACK_HOLE_KICKS_MODE** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_BlackHoleKicks + * - Description: + - Value of program option ``--black-hole-kicks-mode`` |br| + * - Header String: + - PO_BH_Kicks + +.. _spec-options-props-C: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CASE_BB_STABILITY_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_CaseBBStabilityPrescription + * - Description: + - Value of program option ``--case-BB-stability-prescription`` + * - Header String: + - PO_BB_Mass_xFer_Stblty_Prscrptn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CHE_MODE** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_CheMode + * - Description: + - Value of program option ``--chemically-homogeneous-evolution`` + * - Header String: + - PO_CHE_Mode + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCULARISE_BINARY_DURING_MT** + - + * - Data type: + - BOOL + * - COMPAS variable: + - Options::m_CirculariseBinaryDuringMassTransfer + * - Description: + - Value of program option ``--circularise-binary-during-mass-transfer`` + * - Header String: + - PO_Circularise@\ MT + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK** + - + * - Data type: + - BOOL + * - COMPAS variable: + - Options::m_CircumbinaryDisk + * - Description: + - Value of program option ``--circumbinary-disk`` + * - Header String: + - PO_CBD + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_BETA** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CircumbinaryDiskBeta + * - Description: + - Value of program option ``--circumbinary-disk-beta`` + * - Header String: + - PO_CBD_Beta + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_ENVELOPE_MASS_FRACTION_SUPPLIED** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CircumbinaryDiskEnvelopeMassFractionSupplied + * - Description: + - Value of program option ``--circumbinary-disk-envelope-mass-fraction-supplied`` + * - Header String: + - PO_CBD_Envelope_Mass_Fraction_Supplied + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_INNER_RADIUS_OVER_SEPARATION** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CircumbinaryDiskInnerRadiusOverSeparation + * - Description: + - Value of program option ``--circumbinary-disk-inner-radius-over-separation`` + * - Header String: + - PO_CBD_Inner_Radius_Over_Separation + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_LIFETIME** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CircumbinaryDiskLifetime + * - Description: + - Value of program option ``--circumbinary-disk-lifetime`` + * - Header String: + - PO_CBD_Lifetime + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_STRUCTURE_FACTOR** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CircumbinaryDiskStructureFactor + * - Description: + - Value of program option ``--circumbinary-disk-structure-factor`` + * - Header String: + - PO_CBD_Structure_Factor + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_EDDINGTON_MODE** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_CircumbinaryDiskEddingtonMode + * - Description: + - Value of program option ``--circumbinary-disk-eddington-mode`` + * - Header String: + - PO_CBD_Eddington_Mode + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_EDDINGTON_CAP_FACTOR** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CircumbinaryDiskEddingtonCapFactor + * - Description: + - Value of program option ``--circumbinary-disk-eddington-cap-factor`` + * - Header String: + - PO_CBD_Eddington_Cap_Factor + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **CIRCUMBINARY_DISK_EDDINGTON_GE23_FACTOR** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CircumbinaryDiskEddingtonGe23Factor + * - Description: + - Value of program option ``--circumbinary-disk-eddington-ge23-factor`` + * - Header String: + - PO_CBD_Eddington_GE23_Factor + + + + + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **COMMON_ENVELOPE_ALPHA** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CommonEnvelopeAlpha + * - Description: + - Value of program option ``--common-envelope-alpha`` + * - Header String: + - PO_CE_Alpha + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **COMMON_ENVELOPE_ALPHA_THERMAL** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CommonEnvelopeAlphaThermal + * - Description: + - Value of program option ``--common-envelope-alpha-thermal`` + * - Header String: + - PO_CE_Alpha_Thermal + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **COMMON_ENVELOPE_LAMBDA** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CommonEnvelopeLambda + * - Description: + - Value of program option ``--common-envelope-lambda`` + * - Header String: + - PO_CE_Lambda + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **COMMON_ENVELOPE_LAMBDA_MULTIPLIER** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CommonEnvelopeLambdaMultiplier + * - Description: + - Value of program option ``--common-envelope-lambda-multiplier`` + * - Header String: + - PO_CE_Lambda_Multiplier + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **COMMON_ENVELOPE_LAMBDA_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_CommonEnvelopeLambdaPrescription + * - Description: + - Value of program option ``--common-envelope-lambda-prescription`` + * - Header String: + - PO_CE_Lambda_Prscrptn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **COMMON_ENVELOPE_MASS_ACCRETION_CONSTANT** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CommonEnvelopeMassAccretionConstant + * - Description: + - Value of program option ``--common-envelope-mass-accretion-constant`` + * - Header String: + - PO_CE_Mass_Accr_Constant + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **COMMON_ENVELOPE_MASS_ACCRETION_MAX** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CommonEnvelopeMassAccretionMax + * - Description: + - Value of program option ``--common-envelope-mass-accretion-max`` + * - Header String: + - PO_CE_Mass_Accr_Max + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **COMMON_ENVELOPE_MASS_ACCRETION_MIN** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CommonEnvelopeMassAccretionMin + * - Description: + - Value of program option ``--common-envelope-mass-accretion-min`` + * - Header String: + - PO_CE_Mass_Accr_Min + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **COMMON_ENVELOPE_MASS_ACCRETION_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_CommonEnvelopeMassAccretionPrescription + * - Description: + - Value of program option ``--common-envelope-mass-accretion-prescription`` + * - Header String: + - PO_CE_Mass_Accr_Prscrptn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **COMMON_ENVELOPE_RECOMBINATION_ENERGY_DENSITY** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CommonEnvelopeRecombinationEnergyDensity + * - Description: + - Value of program option ``--common-envelope-recombination-energy-density`` + * - Header String: + - PO_CE_Recomb_Enrgy_Dnsty + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **COMMON_ENVELOPE_SLOPE_KRUCKOW** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_CommonEnvelopeSlopeKruckow + * - Description: + - Value of program option ``--common-envelope-slope-kruckow`` + * - Header String: + - PO_CE_Slope_Kruckow + +.. _spec-options-props-D: + +.. _spec-options-props-E: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ECCENTRICITY** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_Eccentricity + * - Description: + - Value of program option ``--eccentricity`` + * - Header String: + - PO_Eccentricity + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ECCENTRICITY_DISTRIBUTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_EccentricityDistribution + * - Description: + - Value of program option ``--eccentricity-distribution`` + * - Header String: + - PO_Eccentricity_Dstrbtn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ECCENTRICITY_DISTRIBUTION_MAX** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_EccentricityDistributionMax + * - Description: + - Value of program option ``--eccentricity-max`` + * - Header String: + - PO_Eccentricity_Dstrbtn_Max + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ECCENTRICITY_DISTRIBUTION_MIN** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_EccentricityDistributionMin + * - Description: + - Value of program option ``--eccentricity-min`` + * - Header String: + - PO_Eccentricity_Dstrbtn_Min + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **EDDINGTON_ACCRETION_FACTOR** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_EddingtonAccretionFactor + * - Description: + - Value of program option ``--eddington-accretion-factor`` + * - Header String: + - PO_Eddington_Accr_Factor + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ENVELOPE_STATE_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_EnvelopeStatePrescription + * - Description: + - Value of program option ``--envelope-state-prescription`` + * - Header String: + - PO_Envelope_State_Prscrptn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ENABLE_ROTATIONALLY_ENHANCED_MASS_LOSS** + - + * - Data type: + - BOOL + * - COMPAS variable: + - Options::m_EnableRotationallyEnhancedMassLoss + * - Description: + - Value of program option ``--enable-rotationally-enhanced-mass-loss`` + * - Header String: + - PO_Enable_Rotationally_Enhanced_Mass_Loss + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ENHANCE_CHE_LIFETIMES_LUMINOSITIES** + - + * - Data type: + - BOOL + * - COMPAS variable: + - Options::m_EnhanceCHELifetimesLuminosities + * - Description: + - Value of program option ``--enhance-CHE-lifetimes-luminosities`` + * - Header String: + - PO_Enhance_CHE_lifetimes_luminosities + +.. _spec-options-props-F: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **FRYER_SUPERNOVA_ENGINE** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_FryerSupernovaEngine + * - Description: + - Value of program option ``--fryer-supernova-engine`` + * - Header String: + - PO_Fryer_SN_Engine + +.. _spec-options-props-G: + +.. _spec-options-props-H: + +.. _spec-options-props-I: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **INITIAL_MASS** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_InitialMass + * - Description: + - Value of program option ``--initial-mass`` + * - Header String: + - PO_Initial_Mass + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **INITIAL_MASS_1** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_InitialMass1 + * - Description: + - Value of program option ``--initial-mass-1`` + * - Header String: + - PO_Initial_Mass(1) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **INITIAL_MASS_2** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_InitialMass2 + * - Description: + - Value of program option ``--initial-mass-2`` + * - Header String: + - PO_Initial_Mass(2) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **INITIAL_MASS_FUNCTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_InitialMassFunction + * - Description: + - Value of program option ``--initial-mass-function`` + * - Header String: + - PO_Initial_Mass_Function + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **INITIAL_MASS_FUNCTION_MAX** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_InitialMassFunctionMax + * - Description: + - Value of program option ``--initial-mass-function-max`` + * - Header String: + - PO_Initial_Mass_Func_Max + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **INITIAL_MASS_FUNCTION_MIN** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_InitialMassFunctionMin + * - Description: + - Value of program option ``--initial-mass-function-min`` + * - Header String: + - PO_Initial_Mass_Func_Min + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **INITIAL_MASS_FUNCTION_POWER** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_InitialMassFunctionPower + * - Description: + - Value of program option ``--initial-mass-power`` + * - Header String: + - PO_Initial_Mass_Func_Power + +.. _spec-options-props-J: + +.. _spec-options-props-K: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_DIRECTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_KickDirectionDistribution + * - Description: + - Value of program option ``--kick-direction`` + * - Header String: + - PO_Kick_Direction_Dstrbtn + +DEPRECATION NOTICE: property ``KICK_DIRECTION`` has been deprecated and will soon be removed. Please use ``KICK_DIRECTION_DISTRIBUTION`` in future. + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_DIRECTION_DISTRIBUTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_KickDirectionDistribution + * - Description: + - Value of program option ``--kick-direction-distribution`` + * - Header String: + - PO_Kick_Direction_Dstrbtn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_DIRECTION_POWER** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickDirectionPower + * - Description: + - Value of program option ``--kick-direction-power`` + * - Header String: + - PO_Kick_Direction_Power + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_SCALING_FACTOR** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickScalingFactor + * - Description: + - Value of program option ``--kick-scaling-factor`` + * - Header String: + - PO_Kick_Scaling_Factor + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MAGNITUDE** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickMagnitude + * - Description: + - Value of program option ``--kick-magnitude`` + * - Header String: + - PO_Kick_Magnitude + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MAGNITUDE_1** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickMagnitude1 + * - Description: + - Value of program option ``--kick-magnitude-1`` + * - Header String: + - PO_Kick_Magnitude(1) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MAGNITUDE_2** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickMagnitude2 + * - Description: + - Value of program option ``--kick-magnitude-2`` + * - Header String: + - PO_Kick_Magnitude(2) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MAGNITUDE_DISTRIBUTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_KickMagnitudeDistribution + * - Description: + - Value of program option ``--kick-magnitude-distribution`` + * - Header String: + - PO_Kick_Magnitude_Dstrbtn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MAGNITUDE_DISTRIBUTION_MAXIMUM** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickMagnitudeDistributionMaximum + * - Description: + - Value of program option ``--kick-magnitude-max`` + * - Header String: + - PO_Kick_Magnitude_Dstrbtn_Max + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_kickMagnitudeDistributionSigmaCCSN BH + * - Description: + - Value of program option ``--kick-magnitude-sigma-CCSN-BH`` + * - Header String: + - PO_Sigma_Kick_CCSN_BH + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_kickMagnitudeDistributionSigmaCCSN NS + * - Description: + - Value of program option ``--kick-magnitude-sigma-CCSN-NS`` + * - Header String: + - PO_Sigma_Kick_CCSN_NS + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_kickMagnitudeDistributionSigmaForECSN + * - Description: + - Value of program option ``--kick-magnitude-sigma-ECSN`` + * - Header String: + - PO_Sigma_Kick_ECSN + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_kickMagnitudeDistributionSigmaForUSSN + * - Description: + - Value of program option ``--kick-magnitude-sigma-USSN`` + * - Header String: + - PO_Sigma_Kick_USSN + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MEAN_ANOMALY_1** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickMeanAnomaly1 + * - Description: + - Value of program option ``--kick-mean-anomaly-1`` + * - Header String: + - PO_Kick_Mean_Anomaly(1) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MEAN_ANOMALY_2** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickMeanAnomaly2 + * - Description: + - Value of program option ``--kick-mean-anomaly-2`` + * - Header String: + - PO_Kick_Mean_Anomaly(2) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MAGNITUDE_RANDOM** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickMagnitudeRandom + * - Description: + - Value of program option ``--kick-magnitude-random`` + * - Header String: + - PO_Kick_Magnitude_Random + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MAGNITUDE_RANDOM_1** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickMagnitudeRandom1 + * - Description: + - Value of program option ``--kick-magnitude-random-1`` + * - Header String: + - PO_Kick_Magnitude_Random(1) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_MAGNITUDE_RANDOM_2** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickMagnitudeRandom2 + * - Description: + - Value of program option ``--kick-magnitude-random-2`` + * - Header String: + - PO_Kick_Magnitude_Random(2) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_PHI_1** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickPhi1 + * - Description: + - Value of program option ``--kick-phi-1`` + * - Header String: + - PO_Kick_Mean_Phi(1) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_PHI_2** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickPhi2 + * - Description: + - Value of program option ``--kick-phi-2`` + * - Header String: + - PO_Kick_Mean_Phi(2) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_THETA_1** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickTheta1 + * - Description: + - Value of program option ``--kick-theta-1`` + * - Header String: + - PO_Kick_Mean_Theta(1) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **KICK_THETA_2** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_KickTheta2 + * - Description: + - Value of program option ``--kick-theta-2`` + * - Header String: + - PO_Kick_Mean_Theta(2) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **LBV_FACTOR** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_LuminousBlueVariableFactor + * - Description: + - Value of program option ``--luminous-blue-variable-multiplier`` + * - Header String: + - PO_LBV_Factor + +.. _spec-options-props-L: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **LBV_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_LuminousBlueVariablePrescription + * - Description: + - Value of program option ``--luminous-blue-variable-prescription`` + * - Header String: + - PO_LBV_Mass_Loss_Prscrptn + +DEPRECATION NOTICE: property ``LBV_PRESCRIPTION`` has been deprecated and will soon be removed. Please use ``LBV_MASS_LOSS_PRESCRIPTION`` in future. + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **LBV_MASS_LOSS_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_LuminousBlueVariablePrescription + * - Description: + - Value of program option ``--LBV-mass-loss-prescription`` + * - Header String: + - PO_LBV_Mass_Loss_Prscrptn + +:ref:`Back to Top ` + +.. _spec-options-props-M: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MASS_LOSS_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_MassLossPrescription + * - Description: + - Value of program option ``--mass-loss-prescription`` + * - Header String: + - PO_Mass_Loss_Prscrptn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MASS_RATIO** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MassRatio + * - Description: + - Value of program option ``-``-mass-ratio`` + * - Header String: + - PO_Mass_Ratio + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MASS_RATIO_DISTRIBUTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_MassRatioDistribution + * - Description: + - Value of program option ``--mass-ratio-distribution`` + * - Header String: + - PO_Mass_Ratio_Dstrbtn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MASS_RATIO_DISTRIBUTION_MAX** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MassRatioDistributionMax + * - Description: + - Value of program option ``--mass-ratio-max`` + * - Header String: + - PO_Mass_Ratio_Dstrbtn_Max + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MASS_RATIO_DISTRIBUTION_MIN** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MassRatioDistributionMin + * - Description: + - Value of program option ``--mass-ratio-min`` + * - Header String: + - PO_Mass_Ratio_Dstrbtn_Min + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MAXIMUM_EVOLUTION_TIME** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MaxEvolutionTime + * - Description: + - Value of program option ``--maximum-evolution-time`` + * - Header String: + - PO_Max_Evolution_Time + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MAXIMUM_DONOR_MASS** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MaximumMassDonorNandezIvanova + * - Description: + - Value of program option ``--maximum-mass-donor-nandez-ivanova`` + * - Header String: + - PO_Max_Donor_Mass + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MAXIMUM_NEUTRON_STAR_MASS** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MaximumNeutronStarMass + * - Description: + - Value of program option ``--maximum-neutron-star-mass`` + * - Header String: + - PO_Max_NS_Mass + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MAXIMUM_TIMESTEPS** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_MaxNumberOfTimestepIterations + * - Description: + - Value of program option ``--maximum-number-timestep-iterations`` + * - Header String: + - PO_Max_Timesteps + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MCBUR1** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_mCBUR1 + * - Description: + - Value of program option ``--mcbur1`` + * - Header String: + - PO_MCBUR1 + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **METALLICITY** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_Metallicity + * - Description: + - Value of program option ``--metallicity`` + * - Header String: + - PO_Metallicity + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **METALLICITY_DISTRIBUTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_MetallicityDistribution + * - Description: + - Value of program option ``--metallicity-distribution`` + * - Header String: + - PO_Metallicity_Dstrbtn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **METALLICITY_DISTRIBUTION_MAX** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MetallicityDistributionMax + * - Description: + - Value of program option ``--metallicity-max`` + * - Header String: + - PO_Metallicity_Dstrbtn_Max + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **METALLICITY_DISTRIBUTION_MIN** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MetallicityDistributionMin + * - Description: + - Value of program option ``--metallicity-min`` + * - Header String: + - PO_Metallicity_Dstrbtn_Min + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MINIMUM_SAMPLED_SECONDARY_MASS** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MinimumSampledSecondaryMass + * - Description: + - Value of program option ``--minimum-sampled-secondary-mass`` + * - Header String: + - PO_Min_Secondary_Mass + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MT_ACCRETION_EFFICIENCY_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_MassTransferAccretionEfficiencyPrescription + * - Description: + - Value of program option ``--mass-transfer-accretion-efficiency-prescription`` + * - Header String: + - PO_MT_Acc_Efficiency_Prscrptn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MT_ANG_MOM_LOSS_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_MassTransferAngularMomentumLossPrescription + * - Description: + - Value of program option ``--mass-transfer-angular-momentum-loss-prescription`` + * - Header String: + - PO_MT_AngMom_Loss_Prscrptn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MT_FRACTION_ACCRETED** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MassTransferFractionAccreted + * - Description: + - Value of program option ``--mass-transfer-fa`` + * - Header String: + - PO_MT_Fraction_Accreted + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MT_JLOSS** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MassTransferJloss + * - Description: + - Value of program option ``--mass-transfer-jloss`` + * - Header String: + - PO_MT_JLoss + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MT_THERMAL_LIMIT_C** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MassTransferCParameter + * - Description: + - Value of program option ``--mass-transfer-thermal-limit-C`` + * - Header String: + - PO_MT_Thermal_Limit_C + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MT_REJUVENATION_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_MassTransferRejuvenationPrescription + * - Description: + - Value of program option ``--mass-transfer-rejuvenation-prescription`` + * - Header String: + - PO_MT_Rejuvenation_Prscrptn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MT_THERMALLY_LIMITED_VARIATION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_MassTransferThermallyLimitedVariation + * - Description: + - Value of program option ``--mass-transfer-thermal-limit-accretor`` + * - Header String: + - PO_MT_Thermally_Lmtd_Variation + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MULLER_MANDEL_KICK_MULTIPLIER_BH** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MullerMandelKickBH + * - Description: + - Value of program option ``--muller-mandel-kick-multiplier-BH`` + * - Header String: + - PO_MM_Kick_Multiplier_BH + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **MULLER_MANDEL_KICK_MULTIPLIER_NS** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_MullerMandelKickNS + * - Description: + - Value of program option ``--muller-mandel-kick-multiplier-NS`` + * - Header String: + - PO_MM_Kick_Multiplier_NS + +.. _spec-options-props-N: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **NEUTRINO_MASS_LOSS_ASSUMPTION_BH** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_NeutrinoMassLossAssumptionBH + * - Description: + - Value of program option ``--neutrino-mass-loss-BH-formation`` + * - Header String: + - PO_Neutrino_Mass_Loss_Assmptn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **NEUTRINO_MASS_LOSS_VALUE_BH** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_NeutrinoMassLossValueBH + * - Description: + - Value of program option ``--neutrino-mass-loss-BH-formation-value`` + * - Header String: + - PO_Neutrino_Mass_Loss_Value + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **NOTES** + - + * - Data type: + - STRING + * - COMPAS variable: + - Options::m_Notes + * - Description: + - Value of program option ``--notes`` + * - Header String: + - as specified by program option ``--Notes-Hdrs`` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **NS_EOS** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_NeutronStarEquationOfState + * - Description: + - Value of program option ``--neutron-star-equation-of-state`` + * - Header String: + - PO_NS_EOS + +.. _spec-options-props-O: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ORBITAL_PERIOD** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_OrbitalPeriod + * - Description: + - Value of program option ``--orbital-period`` + * - Header String: + - PO_Orbital_Period + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ORBITAL_PERIOD_DISTRIBUTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_OrbitalPeriodDistribution + * - Description: + - Value of program option ``--orbital-period-distribution`` + * - Header String: + - PO_Orbital_Period_Dstrbtn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ORBITAL_PERIOD_DISTRIBUTION_MAX** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_OrbitalPeriodDistributionMax + * - Description: + - Value of program option ``--orbital-period-max`` + * - Header String: + - PO_Orbital_Period_Max + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ORBITAL_PERIOD_DISTRIBUTION_MIN** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_OrbitalPeriodDistributionMin + * - Description: + - Value of program option ``--orbital-period-min`` + * - Header String: + - PO_Orbital_Period_Min + +.. _spec-options-props-P: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PISN_LOWER_LIMIT** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_PairInstabilityLowerLimit + * - Description: + - Value of program option ``--PISN-lower-limit`` + * - Header String: + - PO_PISN_Lower_Limit + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PISN_UPPER_LIMIT** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_PairInstabilityUpperLimit + * - Description: + - Value of program option ``--PISN-upper-limit`` + * - Header String: + - PO_PISN_Upper_Limit + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_PostCommonEnvelopeEccentricityPrescription + * - Description: + - Value of program option ``--post-common-envelope-eccentricity-prescription`` + * - Header String: + - PO_Post_CE_Eccentricity_Prescription + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **POST_COMMON_ENVELOPE_ECCENTRICITY_CAP** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_PostCommonEnvelopeEccentricityCap + * - Description: + - Value of program option ``--post-common-envelope-eccentricity-cap`` + * - Header String: + - PO_Post_CE_Eccentricity_Cap + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **POST_COMMON_ENVELOPE_ECCENTRICITY_FRACTION** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_PostCommonEnvelopeEccentricityFraction + * - Description: + - Value of program option ``--post-common-envelope-eccentricity-fraction`` + * - Header String: + - PO_Post_CE_Eccentricity_Fraction + + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PPI_CO_CORE_SHIFT_HENDRIKS** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_PulsationalPairInstabilityCOCoreShiftHendriks + * - Description: + - Value of program option ``--PPI-CO-Core-Shift-Hendriks`` + * - Header String: + - PO_PPI_CO_CORE_SHIFT_HENDRIKS + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PPI_LOWER_LIMIT** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_PulsationalPairInstabilityLowerLimit + * - Description: + - Value of program option ``--PPI-lower-limit`` + * - Header String: + - PO_PPI_Lower_Limit + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PPI_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_PulsationalPairInstabilityPrescription + * - Description: + - Value of program option ``--pulsational-pair-instability-prescription`` + * - Header String: + - PO_PPI_Prscrptn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PPI_UPPER_LIMIT** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_PulsationalPairInstabilityUpperLimit + * - Description: + - Value of program option ``--PPI-upper-limit`` + * - Header String: + - PO_PPI_Upper_Limit + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PULSAR_MAGNETIC_FIELD_DISTRIBUTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_PulsarBirthMagneticFieldDistribution + * - Description: + - Value of program option ``--pulsar-birth-magnetic-field-distribution`` + * - Header String: + - PO_Pulsar_Mag_Field_Dstrbtn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MAX** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_PulsarBirthMagneticFieldDistributionMax + * - Description: + - Value of program option ``--pulsar-birth-magnetic-field-distribution-max`` + * - Header String: + - PO_Pulsar_Mag_Field_Dstrbtn_Max + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MIN** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_PulsarBirthMagneticFieldDistributionMin + * - Description: + - Value of program option ``--pulsar-birth-magnetic-field-distribution-min`` + * - Header String: + - PO_Pulsar_Mag_Field_Dstrbtn_Min + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_PulsarBirthSpinPeriodDistribution + * - Description: + - Value of program option ``--pulsar-birth-spin-period-distribution`` + * - Header String: + - PO_Pulsar_Spin_Period_Dstrbtn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PULSAR_BIRTH_SPIN_DISTRIBUTION_MAX** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_PulsarBirthSpinPeriodDistributionMax + * - Description: + - Value of program option ``--pulsar-birth-spin-period-distribution-max`` + * - Header String: + - PO_Pulsar_Spin_Period_Dstrbtn_Max + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PULSAR_BIRTH_SPIN_DISTRIBUTION_MIN** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_PulsarBirthSpinPeriodDistributionMin + * - Description: + - Value of program option ``--pulsar-birth-spin-period-distribution-min`` + * - Header String: + - PO_Pulsar_Spin_Period_Dstrbtn_Min + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PULSAR_MAGNETIC_FIELD_DECAY_MASS_SCALE** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options:m_PulsarMagneticFieldDecayMassscale + * - Description: + - Value of program option ``--pulsar-magnetic-field-decay-massscale`` + * - Header String: + - PO_Pulsar_Mag_Field_Decay_mScale + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PULSAR_MAGNETIC_FIELD_DECAY_TIME_SCALE** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options:m_PulsarMagneticFieldDecayTimescale + * - Description: + - Value of program option ``--pulsar-magnetic-field-decay-timescale`` + * - Header String: + - PO_Pulsar_Mag_Field_Decay_tScale + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **PULSAR_MINIMUM_MAGNETIC_FIELD** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_PulsarLog10MinimumMagneticField + * - Description: + - Value of program option ``--pulsar-minimum-magnetic-field`` + * - Header String: + - PO_Pulsar_Minimum_Mag_Field + +.. _spec-options-props-Q: + +.. _spec-options-props-R: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **RANDOM_SEED** + - + * - Data type: + - UNSIGNED LONG INT + * - COMPAS variable: + - Options::m_RandomSeed + * - Description: + - Value of program option ``--random-seed`` + * - Header String: + - PO_SEED(OPTION) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **RANDOM_SEED_CMDLINE** + - + * - Data type: + - UNSIGNED LONG INT + * - COMPAS variable: + - Options::m_FixedRandomSeed + * - Description: + - Value of program option ``--random-seed`` (specified on the commandline) + * - Header String: + - PO_SEED(CMDLINE) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **REMNANT_MASS_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_RemnantMassPrescription + * - Description: + - Value of program option ``--remnant-mass-prescription`` + * - Header String: + - PO_Remnant_Mass_Prscrptn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ROTATIONAL_VELOCITY_DISTRIBUTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_RotationalVelocityDistribution + * - Description: + - Value of program option ``--rotational-velocity-distribution`` + * - Header String: + - PO_Rotational_Velocity_Dstrbtn + +.. _spec-options-props-S: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **SCALE_CHE_MASS_LOSS_SURF_HE_ABUNDANCE** + - + * - Data type: + - BOOL + * - COMPAS variable: + - Options::m_ScaleCHEMassLossWithSurfaceHeliumAbundance + * - Description: + - Value of program option ``--scale-CHE-mass-loss-with-surface-helium-abundance`` + * - Header String: + - PO_Scale_CHE_Mass_Loss_Surf_He_Abundance + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **SCALE_TERMINAL_WIND_VEL_METALLICITY_POWER** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_ScaleTerminalWindVelocityWithMetallicityPower + * - Description: + - Value of program option ``--scale-terminal-wind-velocity-with-metallicity-power`` + * - Header String: + - PO_Scale_Terminal_Wind_Vel_Metallicity_Power + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **SEMI_MAJOR_AXIS** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_SemiMajorAxis + * - Description: + - Value of program option ``--semi-major-axis`` + * - Header String: + - PO_Semi-Major_Axis + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **SEMI_MAJOR_AXIS_DISTRIBUTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_SemiMajorAxisDistribution + * - Description: + - Value of program option ``--semi-major-axis-distribution`` + * - Header String: + - PO_Semi-Major_Axis_Dstrbtn + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **SEMI_MAJOR_AXIS_DISTRIBUTION_MAX** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_SemiMajorAxisDistributionMax + * - Description: + - Value of program option ``--semi-major-axis-max`` + * - Header String: + - PO_Semi-Major_Axis_Dstrbtn_Max + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **SEMI_MAJOR_AXIS_DISTRIBUTION_MIN** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_SemiMajorAxisDistributionMin + * - Description: + - Value of program option ``--semi-major-axis-min`` + * - Header String: + - PO_Semi-Major_Axis_Dstrbtn_Min + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **STELLAR_ZETA_PRESCRIPTION** + - + * - Data type: + - INT + * - COMPAS variable: + - Options::m_StellarZetaPrescription + * - Description: + - Value of program option ``--stellar-zeta-prescription`` + * - Header String: + - PO_Stellar_Zeta_Prscrptn + +.. _spec-options-props-T: + +.. _spec-options-props-U: + +.. _spec-options-props-V: + +.. _spec-options-props-W: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **WR_FACTOR** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_WolfRayetFactor + * - Description: + - Value of program option ``--wolf-rayet-multiplier`` + * - Header String: + - PO_WR_Factor + +.. _spec-options-props-X: + +.. _spec-options-props-Y: + +.. _spec-options-props-Z: + +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ZETA_ADIABATIC_ARBITRARY** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_ZetaAdiabaticArbitrary + * - Description: + - Value of program option ``--zeta-adiabatic-arbitrary`` + * - Header String: + - PO_Zeta_Adiabatic_Arbitrary + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ZETA_MS** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_ZetaMainSequence + * - Description: + - Value of program option ``--zeta-main-sequence`` + * - Header String: + - PO_Zeta_Main_Sequence_Giant + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **ZETA_RADIATIVE_ENVELOPE_GIANT** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - Options::m_ZetaRadiativeEnvelopeGiant + * - Description: + - Value of program option ``--zeta-radiative-envelope-giant`` + * - Header String: + - PO_Zeta_Radiative_Envelope_Giant + diff --git a/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification.rst b/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification.rst index d4e257e83..dfb59d686 100644 --- a/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification.rst +++ b/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification.rst @@ -1,137 +1,137 @@ -Standard log file record specification -====================================== - -The standard log file record specifiers can be changed at run-time by supplying a log file definitions file via the ``--logfile-definitions`` -program option. This allows users to change what appears in any of the standard COMPAS log files without the need to change the source code -or rebuild the COMPAS executable. - -The syntax of the definitions file is fairly simple. The definitions file is expected to contain zero or more log file record specifications, as -explained below. - -Complete lists of available properties selectable for inclusion (or exclusion) from COMPAS log file are available: - - -.. toctree:: - :maxdepth: 1 - - standard-logfiles-record-specification-stellar - standard-logfiles-record-specification-binary - standard-logfiles-record-specification-options - - -For the following specification:: - - ::= means `expands to` or `is defined as` - { x } means (possible) repetition: x may appear zero or more times - [ x ] means x is optional: x may appear, or not - is a term (expression) - "abc" means literal string "abc" - n means integer number - | means `OR` - # indicates the start of a comment - - -Log file definitions file specification ---------------------------------------- - -:: - - ::= {} - - ::= "{" { [ ] } "}" - - ::= "SSE_SYSPARMS_REC" | # SSE only - "SSE_DETAILED_REC" | # SSE only - "SSE_SYS_SNAPSHOT_REC" | # SSE only - "SSE_SNE_REC" | # SSE only - "SSE_SWITCH_REC" | # SSE only - "BSE_SYSPARMS_REC" | # BSE only - "BSE_SWITCH_REC" | # BSE only - "BSE_DCO_REC" | # BSE only - "BSE_SNE_REC" | # BSE only - "BSE_CEE_REC" | # BSE only - "BSE_CBD_REC" | # BSE only - "BSE_PULSARS_REC" | # BSE only - "BSE_RLOF_REC" | # BSE only - "BSE_DETAILED_REC" | # BSE only - "BSE_SYS_SNAPSHOT_REC" | # BSE only - - ::= "=" | "+=" | "-=" - - ::= [ ] - - ::= "::" [ ] - - ::= "::" | "EOL" - - ::= "," | - - ::= "STAR_PROPERTY" | # SSE only - "STAR1_PROPERTY" | # BSE only - "STAR2_PROPERTY" | # BSE only - "SUPERNOVA_PROPERTY" | # BSE only - "COMPANION_PROPERTY" | # BSE only - "BINARY_PROPERTY" | # BSE only - "PROGRAM_OPTION" | # SSE_or BSE - - ::= "[" n "]" - - ::= valid property name for specified property type (see definitions in constants.h) - - -The log file definitions may contain comments. Comments are denoted by the hash/pound character ("#"). The hash/pound character and any -text following it on the line in which the hash character appears is ignored by the parser. The hash/pound character can appear anywhere -on a line - if it is the first character then the entire line is a comment and ignored by the parser, or it can follow valid symbols on -a line, in which case the symbols before the hash/pound character are parsed and interpreted by the parser. - -A log file specification record is initially set to its default value (see :doc:`standard-logfiles-default-record-specifications`). -The log file definitions file informs COMPAS as to the modifications to the default values the user wants. This means that the log file -definitions log file is not mandatory, and if the log file definitions file is not present, or contains no valid record specifiers, the log -file record definitions will remain at their default values. - -The assignment operator given in a record specification (```` in the specification above) can be one of "=", "+=", and "-=". The meanings of -these are: - - "=" means the record specifier should be assigned the list of properties specified in the braced-list following the "=" operator. The value of the record specifier prior to the assignment is discarded, and the new value set as described. - - "+=" means the list of properties specified in the braced-list following the "+=" operator should be appended to the existing value of the record specifier. Note that the new properties are appended to the existing list, so will appear at the end of the list (properties are printed in the order they appear in the list). - - "-=" means the list of properties specified in the braced-list following the "-=" operator should be subtracted from the existing value of the record specifier. - -The `prop-index` qualifier may only be used for vector program options. - - -Example definitions file entries --------------------------------- - -Some example log file definitions file entries are:: - - SSE_SYSPARMS_REC = { STAR_PROPERTY::RANDOM_SEED, STAR_PROPERTY::RADIUS, - STAR_PROPERTY::MASS, - STAR_PROPERTY::LUMINOSITY - } - - BSE_PULSARS_REC += { STAR_1_PROPERTY::LUMINOSITY, STAR_2_PROPERTY::CORE_MASS, - BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, COMPANION PROPERTY::RADIUS - } - - BSE_PULSARS_REC -= { SUPERNOVA_PROPERTY::TEMPERATURE } - - BSE_PULSARS_REC += { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS, - BINARY_PROPERTY::ORBITAL_VELOCITY - } - - BSE_SYSPARMS_REC -= { PROGRAM_OPTION::NOTES } - BSE_SYSPARMS_REC += { PROGRAM_OPTION::NOTES[1], PROGRAM_OPTION::NOTES[3] } - -A full example log file record specifications file is shown in :doc:`standard-logfiles-example-definitions-file`. - -The record specifications in the definitions file are processed individually in the sequence they appear in the file, and are cumulative: -for record specifications pertaining to the same record name, the output of earlier specifications is input to later specifications. - -For each record specification: - -- Properties requested to be added to an existing record specification that already exist in that record specification are ignored. Properties will not appear in a record specification twice. -- Properties requested to be subtracted from an existing record specification that do not exist in that record specification are ignored. - -Note that neither of those circumstances will cause a parse error for the definitions file – in both cases the user’s intent is satisfied. +Standard log file record specification +====================================== + +The standard log file record specifiers can be changed at run-time by supplying a log file definitions file via the ``--logfile-definitions`` +program option. This allows users to change what appears in any of the standard COMPAS log files without the need to change the source code +or rebuild the COMPAS executable. + +The syntax of the definitions file is fairly simple. The definitions file is expected to contain zero or more log file record specifications, as +explained below. + +Complete lists of available properties selectable for inclusion (or exclusion) from COMPAS log file are available: + + +.. toctree:: + :maxdepth: 1 + + standard-logfiles-record-specification-stellar + standard-logfiles-record-specification-binary + standard-logfiles-record-specification-options + + +For the following specification:: + + ::= means `expands to` or `is defined as` + { x } means (possible) repetition: x may appear zero or more times + [ x ] means x is optional: x may appear, or not + is a term (expression) + "abc" means literal string "abc" + n means integer number + | means `OR` + # indicates the start of a comment + + +Log file definitions file specification +--------------------------------------- + +:: + + ::= {} + + ::= "{" { [ ] } "}" + + ::= "SSE_SYSPARMS_REC" | # SSE only + "SSE_DETAILED_REC" | # SSE only + "SSE_SYS_SNAPSHOT_REC" | # SSE only + "SSE_SNE_REC" | # SSE only + "SSE_SWITCH_REC" | # SSE only + "BSE_SYSPARMS_REC" | # BSE only + "BSE_SWITCH_REC" | # BSE only + "BSE_DCO_REC" | # BSE only + "BSE_SNE_REC" | # BSE only + "BSE_CEE_REC" | # BSE only + "BSE_CBD_REC" | # BSE only + "BSE_PULSARS_REC" | # BSE only + "BSE_RLOF_REC" | # BSE only + "BSE_DETAILED_REC" | # BSE only + "BSE_SYS_SNAPSHOT_REC" | # BSE only + + ::= "=" | "+=" | "-=" + + ::= [ ] + + ::= "::" [ ] + + ::= "::" | "EOL" + + ::= "," | + + ::= "STAR_PROPERTY" | # SSE only + "STAR1_PROPERTY" | # BSE only + "STAR2_PROPERTY" | # BSE only + "SUPERNOVA_PROPERTY" | # BSE only + "COMPANION_PROPERTY" | # BSE only + "BINARY_PROPERTY" | # BSE only + "PROGRAM_OPTION" | # SSE_or BSE + + ::= "[" n "]" + + ::= valid property name for specified property type (see definitions in constants.h) + + +The log file definitions may contain comments. Comments are denoted by the hash/pound character ("#"). The hash/pound character and any +text following it on the line in which the hash character appears is ignored by the parser. The hash/pound character can appear anywhere +on a line - if it is the first character then the entire line is a comment and ignored by the parser, or it can follow valid symbols on +a line, in which case the symbols before the hash/pound character are parsed and interpreted by the parser. + +A log file specification record is initially set to its default value (see :doc:`standard-logfiles-default-record-specifications`). +The log file definitions file informs COMPAS as to the modifications to the default values the user wants. This means that the log file +definitions log file is not mandatory, and if the log file definitions file is not present, or contains no valid record specifiers, the log +file record definitions will remain at their default values. + +The assignment operator given in a record specification (```` in the specification above) can be one of "=", "+=", and "-=". The meanings of +these are: + + "=" means the record specifier should be assigned the list of properties specified in the braced-list following the "=" operator. The value of the record specifier prior to the assignment is discarded, and the new value set as described. + + "+=" means the list of properties specified in the braced-list following the "+=" operator should be appended to the existing value of the record specifier. Note that the new properties are appended to the existing list, so will appear at the end of the list (properties are printed in the order they appear in the list). + + "-=" means the list of properties specified in the braced-list following the "-=" operator should be subtracted from the existing value of the record specifier. + +The `prop-index` qualifier may only be used for vector program options. + + +Example definitions file entries +-------------------------------- + +Some example log file definitions file entries are:: + + SSE_SYSPARMS_REC = { STAR_PROPERTY::RANDOM_SEED, STAR_PROPERTY::RADIUS, + STAR_PROPERTY::MASS, + STAR_PROPERTY::LUMINOSITY + } + + BSE_PULSARS_REC += { STAR_1_PROPERTY::LUMINOSITY, STAR_2_PROPERTY::CORE_MASS, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, COMPANION PROPERTY::RADIUS + } + + BSE_PULSARS_REC -= { SUPERNOVA_PROPERTY::TEMPERATURE } + + BSE_PULSARS_REC += { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS, + BINARY_PROPERTY::ORBITAL_VELOCITY + } + + BSE_SYSPARMS_REC -= { PROGRAM_OPTION::NOTES } + BSE_SYSPARMS_REC += { PROGRAM_OPTION::NOTES[1], PROGRAM_OPTION::NOTES[3] } + +A full example log file record specifications file is shown in :doc:`standard-logfiles-example-definitions-file`. + +The record specifications in the definitions file are processed individually in the sequence they appear in the file, and are cumulative: +for record specifications pertaining to the same record name, the output of earlier specifications is input to later specifications. + +For each record specification: + +- Properties requested to be added to an existing record specification that already exist in that record specification are ignored. Properties will not appear in a record specification twice. +- Properties requested to be subtracted from an existing record specification that do not exist in that record specification are ignored. + +Note that neither of those circumstances will cause a parse error for the definitions file – in both cases the user’s intent is satisfied. diff --git a/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-types.rst b/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-types.rst index 30bfbb2bb..39658693a 100644 --- a/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-types.rst +++ b/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-types.rst @@ -1,69 +1,69 @@ -Standard log file record types -============================== - -All standard COMPAS logfiles, except the switch log files, have a record type property (column). The record type property -is an unsigned integer that can take any value in the range :math:`0..4294967295`. - -The record type is used to differentiate records within a standard log file. The functionality was introduced primarily to -support different types of records in the detailed output files (BSE and SSE), but has been extended to all other log files -(except the switch log files). - -The use case for the detailed output log files is to differentiate between records written to the file when the star or binary -and constituent stars are known to be in self-consistent states (that is, the attributes of the star or binary and constituent -stars have been correctly and completely updated), and records written to the file, perhaps mid-timestep, when the star or -binary and/or constituent stars may not be self-consistent. Since the record type property can take any value in the range -:math:`0..4294967295` there is scope to identify many different events or situations, in any of the standard log files. We may, -for example, use different record types to indicate that a detailed output record was written immediately prior to, or immediately -following, a particular event or calculation. Or we may want to indicate that a supernovae record was written to the supernovae -file prior to the SN event, and another record following the SN event. Or for the RLOF file we may want to differentiate between -records written pre-MT and post_MT - the possibilities are (almost) limitless. - -Each standard log file has its own set of record types - select a file below to see the available record types for that file. - -.. toctree:: - :maxdepth: 1 - - standard-logfiles-record-types-sse-system-parameters - standard-logfiles-record-types-sse-supernovae - standard-logfiles-record-types-sse-pulsar-evolution - standard-logfiles-record-types-sse-detailed-output - standard-logfiles-record-types-sse-system-snapshot - - standard-logfiles-record-types-bse-system-parameters - standard-logfiles-record-types-bse-supernovae - standard-logfiles-record-types-bse-rlof - standard-logfiles-record-types-bse-pulsar-evolution - standard-logfiles-record-types-bse-double-compact-objects - standard-logfiles-record-types-bse-common-envelopes - standard-logfiles-record-types-bse-circumbinary-disks - standard-logfiles-record-types-bse-detailed-output - standard-logfiles-record-types-bse-system-snapshot - -Since the record type property is an unsigned integer, filtering the output files by record type is very simple. Even so, users may -want to disable the logging of some record types - perhaps to limit the size of the log files produced. For this reason, program options -are provided to enable/disable the logging of different record types for log files that have a record type property. These options are: - - - --logfile-system-parameters-record-types - - --logfile-supernovae-record-types - - --logfile-detailed-output-record-types - - --logfile-common-envelopes-record-types - - --logfile-rlof-parameters-record-types - - --logfile-double-compact-objects-record-types - - --logfile-pulsar-evolution-record-types - -For these options, the record types to be enabled are specified as a bitmap, with each bit corresponding to a record type. To construct -the bitmap, for each record type to be enabled, raise 2 to the power of (record type - 1), then sum the results - the sum is the bitmap, -and the integer value to be entered for this option. - -Example: - -To enable record types :math:`1`, :math:`4`, and :math:`9`, the option value should be - -.. math:: - - 2^{(1 - 1)} + 2^{(4 - 1)} + 2^{(9 - 1)} = 2^0 + 2^3 + 2^8 = 1 + 8 + 256 = 265 - -:math:`265`` as a binary number is written as 0100001001, with the 1st, 4th, and 9th bits enabled (counting 1-based from the least-significant -bit being the right-most), corresponding to the record types :math:`1`, :math:`4`, and :math:`9` being enabled, and all other record types disabled. - -A value of -1 for the bitmap is shorthand for all bits enabled - all record types enabled. +Standard log file record types +============================== + +All standard COMPAS logfiles, except the switch log files, have a record type property (column). The record type property +is an unsigned integer that can take any value in the range :math:`0..4294967295`. + +The record type is used to differentiate records within a standard log file. The functionality was introduced primarily to +support different types of records in the detailed output files (BSE and SSE), but has been extended to all other log files +(except the switch log files). + +The use case for the detailed output log files is to differentiate between records written to the file when the star or binary +and constituent stars are known to be in self-consistent states (that is, the attributes of the star or binary and constituent +stars have been correctly and completely updated), and records written to the file, perhaps mid-timestep, when the star or +binary and/or constituent stars may not be self-consistent. Since the record type property can take any value in the range +:math:`0..4294967295` there is scope to identify many different events or situations, in any of the standard log files. We may, +for example, use different record types to indicate that a detailed output record was written immediately prior to, or immediately +following, a particular event or calculation. Or we may want to indicate that a supernovae record was written to the supernovae +file prior to the SN event, and another record following the SN event. Or for the RLOF file we may want to differentiate between +records written pre-MT and post_MT - the possibilities are (almost) limitless. + +Each standard log file has its own set of record types - select a file below to see the available record types for that file. + +.. toctree:: + :maxdepth: 1 + + standard-logfiles-record-types-sse-system-parameters + standard-logfiles-record-types-sse-supernovae + standard-logfiles-record-types-sse-pulsar-evolution + standard-logfiles-record-types-sse-detailed-output + standard-logfiles-record-types-sse-system-snapshot + + standard-logfiles-record-types-bse-system-parameters + standard-logfiles-record-types-bse-supernovae + standard-logfiles-record-types-bse-rlof + standard-logfiles-record-types-bse-pulsar-evolution + standard-logfiles-record-types-bse-double-compact-objects + standard-logfiles-record-types-bse-common-envelopes + standard-logfiles-record-types-bse-circumbinary-disks + standard-logfiles-record-types-bse-detailed-output + standard-logfiles-record-types-bse-system-snapshot + +Since the record type property is an unsigned integer, filtering the output files by record type is very simple. Even so, users may +want to disable the logging of some record types - perhaps to limit the size of the log files produced. For this reason, program options +are provided to enable/disable the logging of different record types for log files that have a record type property. These options are: + + - --logfile-system-parameters-record-types + - --logfile-supernovae-record-types + - --logfile-detailed-output-record-types + - --logfile-common-envelopes-record-types + - --logfile-rlof-parameters-record-types + - --logfile-double-compact-objects-record-types + - --logfile-pulsar-evolution-record-types + +For these options, the record types to be enabled are specified as a bitmap, with each bit corresponding to a record type. To construct +the bitmap, for each record type to be enabled, raise 2 to the power of (record type - 1), then sum the results - the sum is the bitmap, +and the integer value to be entered for this option. + +Example: + +To enable record types :math:`1`, :math:`4`, and :math:`9`, the option value should be + +.. math:: + + 2^{(1 - 1)} + 2^{(4 - 1)} + 2^{(9 - 1)} = 2^0 + 2^3 + 2^8 = 1 + 8 + 256 = 265 + +:math:`265`` as a binary number is written as 0100001001, with the 1st, 4th, and 9th bits enabled (counting 1-based from the least-significant +bit being the right-most), corresponding to the record types :math:`1`, :math:`4`, and :math:`9` being enabled, and all other record types disabled. + +A value of -1 for the bitmap is shorthand for all bits enabled - all record types enabled. diff --git a/online-docs/pages/User guide/COMPAS output/standard-logfiles.rst b/online-docs/pages/User guide/COMPAS output/standard-logfiles.rst index 256d9d0ba..f3e616675 100644 --- a/online-docs/pages/User guide/COMPAS output/standard-logfiles.rst +++ b/online-docs/pages/User guide/COMPAS output/standard-logfiles.rst @@ -1,64 +1,64 @@ -Standard log files -================== - -COMPAS defines several standard log files that may be produced depending upon the simulation mode (Single Star Evolution (SSE), -or Binary Star Evolution (BSE), see the ``--mode`` program option), and the value of various program options. - -The standard log files are: - - .. list-table:: - :widths: 32 68 - :header-rows: 0 - :class: aligned-text - - * - System Parameters - - Records summary information for all stars, or binary stars, during evolution. - * - - - - * - Supernovae - - Records summary information for all stars that experience a SN event during evolution. - * - - - - * - System Snapshot Log - - Records detailed system information during evolution. - * - - - Enable with program option ``--system-snapshot-age-thresholds`` and/or ``--system-snapshot-time-thresholds``. - * - - - - * - BSE/SSE Detailed Output - - Records detailed information for a star, or binary star, during evolution. - * - - - Enable with program option ``--detailed-output``. - * - - - - * - SwitchLog - - Records detailed information for all stars, or binary stars, at the time of each stellar type switch during evolution. - * - - - Enable with program option ``--switch-log``. - * - - - - * - Double Compact Objects - - Records summary information for all binary systems that form DCOs during BSE. - * - - - - * - Common Envelopes - - Records summary information for all binary systems that experience CEEs during BSE. - * - - - - * - Circumbinary Disks - - Records summary information for each post-common-envelope circumbinary disk that forms during BSE. - * - - - Enable with program option ``--circumbinary-disk``. - * - - - - * - Pulsar Evolution - - Records detailed Pulsar evolution information during SSE/BSE. - * - - - Enable with program option ``--evolve-pulsars``. - * - - - - * - RLOF - - Records detailed information RLOF events during BSE. - * - - - Enable with program option ``--rlof-printing``. - +Standard log files +================== + +COMPAS defines several standard log files that may be produced depending upon the simulation mode (Single Star Evolution (SSE), +or Binary Star Evolution (BSE), see the ``--mode`` program option), and the value of various program options. + +The standard log files are: + + .. list-table:: + :widths: 32 68 + :header-rows: 0 + :class: aligned-text + + * - System Parameters + - Records summary information for all stars, or binary stars, during evolution. + * - + - + * - Supernovae + - Records summary information for all stars that experience a SN event during evolution. + * - + - + * - System Snapshot Log + - Records detailed system information during evolution. + * - + - Enable with program option ``--system-snapshot-age-thresholds`` and/or ``--system-snapshot-time-thresholds``. + * - + - + * - BSE/SSE Detailed Output + - Records detailed information for a star, or binary star, during evolution. + * - + - Enable with program option ``--detailed-output``. + * - + - + * - SwitchLog + - Records detailed information for all stars, or binary stars, at the time of each stellar type switch during evolution. + * - + - Enable with program option ``--switch-log``. + * - + - + * - Double Compact Objects + - Records summary information for all binary systems that form DCOs during BSE. + * - + - + * - Common Envelopes + - Records summary information for all binary systems that experience CEEs during BSE. + * - + - + * - Circumbinary Disks + - Records summary information for each post-common-envelope circumbinary disk that forms during BSE. + * - + - Enable with program option ``--circumbinary-disk``. + * - + - + * - Pulsar Evolution + - Records detailed Pulsar evolution information during SSE/BSE. + * - + - Enable with program option ``--evolve-pulsars``. + * - + - + * - RLOF + - Records detailed information RLOF events during BSE. + * - + - Enable with program option ``--rlof-printing``. + diff --git a/online-docs/pages/User guide/Program options/program-options-list-defaults.rst b/online-docs/pages/User guide/Program options/program-options-list-defaults.rst index ba3c0d5ee..a542d63f4 100644 --- a/online-docs/pages/User guide/Program options/program-options-list-defaults.rst +++ b/online-docs/pages/User guide/Program options/program-options-list-defaults.rst @@ -1640,7 +1640,7 @@ Go to :ref:`the top of this page ` for the full alphabetical --common-envelope-mass-accretion-min, --common-envelope-mass-accretion-max, --common-envelope-recombination-energy-density, --maximum-mass-donor-nandez-ivanova, --revised-energy-formalism-nandez-ivanova, --common-envelope-second-stage-beta, --common-envelope-second-stage-gamma-prescription, --post-common-envelope-eccentricity-prescription, --post-common-envelope-eccentricity-cap, --post-common-envelope-eccentricity-fraction ---circumbinary-disk, --circumbinary-disk-beta, --circumbinary-disk-envelope-mass-fraction-supplied, --circumbinary-disk-inner-radius-over-separation, --circumbinary-disk-lifetime, +--circumbinary-disk, --circumbinary-disk-beta, --circumbinary-disk-envelope-mass-fraction-supplied, --circumbinary-disk-inner-radius-over-separation, --circumbinary-disk-lifetime, --circumbinary-disk-structure-factor, --circumbinary-disk-eddington-mode, --circumbinary-disk-eddington-cap-factor, --circumbinary-disk-eddington-ge23-factor diff --git a/online-docs/pages/whats-new.rst b/online-docs/pages/whats-new.rst index 81294e3c9..30ca591bd 100644 --- a/online-docs/pages/whats-new.rst +++ b/online-docs/pages/whats-new.rst @@ -3,7 +3,7 @@ What's new Following is a brief list of important updates to the COMPAS code. A complete record of changes can be found in the file ``changelog.h``. -**Unreleased — circumbinary-disk integration** +**03.31.00 November 2, 2026** * Added post-common-envelope circumbinary disk formation and evolution following Grichener et al. (2026), including new CBD program options and the ``BSE_Circumbinary_Disks`` logfile. diff --git a/online-docs/whats-new.rst b/online-docs/whats-new.rst deleted file mode 100644 index 30ca591bd..000000000 --- a/online-docs/whats-new.rst +++ /dev/null @@ -1,551 +0,0 @@ -What's new -========== - -Following is a brief list of important updates to the COMPAS code. A complete record of changes can be found in the file ``changelog.h``. - -**03.31.00 November 2, 2026** - -* Added post-common-envelope circumbinary disk formation and evolution following Grichener et al. (2026), including new CBD program options and the ``BSE_Circumbinary_Disks`` logfile. - -**03.29.00 January 30, 2026** -* Added new tidal prescription based on Zahn (1977) and Hurley et. al (2002), called ``ZAHN1977``. -* Renamed the ``KAPIL2025`` tides prescription to ``KAPIL2026`` to match paper date. - -**03.28.00 January 28, 2026** - -* Updated the default values for the Mandel-Müller kick prescription to a magnitude of 630 km/s and a sigma of 0.45, as calibrated by Disberg et al. (2026) to the results of Disberg & Mandel (2025). - -**03.27.02 December 16, 2025** - -* Fixed a bug in the assignment of kick direction angles -* Undid replacement of --scale-CHE-mass-loss-with-surface-helium-abundance with the more general --scale-mass-loss-with-surface-helium-abundance (see 03.26.02) - -**03.26.02 October 27, 2025** - -* Added option --USSN-kicks-override-mandel-muller ; if set to true, use user-defined USSN kicks (as a fixed value) in lieu of the Mandel & Muller kick prescription for USSNe -* Replaced --scale-CHE-mass-loss-with-surface-helium-abundance with the more general --scale-mass-loss-with-surface-helium-abundance (applies to all MS stars, not just CHE stars) - -**03.26.00 September 2, 2025** - -* Added HAMSTARS mass transfer efficiency prescription - -**03.25.00 August 19, 2025** - -* Added KLENCKI_LINEAR AM loss, which is linear in the specific AM gamma instead of the orbital separation (as in MACLEOD_LINEAR). - -This is based on the variations explored in Klencki+ 2025, and is very similar in construction to the MACLEOD_LINEAR option, -with both requiring an interpolation fraction f set by the user. Therefore, the following options are deprecated: - - * ``--mass-transfer-jloss-macleod-linear-fraction-degen`` in favor of ``--mass-transfer-jloss-linear-fraction-degen`` - * ``--mass-transfer-jloss-macleod-linear-fraction-non-degen`` in favor of ``--mass-transfer-jloss-linear-fraction-non-degen`` - -and the replacement options apply for both MACLEOD_LINEAR and KLENCKI_LINEAR. - -**03.24.00 August 19, 2025** - -* Updated Maltsev remnant mass prescription to include the 3 variants described in Willcox+ 2025 (bimodality paper). -* New related options `--maltsev-fallback` which takes a float between 0 and 1 to specify the fallback fraction, and - `--maltsev-mode` with choices `'OPTIMISTIC','PESSIMISTIC','BALANCED'` for the extrapolation prescription (see Willcox+ 2025b) - -**03.23.00 August 09, 2025** - -* The following option is now deprecated, and will be removed in 1 year: - - * ``--use-mass-loss`` in favour of ``--mass-loss-prescription`` - -Instead of using ``--use-mass-loss`` or ``--use-mass-loss true`` to enable mass loss, then specifying the mass loss prescription to be used with -``--mass-loss-prescription``, mass loss can be enabled using ``--mass-loss-prescription`` with any valid prescription (that is not ``zero``), and -disabled with ``--mass-loss-prescription zero`` instead of ``use-mass-loss false``. - -**03.22.02 August 08, 2025** - -* The following options are now deprecated, and will be removed in 1 year: - - * ``--initial-mass-min`` in favour of ``--initial-mass-function-min`` - * ``--initial-mass-max`` in favour of ``--initial-mass-function-max`` - * ``--initial-mass-power`` in favour of ``--initial-mass-function-power`` - * ``--minimum-mass-secondary`` in favour of ``--minimum-sampled-secondary-mass`` - -* The user supplied value for ``--minimum-sampled-secondary-mass`` now checked against the COMPAS values for minimum initial mass (0.00007 :math:`M_\odot`) and maximum initial mass (150.0 :math:`M_\odot`) -* The secondary mass (for BSE), whether input by user, sampled, or calculated from the primary mass and mass ratio, now checked against the COMPAS value for minimum initial mass (0.00007 :math:`M_\odot`) -* The default record types written to the SSE and BSE detailed output files now include only record types 1, 4, & 5 (INITIAL_STATE, TIMESTEP_COMPLETED, and FINAL_STATE) -* The default record types written to the SSE and BSE pulsar evolution files now includes only record type 3 ((Pulsar) TIMESTEP_COMPLETED) - -**03.22.00 July 18, 2025** - -* Changed default values of --enhance-CHE-lifetimes-luminosities and --scale-CHE-mass-loss-with-surface-helium-abundance to true -* Added options to set beta and gamma prescription for second stage of 2-stage CE (``--common-envelope-second-stage-beta``, ``--common-envelope-second-stage-gamma-prescription``) -* Fixed a bug in the calculation of zeta_equilibrium, which impacts when mass transfer is declared to proceed on a nuclear timescale (and hence how conservative it is) -* Fixed the calculation of Mandel & Muller kicks; split ``--muller-mandel-sigma-kick`` into ``--muller-mandel-sigma-kick-NS`` and ``--muller-mandel-sigma-kick-BH`` - -**03.21.00 July 17, 2025** - -* Deprecated mass loss prescription MERRITT2024 in favour of MERRITT2025 -* Added version strings for gsl, boost, and HDF5 to COMPAS splashscreen - -**03.20.06 June 25, 2025** - -* The MAXWELLIAN NS CCSN kick changed from the Hobbs value of 265 km/s to 217 km/s based on 48 younger than 10 Myr pulsars with proper motions from Disberg & Mandel (2025) sample; corrects Hobbs+ 2005 missing Jacobian -* Implemented a LOGNORMAL NS CCSN kick magnitude distribution based on Disberg & Mandel, 2025 - -**03.20.03 June 18, 2025** - -* Resolved an issue that appeared in 03.10.02 with some TPAGB stars in the ECSN range (but not satisfying ECSN conditions) exploding as core-collapse supernovae - -**03.20.01 May 26, 2025** - -* Updates to mass accretion for massive ONe WD -* Changed white dwarf mass-radius relation to use expression from Eggleton 1986, suitable for extremely low-mass white dwarfs. - -**03.20.00 May 25, 2025** - -* Replaced the name of the ``KAPIL2024`` tides prescription with ``KAPIL2025``. -* Updated the equilibrium and dynamical tides equations to match the paper. -* New outputs for BSE_DETAILED_OUTPUT from tidal evolution, including ``CIRCULARIZATION_TIMESCALE``, ``SYNCHRONIZATION_TIMESCALE_1``, ``SYNCHRONIZATION_TIMESCALE_2``, ``TIDAL_POTENTIAL_LOVE_NUMBER_22_1``, ``TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_1``, and ``TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_2`` - -**03.19.00 May 22, 2025** - -* Added functionality to create new System Snapshot logfile |br| - Writing to the System Snapshot logfile is triggered by system age and/or simulation time passing thresholds set by new program options (see below). |br| - New program options added: |br| - ``--logfile-system-snapshot-log``: specifies the name of the System Snapshot logfile (default is "[BSE/SSE]_System_Snapshot_Log") |br| - ``--logfile-system-snapshot-log-record-types``: specifies the enabled record types for System Snapshot logfile (default is all types) |br| - ``--system-snapshot-age-thresholds``: specifies the age thresholds for System Snapshot logfile |br| - ``--system-snapshot-time-thresholds``: specifies the time thresholds for System Snapshot logfile - -**03.18.02 May 1, 2025** - -* Changed default for Nanjing lambdas to use enhanced lambdas and interpolate in mass and metallicity - -**03.18.00 Apr 14, 2025** - -New command line option: - -* ``--timestep-multipliers`` to enable more granular, phase-dependent, timestep multipliers - -**03.17.03 Apr 14, 2025** - -* Neutron stars are now labelled as ``RecycledNS`` when undergoing mass transfer through common envelope (when ``--neutron-star-accretion-in-ce`` is not set to ``ZERO``). -* Removed output option ``RLOF_ONTO_NS`` as it can be retrieved from existing RLOF output info. - -**03.17.00 Mar 22, 2025** - -* Added ``ENVELOPE_STATE_PRESCRIPTION::CONVECTIVE_MASS_FRACTION`` (default threshold of convective envelope by mass to label envelope convective is 0.1, can be set with ``--convective-envelope-mass-threshold``) -* Stable mass transfer now conserves angular momentum after accounting for the rotational angular momentum lost or gained by the stars -* Imposed Keplerian rotation limit on mass-gaining stars: response depends on the new ``--response-to-spin-up`` option, with possible values: - * ``TRANSFER_TO_ORBIT`` (default) allows the star to accrete, but excess angular momentum is deposited in the orbit - * ``KEPLERIAN_LIMIT`` forces mass transfer to become non-conservative once star (approximately) reaches super-critical rotation - * ``NO_LIMIT`` allows arbitrary super-critical accretion, to match legacy choices - -**03.16.02 Mar 19, 2025** - -New output options for supernova, which allow for full characterization of the binary orientation post-SN: - -* ORBITAL_ANGULAR_MOMENTUM_VECTOR_X -* ORBITAL_ANGULAR_MOMENTUM_VECTOR_Y -* ORBITAL_ANGULAR_MOMENTUM_VECTOR_Z -* SYSTEMIC_VELOCITY_X -* SYSTEMIC_VELOCITY_Y -* SYSTEMIC_VELOCITY_Z - -**03.15.00 Mar 5, 2025** - -Changes to the treatment of Neutron Star evolution. - -New command line options: - -* ``--neutron-star-accretion-in-ce`` to determine how a NS accretes mass in a common envelope -* ``--pulsar-birth-magnetic-field-distribution-mean`` and ``--pulsar-birth-magnetic-field-distribution-sigma`` to determine the birth distribution of the pulsar magnetic field (only relevant when the ``--pulsar-birth-magnetic-field-distribution`` option value is ``NORMAL`` or ``LOGNORMAL``) -* ``--pulsar-birth-spin-period-distribution-mean`` and ``--pulsar-birth-spin-period-distribution-sigma`` to determine the birth distribution of the pulsar period (only relevant when the ``--pulsar-birth-spin-period-distribution`` option value is ```NORMAL`` or ``LOGNORMAL``) - -Changed command line option values and defaults: - -* ``--pulsar-birth-spin-period-distribution`` option value ``ZERO`` is now deprecated. -* ``--pulsar-birth-magnetic-field-distribution`` option value ``ZERO`` is now deprecated. -* ``--pulsar-birth-spin-period-distribution`` default option value is now ``NORMAL`` (was ``ZERO``) -* ``--pulsar-birth-magnetic-field-distribution`` default option value is now ``LOGNORMAL`` (was ``ZERO``) - -Changes to the NS-related values in log files: - -* The pulsar magnetic field strength is now recorded in ``Gauss`` (was ``Tesla``) -* The pulsar spin down rate now tracks the pulsar spin period derivative (was spin frequency derivative). -* The SSE/BSE_Pulsar_Evolution file default record now includes the pulsar spin period (s) instead of spin frequency. Spin frequency is still tracked and can be added using the ``logfile-definitions`` option -* The period of non-spinning neutron stars is now reported as infinity instead of zero - -**03.14.00 Mar 3, 2025** - -* Updates to improve convergence without sacrificing computational speed, including updates to default mass and radial change fractions per time step and their usage -* Capped total wind mass loss rate at MAXIMUM_WIND_MASS_LOSS_RATE (set to 0.1 Msol/yr) for all prescriptions -* Changed order of calls in SSE evolution to better match BSE evolution - -**03.13.02 Feb 19, 2025** - -* Replaced name of ``SHIKAUCHI`` main sequence core mass prescription with ``BRCEK``. - -**03.13.01 Feb 13, 2025** - -* Enabled nuclear timescale mass transfer from evolved donors - -**03.13.00 Feb 13, 2025** - -* Added pulsar evolution and output (SSE_Pulsar_Evolution) for SSE mode -* Changed stopping condition for single stars to continue evolving pulsars if ``--evolve-pulsars`` is ``TRUE`` -* Updated documentation for new output - -**03.12.04 Feb 8, 2025** - -* Replaced name of ``COMPAS`` PPISN prescription with ``WOOSLEY``; ``COMPAS`` is now deprecated - -**03.12.00 Jan 16, 2025** - -* Added convective core mass prescription for main sequence stars from Shikauchi+ (2024), describing how the core mass evolves under mass loss and mass gain. -* New command line option ``--main-sequence-core-mass-prescription`` with arguments ``SHIKAUCHI`` (new prescription), ``MANDEL`` (replaces the functionality of ``--retain-core-mass-during-caseA-mass-transfer``), and ``ZERO`` (core mass set to zero, no treatment). -* Updated stellar tracks with added luminosity prescription for main sequence stars from Shikauchi+ (2024). -* Added treatment for rejuvenation of main sequence accretors when the new prescription is used. - -**03.10.00 Nov 29, 2024** - -Added functionality to log stellar mergers in the BSE switchlog file. -Switchlog merger records come in pairs (one for each star) so that the stellar type of each star is recorded. - -**03.09.00 Nov 28, 2024** - -Improved nuclear timescale mass transfer: the nuclear timescale mass transfer rate is now set by the requirement that the star -ends the time step just filling its Roche lobe. -Fixed several significant mass-transfer issues, such as accretors not gaining mass appropriately and failures -in the root solver for fitting the star into the Roche lobe that were leading to artificial common envelopes and mergers. - -**03.08.02 Nov 18, 2024** - -Updated implementation of the mass transfer stability critical mass ratio tables from the team of Hongwei Ge. -We now use all the most up to do date tables they've produced (public or otherwise) from Papers I-V, including -variations for adiabatic and isentropic treatments, variable accretion efficiency, and two different metallicities, -as well as for He stars (albeit only for adiabatic, fully conservative, solar metallicity stars). - -**03.08.00 Nov 18, 2024** - -Improved the treatment of stellar rotation (with further corrections in 03.08.01): - -* Assume rigid body rotation -* Keep the angular moment of a star constant when there is no mass loss -* When a star with radius r and angular frequency omega loses mass dm through winds or mass transfer, it loses angular momentum dL = (2/3) dm r^2 omega -* (However, angular momentum never drops below zero) -* When a star loses its envelope, the remaining core is assumed to rotate with the same rotation rate as the preceding star -* When a star of mass m and radius r gains mass dm through accretion, it gain angular momentum dL = dm \sqrt{G m r} -* If initial binary rotation is fast enough for a star to be CHE, it is set to that rotation frequency without regard for the tidal prescription; CHE stars remain tidally locked if the tidal prescription is NONE - -**03.07.01 Oct 23, 2024** - -Resolved (and reverted) performance degradation introduced in v03.00.00. - -**03.07.00 Oct 16, 2024** - -Added new critical mass ratio tables from Ge et al. 2024. - -**03.06.00 Oct 14, 2024** - -Incorporated the Maltsev+ (2024) prescription for supernova remnant masses. - -**03.03.00 Sep 24, 2024** - -Added new functionality to improve modelling of chemically homogeneous evolution (CHE). The default behaviour remains unchanged. - -* New command line option `--enable-rotationally-enhanced-mass-loss` to enable rotationally enhanced mass loss following Langer (1998) -* New command line option `--enhance-CHE-lifetimes-luminosities` to enhance CHE lifetimes and luminosities following detailed models from Szecsi et al. (2015) -* New command line option `--scale-CHE-mass-loss-with-surface-helium-abundance` to switch from OB to WR mass loss for CH stars towards the end of the main sequence -* New command line option `--scale-terminal-wind-velocity-with-metallicity-power` to scale the terminal wind velocity with the metallicity - -**03.02.00 Sep 19, 2024** - -Added recording of ``MASS_TRANSFER_TIMESCALE (NONE, NUCLEAR, THERMAL, CE)``. -Now continuing evolution on mergers at birth (stars touching) if ``--resolve-main-sequence-merger``. -Changed Sabhahit+ 2023 VMS winds to default to current OB wind prescription if Gamma threshold is not met -Correct the behaviour of the second stage of 2-stage CE to first transfer mass from the star that initiated RLOF; -now ensuring that the accretor's mass is correctly adjusted -Update the fits for the convective envelope mass and radial extent to ensure smooth behaviour -Updated treatment of 2-stage common envelope for intermediate mass stars, to smoothly reduce from Hirai & Mandel above 8 solar masses -to classical "full envelope" removal for stars below 2 solar masses. - -**03.01.06 Aug 30, 2024** - -Added functionality to allow users to specify if WD-binaries should be included in the BSE DCO file via new option ``--include-WD-binaries-as-DCO``. -When enabled, ``--include-WD-binaries-as-DCO`` changes the definition of "Double Compact Object" from a binary comprised of any two of -{Neutron Star, Black Hole} to a binary star comprised of any two of {Helium White Dwarf, Carbon-Oxygen White Dwarf, Oxygen-Neon White Dwarf, Neutron Star, Black Hole}. - -The default value for the new option is FALSE. - -**03.01.04 Aug 28, 2024** - -* New option `'HENDRIKS'` for `--pulsational-pair-instability-prescription` implementing the prescription for pulsational pair instability mass-loss from Hendricks et al. 2023 (https://arxiv.org/abs/2309.09339). -* New command line option `--PPI-CO-Core-Shift-Hendriks` for use with the above prescription (see Hendriks+ for an explanation) - -**03.01.00 Aug 24, 2024** - -* New option to emit gravitational radiation at each timestep of binary evolution: ``--emit-gravitational-radiation``. The effects of radiation are approximated by the change in semimajor axis and eccentricity from Peters 1964 equations 5.6 and 5.7. Reduce timestep if required to keep orbital separation change per step due to GW radiation within ~ 1%. - -**03.00.00 Jul 26, 2024** - -This is a major release of COMPAS. There are some significant changes in COMPAS operation and functionality in this release. The major change, and the impetus for -the release, is the implementation of a new, coherent, robust, error handling strategy. - -Early versions of COMPAS (versions prior to v03.00.00) did not have a coherent, robust, error-handling strategy. In those versions, errors were typically displayed -as either errors or warnings (depending on the severity) as they occurred, and evolution of the star (SSE mode) or binary (BSE mode) continued - users were expected -to check errors or warnings displayed and use results with appropriate caution. This was not ideal. - -In addition, earlier versions of COMPAS did not handle floating-point errors (divide-by-zero, invalid-parameters (e.g. :math:`\sqrt{-2.0}`), etc.) well - in fact the -code effectively ignored these errors (for a detailed explanation of why this was so, refer to the Error Handling documentation in the Developer Guide -(See :ref:`developer-guide-fp-errors`). - -In COMPAS version 03.00.00 the error handling philosophy has changed, and more coherent and robust error-handling code implemented. The new error-handling philosophy -is to stop evolution of a star or binary if an error occurs (including, optionally by a program option, floating-point errors), and record in the (SSE/BSE) system -parameters file the fact that an error occurred, and an error number identifying the error that occurred. This way users can check the system parameters file -at the completion of a run for the disposition of a star or binary and, if the evolution of that star or binary was stopped because an error occurred, the -actual error that occurred. - -Users should refer to the Error Handling documentation in the User Guide (See :doc:`./User guide/Handling errors/handling-errors`). -Developers should refer to the Error Handling documentation in the Developer Guide (See :doc:`./Developer guide/Services/services-error-handling`). - -In addition to the new error handling strategy, a number of program options have been deprecated and replaced by new program options that are more consistent with the -naming convention we are trying to maintain. The program options deprecated, and their replacements, are: - -1. `--mass-transfer` , replaced by `--use-mass-transfer` (to be consistent with `--use-mass-loss`) -#. `--luminous-blue-variable-prescription` , replaced by `--LBV-mass-loss-prescription` (to be consistent with other 'prescription'-type options) -#. `--OB-mass-loss` , replaced by `--OB-mass-loss-prescription` (to be consistent with other 'prescription'-type options) -#. `--RSG-mass-loss` , replaced by `--RSG-mass-loss-prescription` (to be consistent with other 'prescription'- type options) -#. `--VMS-mass-loss` , replaced by `--VMS-mass-loss-prescription` (to be consistent with other 'prescription'- type options) -#. `--WR-mass-loss` , replaced by `--WR-mass-loss-prescription` (to be consistent with other 'prescription'- type options) -#. `--kick-direction` , replaced by `--kick-direction-distribution` (to be consistent with other 'distribution'-type options) -#. `--mass-transfer-thermal-limit-accretor`, replaced by `--mass-transfer-thermal-limit-accretor-multiplier` (for consistency and to better describe the option) -#. `--black-hole-kicks` , replaced by `--black-hole-kicks-mode` (for consistency and to better describe the option) -#. `--chemically-homogeneous-evolution` , replaced by `--chemically-homogeneous-evolution-mode` (for consistency and to better describe the option) - -Deprecated program options will still be available, in tandem with their replacements, for some time (at least six months from the release date of v03.00.00), -after which time the deprecated options will be removed and only their replacements will be valid options. Appropriate warning messages will be displayed in -the period of deprecation if deprecated program options are used. - -As well as deprecating some program options, some program option values have been deprecated and replaced by new values that are more consistent with the -naming convention we are trying to maintain. The program option value deprecated, and their replacements, are: - -1. `--LBV-mass-loss-prescription` , value `NONE` replaced by `ZERO` -#. `--luminous-blue-variable-prescription`, value `NONE` replaced by `ZERO` -#. `--OB-mass-loss` , value `NONE` replaced by `ZERO` -#. `--OB-mass-loss-prescription` , value `NONE` replaced by `ZERO` -#. `--RSG-mass-loss` , value `NONE` replaced by `ZERO` -#. `--RSG-mass-loss-prescription` , value `NONE` replaced by `ZERO` -#. `--VMS-mass-loss` , value `NONE` replaced by `ZERO` -#. `--VMS-mass-loss-prescription` , value `NONE` replaced by `ZERO` -#. `--WR-mass-loss` , value `NONE` replaced by `ZERO` -#. `--WR-mass-loss-prescription` , value `NONE` replaced by `ZERO` - -Deprecated program option values will still be available, in tandem with their replacements, for some time (at least six months from the release date of v03.00.00), -after which time the deprecated option values will be removed and only their replacements will be valid option values. Appropriate warning messages will be displayed -in the period of deprecation if deprecated program option values are used. - -Finally, for program option `--mt-rejuvenation-prescription`, the value `NONE` was replaced by `HURLEY` - - -**02.48.01 May 24, 2024** - -* changed functionality of ``--output-path`` option so that missing directories in the specified path are created. -* Added "Quick Links" to online documentation. - -**02.48.00 May 22, 2024** - -* added options ``--mass-transfer-jloss-macleod-linear-fraction-degen`` and ``--mass-transfer-jloss-macleod-linear-fraction-non-degen`` to allow for different accretor AM response for degenerate and non-degenerate companions. -* removed option ``--mass-transfer-jloss-macleod-linear-fraction`` (no longer required - see above). - -**02.46.00 May 13, 2024** - -* added options ``--radial-change-fraction`` and ``--mass-change-fraction``, as approximate desired fractional changes in stellar radius and mass on phase when setting SSE and BSE timesteps -* the recommended values for both parameters are 0.005, but the default remains 0, which reproduces previous timestep choices -* mass transfer from main sequence donors (including HeMS) can now proceed on nuclear timescales -- approximated as the radial expansion timescales -- if equilibrium zetas are greater than Roche lobe zetas - -**02.45.00 Apr 09, 2024** - -* Changed compiler standard in Makefile from ``c++11`` to ``c++17``. This is required for ``boost v1.82`` and above. ``c++11`` can still be used if boost version is below ``v1.82``, but moving to ``c++17`` and boost ``v1.8x`` is preferred (and will eventually be mandatory). Tested with ``Ubuntu v20.04, g++ v11.04, and boost v1.74``; and ``macOS v14.1.1, clang v15.0.0, and boost v1.85``. - -**02.44.00 Apr 04, 2024** - -* Added 'realistic' tides option, which implements dynamical and equilibrium tides using the formalism described in Kapil et al. (2024). -* Functionality enabled with new option ``--tides-prescription KAPIL2024`` (default is ``NONE``). -* Removed old option ``--enable-tides``, which can now be enabled by setting ``--tides-prescription PERFECT``. - - -**02.43.00 Mar 29, 2024** - -* Implementation of the neutrino rocket kick. - -**02.42.00 Jan 04, 2023** - -* Timesteps are now quantised to an integral multiple of 1e-12Myr. -* New option provided to allow user-defined timesteps: ``--timesteps-filename`` (See :doc:`./User guide/timestep-files`). -* Code changes to make SSE and BSE evolution more consistent (See `PR 1052 `_). - -**02.41.03 Dec 28, 2023** - -* The functions ``BaseBinaryStar::CalculateAngularMomentum()``, ``BaseBinaryStar::CalculateTotalEnergy()``, and ``BaseStar::AngularMomentum()`` changed to use moment of inertia instead of gyration radius. -* Changed CalculateMomentOfInertia() to properly implement Hurley et al., 2000 eq 109. -* This change may change DCO yields slightly when compared to previous versions of the code. - -**02.41.00 Nov 02, 2023** - -* Added a naive tides implementation. -* Added program option ``enable-tides`` to enable the tides implementation (default is ``false``). - -**02.40.00 Oct 20, 2023** - -* Added ``FLEXIBLE2023`` as a new default, and ``BELCZYNSKI2010`` as a replacement for the previous ``VINK`` mass loss prescription. The following new sub-wrappers are overridden when selecting ``BELCZYNSKI2010``: -* Added ``--OB-mass-loss`` program option, applying to main sequence stars, with default ``VINK2021``, and options ``NONE``, ``VINK2001`` (previous default), ``BJORKLUND2022``, and ``KRTICKA2018``. -* Added ``--RSG-mass-loss`` program option, applying to stars below 8kK in giant branch stellar types, with default ``DECIN2023``, and options ``NONE``, ``VINISABHAHIT2023``, ``BEASOR2020``, ``YANG2023``, ``KEE2021``, ``NJ90`` (previous default). -* Added ``--VMS-mass-loss`` program option, applying to stars over 100 Msol, with default ``SABHAHIT2023``, and options ``NONE``, ``VINK2011``, and ``BESTENLEHNER2020``. -* Added ``--WR-mass-loss`` program option, with default ``SANDERVINK2023``, and options ``BELCZYNSKI2010``, and ``SHENAR2019``. -* Changed default value for option ``--wolf-rayet-multiplier`` from 0.1 to 1.0 - -**02.39.00 Jul 4, 2023** - -* Added 'Evolution_Status' columns to both SSE and BSE default system parameters records - records final status of evolution (reason evolution stopped). - -**02.38.03 Apr 20, 2023** - -* Changed some of the default options, see issue # 957 and PR # 961 for explanations - -**02.37.00 Mar 26, 2023** - -* Added functionality for WDs to accrete in different regimes. -* New supernova types: SNIA (Type Ia), and HeSD (Helium shell detonation). - -**02.36.00 Mar 15, 2023** - -* Added functionality to automatically create COMPAS YAML file - adds two new options: ``--create-YAML-file`` and ``YAML-template``. See documentation for details. - - **Note:** From this release, the default COMPAS YAML file (``compasConfigDefault.yaml``), as distributed, has all COMPAS option entries commented so that the COMPAS default value for the option is used by default. To use a value other than the COMPAS default value, users must uncomment the entry and change the option value to the desired value. - -**02.35.03 Feb 27, 2023** - -Added mass accretion prescription during CE ``CHEVALIER`` for option ``--common-envelope-mass-accretion-prescription``, following model 2 from van Son + 2020 - -**02.35.02 Feb 19, 2023** - -* Changed ``BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1`` and ``BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2`` to be the Roche lobe radius as computed at periapsis, in units of :math:`R_\odot`. -* Changed header string for ``BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1`` from ``'RocheLobe(1)|a'`` to ``'RocheLobe(1)'`` - same change made for ``BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2``. -* Removed ``BINARY_PROPERTY::STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1`` (header string ``'Radius(1)|RL'``) and ``BINARY_PROPERTY::STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2`` (header string ``'Radius(2)|RL'``) from ``BSE_DETAILED_OUTPUT_REC`` (BSE detailed output file default record). Note that both variables are still selectable for output via the logfile-definitions file. - - **Note:** These changes will affect post-processing code that consumes the affected variables - users should check their post-processing code. - -**02.35.00 Dec 8, 2022** - -* Added critical mass ratios from Ge+ 2020 for determining if MT is unstable. - -**02.34.01 Dec 7, 2022** - -* Fixed TimeMT. - -**02.33.00 Aug 28, 2022** - -* Added simplified (constant per stellar type) critical mass ratios from Claeys+ 2014 for determining if MT is unstable - -**02.32.00 Aug 27, 2022** - -* Added 'record type' functionality to all standard log files. **Note:** This changes default behaviour: only Detailed Output log files affected in this release -* Added/rationalised Detailed Output records printed for binary systems -* Added new program option for each standard log file to allow specification of which record types to print. See e.g. ``--logfile-detailed-output-record-types`` -* Changed case on column header strings for switch log files (SSE and BSE. ``SWITCHING_FROM``, ``SWITCHING_TO``, and ``STAR_SWITCHING`` are now ``Switching_From``, ``Switching_To``, and ``Star_Switching`` respectively). **Note:** This could affect post-processig code that consumes the switch log files - users should check that their code will recognise the new header strings. -* Added new section to online documentation: 'What's new' - -**02.31.10 Aug 12, 2022** - -* Added option to set the Temperature boundary between convective/radiative giant envelopes - -**02.31.09 Aug 9, 2022** - -* Max evolution time and max number of timesteps now read in from gridline as well as commandline - -**02.31.08 Aug 3, 2022** - -* Added Accretion Induced Collapse (AIC) of ONeWD as another type of SN - -**02.31.07 Aug 1, 2022** - -* Added print to DetailedOutput after merger, addresses https://github.com/TeamCOMPAS/COMPAS/issues/825 -* Ensure no ONeWDs are formed with masses above Chandrasekhar mass - -**02.31.06 Aug 2, 2022** - -* Added stellar merger to default BSE_RLOF output - -**02.31.05 July 25, 2022** - -* Renamed program option ``--allow-H-rich-ECSN`` to ``allow-non-stripped-ECSN`` -* Fixed check for non-interacting ECSN progenitors to consider MT history instead of H-richness - -**02.31.04 Jun 10, 2022** - -* Changed MT_TRACKER values to be clearer and complementary to each other -* Updated the relevant section in the detailed plotter that uses MT_TRACKER values -* Removed end states from detailed plotter (Merger, DCO, Unbound) so that they don't over compress the rest - -**02.31.03 May 20, 2022** - -* Fixed MS+MS unstable MT not getting flagged as a CEE - -**02.31.00 May 14, 2022** - -* Added new program option ``--retain-core-mass-during-caseA-mass-transfer`` to preserve a larger donor core mass following case A MT, set equal to the expected core mass of a newly formed HG star with mass equal to that of the donor, scaled by the fraction of its MS lifetime - -**02.30.00 May 8, 2022** - -* Added MACLEOD_LINEAR specific angular momentum gamma loss prescription for stable mass transfer (see ``--mass-transfer-angular-momentum-loss-prescription``) - -**02.29.00 May 5, 2022** - -* Added new program option to allow for H-rich ECSN (``--allow-H-rich-ECSN``, defaults to FALSE). When the option is TRUE, non-interacting ECSN progenitors do not contribute to the single pulsar population. Addresses issue https://github.com/TeamCOMPAS/COMPAS/issues/596 - -**02.28.00 May 11, 2022** - -* Added new remnant mass prescription: Fryer+ 2022 -* Added new program options ``--fryer-22-fmix`` and ``--fryer-22-mcrit`` - -**02.27.09 Apr 25, 2022** - -* Added new program option ``--muller-mandel-sigma-kick`` - -**02.27.08 Apr 12, 2022** - -* Fix for issue https://github.com/TeamCOMPAS/COMPAS/issues/783 - -**02.27.07 Apr 5, 2022** - -* Fix for issue https://github.com/TeamCOMPAS/COMPAS/issues/773 - -**02.27.06 Apr 5, 2022** - -* Fixed StarTrack PPISN prescription: previously it was doing the same thing as the COMPAS PPISN prescription - -**02.27.05 Feb 17, 2022** - -* Added new program option ``--hmxr-binaries``, which tells COMPAS to store high-mass x-ray binaries in BSE_RLOF output file -* Added columns for pre- and post-timestep ratio of stars to Roche Lobe radius to BSE_RLOF output file (addressing issue https://github.com/TeamCOMPAS/COMPAS/issues/746) - -**02.27.04 Feb 15, 2022** - -* Fix for issue https://github.com/TeamCOMPAS/COMPAS/issues/761 - -**02.27.03 Feb 8, 2022** - -* Fix for issue https://github.com/TeamCOMPAS/COMPAS/issues/745 - -**v02.27.02 Feb 3, 2022** - -* Fixed mass change on forced envelope loss in response to issue https://github.com/TeamCOMPAS/COMPAS/issues/743 - -**v02.27.01 Feb 3, 2022** - -* Fixed condition for envelope type when using ENVELOPE_STATE_PRESCRIPTION::FIXED_TEMPERATURE (previously, almost all envelopes were incorrectly declared radiative) - -**v02.27.00 Jan 12, 2022** - -* Added enhanced Nanjing lambda option that continuously extrapolates beyond radial range -* Added Nanjing lambda option to switch between calculation using rejuvenated mass and true birth mass -* Added Nanjing lambda mass and metallicity interpolation options -* No change in default behaviour - diff --git a/src/EnumHash.h b/src/EnumHash.h index 559991006..47f7a8aaf 100644 --- a/src/EnumHash.h +++ b/src/EnumHash.h @@ -1,26 +1,26 @@ -#ifndef __EnumHash_h__ -#define __EnumHash_h__ - -// functor object to calculate hash for enum class -// note: this was written because c++11 didn't allow the use of enum hashes, -// but I believe it was considered a defect and has been fixed in c++14 -// check http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2148 -// we may be able to remove this -struct EnumClassHash -{ - template - std::size_t operator()(T t) const - { - return static_cast(t); - } -}; - -template -using HashType = typename std::conditional::value, EnumClassHash, std::hash>::type; - -// type alias for unordered map with enum hash -template -using COMPASUnorderedMap = std::unordered_map>; - - -#endif // __EnumHash_h__ +#ifndef __EnumHash_h__ +#define __EnumHash_h__ + +// functor object to calculate hash for enum class +// note: this was written because c++11 didn't allow the use of enum hashes, +// but I believe it was considered a defect and has been fixed in c++14 +// check http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2148 +// we may be able to remove this +struct EnumClassHash +{ + template + std::size_t operator()(T t) const + { + return static_cast(t); + } +}; + +template +using HashType = typename std::conditional::value, EnumClassHash, std::hash>::type; + +// type alias for unordered map with enum hash +template +using COMPASUnorderedMap = std::unordered_map>; + + +#endif // __EnumHash_h__ diff --git a/src/ErrorCatalog.h b/src/ErrorCatalog.h index 6cbd0417b..8a28a7c06 100644 --- a/src/ErrorCatalog.h +++ b/src/ErrorCatalog.h @@ -1,387 +1,387 @@ -#ifndef __ErrorCatalog_h__ -#define __ErrorCatalog_h__ - - -// This is the COMPAS error catalogue. The error catalogue defines symbolic names for all COMPAS errors, -// and corresponding error strings for those errors. -// -// To add a new error, add the symbolic name to the ERROR enum class, and the corresponding error string -// to the ERROR_CATALOG map. -// -// The key to the ERROR_CATALOG map is the symbolic name in the ERROR enum class. The map entry is a -// tuple containing the ERROR_SCOPE associated with the error (see below), and the error string. - -#include "constants.h" -#include "EnumHash.h" - -#define ERR_MSG(x) std::get<1>(ERROR_CATALOG.at(x)) // for convenience - - -// The ERROR_SCOPE enum class, defined below, allows developers to specify when, if at all, a particular -// error/warning should be displayed by the SHOW_WARN* and SHOW_ERROR* macros defined in ErrorsMacros.h -// (and by the ERRORS-SHowIt() function defined in Errors.h, which is used by the aforementioned macros): -// -// NEVER : the error/warning should never be displayed -// ALWAYS : the error/warning should always be displayed -// FIRST : the error/warning should only be displayed the first time it is encountered -// FIRST_IN_FUNCTION : the error/warning should only be displayed the first time it is encountered for a function -// FIRST_IN_STELLAR_TYPE: the error/warning should only be displayed the first time it is encountered for a stellar type (see enum class STELLAR_TYPE in typedefs.h) -// FIRST_IN_OBJECT_TYPE : the error/warning should only be displayed the first time it is encountered for an object type (see enum class OBJECT_TYPE in typedefs.h) -// FIRST_IN_OBJECT_ID : the error/warning should only be displayed the first time it is encountered for an object id (each object is assigned a unique object id - e.g. a star or binary, each constituent star of a binary) -// -// The THROW_ERROR* macros defined in ErrorsMacros.h are not affected by ERROR_SCOPE - -enum class ERROR_SCOPE: int { NEVER, ALWAYS, FIRST, FIRST_IN_FUNCTION, FIRST_IN_STELLAR_TYPE, FIRST_IN_OBJECT_TYPE, FIRST_IN_OBJECT_ID }; - - -// enum class ERROR -// Symbolic names for errors and warnings (error strings below in ERRORLabel map) -// Listed alphabetically (except for 'NONE' - first so ERROR = 0 = NONE) -enum class ERROR: int { - NONE, // no error - ADDED_EXCESS_AM_TO_STARS, // attempted to add more angular momentum to stars than was available in a binary - AMBIGUOUS_REMNANT_MASS_PRESCRIPTION, // remnant mass unclear from available parameters - ARGUMENT_RANGE_COUNT_EXPECTED_ULINT, // expected an unsigned long integer for range count for option - ARGUMENT_RANGE_NOT_SUPPORTED, // argument range not supported for option - ARGUMENT_RANGE_NUM_PARMS, // argument range requires exactly three parameters - ARGUMENT_RANGE_PARMS_EXPECTED_FP, // expected a floating point number for range start and increment for option - ARGUMENT_RANGE_PARMS_EXPECTED_INT, // expected an integer for range parameters for option - ARGUMENT_RANGE_PARMS_EXPECTED_LFP, // expected a long double number for range start and increment for option - ARGUMENT_RANGE_PARMS_EXPECTED_LINT, // expected an long integer for range parameters for option - ARGUMENT_RANGE_PARMS_EXPECTED_ULINT, // expected an unsigned long integer for range parameters for option - ARGUMENT_SET_EXPECTED_BOOL, // all parameters of argument set must be boolean for option - ARGUMENT_SET_EXPECTED_NUMERIC, // all parameters of argument set must be numeric for option - ARGUMENT_SET_NOT_SUPPORTED, // argument set not supported for option - BAD_LOGFILE_RECORD_SPECIFICATIONS, // error in logfile record specifications - BINARY_EVOLUTION_STOPPED, // evolution of current binary stopped - BINARY_SIMULATION_STOPPED, // binary simulation stopped - BOOST_OPTION_CMDLINE, // failed to initialise Boost options descriptions for commandline options - BOOST_OPTION_GRIDLINE, // failed to initialise Boost options descriptions for grid line options - BOOST_OPTION_INTERNAL_ERROR, // Boost option internal error - DIRECTORY_NOT_EMPTY, // Directory not empty - EMPTY_FILE, // file is empty (contains no content) - EMPTY_FILENAME, // filename is an empty string - ERROR, // unspecified error - ERROR_PROCESSING_CMDLINE_OPTIONS, // an error occurred while processing commandline options - ERROR_PROCESSING_GRIDLINE_OPTIONS, // an error occurred while processing grid file options - EXPECTED_3D_VECTOR, // expected a vector of size 3 - EXPECTED_ASSIGNMENT_OPERATOR, // expected assignment operator - EXPECTED_BINARY_PROPERTY, // expected a binary property (STAR_1_, STAR_2_, SUPERNOVA_, COMPANION_, or BINARY_PROPERTY) - EXPECTED_COMMA_OR_CLOSE_BRACE, // expected a comma or close brace - EXPECTED_INTEGER, // expected an integer - EXPECTED_LOGFILE_RECORD_NAME, // expected logfile record name - EXPECTED_NON_NEGATIVE_INTEGER, // expected a non-negative integer - EXPECTED_OPEN_BRACE, // expected an open brace - EXPECTED_POSITIVE_INTEGER, // expected a positive integer - EXPECTED_PROPERTY_SPECIFIER, // expected a valid property specifier - EXPECTED_SN_EVENT, // expected a supernova event - EXPECTED_STELLAR_PROPERTY, // expected a stellar property (STAR_PROPERTY) - FILE_DOES_NOT_EXIST, // file does not exist - FILE_NOT_CLOSED, // error closing file - file not closed - FILE_OPEN_ERROR, // error opening file - FILE_READ_ERROR, // error reading from file - data not read - FILE_WRITE_ERROR, // error writing to file - data not written - FLOATING_POINT_ERROR, // unspecified floating-point error - FLOATING_POINT_DIVBYZERO, // floating-point divide-by-zero - FLOATING_POINT_INVALID_ARGUMENT, // floating-point invalid - FLOATING_POINT_OVERFLOW, // floating-point overflow - FLOATING_POINT_UNDERFLOW, // floating-point underflow - GRID_OPTIONS_ERROR, // grid file options error - HIGH_TEFF_WINDS, // winds being used at high temperature - INDEX_OUT_OF_RANGE, // index supplied is out of range - INVALID_DATA_TYPE, // invalid data type - INVALID_INITIAL_ATTRIBUTES, // initial values of stellar or binary attributes are not valid - can't evolve star or binary - INVALID_MASS_TRANSFER_DONOR, // mass transfer from NS, BH or Massless Remnant - INVALID_TYPE_EDDINGTON_RATE, // invalid stellar type for Eddington critical rate calculation - INVALID_TYPE_MT_MASS_RATIO, // invalid stellar type for mass ratio calculation - INVALID_TYPE_MT_THERMAL_TIMESCALE, // invalid stellar type for thermal timescale calculation - INVALID_TYPE_ZETA_CALCULATION, // invalid stellar type for Zeta calculation - INVALID_VALUE_FOR_BOOLEAN_OPTION, // invalid value specified for boolean option - INVALID_VALUE_IN_FILE, // invalid value in file - LAMBDA_NOT_POSITIVE, // lambda is <= 0.0 - invalid - LOW_GAMMA, // very massive mass-loss prescription being extrapolated to low gamma (<0.5) - LOW_TEFF_WINDS, // winds being used at low temperature - MAXIMUM_MASS_LOST, // (WARNING) maximum mass lost during mass loss calculations - MISSING_VALUE, // missing value (e.g. for program option) - MISSING_RIGHT_BRACKET, // missing right bracket (e.g. for program option range or set specification) - NO_CONVERGENCE, // iterative process did not converge - NO_LAMBDA_DEWI, // Dewi lambda calculation not supported for stellar type - NO_LAMBDA_NANJING, // Nanjing lambda calculation not supported for stellar type - NO_REAL_ROOTS, // equation has no real roots - NO_TIMESTEPS_READ, // no user timesteps read - NOT_INITIALISED, // object not initialised - OPTION_NOT_SUPPORTED_IN_GRID_FILE, // option not supported in grid file - OUT_OF_BOUNDS, // value out of bounds - PROGRAM_OPTIONS_ERROR, // program options error - RADIUS_NOT_POSITIVE, // radius is <= 0.0 - invalid - REVERT_FAILED, // revert to previous state failed - ROOT_FINDER_FAILED, // root finder threw an exception - STELLAR_EVOLUTION_STOPPED, // evolution of current star stopped - STELLAR_SIMULATION_STOPPED, // stellar simulation stopped - STEPS_UP, // allowed evolution timesteps exceeded - SWITCH_NOT_TAKEN, // switch to new stellar type not performed - TIMESTEP_BELOW_MINIMUM, // timestep too small - below minimum - TIMESTEPS_EXHAUSTED, // timesteps provided exhausted, but evolution not complete - TIMESTEPS_NOT_CONSUMED, // evolution complete, but provided timesteps not consumed - TIMES_UP, // allowed evolution time exceeded - TOO_MANY_MASS0_ITERATIONS, // too many iterations in MASS0 root finder - TOO_MANY_MASS0_TRIES, // too many tries in MASS0 root finder - TOO_MANY_OMEGA_ITERATIONS, // too many iterations in OMEGA root finder - TOO_MANY_OMEGA_TRIES, // too many tries in OMEGA root finder - TOO_MANY_PULSAR_SPIN_ITERATIONS, // too many iterations calculating the pulsar birth spin period - TOO_MANY_PULSAR_MAG_ITERATIONS, // too many iterations calculating the pulsar birth magnetic field - TOO_MANY_RETRIES, // generic too many retries - TOO_MANY_RLOF_ITERATIONS, // too many iterations in RLOF root finder - TOO_MANY_RLOF_TRIES, // too many tries in RLOF root finder - TOO_MANY_RV_ITERATIONS, // too many iterations in rotational velocity root finder - TOO_MANY_RV_TRIES, // too many tries in rotational velocity root finder - TOO_MANY_TIMESTEPS_IN_TIMESTEPS_FILE, // too many timesteps in timesteps file (exceeds maximum) - UNABLE_TO_CREATE_DIRECTORY, // unable to create directory - UNABLE_TO_REMOVE_DIRECTORY, // unable to remove directory - UNEXPECTED_ACCRETION_REGIME, // unexpected accretion regime - UNEXPECTED_BINARY_PROPERTY, // unexpected binary property - UNEXPECTED_BINARY_PROPERTY_TYPE, // unexpected binary property type - UNEXPECTED_END_OF_FILE, // unexpected end of file - UNEXPECTED_LOG_FILE_TYPE, // unexpected log file type - UNEXPECTED_PROGRAM_OPTION, // unexpected program option - UNEXPECTED_PROPERTY, // unexpected property - UNEXPECTED_PROPERTY_TYPE, // unexpected property type - UNEXPECTED_ROOT_FINDER_FAILURE, // unexpected root finder failure - UNEXPECTED_SN_EVENT, // unexpected supernova event in this context - UNEXPECTED_STELLAR_PROPERTY, // unexpected stellar property - UNEXPECTED_STELLAR_PROPERTY_TYPE, // unexpected stellar property type - UNEXPECTED_STELLAR_TYPE, // unexpected stellar type - UNHANDLED_EXCEPTION, // unhandled exception - UNKNOWN_A_DISTRIBUTION, // unknown a-distribution - UNKNOWN_ACCRETION_REGIME, // unknown accretion regime - UNKNOWN_BH_KICK_MODE, // unknown black hole kick mode - UNKNOWN_BINARY_PROPERTY, // unknown binary property - UNKNOWN_CASE_BB_STABILITY_PRESCRIPTION, // unknown case BB/BC mass transfer stability prescription - UNKNOWN_CE_ACCRETION_PRESCRIPTION, // unknown common envelope accretion prescription - UNKNOWN_CE_FORMALISM, // unknown common envelope formalism - UNKNOWN_CE_LAMBDA_PRESCRIPTION, // unknown common envelope Lambda prescription - UNKNOWN_DATA_TYPE, // unknown data type - UNKNOWN_ENVELOPE_STATE_PRESCRIPTION, // unknown envelope state prescription - UNKNOWN_ENVELOPE_TYPE, // unknown envelope type - UNKNOWN_INITIAL_MASS_FUNCTION, // unknown initial mass function - UNKNOWN_KICK_DIRECTION_DISTRIBUTION, // unknown kick direction distribution - UNKNOWN_KICK_MAGNITUDE_DISTRIBUTION, // unknown kick magnitude distribution - UNKNOWN_LOGFILE, // unknown log file - UNKNOWN_LBV_MASS_LOSS_PRESCRIPTION, // unknown LBV mass loss prescription - UNKNOWN_MALTSEV_MODE, // unknown maltsev mode - UNKNOWN_MT_ACCRETION_EFFICIENCY_PRESCRIPTION, // unknown mass transfer accretion efficiency prescription - UNKNOWN_MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION, // unknown mass transfer angular momentum loss prescription - UNKNOWN_MASS_LOSS_PRESCRIPTION, // unknown mass loss prescription - UNKNOWN_MT_CASE, // unknown mass transfer case - UNKNOWN_MT_REJUVENATION_PRESCRIPTION, // unknown mass transfer rejuvenation prescription - UNKNOWN_MT_THERMALLY_LIMITED_VARIATION, // unknown mass transfer thermally limited variation - UNKNOWN_NEUTRINO_MASS_LOSS_PRESCRIPTION, // unknown neutrino mass loss prescription - UNKNOWN_NS_ACCRETION_IN_CE, // unknown NS accretion in common envelope - UNKNOWN_NS_EOS, // unknown NS equation-of-state - UNKNOWN_OB_MASS_LOSS_PRESCRIPTION, // unknown OB mass loss prescription - UNKNOWN_PPI_PRESCRIPTION, // unknown pulsational pair instability prescription - UNKNOWN_PROGRAM_OPTION, // unknown program option - UNKNOWN_PROPERTY_TYPE, // unknown property type - UNKNOWN_PULSAR_BIRTH_MAGNETIC_FIELD_DISTRIBUTION, // unknown pulsar birth magnetic field distribution - UNKNOWN_PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION, // unknown pulsar birth spin period distribution - UNKNOWN_Q_DISTRIBUTION, // unknown q-distribution - UNKNOWN_QCRIT_PRESCRIPTION, // Unknown QCRIT prescription - UNKNOWN_REMNANT_MASS_PRESCRIPTION, // unknown remnant mass prescriptrion - UNKNOWN_RESPONSE_TO_SPIN_UP, // unknown common prescription for responding to excessive spin-up - UNKNOWN_RSG_MASS_LOSS_PRESCRIPTION, // unknown RSG mass loss prescription - UNKNOWN_SEMI_MAJOR_AXIS_DISTRIBUTION, // unknown sem-major axis distribution - UNKNOWN_SN_ENGINE, // unknown supernova engine - UNKNOWN_SN_EVENT, // unknown supernova event encountered - UNKNOWN_STELLAR_POPULATION, // unknown stellar population - UNKNOWN_STELLAR_PROPERTY, // unknown stellar property - UNKNOWN_STELLAR_TYPE, // unknown stellar type - UNKNOWN_TIDES_PRESCRIPTION, // unknown tides prescription - UNKNOWN_VMS_MASS_LOSS_PRESCRIPTION, // unknown VMS mass loss prescription - UNKNOWN_VROT_PRESCRIPTION, // unknown rorational velocity prescription - UNKNOWN_WR_MASS_LOSS_PRESCRIPTION, // unknown WR mass loss prescription - UNKNOWN_ZETA_PRESCRIPTION, // unknown stellar ZETA prescription - WARNING, // unspecified warning - WHITE_DWARF_TOO_MASSIVE, // a white dwarf exceeds the Chandrasekhar mass limit - - // not alphabetical - here to keep "real" error numbers consecutive - SUGGEST_HELP // suggest using --help -}; - - -// message catalog -// for now we'll just define it here - one day we might want to have it in a -// file and read it in at program start - that way we can be more flexible -// (i.e. change messages without recompiling, internationalise etc.) -// -// unordered_map - key is integer message number (from enum class ERROR above) -// listed alphabetically - -const COMPASUnorderedMap> ERROR_CATALOG = { - { ERROR::ADDED_EXCESS_AM_TO_STARS, { ERROR_SCOPE::ALWAYS, "Attempted to add more angular momentum to stars than was available in the binary" }}, - { ERROR::AMBIGUOUS_REMNANT_MASS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Insufficient information to prescribe remnant mass" }}, - { ERROR::ARGUMENT_RANGE_PARMS_EXPECTED_FP, { ERROR_SCOPE::ALWAYS, "Expected a floating point number for range start and increment for option" }}, - { ERROR::ARGUMENT_RANGE_COUNT_EXPECTED_ULINT, { ERROR_SCOPE::ALWAYS, "Expected an unsigned long integer for range count for option" }}, - { ERROR::ARGUMENT_RANGE_PARMS_EXPECTED_INT, { ERROR_SCOPE::ALWAYS, "Expected an integer for range parameters for option" }}, - { ERROR::ARGUMENT_RANGE_PARMS_EXPECTED_LFP, { ERROR_SCOPE::ALWAYS, "Expected a long double number for range start and increment for option" }}, - { ERROR::ARGUMENT_RANGE_PARMS_EXPECTED_LINT, { ERROR_SCOPE::ALWAYS, "Expected an long integer for range parameters for option" }}, - { ERROR::ARGUMENT_RANGE_PARMS_EXPECTED_ULINT, { ERROR_SCOPE::ALWAYS, "Expected an unsigned long integer for range parameters for option" }}, - { ERROR::ARGUMENT_RANGE_NOT_SUPPORTED, { ERROR_SCOPE::ALWAYS, "Argument range not supported for option" }}, - { ERROR::ARGUMENT_RANGE_NUM_PARMS, { ERROR_SCOPE::ALWAYS, "Argument range requires exactly three parameters" }}, - { ERROR::ARGUMENT_SET_EXPECTED_BOOL, { ERROR_SCOPE::ALWAYS, "All parameters of argument set must be boolean for option" }}, - { ERROR::ARGUMENT_SET_EXPECTED_NUMERIC, { ERROR_SCOPE::ALWAYS, "All parameters of argument set must be numeric for option" }}, - { ERROR::ARGUMENT_SET_NOT_SUPPORTED, { ERROR_SCOPE::ALWAYS, "Argument set not supported for option" }}, - { ERROR::BAD_LOGFILE_RECORD_SPECIFICATIONS, { ERROR_SCOPE::ALWAYS, "Logfile record specifications error" }}, - { ERROR::BINARY_EVOLUTION_STOPPED, { ERROR_SCOPE::ALWAYS, "Evolution of current binary stopped" }}, - { ERROR::BINARY_SIMULATION_STOPPED, { ERROR_SCOPE::ALWAYS, "Binaries simulation stopped" }}, - { ERROR::BOOST_OPTION_CMDLINE, { ERROR_SCOPE::ALWAYS, "Failed to initialise Boost options descriptions for commandline options" }}, - { ERROR::BOOST_OPTION_GRIDLINE, { ERROR_SCOPE::ALWAYS, "Failed to initialise Boost options descriptions for grid line options" }}, - { ERROR::BOOST_OPTION_INTERNAL_ERROR, { ERROR_SCOPE::ALWAYS, "Internal error: Boost vm, option" }}, - { ERROR::DIRECTORY_NOT_EMPTY, { ERROR_SCOPE::ALWAYS, "Directory not empty" }}, - { ERROR::EMPTY_FILE, { ERROR_SCOPE::ALWAYS, "File is empty" }}, - { ERROR::EMPTY_FILENAME, { ERROR_SCOPE::ALWAYS, "Filename is an empty string" }}, - { ERROR::ERROR, { ERROR_SCOPE::ALWAYS, "Error!" }}, - { ERROR::ERROR_PROCESSING_CMDLINE_OPTIONS, { ERROR_SCOPE::ALWAYS, "An error occurred while processing commandline options" }}, - { ERROR::ERROR_PROCESSING_GRIDLINE_OPTIONS, { ERROR_SCOPE::ALWAYS, "An error occurred while processing grid file options" }}, - { ERROR::EXPECTED_3D_VECTOR, { ERROR_SCOPE::ALWAYS, "Expected a vector of size 3" }}, - { ERROR::EXPECTED_ASSIGNMENT_OPERATOR, { ERROR_SCOPE::ALWAYS, "Expected assignment operator: one of { '=', '-=', '+=' }" }}, - { ERROR::EXPECTED_BINARY_PROPERTY, { ERROR_SCOPE::ALWAYS, "Expected binary logfile property: one of { (STAR_1|STAR_2|SUPERNOVA|COMPANION|BINARY)_PROPERTY, PROGRAM_OPTION }" }}, - { ERROR::EXPECTED_COMMA_OR_CLOSE_BRACE, { ERROR_SCOPE::ALWAYS, "Expected a comma ',' or close brace '}'" }}, - { ERROR::EXPECTED_INTEGER, { ERROR_SCOPE::ALWAYS, "Expected an integer" }}, - { ERROR::EXPECTED_LOGFILE_RECORD_NAME, { ERROR_SCOPE::ALWAYS, "Expected logfile record specifier" }}, - { ERROR::EXPECTED_NON_NEGATIVE_INTEGER, { ERROR_SCOPE::ALWAYS, "Expected an integer >= 0" }}, - { ERROR::EXPECTED_OPEN_BRACE, { ERROR_SCOPE::ALWAYS, "Expected open brace '{'" }}, - { ERROR::EXPECTED_POSITIVE_INTEGER, { ERROR_SCOPE::ALWAYS, "Expected an integer > 0" }}, - { ERROR::EXPECTED_PROPERTY_SPECIFIER, { ERROR_SCOPE::ALWAYS, "Expected a property specifier or close brace '}'" }}, - { ERROR::EXPECTED_SN_EVENT, { ERROR_SCOPE::ALWAYS, "Expected a supernova event" }}, - { ERROR::EXPECTED_STELLAR_PROPERTY, { ERROR_SCOPE::ALWAYS, "Expected stellar logfile property: one of { STAR_PROPERTY, PROGRAM_OPTION }" }}, - { ERROR::FILE_DOES_NOT_EXIST, { ERROR_SCOPE::ALWAYS, "File does not exist" }}, - { ERROR::FILE_NOT_CLOSED, { ERROR_SCOPE::ALWAYS, "Error closing file - file not closed" }}, - { ERROR::FILE_OPEN_ERROR, { ERROR_SCOPE::ALWAYS, "Error opening file" }}, - { ERROR::FILE_READ_ERROR, { ERROR_SCOPE::ALWAYS, "Error reading from file - data not read" }}, - { ERROR::FILE_WRITE_ERROR, { ERROR_SCOPE::ALWAYS, "Error writing to file - data not written" }}, - { ERROR::FLOATING_POINT_ERROR, { ERROR_SCOPE::ALWAYS, "Unspecified floating-point error" }}, - { ERROR::FLOATING_POINT_DIVBYZERO, { ERROR_SCOPE::ALWAYS, "Floating-point divide-by-zero" }}, - { ERROR::FLOATING_POINT_INVALID_ARGUMENT, { ERROR_SCOPE::ALWAYS, "Floating-point invalid argument" }}, - { ERROR::FLOATING_POINT_OVERFLOW, { ERROR_SCOPE::ALWAYS, "Floating-point overflow" }}, - { ERROR::FLOATING_POINT_UNDERFLOW, { ERROR_SCOPE::ALWAYS, "Floating-point underflow" }}, - { ERROR::GRID_OPTIONS_ERROR, { ERROR_SCOPE::ALWAYS, "Grid File Options error" }}, - { ERROR::HIGH_TEFF_WINDS, { ERROR_SCOPE::FIRST_IN_OBJECT_ID, "Winds being used at high temperature" }}, - { ERROR::INDEX_OUT_OF_RANGE, { ERROR_SCOPE::ALWAYS, "Index out of range" }}, - { ERROR::INVALID_DATA_TYPE, { ERROR_SCOPE::ALWAYS, "Invalid data type" }}, - { ERROR::INVALID_INITIAL_ATTRIBUTES, { ERROR_SCOPE::ALWAYS, "Initial attributes are not valid - evolution not possible" }}, - { ERROR::INVALID_MASS_TRANSFER_DONOR, { ERROR_SCOPE::ALWAYS, "Mass transfer from NS, BH, or Massless Remnant" }}, - { ERROR::INVALID_TYPE_EDDINGTON_RATE, { ERROR_SCOPE::ALWAYS, "Invalid stellar type for Eddington critical rate calculation" }}, - { ERROR::INVALID_TYPE_MT_MASS_RATIO, { ERROR_SCOPE::ALWAYS, "Invalid stellar type for mass ratio calculation" }}, - { ERROR::INVALID_TYPE_MT_THERMAL_TIMESCALE, { ERROR_SCOPE::ALWAYS, "Invalid stellar type for thermal timescale calculation" }}, - { ERROR::INVALID_TYPE_ZETA_CALCULATION, { ERROR_SCOPE::ALWAYS, "Invalid stellar type for Zeta calculation" }}, - { ERROR::INVALID_VALUE_FOR_BOOLEAN_OPTION, { ERROR_SCOPE::ALWAYS, "Invalid value specified for BOOLEAN option" }}, - { ERROR::INVALID_VALUE_IN_FILE, { ERROR_SCOPE::ALWAYS, "Invalid value in file" }}, - { ERROR::LAMBDA_NOT_POSITIVE, { ERROR_SCOPE::FIRST_IN_OBJECT_ID, "Lambda <= 0.0" }}, - { ERROR::LOW_GAMMA, { ERROR_SCOPE::ALWAYS, "Very massive prescription being extrapolated to low gamma (<0.5)" }}, - { ERROR::LOW_TEFF_WINDS, { ERROR_SCOPE::ALWAYS, "Winds being used at low temperature" }}, - { ERROR::MAXIMUM_MASS_LOST, { ERROR_SCOPE::FIRST_IN_OBJECT_ID, "Maximum mass lost during mass loss calculations" }}, - { ERROR::MISSING_VALUE, { ERROR_SCOPE::ALWAYS, "Missing value" }}, - { ERROR::MISSING_RIGHT_BRACKET, { ERROR_SCOPE::ALWAYS, "Missing ']'" }}, - { ERROR::NO_CONVERGENCE, { ERROR_SCOPE::ALWAYS, "No convergence" }}, - { ERROR::NO_LAMBDA_DEWI, { ERROR_SCOPE::ALWAYS, "Dewi lambda calculation not supported for stellar type" }}, - { ERROR::NO_LAMBDA_NANJING, { ERROR_SCOPE::ALWAYS, "Nanjing lambda calculation not supported for stellar type" }}, - { ERROR::NO_REAL_ROOTS, { ERROR_SCOPE::ALWAYS, "No real roots" }}, - { ERROR::NO_TIMESTEPS_READ, { ERROR_SCOPE::ALWAYS, "No user timesteps read" }}, - { ERROR::NONE, { ERROR_SCOPE::NEVER, "No error" }}, - { ERROR::NOT_INITIALISED, { ERROR_SCOPE::ALWAYS, "Object not initialised" }}, - { ERROR::OPTION_NOT_SUPPORTED_IN_GRID_FILE, { ERROR_SCOPE::ALWAYS, "Option not supported in grid file" }}, - { ERROR::OUT_OF_BOUNDS, { ERROR_SCOPE::ALWAYS, "Value out of bounds" }}, - { ERROR::PROGRAM_OPTIONS_ERROR, { ERROR_SCOPE::ALWAYS, "Commandline Options error" }}, - { ERROR::RADIUS_NOT_POSITIVE, { ERROR_SCOPE::ALWAYS, "Radius <= 0.0" }}, - { ERROR::REVERT_FAILED, { ERROR_SCOPE::ALWAYS, "Revert to previous state failed" }}, - { ERROR::ROOT_FINDER_FAILED, { ERROR_SCOPE::ALWAYS, "Exception encountered in root finder" }}, - { ERROR::STELLAR_EVOLUTION_STOPPED, { ERROR_SCOPE::ALWAYS, "Evolution of current star stopped" }}, - { ERROR::STELLAR_SIMULATION_STOPPED, { ERROR_SCOPE::ALWAYS, "Stellar simulation stopped" }}, - { ERROR::STEPS_UP, { ERROR_SCOPE::ALWAYS, "Allowed evolution timesteps exceeded" }}, - { ERROR::SUGGEST_HELP, { ERROR_SCOPE::ALWAYS, "Use option '-h' (or '--help') to see (descriptions of) available options" }}, - { ERROR::SWITCH_NOT_TAKEN, { ERROR_SCOPE::ALWAYS, "Switch to new stellar type not performed" }}, - { ERROR::TIMESTEP_BELOW_MINIMUM, { ERROR_SCOPE::ALWAYS, "Timestep below minimum - timestep taken" }}, - { ERROR::TIMESTEPS_EXHAUSTED, { ERROR_SCOPE::ALWAYS, "Provided timesteps exhausted, but evolution not complete" }}, - { ERROR::TIMESTEPS_NOT_CONSUMED, { ERROR_SCOPE::ALWAYS, "Evolution complete, but provided timesteps not consumed" }}, - { ERROR::TIMES_UP, { ERROR_SCOPE::ALWAYS, "Allowed evolution time exceeded" }}, - { ERROR::TOO_MANY_MASS0_ITERATIONS, { ERROR_SCOPE::ALWAYS, "Reached maximum number of iterations when looking for effective initial mass Mass_0 to match desired stellar core of HG star following case A mass transfer" }}, - { ERROR::TOO_MANY_MASS0_TRIES, { ERROR_SCOPE::ALWAYS, "Reached maximum number of tries when looking for effective initial mass Mass_0 to match desired stellar core of HG star following case A mass transfer" }}, - { ERROR::TOO_MANY_OMEGA_ITERATIONS, { ERROR_SCOPE::ALWAYS, "Reached maximum number of iterations when looking for omega when circularising and synchronising for tides" }}, - { ERROR::TOO_MANY_OMEGA_TRIES, { ERROR_SCOPE::ALWAYS, "Reached maximum number of tries when looking for omega when circularising and synchronising for tides" }}, - { ERROR::TOO_MANY_PULSAR_SPIN_ITERATIONS, { ERROR_SCOPE::ALWAYS, "Reached maximum number of iterations calculating the pulsar birth spin period" }}, - { ERROR::TOO_MANY_RETRIES, { ERROR_SCOPE::ALWAYS, "Too many retries" }}, - { ERROR::TOO_MANY_RLOF_ITERATIONS, { ERROR_SCOPE::ALWAYS, "Reached maximum number of iterations when fitting star inside Roche Lobe in RLOF" }}, - { ERROR::TOO_MANY_RLOF_TRIES, { ERROR_SCOPE::ALWAYS, "Reached maximum number of tries when fitting star inside Roche Lobe in RLOF" }}, - { ERROR::TOO_MANY_RV_ITERATIONS, { ERROR_SCOPE::ALWAYS, "Reached maximum number of tries when inverting the CDF of rotational velocitiesF" }}, - { ERROR::TOO_MANY_RV_TRIES, { ERROR_SCOPE::ALWAYS, "Reached maximum number of tries when inverting the CDF of rotational velocities" }}, - { ERROR::TOO_MANY_TIMESTEPS_IN_TIMESTEPS_FILE, { ERROR_SCOPE::ALWAYS, "Number of timesteps in timestpes file exceeds maximum timesteps" }}, - { ERROR::UNABLE_TO_CREATE_DIRECTORY, { ERROR_SCOPE::ALWAYS, "Unable to create directory" }}, - { ERROR::UNABLE_TO_REMOVE_DIRECTORY, { ERROR_SCOPE::ALWAYS, "Unable to remove directory" }}, - { ERROR::UNEXPECTED_ACCRETION_REGIME, { ERROR_SCOPE::ALWAYS, "Unexpected accretion regime" }}, - { ERROR::UNEXPECTED_BINARY_PROPERTY, { ERROR_SCOPE::ALWAYS, "Unexpected binary property" }}, - { ERROR::UNEXPECTED_BINARY_PROPERTY_TYPE, { ERROR_SCOPE::ALWAYS, "Unexpected binary property type" }}, - { ERROR::UNEXPECTED_END_OF_FILE, { ERROR_SCOPE::ALWAYS, "Unexpected end of file" }}, - { ERROR::UNEXPECTED_LOG_FILE_TYPE, { ERROR_SCOPE::ALWAYS, "Unexpected log file type" }}, - { ERROR::UNEXPECTED_PROGRAM_OPTION, { ERROR_SCOPE::ALWAYS, "Unexpected program option" }}, - { ERROR::UNEXPECTED_PROPERTY, { ERROR_SCOPE::ALWAYS, "Unexpected property" }}, - { ERROR::UNEXPECTED_PROPERTY_TYPE, { ERROR_SCOPE::ALWAYS, "Unexpected property type" }}, - { ERROR::UNEXPECTED_ROOT_FINDER_FAILURE, { ERROR_SCOPE::ALWAYS, "Unexpected root finder failure" }}, - { ERROR::UNEXPECTED_SN_EVENT, { ERROR_SCOPE::ALWAYS, "Unexpected supernova event in this context" }}, - { ERROR::UNEXPECTED_STELLAR_PROPERTY, { ERROR_SCOPE::ALWAYS, "Unexpected stellar property" }}, - { ERROR::UNEXPECTED_STELLAR_PROPERTY_TYPE, { ERROR_SCOPE::ALWAYS, "Unexpected stellar property type" }}, - { ERROR::UNEXPECTED_STELLAR_TYPE, { ERROR_SCOPE::ALWAYS, "Unexpected stellar type" }}, - { ERROR::UNHANDLED_EXCEPTION, { ERROR_SCOPE::ALWAYS, "Unhandled exception" }}, - { ERROR::UNKNOWN_A_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown semi-major-axis distribution" }}, - { ERROR::UNKNOWN_ACCRETION_REGIME, { ERROR_SCOPE::ALWAYS, "Unknown accretion regime" }}, - { ERROR::UNKNOWN_BH_KICK_MODE, { ERROR_SCOPE::ALWAYS, "Unknown black hole kicks mode" }}, - { ERROR::UNKNOWN_BINARY_PROPERTY, { ERROR_SCOPE::ALWAYS, "Unknown binary property" }}, - { ERROR::UNKNOWN_CASE_BB_STABILITY_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown case BB/BC mass transfer stability prescription" }}, - { ERROR::UNKNOWN_CE_ACCRETION_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown common envelope accretion prescription" }}, - { ERROR::UNKNOWN_CE_FORMALISM, { ERROR_SCOPE::ALWAYS, "Unknown common envelope formalism" }}, - { ERROR::UNKNOWN_CE_LAMBDA_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown common envelope lambda prescription" }}, - { ERROR::UNKNOWN_DATA_TYPE, { ERROR_SCOPE::ALWAYS, "Unknown data type" }}, - { ERROR::UNKNOWN_ENVELOPE_STATE_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown envelope state prescription" }}, - { ERROR::UNKNOWN_ENVELOPE_TYPE, { ERROR_SCOPE::ALWAYS, "Unknown envelope type" }}, - { ERROR::UNKNOWN_INITIAL_MASS_FUNCTION, { ERROR_SCOPE::ALWAYS, "Unknown initial mass function (IMF)" }}, - { ERROR::UNKNOWN_KICK_DIRECTION_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown kick direction distribution" }}, - { ERROR::UNKNOWN_KICK_MAGNITUDE_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown kick magnitude distribution" }}, - { ERROR::UNKNOWN_LBV_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown LBV mass loss prescription" }}, - { ERROR::UNKNOWN_LOGFILE, { ERROR_SCOPE::ALWAYS, "Unknown log file" }}, - { ERROR::UNKNOWN_MALTSEV_MODE, { ERROR_SCOPE::ALWAYS, "Unknown Maltsev remnant mass mode" }}, - { ERROR::UNKNOWN_MT_CASE, { ERROR_SCOPE::ALWAYS, "Unknown mass transfer case" }}, - { ERROR::UNKNOWN_MT_ACCRETION_EFFICIENCY_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown mass transfer accretion efficiency prescription" }}, - { ERROR::UNKNOWN_MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown mass transfer angular momentum loss prescription" }}, - { ERROR::UNKNOWN_MT_REJUVENATION_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown mass transfer rejuvenation prescription" }}, - { ERROR::UNKNOWN_MT_THERMALLY_LIMITED_VARIATION, { ERROR_SCOPE::ALWAYS, "Unknown mass transfer thermally limited variation" }}, - { ERROR::UNKNOWN_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown mass loss prescription" }}, - { ERROR::UNKNOWN_NEUTRINO_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown neutrino mass loss prescription" }}, - { ERROR::UNKNOWN_NS_ACCRETION_IN_CE, { ERROR_SCOPE::ALWAYS, "Unknown NS accretion in common envelope" }}, - { ERROR::UNKNOWN_NS_EOS, { ERROR_SCOPE::ALWAYS, "Unknown NS equation-of-state" }}, - { ERROR::UNKNOWN_OB_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown OB mass loss prescription" }}, - { ERROR::UNKNOWN_PPI_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown pulsational pair instability prescription" }}, - { ERROR::UNKNOWN_PROGRAM_OPTION, { ERROR_SCOPE::ALWAYS, "Unknown program option" }}, - { ERROR::UNKNOWN_PROPERTY_TYPE, { ERROR_SCOPE::ALWAYS, "Unknown property type" }}, - { ERROR::UNKNOWN_PULSAR_BIRTH_MAGNETIC_FIELD_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown pulsar birth magnetic field distribution" }}, - { ERROR::UNKNOWN_PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown pulsar birth spin period distribution" }}, - { ERROR::UNKNOWN_Q_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown q-distribution" }}, - { ERROR::UNKNOWN_QCRIT_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown QCRIT prescription" }}, - { ERROR::UNKNOWN_REMNANT_MASS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown remnant mass prescription" }}, - { ERROR::UNKNOWN_RESPONSE_TO_SPIN_UP, { ERROR_SCOPE::ALWAYS, "Unknown response-to-spin-up prescription" }}, - { ERROR::UNKNOWN_RSG_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown RSG mass loss prescription" }}, - { ERROR::UNKNOWN_SEMI_MAJOR_AXIS_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown semi-major axis distribution" }}, - { ERROR::UNKNOWN_SN_ENGINE, { ERROR_SCOPE::ALWAYS, "Unknown supernova engine" }}, - { ERROR::UNKNOWN_SN_EVENT, { ERROR_SCOPE::ALWAYS, "Unknown supernova event" }}, - { ERROR::UNKNOWN_STELLAR_POPULATION, { ERROR_SCOPE::ALWAYS, "Unknown stellar population" }}, - { ERROR::UNKNOWN_STELLAR_PROPERTY, { ERROR_SCOPE::ALWAYS, "Unknown stellar property" }}, - { ERROR::UNKNOWN_STELLAR_TYPE, { ERROR_SCOPE::ALWAYS, "Unknown stellar type" }}, - { ERROR::UNKNOWN_TIDES_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown tides prescription" }}, - { ERROR::UNKNOWN_VMS_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown VMS mass loss prescription" }}, - { ERROR::UNKNOWN_VROT_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown rotational velocity prescription" }}, - { ERROR::UNKNOWN_ZETA_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown stellar ZETA prescription" }}, - { ERROR::WARNING, { ERROR_SCOPE::ALWAYS, "Warning!" }}, - { ERROR::WHITE_DWARF_TOO_MASSIVE, { ERROR_SCOPE::ALWAYS, "This white dwarf exceeds the Chandrasekhar mass limit" }}, - { ERROR::UNKNOWN_WR_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown WR mass loss prescription" }} -}; - - -#endif // __ErrorCatalog_h__ +#ifndef __ErrorCatalog_h__ +#define __ErrorCatalog_h__ + + +// This is the COMPAS error catalogue. The error catalogue defines symbolic names for all COMPAS errors, +// and corresponding error strings for those errors. +// +// To add a new error, add the symbolic name to the ERROR enum class, and the corresponding error string +// to the ERROR_CATALOG map. +// +// The key to the ERROR_CATALOG map is the symbolic name in the ERROR enum class. The map entry is a +// tuple containing the ERROR_SCOPE associated with the error (see below), and the error string. + +#include "constants.h" +#include "EnumHash.h" + +#define ERR_MSG(x) std::get<1>(ERROR_CATALOG.at(x)) // for convenience + + +// The ERROR_SCOPE enum class, defined below, allows developers to specify when, if at all, a particular +// error/warning should be displayed by the SHOW_WARN* and SHOW_ERROR* macros defined in ErrorsMacros.h +// (and by the ERRORS-SHowIt() function defined in Errors.h, which is used by the aforementioned macros): +// +// NEVER : the error/warning should never be displayed +// ALWAYS : the error/warning should always be displayed +// FIRST : the error/warning should only be displayed the first time it is encountered +// FIRST_IN_FUNCTION : the error/warning should only be displayed the first time it is encountered for a function +// FIRST_IN_STELLAR_TYPE: the error/warning should only be displayed the first time it is encountered for a stellar type (see enum class STELLAR_TYPE in typedefs.h) +// FIRST_IN_OBJECT_TYPE : the error/warning should only be displayed the first time it is encountered for an object type (see enum class OBJECT_TYPE in typedefs.h) +// FIRST_IN_OBJECT_ID : the error/warning should only be displayed the first time it is encountered for an object id (each object is assigned a unique object id - e.g. a star or binary, each constituent star of a binary) +// +// The THROW_ERROR* macros defined in ErrorsMacros.h are not affected by ERROR_SCOPE + +enum class ERROR_SCOPE: int { NEVER, ALWAYS, FIRST, FIRST_IN_FUNCTION, FIRST_IN_STELLAR_TYPE, FIRST_IN_OBJECT_TYPE, FIRST_IN_OBJECT_ID }; + + +// enum class ERROR +// Symbolic names for errors and warnings (error strings below in ERRORLabel map) +// Listed alphabetically (except for 'NONE' - first so ERROR = 0 = NONE) +enum class ERROR: int { + NONE, // no error + ADDED_EXCESS_AM_TO_STARS, // attempted to add more angular momentum to stars than was available in a binary + AMBIGUOUS_REMNANT_MASS_PRESCRIPTION, // remnant mass unclear from available parameters + ARGUMENT_RANGE_COUNT_EXPECTED_ULINT, // expected an unsigned long integer for range count for option + ARGUMENT_RANGE_NOT_SUPPORTED, // argument range not supported for option + ARGUMENT_RANGE_NUM_PARMS, // argument range requires exactly three parameters + ARGUMENT_RANGE_PARMS_EXPECTED_FP, // expected a floating point number for range start and increment for option + ARGUMENT_RANGE_PARMS_EXPECTED_INT, // expected an integer for range parameters for option + ARGUMENT_RANGE_PARMS_EXPECTED_LFP, // expected a long double number for range start and increment for option + ARGUMENT_RANGE_PARMS_EXPECTED_LINT, // expected an long integer for range parameters for option + ARGUMENT_RANGE_PARMS_EXPECTED_ULINT, // expected an unsigned long integer for range parameters for option + ARGUMENT_SET_EXPECTED_BOOL, // all parameters of argument set must be boolean for option + ARGUMENT_SET_EXPECTED_NUMERIC, // all parameters of argument set must be numeric for option + ARGUMENT_SET_NOT_SUPPORTED, // argument set not supported for option + BAD_LOGFILE_RECORD_SPECIFICATIONS, // error in logfile record specifications + BINARY_EVOLUTION_STOPPED, // evolution of current binary stopped + BINARY_SIMULATION_STOPPED, // binary simulation stopped + BOOST_OPTION_CMDLINE, // failed to initialise Boost options descriptions for commandline options + BOOST_OPTION_GRIDLINE, // failed to initialise Boost options descriptions for grid line options + BOOST_OPTION_INTERNAL_ERROR, // Boost option internal error + DIRECTORY_NOT_EMPTY, // Directory not empty + EMPTY_FILE, // file is empty (contains no content) + EMPTY_FILENAME, // filename is an empty string + ERROR, // unspecified error + ERROR_PROCESSING_CMDLINE_OPTIONS, // an error occurred while processing commandline options + ERROR_PROCESSING_GRIDLINE_OPTIONS, // an error occurred while processing grid file options + EXPECTED_3D_VECTOR, // expected a vector of size 3 + EXPECTED_ASSIGNMENT_OPERATOR, // expected assignment operator + EXPECTED_BINARY_PROPERTY, // expected a binary property (STAR_1_, STAR_2_, SUPERNOVA_, COMPANION_, or BINARY_PROPERTY) + EXPECTED_COMMA_OR_CLOSE_BRACE, // expected a comma or close brace + EXPECTED_INTEGER, // expected an integer + EXPECTED_LOGFILE_RECORD_NAME, // expected logfile record name + EXPECTED_NON_NEGATIVE_INTEGER, // expected a non-negative integer + EXPECTED_OPEN_BRACE, // expected an open brace + EXPECTED_POSITIVE_INTEGER, // expected a positive integer + EXPECTED_PROPERTY_SPECIFIER, // expected a valid property specifier + EXPECTED_SN_EVENT, // expected a supernova event + EXPECTED_STELLAR_PROPERTY, // expected a stellar property (STAR_PROPERTY) + FILE_DOES_NOT_EXIST, // file does not exist + FILE_NOT_CLOSED, // error closing file - file not closed + FILE_OPEN_ERROR, // error opening file + FILE_READ_ERROR, // error reading from file - data not read + FILE_WRITE_ERROR, // error writing to file - data not written + FLOATING_POINT_ERROR, // unspecified floating-point error + FLOATING_POINT_DIVBYZERO, // floating-point divide-by-zero + FLOATING_POINT_INVALID_ARGUMENT, // floating-point invalid + FLOATING_POINT_OVERFLOW, // floating-point overflow + FLOATING_POINT_UNDERFLOW, // floating-point underflow + GRID_OPTIONS_ERROR, // grid file options error + HIGH_TEFF_WINDS, // winds being used at high temperature + INDEX_OUT_OF_RANGE, // index supplied is out of range + INVALID_DATA_TYPE, // invalid data type + INVALID_INITIAL_ATTRIBUTES, // initial values of stellar or binary attributes are not valid - can't evolve star or binary + INVALID_MASS_TRANSFER_DONOR, // mass transfer from NS, BH or Massless Remnant + INVALID_TYPE_EDDINGTON_RATE, // invalid stellar type for Eddington critical rate calculation + INVALID_TYPE_MT_MASS_RATIO, // invalid stellar type for mass ratio calculation + INVALID_TYPE_MT_THERMAL_TIMESCALE, // invalid stellar type for thermal timescale calculation + INVALID_TYPE_ZETA_CALCULATION, // invalid stellar type for Zeta calculation + INVALID_VALUE_FOR_BOOLEAN_OPTION, // invalid value specified for boolean option + INVALID_VALUE_IN_FILE, // invalid value in file + LAMBDA_NOT_POSITIVE, // lambda is <= 0.0 - invalid + LOW_GAMMA, // very massive mass-loss prescription being extrapolated to low gamma (<0.5) + LOW_TEFF_WINDS, // winds being used at low temperature + MAXIMUM_MASS_LOST, // (WARNING) maximum mass lost during mass loss calculations + MISSING_VALUE, // missing value (e.g. for program option) + MISSING_RIGHT_BRACKET, // missing right bracket (e.g. for program option range or set specification) + NO_CONVERGENCE, // iterative process did not converge + NO_LAMBDA_DEWI, // Dewi lambda calculation not supported for stellar type + NO_LAMBDA_NANJING, // Nanjing lambda calculation not supported for stellar type + NO_REAL_ROOTS, // equation has no real roots + NO_TIMESTEPS_READ, // no user timesteps read + NOT_INITIALISED, // object not initialised + OPTION_NOT_SUPPORTED_IN_GRID_FILE, // option not supported in grid file + OUT_OF_BOUNDS, // value out of bounds + PROGRAM_OPTIONS_ERROR, // program options error + RADIUS_NOT_POSITIVE, // radius is <= 0.0 - invalid + REVERT_FAILED, // revert to previous state failed + ROOT_FINDER_FAILED, // root finder threw an exception + STELLAR_EVOLUTION_STOPPED, // evolution of current star stopped + STELLAR_SIMULATION_STOPPED, // stellar simulation stopped + STEPS_UP, // allowed evolution timesteps exceeded + SWITCH_NOT_TAKEN, // switch to new stellar type not performed + TIMESTEP_BELOW_MINIMUM, // timestep too small - below minimum + TIMESTEPS_EXHAUSTED, // timesteps provided exhausted, but evolution not complete + TIMESTEPS_NOT_CONSUMED, // evolution complete, but provided timesteps not consumed + TIMES_UP, // allowed evolution time exceeded + TOO_MANY_MASS0_ITERATIONS, // too many iterations in MASS0 root finder + TOO_MANY_MASS0_TRIES, // too many tries in MASS0 root finder + TOO_MANY_OMEGA_ITERATIONS, // too many iterations in OMEGA root finder + TOO_MANY_OMEGA_TRIES, // too many tries in OMEGA root finder + TOO_MANY_PULSAR_SPIN_ITERATIONS, // too many iterations calculating the pulsar birth spin period + TOO_MANY_PULSAR_MAG_ITERATIONS, // too many iterations calculating the pulsar birth magnetic field + TOO_MANY_RETRIES, // generic too many retries + TOO_MANY_RLOF_ITERATIONS, // too many iterations in RLOF root finder + TOO_MANY_RLOF_TRIES, // too many tries in RLOF root finder + TOO_MANY_RV_ITERATIONS, // too many iterations in rotational velocity root finder + TOO_MANY_RV_TRIES, // too many tries in rotational velocity root finder + TOO_MANY_TIMESTEPS_IN_TIMESTEPS_FILE, // too many timesteps in timesteps file (exceeds maximum) + UNABLE_TO_CREATE_DIRECTORY, // unable to create directory + UNABLE_TO_REMOVE_DIRECTORY, // unable to remove directory + UNEXPECTED_ACCRETION_REGIME, // unexpected accretion regime + UNEXPECTED_BINARY_PROPERTY, // unexpected binary property + UNEXPECTED_BINARY_PROPERTY_TYPE, // unexpected binary property type + UNEXPECTED_END_OF_FILE, // unexpected end of file + UNEXPECTED_LOG_FILE_TYPE, // unexpected log file type + UNEXPECTED_PROGRAM_OPTION, // unexpected program option + UNEXPECTED_PROPERTY, // unexpected property + UNEXPECTED_PROPERTY_TYPE, // unexpected property type + UNEXPECTED_ROOT_FINDER_FAILURE, // unexpected root finder failure + UNEXPECTED_SN_EVENT, // unexpected supernova event in this context + UNEXPECTED_STELLAR_PROPERTY, // unexpected stellar property + UNEXPECTED_STELLAR_PROPERTY_TYPE, // unexpected stellar property type + UNEXPECTED_STELLAR_TYPE, // unexpected stellar type + UNHANDLED_EXCEPTION, // unhandled exception + UNKNOWN_A_DISTRIBUTION, // unknown a-distribution + UNKNOWN_ACCRETION_REGIME, // unknown accretion regime + UNKNOWN_BH_KICK_MODE, // unknown black hole kick mode + UNKNOWN_BINARY_PROPERTY, // unknown binary property + UNKNOWN_CASE_BB_STABILITY_PRESCRIPTION, // unknown case BB/BC mass transfer stability prescription + UNKNOWN_CE_ACCRETION_PRESCRIPTION, // unknown common envelope accretion prescription + UNKNOWN_CE_FORMALISM, // unknown common envelope formalism + UNKNOWN_CE_LAMBDA_PRESCRIPTION, // unknown common envelope Lambda prescription + UNKNOWN_DATA_TYPE, // unknown data type + UNKNOWN_ENVELOPE_STATE_PRESCRIPTION, // unknown envelope state prescription + UNKNOWN_ENVELOPE_TYPE, // unknown envelope type + UNKNOWN_INITIAL_MASS_FUNCTION, // unknown initial mass function + UNKNOWN_KICK_DIRECTION_DISTRIBUTION, // unknown kick direction distribution + UNKNOWN_KICK_MAGNITUDE_DISTRIBUTION, // unknown kick magnitude distribution + UNKNOWN_LOGFILE, // unknown log file + UNKNOWN_LBV_MASS_LOSS_PRESCRIPTION, // unknown LBV mass loss prescription + UNKNOWN_MALTSEV_MODE, // unknown maltsev mode + UNKNOWN_MT_ACCRETION_EFFICIENCY_PRESCRIPTION, // unknown mass transfer accretion efficiency prescription + UNKNOWN_MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION, // unknown mass transfer angular momentum loss prescription + UNKNOWN_MASS_LOSS_PRESCRIPTION, // unknown mass loss prescription + UNKNOWN_MT_CASE, // unknown mass transfer case + UNKNOWN_MT_REJUVENATION_PRESCRIPTION, // unknown mass transfer rejuvenation prescription + UNKNOWN_MT_THERMALLY_LIMITED_VARIATION, // unknown mass transfer thermally limited variation + UNKNOWN_NEUTRINO_MASS_LOSS_PRESCRIPTION, // unknown neutrino mass loss prescription + UNKNOWN_NS_ACCRETION_IN_CE, // unknown NS accretion in common envelope + UNKNOWN_NS_EOS, // unknown NS equation-of-state + UNKNOWN_OB_MASS_LOSS_PRESCRIPTION, // unknown OB mass loss prescription + UNKNOWN_PPI_PRESCRIPTION, // unknown pulsational pair instability prescription + UNKNOWN_PROGRAM_OPTION, // unknown program option + UNKNOWN_PROPERTY_TYPE, // unknown property type + UNKNOWN_PULSAR_BIRTH_MAGNETIC_FIELD_DISTRIBUTION, // unknown pulsar birth magnetic field distribution + UNKNOWN_PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION, // unknown pulsar birth spin period distribution + UNKNOWN_Q_DISTRIBUTION, // unknown q-distribution + UNKNOWN_QCRIT_PRESCRIPTION, // Unknown QCRIT prescription + UNKNOWN_REMNANT_MASS_PRESCRIPTION, // unknown remnant mass prescriptrion + UNKNOWN_RESPONSE_TO_SPIN_UP, // unknown common prescription for responding to excessive spin-up + UNKNOWN_RSG_MASS_LOSS_PRESCRIPTION, // unknown RSG mass loss prescription + UNKNOWN_SEMI_MAJOR_AXIS_DISTRIBUTION, // unknown sem-major axis distribution + UNKNOWN_SN_ENGINE, // unknown supernova engine + UNKNOWN_SN_EVENT, // unknown supernova event encountered + UNKNOWN_STELLAR_POPULATION, // unknown stellar population + UNKNOWN_STELLAR_PROPERTY, // unknown stellar property + UNKNOWN_STELLAR_TYPE, // unknown stellar type + UNKNOWN_TIDES_PRESCRIPTION, // unknown tides prescription + UNKNOWN_VMS_MASS_LOSS_PRESCRIPTION, // unknown VMS mass loss prescription + UNKNOWN_VROT_PRESCRIPTION, // unknown rorational velocity prescription + UNKNOWN_WR_MASS_LOSS_PRESCRIPTION, // unknown WR mass loss prescription + UNKNOWN_ZETA_PRESCRIPTION, // unknown stellar ZETA prescription + WARNING, // unspecified warning + WHITE_DWARF_TOO_MASSIVE, // a white dwarf exceeds the Chandrasekhar mass limit + + // not alphabetical - here to keep "real" error numbers consecutive + SUGGEST_HELP // suggest using --help +}; + + +// message catalog +// for now we'll just define it here - one day we might want to have it in a +// file and read it in at program start - that way we can be more flexible +// (i.e. change messages without recompiling, internationalise etc.) +// +// unordered_map - key is integer message number (from enum class ERROR above) +// listed alphabetically + +const COMPASUnorderedMap> ERROR_CATALOG = { + { ERROR::ADDED_EXCESS_AM_TO_STARS, { ERROR_SCOPE::ALWAYS, "Attempted to add more angular momentum to stars than was available in the binary" }}, + { ERROR::AMBIGUOUS_REMNANT_MASS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Insufficient information to prescribe remnant mass" }}, + { ERROR::ARGUMENT_RANGE_PARMS_EXPECTED_FP, { ERROR_SCOPE::ALWAYS, "Expected a floating point number for range start and increment for option" }}, + { ERROR::ARGUMENT_RANGE_COUNT_EXPECTED_ULINT, { ERROR_SCOPE::ALWAYS, "Expected an unsigned long integer for range count for option" }}, + { ERROR::ARGUMENT_RANGE_PARMS_EXPECTED_INT, { ERROR_SCOPE::ALWAYS, "Expected an integer for range parameters for option" }}, + { ERROR::ARGUMENT_RANGE_PARMS_EXPECTED_LFP, { ERROR_SCOPE::ALWAYS, "Expected a long double number for range start and increment for option" }}, + { ERROR::ARGUMENT_RANGE_PARMS_EXPECTED_LINT, { ERROR_SCOPE::ALWAYS, "Expected an long integer for range parameters for option" }}, + { ERROR::ARGUMENT_RANGE_PARMS_EXPECTED_ULINT, { ERROR_SCOPE::ALWAYS, "Expected an unsigned long integer for range parameters for option" }}, + { ERROR::ARGUMENT_RANGE_NOT_SUPPORTED, { ERROR_SCOPE::ALWAYS, "Argument range not supported for option" }}, + { ERROR::ARGUMENT_RANGE_NUM_PARMS, { ERROR_SCOPE::ALWAYS, "Argument range requires exactly three parameters" }}, + { ERROR::ARGUMENT_SET_EXPECTED_BOOL, { ERROR_SCOPE::ALWAYS, "All parameters of argument set must be boolean for option" }}, + { ERROR::ARGUMENT_SET_EXPECTED_NUMERIC, { ERROR_SCOPE::ALWAYS, "All parameters of argument set must be numeric for option" }}, + { ERROR::ARGUMENT_SET_NOT_SUPPORTED, { ERROR_SCOPE::ALWAYS, "Argument set not supported for option" }}, + { ERROR::BAD_LOGFILE_RECORD_SPECIFICATIONS, { ERROR_SCOPE::ALWAYS, "Logfile record specifications error" }}, + { ERROR::BINARY_EVOLUTION_STOPPED, { ERROR_SCOPE::ALWAYS, "Evolution of current binary stopped" }}, + { ERROR::BINARY_SIMULATION_STOPPED, { ERROR_SCOPE::ALWAYS, "Binaries simulation stopped" }}, + { ERROR::BOOST_OPTION_CMDLINE, { ERROR_SCOPE::ALWAYS, "Failed to initialise Boost options descriptions for commandline options" }}, + { ERROR::BOOST_OPTION_GRIDLINE, { ERROR_SCOPE::ALWAYS, "Failed to initialise Boost options descriptions for grid line options" }}, + { ERROR::BOOST_OPTION_INTERNAL_ERROR, { ERROR_SCOPE::ALWAYS, "Internal error: Boost vm, option" }}, + { ERROR::DIRECTORY_NOT_EMPTY, { ERROR_SCOPE::ALWAYS, "Directory not empty" }}, + { ERROR::EMPTY_FILE, { ERROR_SCOPE::ALWAYS, "File is empty" }}, + { ERROR::EMPTY_FILENAME, { ERROR_SCOPE::ALWAYS, "Filename is an empty string" }}, + { ERROR::ERROR, { ERROR_SCOPE::ALWAYS, "Error!" }}, + { ERROR::ERROR_PROCESSING_CMDLINE_OPTIONS, { ERROR_SCOPE::ALWAYS, "An error occurred while processing commandline options" }}, + { ERROR::ERROR_PROCESSING_GRIDLINE_OPTIONS, { ERROR_SCOPE::ALWAYS, "An error occurred while processing grid file options" }}, + { ERROR::EXPECTED_3D_VECTOR, { ERROR_SCOPE::ALWAYS, "Expected a vector of size 3" }}, + { ERROR::EXPECTED_ASSIGNMENT_OPERATOR, { ERROR_SCOPE::ALWAYS, "Expected assignment operator: one of { '=', '-=', '+=' }" }}, + { ERROR::EXPECTED_BINARY_PROPERTY, { ERROR_SCOPE::ALWAYS, "Expected binary logfile property: one of { (STAR_1|STAR_2|SUPERNOVA|COMPANION|BINARY)_PROPERTY, PROGRAM_OPTION }" }}, + { ERROR::EXPECTED_COMMA_OR_CLOSE_BRACE, { ERROR_SCOPE::ALWAYS, "Expected a comma ',' or close brace '}'" }}, + { ERROR::EXPECTED_INTEGER, { ERROR_SCOPE::ALWAYS, "Expected an integer" }}, + { ERROR::EXPECTED_LOGFILE_RECORD_NAME, { ERROR_SCOPE::ALWAYS, "Expected logfile record specifier" }}, + { ERROR::EXPECTED_NON_NEGATIVE_INTEGER, { ERROR_SCOPE::ALWAYS, "Expected an integer >= 0" }}, + { ERROR::EXPECTED_OPEN_BRACE, { ERROR_SCOPE::ALWAYS, "Expected open brace '{'" }}, + { ERROR::EXPECTED_POSITIVE_INTEGER, { ERROR_SCOPE::ALWAYS, "Expected an integer > 0" }}, + { ERROR::EXPECTED_PROPERTY_SPECIFIER, { ERROR_SCOPE::ALWAYS, "Expected a property specifier or close brace '}'" }}, + { ERROR::EXPECTED_SN_EVENT, { ERROR_SCOPE::ALWAYS, "Expected a supernova event" }}, + { ERROR::EXPECTED_STELLAR_PROPERTY, { ERROR_SCOPE::ALWAYS, "Expected stellar logfile property: one of { STAR_PROPERTY, PROGRAM_OPTION }" }}, + { ERROR::FILE_DOES_NOT_EXIST, { ERROR_SCOPE::ALWAYS, "File does not exist" }}, + { ERROR::FILE_NOT_CLOSED, { ERROR_SCOPE::ALWAYS, "Error closing file - file not closed" }}, + { ERROR::FILE_OPEN_ERROR, { ERROR_SCOPE::ALWAYS, "Error opening file" }}, + { ERROR::FILE_READ_ERROR, { ERROR_SCOPE::ALWAYS, "Error reading from file - data not read" }}, + { ERROR::FILE_WRITE_ERROR, { ERROR_SCOPE::ALWAYS, "Error writing to file - data not written" }}, + { ERROR::FLOATING_POINT_ERROR, { ERROR_SCOPE::ALWAYS, "Unspecified floating-point error" }}, + { ERROR::FLOATING_POINT_DIVBYZERO, { ERROR_SCOPE::ALWAYS, "Floating-point divide-by-zero" }}, + { ERROR::FLOATING_POINT_INVALID_ARGUMENT, { ERROR_SCOPE::ALWAYS, "Floating-point invalid argument" }}, + { ERROR::FLOATING_POINT_OVERFLOW, { ERROR_SCOPE::ALWAYS, "Floating-point overflow" }}, + { ERROR::FLOATING_POINT_UNDERFLOW, { ERROR_SCOPE::ALWAYS, "Floating-point underflow" }}, + { ERROR::GRID_OPTIONS_ERROR, { ERROR_SCOPE::ALWAYS, "Grid File Options error" }}, + { ERROR::HIGH_TEFF_WINDS, { ERROR_SCOPE::FIRST_IN_OBJECT_ID, "Winds being used at high temperature" }}, + { ERROR::INDEX_OUT_OF_RANGE, { ERROR_SCOPE::ALWAYS, "Index out of range" }}, + { ERROR::INVALID_DATA_TYPE, { ERROR_SCOPE::ALWAYS, "Invalid data type" }}, + { ERROR::INVALID_INITIAL_ATTRIBUTES, { ERROR_SCOPE::ALWAYS, "Initial attributes are not valid - evolution not possible" }}, + { ERROR::INVALID_MASS_TRANSFER_DONOR, { ERROR_SCOPE::ALWAYS, "Mass transfer from NS, BH, or Massless Remnant" }}, + { ERROR::INVALID_TYPE_EDDINGTON_RATE, { ERROR_SCOPE::ALWAYS, "Invalid stellar type for Eddington critical rate calculation" }}, + { ERROR::INVALID_TYPE_MT_MASS_RATIO, { ERROR_SCOPE::ALWAYS, "Invalid stellar type for mass ratio calculation" }}, + { ERROR::INVALID_TYPE_MT_THERMAL_TIMESCALE, { ERROR_SCOPE::ALWAYS, "Invalid stellar type for thermal timescale calculation" }}, + { ERROR::INVALID_TYPE_ZETA_CALCULATION, { ERROR_SCOPE::ALWAYS, "Invalid stellar type for Zeta calculation" }}, + { ERROR::INVALID_VALUE_FOR_BOOLEAN_OPTION, { ERROR_SCOPE::ALWAYS, "Invalid value specified for BOOLEAN option" }}, + { ERROR::INVALID_VALUE_IN_FILE, { ERROR_SCOPE::ALWAYS, "Invalid value in file" }}, + { ERROR::LAMBDA_NOT_POSITIVE, { ERROR_SCOPE::FIRST_IN_OBJECT_ID, "Lambda <= 0.0" }}, + { ERROR::LOW_GAMMA, { ERROR_SCOPE::ALWAYS, "Very massive prescription being extrapolated to low gamma (<0.5)" }}, + { ERROR::LOW_TEFF_WINDS, { ERROR_SCOPE::ALWAYS, "Winds being used at low temperature" }}, + { ERROR::MAXIMUM_MASS_LOST, { ERROR_SCOPE::FIRST_IN_OBJECT_ID, "Maximum mass lost during mass loss calculations" }}, + { ERROR::MISSING_VALUE, { ERROR_SCOPE::ALWAYS, "Missing value" }}, + { ERROR::MISSING_RIGHT_BRACKET, { ERROR_SCOPE::ALWAYS, "Missing ']'" }}, + { ERROR::NO_CONVERGENCE, { ERROR_SCOPE::ALWAYS, "No convergence" }}, + { ERROR::NO_LAMBDA_DEWI, { ERROR_SCOPE::ALWAYS, "Dewi lambda calculation not supported for stellar type" }}, + { ERROR::NO_LAMBDA_NANJING, { ERROR_SCOPE::ALWAYS, "Nanjing lambda calculation not supported for stellar type" }}, + { ERROR::NO_REAL_ROOTS, { ERROR_SCOPE::ALWAYS, "No real roots" }}, + { ERROR::NO_TIMESTEPS_READ, { ERROR_SCOPE::ALWAYS, "No user timesteps read" }}, + { ERROR::NONE, { ERROR_SCOPE::NEVER, "No error" }}, + { ERROR::NOT_INITIALISED, { ERROR_SCOPE::ALWAYS, "Object not initialised" }}, + { ERROR::OPTION_NOT_SUPPORTED_IN_GRID_FILE, { ERROR_SCOPE::ALWAYS, "Option not supported in grid file" }}, + { ERROR::OUT_OF_BOUNDS, { ERROR_SCOPE::ALWAYS, "Value out of bounds" }}, + { ERROR::PROGRAM_OPTIONS_ERROR, { ERROR_SCOPE::ALWAYS, "Commandline Options error" }}, + { ERROR::RADIUS_NOT_POSITIVE, { ERROR_SCOPE::ALWAYS, "Radius <= 0.0" }}, + { ERROR::REVERT_FAILED, { ERROR_SCOPE::ALWAYS, "Revert to previous state failed" }}, + { ERROR::ROOT_FINDER_FAILED, { ERROR_SCOPE::ALWAYS, "Exception encountered in root finder" }}, + { ERROR::STELLAR_EVOLUTION_STOPPED, { ERROR_SCOPE::ALWAYS, "Evolution of current star stopped" }}, + { ERROR::STELLAR_SIMULATION_STOPPED, { ERROR_SCOPE::ALWAYS, "Stellar simulation stopped" }}, + { ERROR::STEPS_UP, { ERROR_SCOPE::ALWAYS, "Allowed evolution timesteps exceeded" }}, + { ERROR::SUGGEST_HELP, { ERROR_SCOPE::ALWAYS, "Use option '-h' (or '--help') to see (descriptions of) available options" }}, + { ERROR::SWITCH_NOT_TAKEN, { ERROR_SCOPE::ALWAYS, "Switch to new stellar type not performed" }}, + { ERROR::TIMESTEP_BELOW_MINIMUM, { ERROR_SCOPE::ALWAYS, "Timestep below minimum - timestep taken" }}, + { ERROR::TIMESTEPS_EXHAUSTED, { ERROR_SCOPE::ALWAYS, "Provided timesteps exhausted, but evolution not complete" }}, + { ERROR::TIMESTEPS_NOT_CONSUMED, { ERROR_SCOPE::ALWAYS, "Evolution complete, but provided timesteps not consumed" }}, + { ERROR::TIMES_UP, { ERROR_SCOPE::ALWAYS, "Allowed evolution time exceeded" }}, + { ERROR::TOO_MANY_MASS0_ITERATIONS, { ERROR_SCOPE::ALWAYS, "Reached maximum number of iterations when looking for effective initial mass Mass_0 to match desired stellar core of HG star following case A mass transfer" }}, + { ERROR::TOO_MANY_MASS0_TRIES, { ERROR_SCOPE::ALWAYS, "Reached maximum number of tries when looking for effective initial mass Mass_0 to match desired stellar core of HG star following case A mass transfer" }}, + { ERROR::TOO_MANY_OMEGA_ITERATIONS, { ERROR_SCOPE::ALWAYS, "Reached maximum number of iterations when looking for omega when circularising and synchronising for tides" }}, + { ERROR::TOO_MANY_OMEGA_TRIES, { ERROR_SCOPE::ALWAYS, "Reached maximum number of tries when looking for omega when circularising and synchronising for tides" }}, + { ERROR::TOO_MANY_PULSAR_SPIN_ITERATIONS, { ERROR_SCOPE::ALWAYS, "Reached maximum number of iterations calculating the pulsar birth spin period" }}, + { ERROR::TOO_MANY_RETRIES, { ERROR_SCOPE::ALWAYS, "Too many retries" }}, + { ERROR::TOO_MANY_RLOF_ITERATIONS, { ERROR_SCOPE::ALWAYS, "Reached maximum number of iterations when fitting star inside Roche Lobe in RLOF" }}, + { ERROR::TOO_MANY_RLOF_TRIES, { ERROR_SCOPE::ALWAYS, "Reached maximum number of tries when fitting star inside Roche Lobe in RLOF" }}, + { ERROR::TOO_MANY_RV_ITERATIONS, { ERROR_SCOPE::ALWAYS, "Reached maximum number of tries when inverting the CDF of rotational velocitiesF" }}, + { ERROR::TOO_MANY_RV_TRIES, { ERROR_SCOPE::ALWAYS, "Reached maximum number of tries when inverting the CDF of rotational velocities" }}, + { ERROR::TOO_MANY_TIMESTEPS_IN_TIMESTEPS_FILE, { ERROR_SCOPE::ALWAYS, "Number of timesteps in timestpes file exceeds maximum timesteps" }}, + { ERROR::UNABLE_TO_CREATE_DIRECTORY, { ERROR_SCOPE::ALWAYS, "Unable to create directory" }}, + { ERROR::UNABLE_TO_REMOVE_DIRECTORY, { ERROR_SCOPE::ALWAYS, "Unable to remove directory" }}, + { ERROR::UNEXPECTED_ACCRETION_REGIME, { ERROR_SCOPE::ALWAYS, "Unexpected accretion regime" }}, + { ERROR::UNEXPECTED_BINARY_PROPERTY, { ERROR_SCOPE::ALWAYS, "Unexpected binary property" }}, + { ERROR::UNEXPECTED_BINARY_PROPERTY_TYPE, { ERROR_SCOPE::ALWAYS, "Unexpected binary property type" }}, + { ERROR::UNEXPECTED_END_OF_FILE, { ERROR_SCOPE::ALWAYS, "Unexpected end of file" }}, + { ERROR::UNEXPECTED_LOG_FILE_TYPE, { ERROR_SCOPE::ALWAYS, "Unexpected log file type" }}, + { ERROR::UNEXPECTED_PROGRAM_OPTION, { ERROR_SCOPE::ALWAYS, "Unexpected program option" }}, + { ERROR::UNEXPECTED_PROPERTY, { ERROR_SCOPE::ALWAYS, "Unexpected property" }}, + { ERROR::UNEXPECTED_PROPERTY_TYPE, { ERROR_SCOPE::ALWAYS, "Unexpected property type" }}, + { ERROR::UNEXPECTED_ROOT_FINDER_FAILURE, { ERROR_SCOPE::ALWAYS, "Unexpected root finder failure" }}, + { ERROR::UNEXPECTED_SN_EVENT, { ERROR_SCOPE::ALWAYS, "Unexpected supernova event in this context" }}, + { ERROR::UNEXPECTED_STELLAR_PROPERTY, { ERROR_SCOPE::ALWAYS, "Unexpected stellar property" }}, + { ERROR::UNEXPECTED_STELLAR_PROPERTY_TYPE, { ERROR_SCOPE::ALWAYS, "Unexpected stellar property type" }}, + { ERROR::UNEXPECTED_STELLAR_TYPE, { ERROR_SCOPE::ALWAYS, "Unexpected stellar type" }}, + { ERROR::UNHANDLED_EXCEPTION, { ERROR_SCOPE::ALWAYS, "Unhandled exception" }}, + { ERROR::UNKNOWN_A_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown semi-major-axis distribution" }}, + { ERROR::UNKNOWN_ACCRETION_REGIME, { ERROR_SCOPE::ALWAYS, "Unknown accretion regime" }}, + { ERROR::UNKNOWN_BH_KICK_MODE, { ERROR_SCOPE::ALWAYS, "Unknown black hole kicks mode" }}, + { ERROR::UNKNOWN_BINARY_PROPERTY, { ERROR_SCOPE::ALWAYS, "Unknown binary property" }}, + { ERROR::UNKNOWN_CASE_BB_STABILITY_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown case BB/BC mass transfer stability prescription" }}, + { ERROR::UNKNOWN_CE_ACCRETION_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown common envelope accretion prescription" }}, + { ERROR::UNKNOWN_CE_FORMALISM, { ERROR_SCOPE::ALWAYS, "Unknown common envelope formalism" }}, + { ERROR::UNKNOWN_CE_LAMBDA_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown common envelope lambda prescription" }}, + { ERROR::UNKNOWN_DATA_TYPE, { ERROR_SCOPE::ALWAYS, "Unknown data type" }}, + { ERROR::UNKNOWN_ENVELOPE_STATE_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown envelope state prescription" }}, + { ERROR::UNKNOWN_ENVELOPE_TYPE, { ERROR_SCOPE::ALWAYS, "Unknown envelope type" }}, + { ERROR::UNKNOWN_INITIAL_MASS_FUNCTION, { ERROR_SCOPE::ALWAYS, "Unknown initial mass function (IMF)" }}, + { ERROR::UNKNOWN_KICK_DIRECTION_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown kick direction distribution" }}, + { ERROR::UNKNOWN_KICK_MAGNITUDE_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown kick magnitude distribution" }}, + { ERROR::UNKNOWN_LBV_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown LBV mass loss prescription" }}, + { ERROR::UNKNOWN_LOGFILE, { ERROR_SCOPE::ALWAYS, "Unknown log file" }}, + { ERROR::UNKNOWN_MALTSEV_MODE, { ERROR_SCOPE::ALWAYS, "Unknown Maltsev remnant mass mode" }}, + { ERROR::UNKNOWN_MT_CASE, { ERROR_SCOPE::ALWAYS, "Unknown mass transfer case" }}, + { ERROR::UNKNOWN_MT_ACCRETION_EFFICIENCY_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown mass transfer accretion efficiency prescription" }}, + { ERROR::UNKNOWN_MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown mass transfer angular momentum loss prescription" }}, + { ERROR::UNKNOWN_MT_REJUVENATION_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown mass transfer rejuvenation prescription" }}, + { ERROR::UNKNOWN_MT_THERMALLY_LIMITED_VARIATION, { ERROR_SCOPE::ALWAYS, "Unknown mass transfer thermally limited variation" }}, + { ERROR::UNKNOWN_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown mass loss prescription" }}, + { ERROR::UNKNOWN_NEUTRINO_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown neutrino mass loss prescription" }}, + { ERROR::UNKNOWN_NS_ACCRETION_IN_CE, { ERROR_SCOPE::ALWAYS, "Unknown NS accretion in common envelope" }}, + { ERROR::UNKNOWN_NS_EOS, { ERROR_SCOPE::ALWAYS, "Unknown NS equation-of-state" }}, + { ERROR::UNKNOWN_OB_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown OB mass loss prescription" }}, + { ERROR::UNKNOWN_PPI_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown pulsational pair instability prescription" }}, + { ERROR::UNKNOWN_PROGRAM_OPTION, { ERROR_SCOPE::ALWAYS, "Unknown program option" }}, + { ERROR::UNKNOWN_PROPERTY_TYPE, { ERROR_SCOPE::ALWAYS, "Unknown property type" }}, + { ERROR::UNKNOWN_PULSAR_BIRTH_MAGNETIC_FIELD_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown pulsar birth magnetic field distribution" }}, + { ERROR::UNKNOWN_PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown pulsar birth spin period distribution" }}, + { ERROR::UNKNOWN_Q_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown q-distribution" }}, + { ERROR::UNKNOWN_QCRIT_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown QCRIT prescription" }}, + { ERROR::UNKNOWN_REMNANT_MASS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown remnant mass prescription" }}, + { ERROR::UNKNOWN_RESPONSE_TO_SPIN_UP, { ERROR_SCOPE::ALWAYS, "Unknown response-to-spin-up prescription" }}, + { ERROR::UNKNOWN_RSG_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown RSG mass loss prescription" }}, + { ERROR::UNKNOWN_SEMI_MAJOR_AXIS_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unknown semi-major axis distribution" }}, + { ERROR::UNKNOWN_SN_ENGINE, { ERROR_SCOPE::ALWAYS, "Unknown supernova engine" }}, + { ERROR::UNKNOWN_SN_EVENT, { ERROR_SCOPE::ALWAYS, "Unknown supernova event" }}, + { ERROR::UNKNOWN_STELLAR_POPULATION, { ERROR_SCOPE::ALWAYS, "Unknown stellar population" }}, + { ERROR::UNKNOWN_STELLAR_PROPERTY, { ERROR_SCOPE::ALWAYS, "Unknown stellar property" }}, + { ERROR::UNKNOWN_STELLAR_TYPE, { ERROR_SCOPE::ALWAYS, "Unknown stellar type" }}, + { ERROR::UNKNOWN_TIDES_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown tides prescription" }}, + { ERROR::UNKNOWN_VMS_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown VMS mass loss prescription" }}, + { ERROR::UNKNOWN_VROT_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown rotational velocity prescription" }}, + { ERROR::UNKNOWN_ZETA_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown stellar ZETA prescription" }}, + { ERROR::WARNING, { ERROR_SCOPE::ALWAYS, "Warning!" }}, + { ERROR::WHITE_DWARF_TOO_MASSIVE, { ERROR_SCOPE::ALWAYS, "This white dwarf exceeds the Chandrasekhar mass limit" }}, + { ERROR::UNKNOWN_WR_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown WR mass loss prescription" }} +}; + + +#endif // __ErrorCatalog_h__ diff --git a/src/LogTypedefs.h b/src/LogTypedefs.h index adad0d82c..26e5f8d4b 100644 --- a/src/LogTypedefs.h +++ b/src/LogTypedefs.h @@ -1,2732 +1,2732 @@ -#ifndef __LogTypedefs_h__ -#define __LogTypedefs_h__ - - -// This is where developer-defined types that pertain directly to the COMPAS looging functionality -// (including the definitions of the default record composition for the various log files) are -// defined. Non-logging tyedefs are listed in typedefs.h - - -#include "constants.h" - - -// logfile file types -enum class LOGFILETYPE: int { HDF5, CSV, TSV, TXT }; // need this declared here so can declare the constant... -const COMPASUnorderedMap LOGFILETYPELabel = { // file types - { LOGFILETYPE::HDF5, "HDF5" }, - { LOGFILETYPE::CSV, "CSV" }, - { LOGFILETYPE::TSV, "TSV" }, - { LOGFILETYPE::TXT, "TXT" } -}; -const COMPASUnorderedMap LOGFILETYPEFileExt = { // file extensions - { LOGFILETYPE::HDF5, "h5" }, - { LOGFILETYPE::CSV, "csv" }, - { LOGFILETYPE::TSV, "tsv" }, - { LOGFILETYPE::TXT, "txt" } -}; - - -// enum class TYPENAME -// Symbolic names for variable typenames (for printing) -enum class TYPENAME: int { - NONE, - BOOL, - SHORTINT, - INT, - LONGINT, - LONGLONGINT, - USHORTINT, - UINT, - ULONGINT, - ULONGLONGINT, - FLOAT, - DOUBLE, - DOUBLE_VECTOR, - LONGDOUBLE, - STRING, - OBJECT_ID, - ERROR, - STELLAR_TYPE, - MT_CASE, - MT_TRACKING, - MT_TIMESCALE, - SN_EVENT, - SN_STATE, - STRING_VECTOR, - EVOLUTION_STATUS -}; -// labels (long and short) for typenames -// unordered_map - key is integer typename (from enum class TYPENAME above) -const COMPASUnorderedMap TYPENAME_LABEL = { - { TYPENAME::NONE, { "NONE", "NONE" }}, - { TYPENAME::BOOL, { "BOOL", "BOOL" }}, - { TYPENAME::SHORTINT, { "SHORT INT", "INT" }}, - { TYPENAME::INT, { "INT", "INT" }}, - { TYPENAME::LONGINT, { "LONG_INT", "INT" }}, - { TYPENAME::LONGLONGINT, { "LONG_LONG_INT", "INT" }}, - { TYPENAME::USHORTINT, { "UNSIGNED_SHORT_INT", "INT" }}, - { TYPENAME::UINT, { "UNSIGNED_INT", "INT" }}, - { TYPENAME::ULONGINT, { "UNSIGNED_LONG_INT", "INT" }}, - { TYPENAME::ULONGLONGINT, { "UNSIGNED_LONG_LONG_INT", "INT" }}, - { TYPENAME::FLOAT, { "FLOAT", "FLOAT" }}, - { TYPENAME::DOUBLE, { "DOUBLE", "FLOAT" }}, - { TYPENAME::LONGDOUBLE, { "LONG_DOUBLE", "FLOAT" }}, - { TYPENAME::STRING, { "STRING", "STRING" }}, - { TYPENAME::OBJECT_ID, { "OBJECT_ID", "INT" }}, - { TYPENAME::ERROR, { "ERROR", "INT" }}, - { TYPENAME::STELLAR_TYPE, { "STELLAR_TYPE", "INT" }}, - { TYPENAME::MT_CASE, { "MT_CASE", "INT" }}, - { TYPENAME::MT_TRACKING, { "MT_TRACKING", "INT" }}, - { TYPENAME::MT_TIMESCALE, { "MT_TIMESCALE", "INT" }}, - { TYPENAME::SN_EVENT, { "SN_EVENT", "INT" }}, - { TYPENAME::SN_STATE, { "SN_STATE", "INT" }}, - { TYPENAME::STRING_VECTOR, { "STRING_VECTOR", "VECTOR" }}, - { TYPENAME::EVOLUTION_STATUS, { "EVOLUTION_STATUS", "INT" }} -}; - - -// (convenience) initializer list for INT data types -const std::initializer_list INT_TYPES = { - TYPENAME::SHORTINT, - TYPENAME::INT, - TYPENAME::LONGINT, - TYPENAME::LONGLONGINT, - TYPENAME::USHORTINT, - TYPENAME::UINT, - TYPENAME::ULONGINT, - TYPENAME::ULONGLONGINT -}; - -// (convenience) initializer list for FLOAT data types -const std::initializer_list FLOAT_TYPES = { - TYPENAME::FLOAT, - TYPENAME::DOUBLE, - TYPENAME::LONGDOUBLE -}; - - -// enum class STRING_QUALIFIER -// Qualifier for typename STRING: FIXED_LENGTH or VARIABLE_LENGTH (used for printing to HDF5 files) -enum class STRING_QUALIFIER: int { NONE, FIXED_LENGTH, VARIABLE_LENGTH }; - - -// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -// !!! !!! -// !!! Do not change the following enum classes and maps unless you are adding !!! -// !!! or deleting a new property (or changing the name of an existing property !!! -// !!! for some reason) !!! -// !!! !!! -// !!! The STAR_PROPERTIES #define below defines the STELLAR variables allowed !!! -// !!! for logfile record definition - if a property is not on the list it !!! -// !!! cannot be selected for inclusion in a logfile via the !!! -// !!! --logfile-definitions option. !!! -// !!! !!! -// !!! The enum classes STAR_PROPERTY, BINARY_PROPERTY, and PROGRAM_OPTION !!! -// !!! defined below defines the STELLAR and BINARY properties, and the !!! -// !!! PROGRAM_OPTIONs allowed for logfile record definition - if a property is !!! -// !!! not on those lists it cannot be selected for inclusion in a logfile via !!! -// !!! --logfile-definitions option. !!! -// !!! !!! -// !!! *NOTE* !!! -// !!! The following enum classes and maps are not where header strings should !!! -// !!! be changed! These classes and maps are a lookup facility for the logfile !!! -// !!! definitions file parser. !!! -// !!! !!! -// !!! Header strings are in the following maps, and should be changed there: !!! -// !!! !!! -// !!! std::map ANY_STAR_PROPERTY_DETAIL !!! -// !!! std::map BINARY_PROPERTY_DETAIL !!! -// !!! !!! -// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -// The #define below defines the STELLAR variables allowed for logfile record definition -// Add new property names here to make the property available for specification in a logfile -// #define is used so that the same list of variables can be used for the various stellar property enum classes (see below) -#define STAR_PROPERTIES \ - NONE, \ - AGE, \ - ANGULAR_MOMENTUM, \ - BINDING_ENERGY_AT_COMMON_ENVELOPE, \ - BINDING_ENERGY_CONVECTIVE_ENVELOPE, \ - BINDING_ENERGY_FIXED, \ - BINDING_ENERGY_NANJING, \ - BINDING_ENERGY_PRE_COMMON_ENVELOPE, \ - BINDING_ENERGY_LOVERIDGE, \ - BINDING_ENERGY_LOVERIDGE_WINDS, \ - BINDING_ENERGY_KRUCKOW, \ - CHEMICALLY_HOMOGENEOUS_MAIN_SEQUENCE, \ - CO_CORE_MASS, \ - CO_CORE_MASS_AT_COMMON_ENVELOPE, \ - CO_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, \ - CONVECTIVE_ENV_MASS, \ - CORE_MASS, \ - CORE_MASS_AT_COMMON_ENVELOPE, \ - CORE_MASS_AT_COMPACT_OBJECT_FORMATION, \ - CORE_RADIUS_AT_COMPACT_OBJECT_FORMATION, \ - DRAWN_KICK_MAGNITUDE, \ - DOMINANT_MASS_LOSS_RATE, \ - DT, \ - DYNAMICAL_TIMESCALE, \ - DYNAMICAL_TIMESCALE_POST_COMMON_ENVELOPE, \ - DYNAMICAL_TIMESCALE_PRE_COMMON_ENVELOPE, \ - ECCENTRIC_ANOMALY, \ - ENV_MASS, \ - ERROR, \ - EVOL_STATUS, \ - EXPERIENCED_AIC, \ - EXPERIENCED_CCSN, \ - EXPERIENCED_HeSD, \ - EXPERIENCED_ECSN, \ - EXPERIENCED_PISN, \ - EXPERIENCED_PPISN, \ - EXPERIENCED_RLOF, \ - EXPERIENCED_SNIA, \ - EXPERIENCED_SN_TYPE, \ - EXPERIENCED_USSN, \ - FALLBACK_FRACTION, \ - HE_CORE_MASS, \ - HE_CORE_MASS_AT_COMMON_ENVELOPE, \ - HE_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, \ - HELIUM_ABUNDANCE_CORE, \ - HELIUM_ABUNDANCE_SURFACE, \ - HYDROGEN_ABUNDANCE_CORE, \ - HYDROGEN_ABUNDANCE_SURFACE, \ - ID, \ - INITIAL_HELIUM_ABUNDANCE, \ - INITIAL_HYDROGEN_ABUNDANCE, \ - INITIAL_STELLAR_TYPE, \ - INITIAL_STELLAR_TYPE_NAME, \ - IS_AIC, \ - IS_CCSN, \ - IS_HeSD, \ - IS_ECSN, \ - IS_HYDROGEN_POOR, \ - IS_PISN, \ - IS_PPISN, \ - IS_RLOF, \ - IS_SNIA, \ - IS_USSN, \ - KICK_MAGNITUDE, \ - LAMBDA_AT_COMMON_ENVELOPE, \ - LAMBDA_CONVECTIVE_ENVELOPE, \ - LAMBDA_DEWI, \ - LAMBDA_FIXED, \ - LAMBDA_KRUCKOW, \ - LAMBDA_KRUCKOW_BOTTOM, \ - LAMBDA_KRUCKOW_MIDDLE, \ - LAMBDA_KRUCKOW_TOP, \ - LAMBDA_LOVERIDGE, \ - LAMBDA_LOVERIDGE_WINDS, \ - LAMBDA_NANJING, \ - LBV_PHASE_FLAG, \ - LUMINOSITY, \ - LUMINOSITY_POST_COMMON_ENVELOPE, \ - LUMINOSITY_PRE_COMMON_ENVELOPE, \ - MASS, \ - MASS_0, \ - MASS_LOSS_DIFF, \ - MASS_TRANSFER_DIFF, \ - MASS_TRANSFER_DONOR_HISTORY, \ - MDOT, \ - MEAN_ANOMALY, \ - METALLICITY, \ - MOMENT_OF_INERTIA, \ - MZAMS, \ - OMEGA, \ - OMEGA_BREAK, \ - OMEGA_ZAMS, \ - ORBITAL_ENERGY_POST_SUPERNOVA, \ - ORBITAL_ENERGY_PRE_SUPERNOVA, \ - PULSAR_MAGNETIC_FIELD, \ - PULSAR_SPIN_DOWN_RATE, \ - PULSAR_BIRTH_PERIOD, \ - PULSAR_BIRTH_SPIN_DOWN_RATE, \ - PULSAR_SPIN_FREQUENCY, \ - PULSAR_SPIN_PERIOD, \ - RADIAL_EXPANSION_TIMESCALE, \ - RADIAL_EXPANSION_TIMESCALE_POST_COMMON_ENVELOPE, \ - RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE, \ - RADIUS, \ - RANDOM_SEED, \ - RECYCLED_NEUTRON_STAR, \ - ROCKET_KICK_MAGNITUDE, \ - ROCKET_KICK_PHI, \ - ROCKET_KICK_THETA, \ - RZAMS, \ - SN_TYPE, \ - SPEED, \ - STELLAR_TYPE, \ - STELLAR_TYPE_NAME, \ - STELLAR_TYPE_PREV, \ - STELLAR_TYPE_PREV_NAME, \ - SUPERNOVA_KICK_MAGNITUDE_RANDOM_NUMBER, \ - SUPERNOVA_PHI, \ - SUPERNOVA_THETA, \ - TEMPERATURE, \ - TEMPERATURE_POST_COMMON_ENVELOPE, \ - TEMPERATURE_PRE_COMMON_ENVELOPE, \ - THERMAL_TIMESCALE, \ - THERMAL_TIMESCALE_POST_COMMON_ENVELOPE, \ - THERMAL_TIMESCALE_PRE_COMMON_ENVELOPE, \ - TIME, \ - TIMESCALE_MS, \ - TOTAL_MASS_AT_COMPACT_OBJECT_FORMATION, \ - TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, \ - TRUE_ANOMALY, \ - TZAMS, \ - VELOCITY_X, \ - VELOCITY_Y, \ - VELOCITY_Z, \ - ZETA_HURLEY, \ - ZETA_HURLEY_HE, \ - ZETA_SOBERMAN, \ - ZETA_SOBERMAN_HE - - -// enum class STAR_PROPERTY -// Symbolic names for variables of an individual star that can be selected for printing -// STAR_PROPERTY refers to an individual star of type BaseStar for SSE (differences are where the data comes from, and the column header) -enum class STAR_PROPERTY: int { STAR_PROPERTIES }; - -// map STAR PROPERTY to string identifying the property -// for lookup by the printing functions -// this map serves as the lookup for: STAR_PROPERTY, STAR_1_PROPERTY, STAR_2_PROPERTY, SUPERNOVA_PROPERTY, COMPANION_PROPERTY and ANY_STAR_PROPERTY -// -// Properties only need to be here if they are required to be available for printing in the logfiles. -// All keys present here should also be in the STAR_PROPERTIES #define and ANY_STAR_PROPERTY_DETAIL -const COMPASUnorderedMap STAR_PROPERTY_LABEL = { - { STAR_PROPERTY::NONE, "NONE" }, - { STAR_PROPERTY::AGE, "AGE" }, - { STAR_PROPERTY::ANGULAR_MOMENTUM, "ANGULAR_MOMENTUM" }, - { STAR_PROPERTY::BINDING_ENERGY_AT_COMMON_ENVELOPE, "BINDING_ENERGY_AT_COMMON_ENVELOPE" }, - { STAR_PROPERTY::BINDING_ENERGY_CONVECTIVE_ENVELOPE, "BINDING_ENERGY_CONVECTIVE_ENVELOPE" }, - { STAR_PROPERTY::BINDING_ENERGY_FIXED, "BINDING_ENERGY_FIXED" }, - { STAR_PROPERTY::BINDING_ENERGY_NANJING, "BINDING_ENERGY_NANJING" }, - { STAR_PROPERTY::BINDING_ENERGY_PRE_COMMON_ENVELOPE, "BINDING_ENERGY_PRE_COMMON_ENVELOPE" }, - { STAR_PROPERTY::BINDING_ENERGY_LOVERIDGE, "BINDING_ENERGY_LOVERIDGE" }, - { STAR_PROPERTY::BINDING_ENERGY_LOVERIDGE_WINDS, "BINDING_ENERGY_LOVERIDGE_WINDS" }, - { STAR_PROPERTY::BINDING_ENERGY_KRUCKOW, "BINDING_ENERGY_KRUCKOW" }, - { STAR_PROPERTY::CHEMICALLY_HOMOGENEOUS_MAIN_SEQUENCE, "CHEMICALLY_HOMOGENEOUS_MAIN_SEQUENCE" }, - { STAR_PROPERTY::CO_CORE_MASS, "CO_CORE_MASS" }, - { STAR_PROPERTY::CO_CORE_MASS_AT_COMMON_ENVELOPE, "CO_CORE_MASS_AT_COMMON_ENVELOPE" }, - { STAR_PROPERTY::CO_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, "CO_CORE_MASS_AT_COMPACT_OBJECT_FORMATION" }, - { STAR_PROPERTY::CONVECTIVE_ENV_MASS, "CONVECTIVE_ENV_MASS" }, - { STAR_PROPERTY::CORE_MASS, "CORE_MASS" }, - { STAR_PROPERTY::CORE_MASS_AT_COMMON_ENVELOPE, "CORE_MASS_AT_COMMON_ENVELOPE" }, - { STAR_PROPERTY::CORE_MASS_AT_COMPACT_OBJECT_FORMATION, "CORE_MASS_AT_COMPACT_OBJECT_FORMATION" }, - { STAR_PROPERTY::CORE_RADIUS_AT_COMPACT_OBJECT_FORMATION, "CORE_RADIUS_AT_COMPACT_OBJECT_FORMATION" }, - { STAR_PROPERTY::DRAWN_KICK_MAGNITUDE, "DRAWN_KICK_MAGNITUDE" }, - { STAR_PROPERTY::DOMINANT_MASS_LOSS_RATE, "DOMINANT_MASS_LOSS_RATE"}, - { STAR_PROPERTY::DT, "DT" }, - { STAR_PROPERTY::DYNAMICAL_TIMESCALE, "DYNAMICAL_TIMESCALE" }, - { STAR_PROPERTY::DYNAMICAL_TIMESCALE_POST_COMMON_ENVELOPE, "DYNAMICAL_TIMESCALE_POST_COMMON_ENVELOPE" }, - { STAR_PROPERTY::DYNAMICAL_TIMESCALE_PRE_COMMON_ENVELOPE, "DYNAMICAL_TIMESCALE_PRE_COMMON_ENVELOPE" }, - { STAR_PROPERTY::ECCENTRIC_ANOMALY, "ECCENTRIC_ANOMALY" }, - { STAR_PROPERTY::ENV_MASS, "ENV_MASS" }, - { STAR_PROPERTY::ERROR, "ERROR" }, - { STAR_PROPERTY::EVOL_STATUS, "EVOL_STATUS" }, - { STAR_PROPERTY::EXPERIENCED_AIC, "EXPERIENCED_AIC" }, - { STAR_PROPERTY::EXPERIENCED_CCSN, "EXPERIENCED_CCSN" }, - { STAR_PROPERTY::EXPERIENCED_HeSD, "EXPERIENCED_HeSD" }, - { STAR_PROPERTY::EXPERIENCED_ECSN, "EXPERIENCED_ECSN" }, - { STAR_PROPERTY::EXPERIENCED_PISN, "EXPERIENCED_PISN" }, - { STAR_PROPERTY::EXPERIENCED_PPISN, "EXPERIENCED_PPISN" }, - { STAR_PROPERTY::EXPERIENCED_RLOF, "EXPERIENCED_RLOF" }, - { STAR_PROPERTY::EXPERIENCED_SNIA, "EXPERIENCED_SNIA" }, - { STAR_PROPERTY::EXPERIENCED_SN_TYPE, "EXPERIENCED_SN_TYPE" }, - { STAR_PROPERTY::EXPERIENCED_USSN, "EXPERIENCED_USSN" }, - { STAR_PROPERTY::FALLBACK_FRACTION, "FALLBACK_FRACTION" }, - { STAR_PROPERTY::HE_CORE_MASS, "HE_CORE_MASS" }, - { STAR_PROPERTY::HE_CORE_MASS_AT_COMMON_ENVELOPE, "HE_CORE_MASS_AT_COMMON_ENVELOPE" }, - { STAR_PROPERTY::HE_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, "HE_CORE_MASS_AT_COMPACT_OBJECT_FORMATION" }, - { STAR_PROPERTY::HELIUM_ABUNDANCE_CORE, "HELIUM_ABUNDANCE_CORE" }, - { STAR_PROPERTY::HELIUM_ABUNDANCE_SURFACE, "HELIUM_ABUNDANCE_SURFACE" }, - { STAR_PROPERTY::HYDROGEN_ABUNDANCE_CORE, "HYDROGEN_ABUNDANCE_CORE" }, - { STAR_PROPERTY::HYDROGEN_ABUNDANCE_SURFACE, "HYDROGEN_ABUNDANCE_SURFACE" }, - { STAR_PROPERTY::ID, "ID" }, - { STAR_PROPERTY::INITIAL_HELIUM_ABUNDANCE, "INITIAL_HELIUM_ABUNDANCE" }, - { STAR_PROPERTY::INITIAL_HYDROGEN_ABUNDANCE, "INITIAL_HYDROGEN_ABUNDANCE" }, - { STAR_PROPERTY::INITIAL_STELLAR_TYPE, "INITIAL_STELLAR_TYPE" }, - { STAR_PROPERTY::INITIAL_STELLAR_TYPE, "INITIAL_STELLAR_TYPE" }, - { STAR_PROPERTY::INITIAL_STELLAR_TYPE_NAME, "INITIAL_STELLAR_TYPE_NAME" }, - { STAR_PROPERTY::IS_AIC, "IS_AIC" }, - { STAR_PROPERTY::IS_CCSN, "IS_CCSN" }, - { STAR_PROPERTY::IS_HeSD, "IS_HeSD" }, - { STAR_PROPERTY::IS_ECSN, "IS_ECSN" }, - { STAR_PROPERTY::IS_HYDROGEN_POOR, "IS_HYDROGEN_POOR" }, - { STAR_PROPERTY::IS_PISN, "IS_PISN" }, - { STAR_PROPERTY::IS_PPISN, "IS_PPISN" }, - { STAR_PROPERTY::IS_RLOF, "IS_RLOF" }, - { STAR_PROPERTY::IS_SNIA, "IS_SNIA" }, - { STAR_PROPERTY::IS_USSN, "IS_USSN" }, - { STAR_PROPERTY::KICK_MAGNITUDE, "KICK_MAGNITUDE" }, - { STAR_PROPERTY::LAMBDA_AT_COMMON_ENVELOPE, "LAMBDA_AT_COMMON_ENVELOPE" }, - { STAR_PROPERTY::LAMBDA_CONVECTIVE_ENVELOPE, "LAMBDA_CONVECTIVE_ENVELOPE" }, - { STAR_PROPERTY::LAMBDA_DEWI, "LAMBDA_DEWI" }, - { STAR_PROPERTY::LAMBDA_FIXED, "LAMBDA_FIXED" }, - { STAR_PROPERTY::LAMBDA_KRUCKOW, "LAMBDA_KRUCKOW" }, - { STAR_PROPERTY::LAMBDA_KRUCKOW_BOTTOM, "LAMBDA_KRUCKOW_BOTTOM" }, - { STAR_PROPERTY::LAMBDA_KRUCKOW_MIDDLE, "LAMBDA_KRUCKOW_MIDDLE" }, - { STAR_PROPERTY::LAMBDA_KRUCKOW_TOP, "LAMBDA_KRUCKOW_TOP" }, - { STAR_PROPERTY::LAMBDA_LOVERIDGE, "LAMBDA_LOVERIDGE" }, - { STAR_PROPERTY::LAMBDA_LOVERIDGE_WINDS, "LAMBDA_LOVERIDGE_WINDS" }, - { STAR_PROPERTY::LAMBDA_NANJING, "LAMBDA_NANJING" }, - { STAR_PROPERTY::LBV_PHASE_FLAG, "LBV_PHASE_FLAG" }, - { STAR_PROPERTY::LUMINOSITY, "LUMINOSITY" }, - { STAR_PROPERTY::LUMINOSITY_POST_COMMON_ENVELOPE, "LUMINOSITY_POST_COMMON_ENVELOPE" }, - { STAR_PROPERTY::LUMINOSITY_PRE_COMMON_ENVELOPE, "LUMINOSITY_PRE_COMMON_ENVELOPE" }, - { STAR_PROPERTY::MASS, "MASS" }, - { STAR_PROPERTY::MASS_0, "MASS_0" }, - { STAR_PROPERTY::MASS_LOSS_DIFF, "MASS_LOSS_DIFF" }, - { STAR_PROPERTY::MASS_TRANSFER_DIFF, "MASS_TRANSFER_DIFF" }, - { STAR_PROPERTY::MASS_TRANSFER_DONOR_HISTORY, "MASS_TRANSFER_DONOR_HISTORY" }, - { STAR_PROPERTY::MDOT, "MDOT" }, - { STAR_PROPERTY::MEAN_ANOMALY, "MEAN_ANOMALY" }, - { STAR_PROPERTY::METALLICITY, "METALLICITY" }, - { STAR_PROPERTY::MOMENT_OF_INERTIA, "MOMENT_OF_INERTIA"}, - { STAR_PROPERTY::MZAMS, "MZAMS" }, - { STAR_PROPERTY::OMEGA, "OMEGA" }, - { STAR_PROPERTY::OMEGA_BREAK, "OMEGA_BREAK" }, - { STAR_PROPERTY::OMEGA_ZAMS, "OMEGA_ZAMS" }, - { STAR_PROPERTY::ORBITAL_ENERGY_POST_SUPERNOVA, "ORBITAL_ENERGY_POST_SUPERNOVA" }, - { STAR_PROPERTY::ORBITAL_ENERGY_PRE_SUPERNOVA, "ORBITAL_ENERGY_PRE_SUPERNOVA" }, - { STAR_PROPERTY::PULSAR_MAGNETIC_FIELD, "PULSAR_MAGNETIC_FIELD" }, - { STAR_PROPERTY::PULSAR_SPIN_DOWN_RATE, "PULSAR_SPIN_DOWN_RATE" }, - { STAR_PROPERTY::PULSAR_BIRTH_PERIOD, "PULSAR_BIRTH_PERIOD" }, - { STAR_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, "PULSAR_BIRTH_SPIN_DOWN_RATE" }, - { STAR_PROPERTY::PULSAR_SPIN_FREQUENCY, "PULSAR_SPIN_FREQUENCY" }, - { STAR_PROPERTY::PULSAR_SPIN_PERIOD, "PULSAR_SPIN_PERIOD" }, - { STAR_PROPERTY::RADIAL_EXPANSION_TIMESCALE, "RADIAL_EXPANSION_TIMESCALE" }, - { STAR_PROPERTY::RADIAL_EXPANSION_TIMESCALE_POST_COMMON_ENVELOPE, "RADIAL_EXPANSION_TIMESCALE_POST_COMMON_ENVELOPE" }, - { STAR_PROPERTY::RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE, "RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE" }, - { STAR_PROPERTY::RADIUS, "RADIUS" }, - { STAR_PROPERTY::RANDOM_SEED, "RANDOM_SEED" }, - { STAR_PROPERTY::RECYCLED_NEUTRON_STAR, "RECYCLED_NEUTRON_STAR" }, - { STAR_PROPERTY::ROCKET_KICK_MAGNITUDE, "ROCKET_KICK_MAGNITUDE" }, - { STAR_PROPERTY::ROCKET_KICK_PHI, "ROCKET_KICK_PHI" }, - { STAR_PROPERTY::ROCKET_KICK_THETA, "ROCKET_KICK_THETA" }, - { STAR_PROPERTY::RZAMS, "RZAMS" }, - { STAR_PROPERTY::SN_TYPE, "SN_TYPE" }, - { STAR_PROPERTY::SPEED, "SPEED" }, - { STAR_PROPERTY::STELLAR_TYPE, "STELLAR_TYPE" }, - { STAR_PROPERTY::STELLAR_TYPE_NAME, "STELLAR_TYPE_NAME" }, - { STAR_PROPERTY::STELLAR_TYPE_PREV, "STELLAR_TYPE_PREV" }, - { STAR_PROPERTY::STELLAR_TYPE_PREV_NAME, "STELLAR_TYPE_PREV_NAME" }, - { STAR_PROPERTY::SUPERNOVA_KICK_MAGNITUDE_RANDOM_NUMBER, "SUPERNOVA_KICK_MAGNITUDE_RANDOM_NUMBER" }, - { STAR_PROPERTY::SUPERNOVA_PHI, "SUPERNOVA_PHI" }, - { STAR_PROPERTY::SUPERNOVA_THETA, "SUPERNOVA_THETA" }, - { STAR_PROPERTY::TEMPERATURE, "TEMPERATURE" }, - { STAR_PROPERTY::TEMPERATURE_POST_COMMON_ENVELOPE, "TEMPERATURE_POST_COMMON_ENVELOPE" }, - { STAR_PROPERTY::TEMPERATURE_PRE_COMMON_ENVELOPE, "TEMPERATURE_PRE_COMMON_ENVELOPE" }, - { STAR_PROPERTY::THERMAL_TIMESCALE, "THERMAL_TIMESCALE" }, - { STAR_PROPERTY::THERMAL_TIMESCALE_POST_COMMON_ENVELOPE, "THERMAL_TIMESCALE_POST_COMMON_ENVELOPE" }, - { STAR_PROPERTY::THERMAL_TIMESCALE_PRE_COMMON_ENVELOPE, "THERMAL_TIMESCALE_PRE_COMMON_ENVELOPE" }, - { STAR_PROPERTY::TIME, "TIME" }, - { STAR_PROPERTY::TIMESCALE_MS, "TIMESCALE_MS" }, - { STAR_PROPERTY::TOTAL_MASS_AT_COMPACT_OBJECT_FORMATION, "TOTAL_MASS_AT_COMPACT_OBJECT_FORMATION" }, - { STAR_PROPERTY::TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, "TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION" }, - { STAR_PROPERTY::TRUE_ANOMALY, "TRUE_ANOMALY" }, - { STAR_PROPERTY::TZAMS, "TZAMS" }, - { STAR_PROPERTY::VELOCITY_X, "VELOCITY_X" }, - { STAR_PROPERTY::VELOCITY_Y, "VELOCITY_Y" }, - { STAR_PROPERTY::VELOCITY_Z, "VELOCITY_Z" }, - { STAR_PROPERTY::ZETA_HURLEY, "ZETA_HURLEY" }, - { STAR_PROPERTY::ZETA_HURLEY_HE, "ZETA_HURLEY_HE" }, - { STAR_PROPERTY::ZETA_SOBERMAN, "ZETA_SOBERMAN" }, - { STAR_PROPERTY::ZETA_SOBERMAN_HE, "ZETA_SOBERMAN_HE" } -}; - - -// enum class STAR_1_PROPERTY -// Symbolic names for variables of an individual star that can be selected for printing -// STAR_1_PROPERTY refers to star 1 (of type BinaryConstituentStar) of a binary for BSE (differences are where the data comes from, and the column header) -enum class STAR_1_PROPERTY: int { STAR_PROPERTIES }; - - -// enum class STAR_2_PROPERTY -// Symbolic names for variables of an individual star that can be selected for printing -// STAR_2_PROPERTY refers to star 2 (of type BinaryConstituentStar) of a binary for BSE (differences are where the data comes from, and the column header) -enum class STAR_2_PROPERTY: int { STAR_PROPERTIES }; - - -// enum class SUPERNOVA_PROPERTY -// Symbolic names for variables of an individual star that can be selected for printing -// SUPERNOVA_PROPERTY refers to the supernova star (of type BinaryConstituentStar) of a binary where one star has experienced a SN event for BSE (differences are where the data comes from, and the column header) -enum class SUPERNOVA_PROPERTY: int { STAR_PROPERTIES }; - - -// enum class COMPANION_PROPERTY -// Symbolic names for variables of an individual star that can be selected for printing -// COMPANION_PROPERTY refers to the companion star (of type BinaryConstituentStar) of a binary where one star has experienced a SN event for BSE (differences are where the data comes from, and the column header) -enum class COMPANION_PROPERTY: int { STAR_PROPERTIES }; - - -// enum class ANY_STAR_PROPERTY -// Symbolic names for variables of an individual star that can be selected for printing -// ANY_STAR_PROPERTY refers to the any individual star -enum class ANY_STAR_PROPERTY: int { STAR_PROPERTIES }; - - -// enum class BINARY_PROPERTY -// Symbolic names for variables of binary stars that can be selected for printing -// BINARY_PROPERTY refers to a binary star of type BaseBinaryStar) for BSE -// -// Properties only need to be here if they are required to be available for -// printing in the logfiles - all keys present here should also be in BINARY_PROPERTY_LABEL -// and BINARY_PROPERTY_DETAIL -enum class BINARY_PROPERTY: int { - NONE, - CIRCULARIZATION_TIMESCALE, - CIRCUMBINARY_DISK_FORMED, - CIRCUMBINARY_DISK_FORMATION_TIME, - CIRCUMBINARY_DISK_MASS_1_AT_FORMATION, - CIRCUMBINARY_DISK_MASS_2_AT_FORMATION, - CIRCUMBINARY_DISK_STELLAR_TYPE_1_AT_FORMATION, - CIRCUMBINARY_DISK_STELLAR_TYPE_2_AT_FORMATION, - CIRCUMBINARY_DISK_INITIAL_MASS, - CIRCUMBINARY_DISK_MASS_RETAINED_1, - CIRCUMBINARY_DISK_MASS_RETAINED_2, - CIRCUMBINARY_DISK_MASS_SUPPLIED, - CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_PRE, - CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_POST, - CIRCUMBINARY_DISK_ECCENTRICITY_PRE, - CIRCUMBINARY_DISK_ECCENTRICITY_POST, - COMMON_ENVELOPE_AT_LEAST_ONCE, - COMMON_ENVELOPE_EVENT_COUNT, - UNBOUND, - DOUBLE_CORE_COMMON_ENVELOPE, - DT, - ECCENTRICITY, - ECCENTRICITY_AT_DCO_FORMATION, - ECCENTRICITY_INITIAL, - ECCENTRICITY_POST_COMMON_ENVELOPE, - ECCENTRICITY_PRE_SUPERNOVA, - ECCENTRICITY_PRE_COMMON_ENVELOPE, - ERROR, - EVOL_STATUS, - ID, - IMMEDIATE_RLOF_POST_COMMON_ENVELOPE, - MASS_1_POST_COMMON_ENVELOPE, - MASS_1_PRE_COMMON_ENVELOPE, - MASS_2_POST_COMMON_ENVELOPE, - MASS_2_PRE_COMMON_ENVELOPE, - MASS_ENV_1, - MASS_ENV_2, - MASSES_EQUILIBRATED, - MASSES_EQUILIBRATED_AT_BIRTH, - MASS_TRANSFER_TRACKER_HISTORY, - MERGES_IN_HUBBLE_TIME, - OPTIMISTIC_COMMON_ENVELOPE, - ORBITAL_ANGULAR_MOMENTUM_VECTOR_X, - ORBITAL_ANGULAR_MOMENTUM_VECTOR_Y, - ORBITAL_ANGULAR_MOMENTUM_VECTOR_Z, - ORBITAL_ANGULAR_VELOCITY, - ORBITAL_VELOCITY_PRE_SUPERNOVA, - RADIUS_1_POST_COMMON_ENVELOPE, - RADIUS_1_PRE_COMMON_ENVELOPE, - RADIUS_2_POST_COMMON_ENVELOPE, - RADIUS_2_PRE_COMMON_ENVELOPE, - RANDOM_SEED, - RLOF_ACCRETION_EFFICIENCY, - RLOF_MASS_LOSS_RATE, - RLOF_MASS_TRANSFER_TIMESCALE, - RLOF_POST_MT_COMMON_ENVELOPE, - RLOF_POST_MT_ECCENTRICITY, - RLOF_POST_MT_EVENT_COUNTER, - RLOF_POST_MT_ID, - RLOF_POST_MT_SEMI_MAJOR_AXIS, - RLOF_POST_MT_STAR1_MASS, - RLOF_POST_MT_STAR2_MASS, - RLOF_POST_MT_STAR1_RADIUS, - RLOF_POST_MT_STAR2_RADIUS, - RLOF_POST_MT_STAR1_TEFF, - RLOF_POST_MT_STAR2_TEFF, - RLOF_POST_MT_STAR1_LUM, - RLOF_POST_MT_STAR2_LUM, - RLOF_POST_MT_STAR1_RLOF, - RLOF_POST_MT_STAR2_RLOF, - RLOF_POST_MT_STAR1_STELLAR_TYPE, - RLOF_POST_MT_STAR1_STELLAR_TYPE_NAME, - RLOF_POST_MT_STAR2_STELLAR_TYPE, - RLOF_POST_MT_STAR2_STELLAR_TYPE_NAME, - RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, - RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, - RLOF_PRE_MT_ECCENTRICITY, - RLOF_PRE_MT_SEMI_MAJOR_AXIS, - RLOF_PRE_MT_STAR1_MASS, - RLOF_PRE_MT_STAR2_MASS, - RLOF_PRE_MT_STAR1_RADIUS, - RLOF_PRE_MT_STAR2_RADIUS, - RLOF_PRE_MT_STAR1_TEFF, - RLOF_PRE_MT_STAR2_TEFF, - RLOF_PRE_MT_STAR1_LUM, - RLOF_PRE_MT_STAR2_LUM, - RLOF_PRE_MT_STAR1_RLOF, - RLOF_PRE_MT_STAR2_RLOF, - RLOF_PRE_MT_STAR1_STELLAR_TYPE, - RLOF_PRE_MT_STAR1_STELLAR_TYPE_NAME, - RLOF_PRE_MT_STAR2_STELLAR_TYPE, - RLOF_PRE_MT_STAR2_STELLAR_TYPE_NAME, - RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, - RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, - RLOF_SECONDARY_POST_COMMON_ENVELOPE, - RLOF_TIME_POST_MT, - RLOF_TIME_PRE_MT, - ROCHE_LOBE_RADIUS_1, - ROCHE_LOBE_RADIUS_2, - ROCHE_LOBE_RADIUS_1_POST_COMMON_ENVELOPE, - ROCHE_LOBE_RADIUS_2_POST_COMMON_ENVELOPE, - ROCHE_LOBE_RADIUS_1_PRE_COMMON_ENVELOPE, - ROCHE_LOBE_RADIUS_2_PRE_COMMON_ENVELOPE, - STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, - STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, - SEMI_MAJOR_AXIS_AT_DCO_FORMATION, - SEMI_MAJOR_AXIS_INITIAL, - SEMI_MAJOR_AXIS_POST_COMMON_ENVELOPE, - SEMI_MAJOR_AXIS_POST_STAGE_1_CE, - SEMI_MAJOR_AXIS_PRE_SUPERNOVA, - SEMI_MAJOR_AXIS_PRE_SUPERNOVA_RSOL, - SEMI_MAJOR_AXIS_PRE_COMMON_ENVELOPE, - SEMI_MAJOR_AXIS, - SEMI_MAJOR_AXIS_RSOL, - SIMULTANEOUS_RLOF, - STABLE_RLOF_POST_COMMON_ENVELOPE, - STELLAR_MERGER, - STELLAR_MERGER_AT_BIRTH, - STELLAR_TYPE_1_POST_COMMON_ENVELOPE, - STELLAR_TYPE_1_PRE_COMMON_ENVELOPE, - STELLAR_TYPE_2_POST_COMMON_ENVELOPE, - STELLAR_TYPE_2_PRE_COMMON_ENVELOPE, - STELLAR_TYPE_NAME_1_POST_COMMON_ENVELOPE, - STELLAR_TYPE_NAME_1_PRE_COMMON_ENVELOPE, - STELLAR_TYPE_NAME_2_POST_COMMON_ENVELOPE, - STELLAR_TYPE_NAME_2_PRE_COMMON_ENVELOPE, - SUPERNOVA_ORBIT_INCLINATION_ANGLE, - SUPERNOVA_STATE, - SYNCHRONIZATION_TIMESCALE_1, - SYNCHRONIZATION_TIMESCALE_2, - SYSTEMIC_SPEED, - SYSTEMIC_VELOCITY_X, - SYSTEMIC_VELOCITY_Y, - SYSTEMIC_VELOCITY_Z, - TIDAL_POTENTIAL_LOVE_NUMBER_10_1, - TIDAL_POTENTIAL_LOVE_NUMBER_12_1, - TIDAL_POTENTIAL_LOVE_NUMBER_22_1, - TIDAL_POTENTIAL_LOVE_NUMBER_32_1, - TIDAL_POTENTIAL_LOVE_NUMBER_10_2, - TIDAL_POTENTIAL_LOVE_NUMBER_12_2, - TIDAL_POTENTIAL_LOVE_NUMBER_22_2, - TIDAL_POTENTIAL_LOVE_NUMBER_32_2, - TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_1, - TIDAL_POTENTIAL_LOVE_NUMBER_12_EQ_1, - TIDAL_POTENTIAL_LOVE_NUMBER_22_EQ_1, - TIDAL_POTENTIAL_LOVE_NUMBER_32_EQ_1, - TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_2, - TIDAL_POTENTIAL_LOVE_NUMBER_12_EQ_2, - TIDAL_POTENTIAL_LOVE_NUMBER_22_EQ_2, - TIDAL_POTENTIAL_LOVE_NUMBER_32_EQ_2, - TIDAL_POTENTIAL_LOVE_NUMBER_10_DYN_1, - TIDAL_POTENTIAL_LOVE_NUMBER_12_DYN_1, - TIDAL_POTENTIAL_LOVE_NUMBER_22_DYN_1, - TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_1, - TIDAL_POTENTIAL_LOVE_NUMBER_10_DYN_2, - TIDAL_POTENTIAL_LOVE_NUMBER_12_DYN_2, - TIDAL_POTENTIAL_LOVE_NUMBER_22_DYN_2, - TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_2, - TIME, - TIME_TO_COALESCENCE, - TOTAL_ANGULAR_MOMENTUM, - TOTAL_ENERGY, - ZETA_LOBE, - ZETA_STAR -}; -// map BINARY_PROPERTY to string identifying the property -// for lookup by the printing functions -// -// Property names only need to be here if they are required to be available for -// printing in the logfiles - all keys present here should also be in BINARY_PROPERTY -// and BINARY_PROPERTY_DETAIL -const COMPASUnorderedMap BINARY_PROPERTY_LABEL = { - { BINARY_PROPERTY::NONE, "NONE" }, - { BINARY_PROPERTY::CIRCULARIZATION_TIMESCALE, "CIRCULARIZATION_TIMESCALE" }, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_FORMED, "CIRCUMBINARY_DISK_FORMED" }, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_FORMATION_TIME, "CIRCUMBINARY_DISK_FORMATION_TIME" }, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_1_AT_FORMATION, "CIRCUMBINARY_DISK_MASS_1_AT_FORMATION" }, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_2_AT_FORMATION, "CIRCUMBINARY_DISK_MASS_2_AT_FORMATION" }, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_STELLAR_TYPE_1_AT_FORMATION, "CIRCUMBINARY_DISK_STELLAR_TYPE_1_AT_FORMATION" }, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_STELLAR_TYPE_2_AT_FORMATION, "CIRCUMBINARY_DISK_STELLAR_TYPE_2_AT_FORMATION" }, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_INITIAL_MASS, "CIRCUMBINARY_DISK_INITIAL_MASS" }, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_1, "CIRCUMBINARY_DISK_MASS_RETAINED_1" }, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_2, "CIRCUMBINARY_DISK_MASS_RETAINED_2" }, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_SUPPLIED, "CIRCUMBINARY_DISK_MASS_SUPPLIED" }, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_PRE, "CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_PRE" }, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_POST, "CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_POST" }, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_ECCENTRICITY_PRE, "CIRCUMBINARY_DISK_ECCENTRICITY_PRE" }, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_ECCENTRICITY_POST, "CIRCUMBINARY_DISK_ECCENTRICITY_POST" }, - { BINARY_PROPERTY::COMMON_ENVELOPE_AT_LEAST_ONCE, "COMMON_ENVELOPE_AT_LEAST_ONCE" }, - { BINARY_PROPERTY::COMMON_ENVELOPE_EVENT_COUNT, "COMMON_ENVELOPE_EVENT_COUNT" }, - { BINARY_PROPERTY::UNBOUND, "UNBOUND" }, - { BINARY_PROPERTY::DOUBLE_CORE_COMMON_ENVELOPE, "DOUBLE_CORE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::DT, "DT" }, - { BINARY_PROPERTY::ECCENTRICITY, "ECCENTRICITY" }, - { BINARY_PROPERTY::ECCENTRICITY_AT_DCO_FORMATION, "ECCENTRICITY_AT_DCO_FORMATION" }, - { BINARY_PROPERTY::ECCENTRICITY_INITIAL, "ECCENTRICITY_INITIAL" }, - { BINARY_PROPERTY::ECCENTRICITY_POST_COMMON_ENVELOPE, "ECCENTRICITY_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::ECCENTRICITY_PRE_SUPERNOVA, "ECCENTRICITY_PRE_SUPERNOVA" }, - { BINARY_PROPERTY::ECCENTRICITY_PRE_COMMON_ENVELOPE, "ECCENTRICITY_PRE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::ERROR, "ERROR" }, - { BINARY_PROPERTY::EVOL_STATUS, "EVOL_STATUS" }, - { BINARY_PROPERTY::ID, "ID" }, - { BINARY_PROPERTY::IMMEDIATE_RLOF_POST_COMMON_ENVELOPE, "IMMEDIATE_RLOF_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::MASS_1_POST_COMMON_ENVELOPE, "MASS_1_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::MASS_1_PRE_COMMON_ENVELOPE, "MASS_1_PRE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::MASS_2_POST_COMMON_ENVELOPE, "MASS_2_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::MASS_2_PRE_COMMON_ENVELOPE, "MASS_2_PRE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::MASS_ENV_1, "MASS_ENV_1" }, - { BINARY_PROPERTY::MASS_ENV_2, "MASS_ENV_2" }, - { BINARY_PROPERTY::MASSES_EQUILIBRATED, "MASSES_EQUILIBRATED" }, - { BINARY_PROPERTY::MASSES_EQUILIBRATED_AT_BIRTH, "MASSES_EQUILIBRATED_AT_BIRTH" }, - { BINARY_PROPERTY::MASS_TRANSFER_TRACKER_HISTORY, "MASS_TRANSFER_TRACKER_HISTORY" }, - { BINARY_PROPERTY::MERGES_IN_HUBBLE_TIME, "MERGES_IN_HUBBLE_TIME" }, - { BINARY_PROPERTY::OPTIMISTIC_COMMON_ENVELOPE, "OPTIMISTIC_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_X, "ORBITAL_ANGULAR_MOMENTUM_VECTOR_X" }, - { BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_Y, "ORBITAL_ANGULAR_MOMENTUM_VECTOR_Y" }, - { BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_Z, "ORBITAL_ANGULAR_MOMENTUM_VECTOR_Z" }, - { BINARY_PROPERTY::ORBITAL_ANGULAR_VELOCITY, "ORBITAL_ANGULAR_VELOCITY" }, - { BINARY_PROPERTY::ORBITAL_VELOCITY_PRE_SUPERNOVA, "ORBITAL_VELOCITY_PRE_SUPERNOVA" }, - { BINARY_PROPERTY::RADIUS_1_POST_COMMON_ENVELOPE, "RADIUS_1_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::RADIUS_1_PRE_COMMON_ENVELOPE, "RADIUS_1_PRE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::RADIUS_2_POST_COMMON_ENVELOPE, "RADIUS_2_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::RADIUS_2_PRE_COMMON_ENVELOPE, "RADIUS_2_PRE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::RANDOM_SEED, "RANDOM_SEED" }, - { BINARY_PROPERTY::RLOF_ACCRETION_EFFICIENCY, "RLOF_ACCRETION_EFFICIENCY"}, - { BINARY_PROPERTY::RLOF_MASS_LOSS_RATE, "RLOF_MASS_LOSS_RATE"}, - { BINARY_PROPERTY::RLOF_MASS_TRANSFER_TIMESCALE, "RLOF_MASS_TRANSFER_TIMESCALE"}, - { BINARY_PROPERTY::RLOF_POST_MT_COMMON_ENVELOPE, "RLOF_POST_MT_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::RLOF_POST_MT_ECCENTRICITY, "RLOF_POST_MT_ECCENTRICITY" }, - { BINARY_PROPERTY::RLOF_POST_MT_EVENT_COUNTER, "RLOF_POST_MT_EVENT_COUNTER" }, - { BINARY_PROPERTY::RLOF_POST_MT_ID, "RLOF_POST_MT_ID" }, - { BINARY_PROPERTY::RLOF_POST_MT_SEMI_MAJOR_AXIS, "RLOF_POST_MT_SEMI_MAJOR_AXIS" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_MASS, "RLOF_POST_MT_STAR1_MASS" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_MASS, "RLOF_POST_MT_STAR2_MASS" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_RADIUS, "RLOF_POST_MT_STAR1_RADIUS" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_RADIUS, "RLOF_POST_MT_STAR2_RADIUS" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_TEFF, "RLOF_POST_MT_STAR1_TEFF" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_TEFF, "RLOF_POST_MT_STAR2_TEFF" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_LUM, "RLOF_POST_MT_STAR1_LUM" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_LUM, "RLOF_POST_MT_STAR2_LUM" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_RLOF, "RLOF_POST_MT_STAR1_RLOF" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_RLOF, "RLOF_POST_MT_STAR2_RLOF" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_STELLAR_TYPE, "RLOF_POST_MT_STAR1_STELLAR_TYPE" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_STELLAR_TYPE_NAME, "RLOF_POST_MT_STAR1_STELLAR_TYPE_NAME" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_STELLAR_TYPE, "RLOF_POST_MT_STAR2_STELLAR_TYPE" }, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_STELLAR_TYPE_NAME, "RLOF_POST_MT_STAR2_STELLAR_TYPE_NAME" }, - { BINARY_PROPERTY::RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, "RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1" }, - { BINARY_PROPERTY::RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, "RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2" }, - { BINARY_PROPERTY::RLOF_PRE_MT_ECCENTRICITY, "RLOF_PRE_MT_ECCENTRICITY" }, - { BINARY_PROPERTY::RLOF_PRE_MT_SEMI_MAJOR_AXIS, "RLOF_PRE_MT_SEMI_MAJOR_AXIS" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_MASS, "RLOF_PRE_MT_STAR1_MASS" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_MASS, "RLOF_PRE_MT_STAR2_MASS" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_RADIUS, "RLOF_PRE_MT_STAR1_RADIUS" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_RADIUS, "RLOF_PRE_MT_STAR2_RADIUS" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_TEFF, "RLOF_PRE_MT_STAR1_TEFF" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_TEFF, "RLOF_PRE_MT_STAR2_TEFF" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_LUM, "RLOF_PRE_MT_STAR1_LUM" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_LUM, "RLOF_PRE_MT_STAR2_LUM" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_RLOF, "RLOF_PRE_MT_STAR1_RLOF" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_RLOF, "RLOF_PRE_MT_STAR2_RLOF" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_STELLAR_TYPE, "RLOF_PRE_MT_STAR1_STELLAR_TYPE" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_STELLAR_TYPE_NAME, "RLOF_PRE_MT_STAR1_STELLAR_TYPE_NAME" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_STELLAR_TYPE, "RLOF_PRE_MT_STAR2_STELLAR_TYPE" }, - { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_STELLAR_TYPE_NAME, "RLOF_PRE_MT_STAR2_STELLAR_TYPE_NAME" }, - { BINARY_PROPERTY::RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, "RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1" }, - { BINARY_PROPERTY::RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, "RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2" }, - { BINARY_PROPERTY::RLOF_SECONDARY_POST_COMMON_ENVELOPE, "RLOF_SECONDARY_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::RLOF_TIME_POST_MT, "RLOF_TIME_POST_MT" }, - { BINARY_PROPERTY::RLOF_TIME_PRE_MT, "RLOF_TIME_PRE_MT" }, - { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1, "ROCHE_LOBE_RADIUS_1" }, - { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1_POST_COMMON_ENVELOPE, "ROCHE_LOBE_RADIUS_1_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1_PRE_COMMON_ENVELOPE, "ROCHE_LOBE_RADIUS_1_PRE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2, "ROCHE_LOBE_RADIUS_2" }, - { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2_POST_COMMON_ENVELOPE, "ROCHE_LOBE_RADIUS_2_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2_PRE_COMMON_ENVELOPE, "ROCHE_LOBE_RADIUS_2_PRE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, "STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1" }, - { BINARY_PROPERTY::STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, "STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2" }, - { BINARY_PROPERTY::SEMI_MAJOR_AXIS_AT_DCO_FORMATION, "SEMI_MAJOR_AXIS_AT_DCO_FORMATION" }, - { BINARY_PROPERTY::SEMI_MAJOR_AXIS_INITIAL, "SEMI_MAJOR_AXIS_INITIAL" }, - { BINARY_PROPERTY::SEMI_MAJOR_AXIS_POST_COMMON_ENVELOPE, "SEMI_MAJOR_AXIS_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::SEMI_MAJOR_AXIS_POST_STAGE_1_CE, "SEMI_MAJOR_AXIS_POST_STAGE_1_CE" }, - { BINARY_PROPERTY::SEMI_MAJOR_AXIS_PRE_SUPERNOVA, "SEMI_MAJOR_AXIS_PRE_SUPERNOVA" }, - { BINARY_PROPERTY::SEMI_MAJOR_AXIS_PRE_SUPERNOVA_RSOL, "SEMI_MAJOR_AXIS_PRE_SUPERNOVA_RSOL" }, - { BINARY_PROPERTY::SEMI_MAJOR_AXIS_PRE_COMMON_ENVELOPE, "SEMI_MAJOR_AXIS_PRE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::SEMI_MAJOR_AXIS, "SEMI_MAJOR_AXIS" }, - { BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, "SEMI_MAJOR_AXIS_RSOL" }, - { BINARY_PROPERTY::SIMULTANEOUS_RLOF, "SIMULTANEOUS_RLOF" }, - { BINARY_PROPERTY::STABLE_RLOF_POST_COMMON_ENVELOPE, "STABLE_RLOF_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::STELLAR_MERGER, "STELLAR_MERGER" }, - { BINARY_PROPERTY::STELLAR_MERGER_AT_BIRTH, "STELLAR_MERGER_AT_BIRTH" }, - { BINARY_PROPERTY::STELLAR_TYPE_1_POST_COMMON_ENVELOPE, "STELLAR_TYPE_1_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::STELLAR_TYPE_1_PRE_COMMON_ENVELOPE, "STELLAR_TYPE_1_PRE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::STELLAR_TYPE_2_POST_COMMON_ENVELOPE, "STELLAR_TYPE_2_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::STELLAR_TYPE_2_PRE_COMMON_ENVELOPE, "STELLAR_TYPE_2_PRE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::STELLAR_TYPE_NAME_1_POST_COMMON_ENVELOPE, "STELLAR_TYPE_NAME_1_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::STELLAR_TYPE_NAME_1_PRE_COMMON_ENVELOPE, "STELLAR_TYPE_NAME_1_PRE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::STELLAR_TYPE_NAME_2_POST_COMMON_ENVELOPE, "STELLAR_TYPE_NAME_2_POST_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::STELLAR_TYPE_NAME_2_PRE_COMMON_ENVELOPE, "STELLAR_TYPE_NAME_2_PRE_COMMON_ENVELOPE" }, - { BINARY_PROPERTY::SUPERNOVA_ORBIT_INCLINATION_ANGLE, "SUPERNOVA_ORBIT_INCLINATION_ANGLE" }, - { BINARY_PROPERTY::SUPERNOVA_STATE, "SUPERNOVA_STATE" }, - { BINARY_PROPERTY::SYNCHRONIZATION_TIMESCALE_1, "SYNCHRONIZATION_TIMESCALE_1" }, - { BINARY_PROPERTY::SYNCHRONIZATION_TIMESCALE_2, "SYNCHRONIZATION_TIMESCALE_2" }, - { BINARY_PROPERTY::SYSTEMIC_SPEED, "SYSTEMIC_SPEED" }, - { BINARY_PROPERTY::SYSTEMIC_VELOCITY_X, "SYSTEMIC_VELOCITY_X" }, - { BINARY_PROPERTY::SYSTEMIC_VELOCITY_Y, "SYSTEMIC_VELOCITY_Y" }, - { BINARY_PROPERTY::SYSTEMIC_VELOCITY_Z, "SYSTEMIC_VELOCITY_Z" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_10_1, "TIDAL_POTENTIAL_LOVE_NUMBER_10_1" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_12_1, "TIDAL_POTENTIAL_LOVE_NUMBER_12_1" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_22_1, "TIDAL_POTENTIAL_LOVE_NUMBER_22_1" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_32_1, "TIDAL_POTENTIAL_LOVE_NUMBER_32_1" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_10_2, "TIDAL_POTENTIAL_LOVE_NUMBER_10_2" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_12_2, "TIDAL_POTENTIAL_LOVE_NUMBER_12_2" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_22_2, "TIDAL_POTENTIAL_LOVE_NUMBER_22_2" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_32_2, "TIDAL_POTENTIAL_LOVE_NUMBER_32_2" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_1, "TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_1" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_12_EQ_1, "TIDAL_POTENTIAL_LOVE_NUMBER_12_EQ_1" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_22_EQ_1, "TIDAL_POTENTIAL_LOVE_NUMBER_22_EQ_1" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_32_EQ_1, "TIDAL_POTENTIAL_LOVE_NUMBER_32_EQ_1" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_2, "TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_2" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_12_EQ_2, "TIDAL_POTENTIAL_LOVE_NUMBER_12_EQ_2" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_22_EQ_2, "TIDAL_POTENTIAL_LOVE_NUMBER_22_EQ_2" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_32_EQ_2, "TIDAL_POTENTIAL_LOVE_NUMBER_32_EQ_2" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_10_DYN_1, "TIDAL_POTENTIAL_LOVE_NUMBER_10_DYN_1" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_12_DYN_1, "TIDAL_POTENTIAL_LOVE_NUMBER_12_DYN_1" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_22_DYN_1, "TIDAL_POTENTIAL_LOVE_NUMBER_22_DYN_1" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_1, "TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_1" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_10_DYN_2, "TIDAL_POTENTIAL_LOVE_NUMBER_10_DYN_2" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_12_DYN_2, "TIDAL_POTENTIAL_LOVE_NUMBER_12_DYN_2" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_22_DYN_2, "TIDAL_POTENTIAL_LOVE_NUMBER_22_DYN_2" }, - { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_2, "TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_2" }, - { BINARY_PROPERTY::TIME, "TIME" }, - { BINARY_PROPERTY::TIME_TO_COALESCENCE, "TIME_TO_COALESCENCE" }, - { BINARY_PROPERTY::TOTAL_ANGULAR_MOMENTUM, "TOTAL_ANGULAR_MOMENTUM" }, - { BINARY_PROPERTY::TOTAL_ENERGY, "TOTAL_ENERGY" }, - { BINARY_PROPERTY::ZETA_LOBE, "ZETA_LOBE" }, - { BINARY_PROPERTY::ZETA_STAR, "ZETA_STAR" } -}; - - -// enum class PROGRAM_OPTION -// Symbolic names for program option values -// -// Options only need to be here if they are required to be -// available for printing in the logfiles -enum class PROGRAM_OPTION: int { - - NONE, - - ADD_OPTIONS_TO_SYSPARMS, - ALLOW_NON_STRIPPED_ECSN, - ALLOW_IMMEDIATE_RLOF_POST_CE_TO_SURVIVE_COMMON_ENVELOPE, - ALLOW_MS_STAR_TO_SURVIVE_COMMON_ENVELOPE, - ALLOW_RADIATIVE_ENVELOPE_STAR_TO_SURVIVE_COMMON_ENVELOPE, - ALLOW_RLOF_AT_BIRTH, - ALLOW_TOUCHING_AT_BIRTH, - ANG_MOM_CONSERVATION_DURING_CIRCULARISATION, - - BLACK_HOLE_KICKS_MODE, - - CASE_BB_STABILITY_PRESCRIPTION, - - CHECK_PHOTON_TIRING_LIMIT, - - CHE_MODE, - - CIRCULARISE_BINARY_DURING_MT, - - CIRCUMBINARY_DISK, - CIRCUMBINARY_DISK_BETA, - CIRCUMBINARY_DISK_EDDINGTON_CAP_FACTOR, - CIRCUMBINARY_DISK_EDDINGTON_GE23_FACTOR, - CIRCUMBINARY_DISK_EDDINGTON_MODE, - CIRCUMBINARY_DISK_INNER_RADIUS_OVER_SEPARATION, - CIRCUMBINARY_DISK_LIFETIME, - CIRCUMBINARY_DISK_STRUCTURE_FACTOR, - CIRCUMBINARY_DISK_ENVELOPE_MASS_FRACTION_SUPPLIED, - POST_COMMON_ENVELOPE_ECCENTRICITY_CAP, - POST_COMMON_ENVELOPE_ECCENTRICITY_FRACTION, - POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION, - - COMMON_ENVELOPE_ALPHA, - COMMON_ENVELOPE_ALPHA_THERMAL, - COMMON_ENVELOPE_FORMALISM, - COMMON_ENVELOPE_LAMBDA, - COMMON_ENVELOPE_LAMBDA_MULTIPLIER, - COMMON_ENVELOPE_LAMBDA_PRESCRIPTION, - COMMON_ENVELOPE_MASS_ACCRETION_CONSTANT, - COMMON_ENVELOPE_MASS_ACCRETION_MAX, - COMMON_ENVELOPE_MASS_ACCRETION_MIN, - COMMON_ENVELOPE_MASS_ACCRETION_PRESCRIPTION, - COMMON_ENVELOPE_RECOMBINATION_ENERGY_DENSITY, - COMMON_ENVELOPE_SECOND_STAGE_BETA, - COMMON_ENVELOPE_SECOND_STAGE_GAMMA_PRESCRIPTION, - COMMON_ENVELOPE_SLOPE_KRUCKOW, - - CONVECTIVE_ENVELOPE_MASS_THRESHOLD, - CONVECTIVE_ENVELOPE_TEMPERATURE_THRESHOLD, - - COOL_WIND_MASS_LOSS_MULTIPLIER, - - ECCENTRICITY, - ECCENTRICITY_DISTRIBUTION, - ECCENTRICITY_DISTRIBUTION_MAX, - ECCENTRICITY_DISTRIBUTION_MIN, - EDDINGTON_ACCRETION_FACTOR, - ENABLE_ROTATIONALLY_ENHANCED_MASS_LOSS, - ENHANCE_CHE_LIFETIMES_LUMINOSITIES, - ENVELOPE_STATE_PRESCRIPTION, - EVOLUTION_MODE, - - FP_ERROR_MODE, - - FRYER_SUPERNOVA_ENGINE, - - FRYER22_FMIX, - FRYER22_MCRIT, - - INITIAL_MASS, - INITIAL_MASS_1, - INITIAL_MASS_2, - - INITIAL_MASS_FUNCTION, - INITIAL_MASS_FUNCTION_MAX, - INITIAL_MASS_FUNCTION_MIN, - INITIAL_MASS_FUNCTION_POWER, - - KICK_DIRECTION_DISTRIBUTION, - KICK_DIRECTION_POWER, - KICK_SCALING_FACTOR, - KICK_MAGNITUDE_DISTRIBUTION, - KICK_MAGNITUDE_DISTRIBUTION_MAXIMUM, - - KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH, - KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS, - KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN, - KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN, - - KICK_MAGNITUDE, - KICK_MAGNITUDE_1, - KICK_MAGNITUDE_2, - - KICK_MAGNITUDE_RANDOM, - KICK_MAGNITUDE_RANDOM_1, - KICK_MAGNITUDE_RANDOM_2, - - KICK_MEAN_ANOMALY_1, - KICK_MEAN_ANOMALY_2, - KICK_PHI_1, - KICK_PHI_2, - KICK_THETA_1, - KICK_THETA_2, - - LBV_FACTOR, - LBV_MASS_LOSS_PRESCRIPTION, - - MALTSEV_FALLBACK, - MALTSEV_MODE, - - MASS_LOSS_PRESCRIPTION, - - MASS_RATIO, - MASS_RATIO_DISTRIBUTION, - MASS_RATIO_DISTRIBUTION_MAX, - MASS_RATIO_DISTRIBUTION_MIN, - - MAXIMUM_EVOLUTION_TIME, - MAXIMUM_DONOR_MASS, - MAXIMUM_NEUTRON_STAR_MASS, - MAXIMUM_TIMESTEPS, - - MCBUR1, - - METALLICITY, - METALLICITY_DISTRIBUTION, - METALLICITY_DISTRIBUTION_MAX, - METALLICITY_DISTRIBUTION_MIN, - - MINIMUM_SAMPLED_SECONDARY_MASS, - - MT_ACCRETION_EFFICIENCY_PRESCRIPTION, - MT_ANG_MOM_LOSS_PRESCRIPTION, - MT_THERMAL_LIMIT_C, - - MT_CRIT_MR_MS_LOW_MASS_DEGENERATE_ACCRETOR, - MT_CRIT_MR_MS_LOW_MASS_NON_DEGENERATE_ACCRETOR, - MT_CRIT_MR_MS_HIGH_MASS_DEGENERATE_ACCRETOR, - MT_CRIT_MR_MS_HIGH_MASS_NON_DEGENERATE_ACCRETOR, - MT_CRIT_MR_GIANT_DEGENERATE_ACCRETOR, - MT_CRIT_MR_GIANT_NON_DEGENERATE_ACCRETOR, - MT_CRIT_MR_HG_DEGENERATE_ACCRETOR, - MT_CRIT_MR_HG_NON_DEGENERATE_ACCRETOR, - MT_CRIT_MR_HE_GIANT_DEGENERATE_ACCRETOR, - MT_CRIT_MR_HE_GIANT_NON_DEGENERATE_ACCRETOR, - MT_CRIT_MR_HE_HG_DEGENERATE_ACCRETOR, - MT_CRIT_MR_HE_HG_NON_DEGENERATE_ACCRETOR, - MT_CRIT_MR_HE_MS_DEGENERATE_ACCRETOR, - MT_CRIT_MR_HE_MS_NON_DEGENERATE_ACCRETOR, - MT_CRIT_MR_WD_DEGENERATE_ACCRETOR, - MT_CRIT_MR_WD_NONDEGENERATE_ACCRETOR, - - MT_FRACTION_ACCRETED, - MT_JLOSS, - MT_JLOSS_LINEAR_FRACTION_DEGEN, - MT_JLOSS_LINEAR_FRACTION_NON_DEGEN, - MT_REJUVENATION_PRESCRIPTION, - MT_THERMALLY_LIMITED_VARIATION, - - MULLER_MANDEL_KICK_MULTIPLIER_BH, - MULLER_MANDEL_KICK_MULTIPLIER_NS, - MULLER_MANDEL_SIGMA_KICK_BH, - MULLER_MANDEL_SIGMA_KICK_NS, - - NEUTRINO_MASS_LOSS_ASSUMPTION_BH, - NEUTRINO_MASS_LOSS_VALUE_BH, - - NOTES, - - NS_ACCRETION_IN_CE, - NS_EOS, - - ORBITAL_PERIOD, - ORBITAL_PERIOD_DISTRIBUTION, - ORBITAL_PERIOD_DISTRIBUTION_MAX, - ORBITAL_PERIOD_DISTRIBUTION_MIN, - - OVERALL_WIND_MASS_LOSS_MULTIPLIER, - - PISN_LOWER_LIMIT, - PISN_UPPER_LIMIT, - - PPI_LOWER_LIMIT, - PPI_PRESCRIPTION, - PPI_UPPER_LIMIT, - PPI_CO_CORE_SHIFT_HENDRIKS, - - PULSAR_MAGNETIC_FIELD_DISTRIBUTION, - PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MAX, - PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MIN, - - PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION, - PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MAX, - PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MIN, - - PULSAR_MAGNETIC_FIELD_DECAY_MASS_SCALE, - PULSAR_MAGNETIC_FIELD_DECAY_TIME_SCALE, - - PULSAR_MINIMUM_MAGNETIC_FIELD, - - QCRIT_PRESCRIPTION, - - RANDOM_SEED, - RANDOM_SEED_CMDLINE, - - REMNANT_MASS_PRESCRIPTION, - - RESPONSE_TO_SPIN_UP, - - ROCKET_KICK_MAGNITUDE_1, - ROCKET_KICK_MAGNITUDE_2, - ROCKET_KICK_PHI_1, - ROCKET_KICK_PHI_2, - ROCKET_KICK_THETA_1, - ROCKET_KICK_THETA_2, - - ROTATIONAL_VELOCITY_DISTRIBUTION, - ROTATIONAL_FREQUENCY, - ROTATIONAL_FREQUENCY_1, - ROTATIONAL_FREQUENCY_2, - - SCALE_CHE_MASS_LOSS_SURF_HE_ABUNDANCE, - SCALE_TERMINAL_WIND_VEL_METALLICITY_POWER, - SEMI_MAJOR_AXIS, - SEMI_MAJOR_AXIS_DISTRIBUTION, - SEMI_MAJOR_AXIS_DISTRIBUTION_MAX, - SEMI_MAJOR_AXIS_DISTRIBUTION_MIN, - - STELLAR_ZETA_PRESCRIPTION, - - TIDES_PRESCRIPTION, - - USSN_KICKS_OVERRIDE_MANDEL_MULLER, - - WR_FACTOR, - - ZETA_ADIABATIC_ARBITRARY, - ZETA_MS, - ZETA_RADIATIVE_ENVELOPE_GIANT -}; -// map PROGRAM_OPTION to string identifying the property -// for lookup by the printing functions -// -// Options only need to be here if they are required to be -// available for printing in the logfiles - all keys present here -// should also be in PROGRAM_OPTION_DETAIL ( except PROGRAM_OPTION::NOTES) -const COMPASUnorderedMap PROGRAM_OPTION_LABEL = { - - { PROGRAM_OPTION::NONE, "NONE" }, - - { PROGRAM_OPTION::ALLOW_NON_STRIPPED_ECSN, "ALLOW_NON_STRIPPED_ECSN" }, - { PROGRAM_OPTION::ADD_OPTIONS_TO_SYSPARMS, "ADD_OPTIONS_TO_SYSPARMS" }, - { PROGRAM_OPTION::ALLOW_MS_STAR_TO_SURVIVE_COMMON_ENVELOPE, "ALLOW_MS_STAR_TO_SURVIVE_COMMON_ENVELOPE" }, - { PROGRAM_OPTION::ALLOW_RADIATIVE_ENVELOPE_STAR_TO_SURVIVE_COMMON_ENVELOPE, "ALLOW_RADIATIVE_ENVELOPE_STAR_TO_SURVIVE_COMMON_ENVELOPE" }, - { PROGRAM_OPTION::ALLOW_IMMEDIATE_RLOF_POST_CE_TO_SURVIVE_COMMON_ENVELOPE, "ALLOW_IMMEDIATE_RLOF_POST_CE_TO_SURVIVE_COMMON_ENVELOPE" }, - { PROGRAM_OPTION::ALLOW_RLOF_AT_BIRTH, "ALLOW_RLOF_AT_BIRTH" }, - { PROGRAM_OPTION::ALLOW_TOUCHING_AT_BIRTH, "ALLOW_TOUCHING_AT_BIRTH" }, - { PROGRAM_OPTION::ANG_MOM_CONSERVATION_DURING_CIRCULARISATION, "ANG_MOM_CONSERVATION_DURING_CIRCULARISATION" }, - - { PROGRAM_OPTION::BLACK_HOLE_KICKS_MODE, "BLACK_HOLE_KICKS_MODE" }, - - { PROGRAM_OPTION::CASE_BB_STABILITY_PRESCRIPTION, "CASE_BB_STABILITY_PRESCRIPTION" }, - - { PROGRAM_OPTION::CHECK_PHOTON_TIRING_LIMIT, "CHECK_PHOTON_TIRING_LIMIT" }, - - { PROGRAM_OPTION::CHE_MODE, "CHE_MODE" }, - - { PROGRAM_OPTION::CIRCULARISE_BINARY_DURING_MT, "CIRCULARISE_BINARY_DURING_MT" }, - - { PROGRAM_OPTION::CIRCUMBINARY_DISK, "CIRCUMBINARY_DISK" }, - { PROGRAM_OPTION::CIRCUMBINARY_DISK_BETA, "CIRCUMBINARY_DISK_BETA" }, - { PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_CAP_FACTOR, "CIRCUMBINARY_DISK_EDDINGTON_CAP_FACTOR" }, - { PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_GE23_FACTOR, "CIRCUMBINARY_DISK_EDDINGTON_GE23_FACTOR" }, - { PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_MODE, "CIRCUMBINARY_DISK_EDDINGTON_MODE" }, - { PROGRAM_OPTION::CIRCUMBINARY_DISK_INNER_RADIUS_OVER_SEPARATION, "CIRCUMBINARY_DISK_INNER_RADIUS_OVER_SEPARATION" }, - { PROGRAM_OPTION::CIRCUMBINARY_DISK_LIFETIME, "CIRCUMBINARY_DISK_LIFETIME" }, - { PROGRAM_OPTION::CIRCUMBINARY_DISK_STRUCTURE_FACTOR, "CIRCUMBINARY_DISK_STRUCTURE_FACTOR" }, - { PROGRAM_OPTION::CIRCUMBINARY_DISK_ENVELOPE_MASS_FRACTION_SUPPLIED, "CIRCUMBINARY_DISK_ENVELOPE_MASS_FRACTION_SUPPLIED" }, - { PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_CAP, "POST_COMMON_ENVELOPE_ECCENTRICITY_CAP" }, - { PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_FRACTION, "POST_COMMON_ENVELOPE_ECCENTRICITY_FRACTION" }, - { PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION, "POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION" }, - - { PROGRAM_OPTION::COMMON_ENVELOPE_ALPHA, "COMMON_ENVELOPE_ALPHA" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_ALPHA_THERMAL, "COMMON_ENVELOPE_ALPHA_THERMAL" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_FORMALISM, "COMMON_ENVELOPE_FORMALISM" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_LAMBDA, "COMMON_ENVELOPE_LAMBDA" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_LAMBDA_MULTIPLIER, "COMMON_ENVELOPE_LAMBDA_MULTIPLIER" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_LAMBDA_PRESCRIPTION, "COMMON_ENVELOPE_LAMBDA_PRESCRIPTION" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_CONSTANT, "COMMON_ENVELOPE_MASS_ACCRETION_CONSTANT" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_MAX, "COMMON_ENVELOPE_MASS_ACCRETION_MAX" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_MIN, "COMMON_ENVELOPE_MASS_ACCRETION_MIN" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_PRESCRIPTION, "COMMON_ENVELOPE_MASS_ACCRETION_PRESCRIPTION" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_RECOMBINATION_ENERGY_DENSITY, "COMMON_ENVELOPE_RECOMBINATION_ENERGY_DENSITY" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_SECOND_STAGE_BETA, "COMMON_ENVELOPE_SECOND_STAGE_BETA" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_SECOND_STAGE_GAMMA_PRESCRIPTION, "COMMON_ENVELOPE_SECOND_STAGE_GAMMA_PRESCRIPTION" }, - { PROGRAM_OPTION::COMMON_ENVELOPE_SLOPE_KRUCKOW, "COMMON_ENVELOPE_SLOPE_KRUCKOW" }, - - { PROGRAM_OPTION::COOL_WIND_MASS_LOSS_MULTIPLIER, "COOL_WIND_MASS_LOSS_MULTIPLIER" }, - - { PROGRAM_OPTION::ECCENTRICITY, "ECCENTRICITY" }, - { PROGRAM_OPTION::ECCENTRICITY_DISTRIBUTION, "ECCENTRICITY_DISTRIBUTION" }, - { PROGRAM_OPTION::ECCENTRICITY_DISTRIBUTION_MAX, "ECCENTRICITY_DISTRIBUTION_MAX" }, - { PROGRAM_OPTION::ECCENTRICITY_DISTRIBUTION_MIN, "ECCENTRICITY_DISTRIBUTION_MIN" }, - { PROGRAM_OPTION::EDDINGTON_ACCRETION_FACTOR, "EDDINGTON_ACCRETION_FACTOR" }, - { PROGRAM_OPTION::ENABLE_ROTATIONALLY_ENHANCED_MASS_LOSS, "ENABLE_ROTATIONALLY_ENHANCED_MASS_LOSS" }, - { PROGRAM_OPTION::ENHANCE_CHE_LIFETIMES_LUMINOSITIES, "ENHANCE_CHE_LIFETIMES_LUMINOSITIES" }, - { PROGRAM_OPTION::ENVELOPE_STATE_PRESCRIPTION, "ENVELOPE_STATE_PRESCRIPTION" }, - { PROGRAM_OPTION::EVOLUTION_MODE, "EVOLUTION_MODE" }, - - { PROGRAM_OPTION::FP_ERROR_MODE, "FP_ERROR_MODE" }, - - { PROGRAM_OPTION::FRYER_SUPERNOVA_ENGINE, "FRYER_SUPERNOVA_ENGINE" }, - - { PROGRAM_OPTION::FRYER22_FMIX, "FRYER22_FMIX" }, - { PROGRAM_OPTION::FRYER22_MCRIT, "FRYER22_MCRIT" }, - - { PROGRAM_OPTION::INITIAL_MASS, "INITIAL_MASS" }, - { PROGRAM_OPTION::INITIAL_MASS_1, "INITIAL_MASS_1" }, - { PROGRAM_OPTION::INITIAL_MASS_2, "INITIAL_MASS_2" }, - - { PROGRAM_OPTION::INITIAL_MASS_FUNCTION, "INITIAL_MASS_FUNCTION" }, - { PROGRAM_OPTION::INITIAL_MASS_FUNCTION_MAX, "INITIAL_MASS_FUNCTION_MAX" }, - { PROGRAM_OPTION::INITIAL_MASS_FUNCTION_MIN, "INITIAL_MASS_FUNCTION_MIN" }, - { PROGRAM_OPTION::INITIAL_MASS_FUNCTION_POWER, "INITIAL_MASS_FUNCTION_POWER" }, - { PROGRAM_OPTION::KICK_DIRECTION_DISTRIBUTION, "KICK_DIRECTION_DISTRIBUTION" }, - { PROGRAM_OPTION::KICK_DIRECTION_POWER, "KICK_DIRECTION_POWER" }, - { PROGRAM_OPTION::KICK_SCALING_FACTOR, "KICK_SCALING_FACTOR" }, - { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION, "KICK_MAGNITUDE_DISTRIBUTION" }, - { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_MAXIMUM, "KICK_MAGNITUDE_DISTRIBUTION_MAXIMUM" }, - - { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH, "KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH" }, - { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS, "KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS" }, - { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN, "KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN" }, - { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN, "KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN" }, - - { PROGRAM_OPTION::KICK_MAGNITUDE, "KICK_MAGNITUDE" }, - { PROGRAM_OPTION::KICK_MAGNITUDE_1, "KICK_MAGNITUDE_1" }, - { PROGRAM_OPTION::KICK_MAGNITUDE_2, "KICK_MAGNITUDE_2" }, - - { PROGRAM_OPTION::KICK_MAGNITUDE_RANDOM, "KICK_MAGNITUDE_RANDOM" }, - { PROGRAM_OPTION::KICK_MAGNITUDE_RANDOM_1, "KICK_MAGNITUDE_RANDOM_1" }, - { PROGRAM_OPTION::KICK_MAGNITUDE_RANDOM_2, "KICK_MAGNITUDE_RANDOM_2" }, - - { PROGRAM_OPTION::KICK_MEAN_ANOMALY_1, "KICK_MEAN_ANOMALY_1" }, - { PROGRAM_OPTION::KICK_MEAN_ANOMALY_2, "KICK_MEAN_ANOMALY_2" }, - { PROGRAM_OPTION::KICK_PHI_1, "KICK_PHI_1" }, - { PROGRAM_OPTION::KICK_PHI_2, "KICK_PHI_2" }, - { PROGRAM_OPTION::KICK_THETA_1, "KICK_THETA_1" }, - { PROGRAM_OPTION::KICK_THETA_2, "KICK_THETA_2" }, - - { PROGRAM_OPTION::LBV_FACTOR, "LBV_FACTOR" }, - { PROGRAM_OPTION::LBV_MASS_LOSS_PRESCRIPTION, "LBV_MASS_LOSS_PRESCRIPTION" }, - - { PROGRAM_OPTION::MALTSEV_FALLBACK, "MALTSEV_FALLBACK" }, - { PROGRAM_OPTION::MALTSEV_MODE, "MALTSEV_MODE" }, - { PROGRAM_OPTION::MASS_LOSS_PRESCRIPTION, "MASS_LOSS_PRESCRIPTION" }, - - { PROGRAM_OPTION::MASS_RATIO, "MASS_RATIO" }, - { PROGRAM_OPTION::MASS_RATIO_DISTRIBUTION, "MASS_RATIO_DISTRIBUTION" }, - { PROGRAM_OPTION::MASS_RATIO_DISTRIBUTION_MAX, "MASS_RATIO_DISTRIBUTION_MAX" }, - { PROGRAM_OPTION::MASS_RATIO_DISTRIBUTION_MIN, "MASS_RATIO_DISTRIBUTION_MIN" }, - - { PROGRAM_OPTION::MAXIMUM_EVOLUTION_TIME, "MAXIMUM_EVOLUTION_TIME" }, - { PROGRAM_OPTION::MAXIMUM_DONOR_MASS, "MAXIMUM_DONOR_MASS" }, - { PROGRAM_OPTION::MAXIMUM_NEUTRON_STAR_MASS, "MAXIMUM_NEUTRON_STAR_MASS" }, - { PROGRAM_OPTION::MAXIMUM_TIMESTEPS, "MAXIMUM_TIMESTEPS" }, - - { PROGRAM_OPTION::MCBUR1, "MCBUR1" }, - - { PROGRAM_OPTION::METALLICITY, "METALLICITY" }, - { PROGRAM_OPTION::METALLICITY_DISTRIBUTION, "METALLICITY_DISTRIBUTION" }, - { PROGRAM_OPTION::METALLICITY_DISTRIBUTION_MAX, "METALLICITY_DISTRIBUTION_MAX" }, - { PROGRAM_OPTION::METALLICITY_DISTRIBUTION_MIN, "METALLICITY_DISTRIBUTION_MIN" }, - - { PROGRAM_OPTION::MINIMUM_SAMPLED_SECONDARY_MASS, "MINIMUM_SAMPLED_SECONDARY_MASS" }, - - { PROGRAM_OPTION::MT_ACCRETION_EFFICIENCY_PRESCRIPTION, "MT_ACCRETION_EFFICIENCY_PRESCRIPTION" }, - { PROGRAM_OPTION::MT_ANG_MOM_LOSS_PRESCRIPTION, "MT_ANG_MOM_LOSS_PRESCRIPTION" }, - { PROGRAM_OPTION::MT_THERMAL_LIMIT_C, "MT_THERMAL_LIMIT_C" }, - - { PROGRAM_OPTION::MT_CRIT_MR_MS_LOW_MASS_DEGENERATE_ACCRETOR, "MT_CRIT_MR_MS_LOW_MASS_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_MS_LOW_MASS_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_MS_LOW_MASS_NON_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_MS_HIGH_MASS_DEGENERATE_ACCRETOR, "MT_CRIT_MR_MS_HIGH_MASS_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_MS_HIGH_MASS_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_MS_HIGH_MASS_NON_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_GIANT_DEGENERATE_ACCRETOR, "MT_CRIT_MR_GIANT_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_GIANT_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_GIANT_NON_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_HG_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HG_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_HG_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HG_NON_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_HE_GIANT_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HE_GIANT_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_HE_GIANT_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HE_GIANT_NON_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_HE_HG_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HE_HG_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_HE_HG_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HE_HG_NON_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_HE_MS_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HE_MS_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_HE_MS_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HE_MS_NON_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_WD_DEGENERATE_ACCRETOR, "MT_CRIT_MR_WD_DEGENERATE_ACCRETOR" }, - { PROGRAM_OPTION::MT_CRIT_MR_WD_NONDEGENERATE_ACCRETOR, "MT_CRIT_MR_WD_NONDEGENERATE_ACCRETOR" }, - - { PROGRAM_OPTION::MT_FRACTION_ACCRETED, "MT_FRACTION_ACCRETED" }, - { PROGRAM_OPTION::MT_JLOSS, "MT_JLOSS" }, - { PROGRAM_OPTION::MT_JLOSS_LINEAR_FRACTION_DEGEN, "MT_JLOSS_LINEAR_FRACTION_DEGEN" }, - { PROGRAM_OPTION::MT_JLOSS_LINEAR_FRACTION_NON_DEGEN, "MT_JLOSS_LINEAR_FRACTION_NON_DEGEN" }, - { PROGRAM_OPTION::MT_REJUVENATION_PRESCRIPTION, "MT_REJUVENATION_PRESCRIPTION" }, - { PROGRAM_OPTION::MT_THERMALLY_LIMITED_VARIATION, "MT_THERMALLY_LIMITED_VARIATION" }, - - { PROGRAM_OPTION::MULLER_MANDEL_KICK_MULTIPLIER_BH, "MULLER_MANDEL_KICK_MULTIPLIER_BH" }, - { PROGRAM_OPTION::MULLER_MANDEL_KICK_MULTIPLIER_NS, "MULLER_MANDEL_KICK_MULTIPLIER_NS" }, - { PROGRAM_OPTION::MULLER_MANDEL_SIGMA_KICK_BH, "MULLER_MANDEL_SIGMA_KICK_BH" }, - { PROGRAM_OPTION::MULLER_MANDEL_SIGMA_KICK_NS, "MULLER_MANDEL_SIGMA_KICK_NS" }, - - { PROGRAM_OPTION::NEUTRINO_MASS_LOSS_ASSUMPTION_BH, "NEUTRINO_MASS_LOSS_ASSUMPTION_BH" }, - { PROGRAM_OPTION::NEUTRINO_MASS_LOSS_VALUE_BH, "NEUTRINO_MASS_LOSS_VALUE_BH" }, - - { PROGRAM_OPTION::NOTES, "NOTES" }, - - { PROGRAM_OPTION::NS_ACCRETION_IN_CE, "NS_ACCRETION_IN_CE" }, - { PROGRAM_OPTION::NS_EOS, "NS_EOS" }, - - { PROGRAM_OPTION::ORBITAL_PERIOD, "ORBITAL_PERIOD" }, - { PROGRAM_OPTION::ORBITAL_PERIOD_DISTRIBUTION, "ORBITAL_PERIOD_DISTRIBUTION" }, - { PROGRAM_OPTION::ORBITAL_PERIOD_DISTRIBUTION_MAX, "ORBITAL_PERIOD_DISTRIBUTION_MAX" }, - { PROGRAM_OPTION::ORBITAL_PERIOD_DISTRIBUTION_MIN, "ORBITAL_PERIOD_DISTRIBUTION_MIN" }, - - { PROGRAM_OPTION::OVERALL_WIND_MASS_LOSS_MULTIPLIER, "OVERALL_WIND_MASS_LOSS_MULTIPLIER" }, - - { PROGRAM_OPTION::PISN_LOWER_LIMIT, "PISN_LOWER_LIMIT" }, - { PROGRAM_OPTION::PISN_UPPER_LIMIT, "PISN_UPPER_LIMIT" }, - - { PROGRAM_OPTION::PPI_LOWER_LIMIT, "PPI_LOWER_LIMIT" }, - { PROGRAM_OPTION::PPI_PRESCRIPTION, "PPI_PRESCRIPTION" }, - { PROGRAM_OPTION::PPI_UPPER_LIMIT, "PPI_UPPER_LIMIT" }, - { PROGRAM_OPTION::PPI_CO_CORE_SHIFT_HENDRIKS, "PPI_CO_CORE_SHIFT_HENDRIKS"}, - - { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DISTRIBUTION, "PULSAR_MAGNETIC_FIELD_DISTRIBUTION" }, - { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MAX, "PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MAX" }, - { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MIN, "PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MIN" }, - - { PROGRAM_OPTION::PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION, "PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION" }, - { PROGRAM_OPTION::PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MAX, "PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MAX" }, - { PROGRAM_OPTION::PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MIN, "PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MIN" }, - - { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DECAY_MASS_SCALE, "PULSAR_MAGNETIC_FIELD_DECAY_MASS_SCALE" }, - { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DECAY_TIME_SCALE, "PULSAR_MAGNETIC_FIELD_DECAY_TIME_SCALE" }, - - { PROGRAM_OPTION::PULSAR_MINIMUM_MAGNETIC_FIELD, "PULSAR_MINIMUM_MAGNETIC_FIELD" }, - - { PROGRAM_OPTION::QCRIT_PRESCRIPTION, "QCRIT_PRESCRIPTION" }, - - { PROGRAM_OPTION::RANDOM_SEED, "RANDOM_SEED" }, - { PROGRAM_OPTION::RANDOM_SEED_CMDLINE, "RANDOM_SEED_CMDLINE" }, - - { PROGRAM_OPTION::REMNANT_MASS_PRESCRIPTION, "REMNANT_MASS_PRESCRIPTION" }, - - { PROGRAM_OPTION::ROCKET_KICK_MAGNITUDE_1, "ROCKET_KICK_MAGNITUDE_1" }, - { PROGRAM_OPTION::ROCKET_KICK_MAGNITUDE_2, "ROCKET_KICK_MAGNITUDE_2" }, - { PROGRAM_OPTION::ROCKET_KICK_PHI_1, "ROCKET_KICK_PHI_1" }, - { PROGRAM_OPTION::ROCKET_KICK_PHI_2, "ROCKET_KICK_PHI_2" }, - { PROGRAM_OPTION::ROCKET_KICK_THETA_1, "ROCKET_KICK_THETA_1" }, - { PROGRAM_OPTION::ROCKET_KICK_THETA_2, "ROCKET_KICK_THETA_2" }, - - { PROGRAM_OPTION::ROTATIONAL_VELOCITY_DISTRIBUTION, "ROTATIONAL_VELOCITY_DISTRIBUTION" }, - { PROGRAM_OPTION::ROTATIONAL_FREQUENCY, "ROTATIONAL_FREQUENCY" }, - { PROGRAM_OPTION::ROTATIONAL_FREQUENCY_1, "ROTATIONAL_FREQUENCY_1" }, - { PROGRAM_OPTION::ROTATIONAL_FREQUENCY_2, "ROTATIONAL_FREQUENCY_2" }, - - { PROGRAM_OPTION::SCALE_CHE_MASS_LOSS_SURF_HE_ABUNDANCE, "SCALE_CHE_MASS_LOSS_SURF_HE_ABUNDANCE" }, - { PROGRAM_OPTION::SCALE_TERMINAL_WIND_VEL_METALLICITY_POWER, "SCALE_TERMINAL_WIND_VEL_METALLICITY_POWER" }, - { PROGRAM_OPTION::SEMI_MAJOR_AXIS, "SEMI_MAJOR_AXIS" }, - { PROGRAM_OPTION::SEMI_MAJOR_AXIS_DISTRIBUTION, "SEMI_MAJOR_AXIS_DISTRIBUTION" }, - { PROGRAM_OPTION::SEMI_MAJOR_AXIS_DISTRIBUTION_MAX, "SEMI_MAJOR_AXIS_DISTRIBUTION_MAX" }, - { PROGRAM_OPTION::SEMI_MAJOR_AXIS_DISTRIBUTION_MIN, "SEMI_MAJOR_AXIS_DISTRIBUTION_MIN" }, - - { PROGRAM_OPTION::STELLAR_ZETA_PRESCRIPTION, "STELLAR_ZETA_PRESCRIPTION" }, - - { PROGRAM_OPTION::TIDES_PRESCRIPTION, "TIDES_PRESCRIPTION" }, - - { PROGRAM_OPTION::USSN_KICKS_OVERRIDE_MANDEL_MULLER, "USSN_KICKS_OVERRIDE_MANDEL_MULLER" }, - - { PROGRAM_OPTION::WR_FACTOR, "WR_FACTOR" }, - - { PROGRAM_OPTION::ZETA_ADIABATIC_ARBITRARY, "ZETA_ADIABATIC_ARBITRARY" }, - { PROGRAM_OPTION::ZETA_MS, "ZETA_MS" }, - { PROGRAM_OPTION::ZETA_RADIATIVE_ENVELOPE_GIANT, "ZETA_RADIATIVE_ENVELOPE_GIANT" } -}; - - -enum class ANY_PROPERTY_TYPE: int { T_STAR_1_PROPERTY, T_STAR_2_PROPERTY, T_SUPERNOVA_PROPERTY, T_COMPANION_PROPERTY, T_STAR_PROPERTY, T_BINARY_PROPERTY, T_PROGRAM_OPTION }; - -typedef boost::variant T_ANY_PROPERTY; -typedef boost::variant T_ANY_STAR_PROPERTY; -typedef boost::variant T_ANY_BINARY_CONSTITUENT_PROPERTY; -typedef boost::variant T_ANY_BINARY_PROPERTY; - - -typedef std::vector ANY_PROPERTY_VECTOR; - - -class VariantPropertyType: public boost::static_visitor { -public: - ANY_PROPERTY_TYPE operator()(STAR_PROPERTY prop) const { return ANY_PROPERTY_TYPE::T_STAR_PROPERTY; } - ANY_PROPERTY_TYPE operator()(STAR_1_PROPERTY prop) const { return ANY_PROPERTY_TYPE::T_STAR_1_PROPERTY; } - ANY_PROPERTY_TYPE operator()(STAR_2_PROPERTY prop) const { return ANY_PROPERTY_TYPE::T_STAR_2_PROPERTY; } - ANY_PROPERTY_TYPE operator()(SUPERNOVA_PROPERTY prop) const { return ANY_PROPERTY_TYPE::T_SUPERNOVA_PROPERTY; } - ANY_PROPERTY_TYPE operator()(COMPANION_PROPERTY prop) const { return ANY_PROPERTY_TYPE::T_COMPANION_PROPERTY; } - ANY_PROPERTY_TYPE operator()(BINARY_PROPERTY prop) const { return ANY_PROPERTY_TYPE::T_BINARY_PROPERTY; } - ANY_PROPERTY_TYPE operator()(PROGRAM_OPTION prop) const { return ANY_PROPERTY_TYPE::T_PROGRAM_OPTION; } -}; - - -// Property types -enum class PROPERTY_TYPE: int { NONE, STAR_PROPERTY, STAR_1_PROPERTY, STAR_2_PROPERTY, SUPERNOVA_PROPERTY, COMPANION_PROPERTY, ANY_STAR_PROPERTY, BINARY_PROPERTY, PROGRAM_OPTION }; -const COMPASUnorderedMap PROPERTY_TYPE_LABEL = { - { PROPERTY_TYPE::NONE, "" }, - { PROPERTY_TYPE::STAR_PROPERTY, "STAR_PROPERTY" }, - { PROPERTY_TYPE::STAR_1_PROPERTY, "STAR_1_PROPERTY" }, - { PROPERTY_TYPE::STAR_2_PROPERTY, "STAR_2_PROPERTY" }, - { PROPERTY_TYPE::SUPERNOVA_PROPERTY, "SUPERNOVA_PROPERTY" }, - { PROPERTY_TYPE::COMPANION_PROPERTY, "COMPANION_PROPERTY" }, - { PROPERTY_TYPE::ANY_STAR_PROPERTY, "ANY_STAR_PROPERTY" }, - { PROPERTY_TYPE::BINARY_PROPERTY, "BINARY_PROPERTY" }, - { PROPERTY_TYPE::PROGRAM_OPTION, "PROGRAM_OPTION" } -}; - - -// typedef for property details -// the property details provide information about the property to assist in printing the property value -// the property_details tuple contains: -// -// -// -// where: -// -// data type is, as the name suggest, the data type of the property, from the TYPENAME enum class (above) -// header string is the string to be printed as the column header for the property -// units string is the string to be printed as the units header for the property -// field width is the printf() field width of the property (does not apply to HDF5 files; meaning varies per the data type, refer to printf() documentation) -// field precision is the printf() field precision of the property (does not apply to HDF5 files; meaning varies per the data type, refer to printf() documentation) -typedef std::tuple PROPERTY_DETAILS; - -// map ANY_STAR_PROPERTY_DETAIL -// Records the details of STELLAR properties. The STELLAR properties are those that pertain -// to individual stars, whether they be a single star being evolved for SSE, or one of the -// constituent stars being evolved as part of a binary for BSE -// -// Properties only need to be here if they are required to be available for printing in -// the logfiles - all keys present here should also be in the STAR_PROPERTIES #define and -// STAR_PROPERTIES_LABEL -const std::map ANY_STAR_PROPERTY_DETAIL = { - { ANY_STAR_PROPERTY::AGE, { TYPENAME::DOUBLE, "Age", "Myr", 24, 15}}, - { ANY_STAR_PROPERTY::ANGULAR_MOMENTUM, { TYPENAME::DOUBLE, "Ang_Momentum", "Msol AU^2 yr^-1", 24, 15}}, - { ANY_STAR_PROPERTY::BINDING_ENERGY_AT_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Binding_Energy@CE", "erg", 24, 15}}, - { ANY_STAR_PROPERTY::BINDING_ENERGY_CONVECTIVE_ENVELOPE, { TYPENAME::DOUBLE, "BE_ConvectiveEnvelope", "erg", 24, 15}}, - { ANY_STAR_PROPERTY::BINDING_ENERGY_FIXED, { TYPENAME::DOUBLE, "BE_Fixed", "erg", 24, 15}}, - { ANY_STAR_PROPERTY::BINDING_ENERGY_NANJING, { TYPENAME::DOUBLE, "BE_Nanjing", "erg", 24, 15}}, - { ANY_STAR_PROPERTY::BINDING_ENERGY_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Binding_EnergyCE", "Myr", 24, 15}}, - { ANY_STAR_PROPERTY::DYNAMICAL_TIMESCALE_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Tau_DynamicalCE", "Lsol", 24, 15}}, - { ANY_STAR_PROPERTY::LUMINOSITY_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "LuminositySN", "Msol^2AU^-1", 24, 15}}, - { ANY_STAR_PROPERTY::ORBITAL_ENERGY_PRE_SUPERNOVA, { TYPENAME::DOUBLE, "Orbital_EnergyCE", "Myr", 24, 15}}, - { ANY_STAR_PROPERTY::RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Tau_RadialCE", "K", 24, 15}}, - { ANY_STAR_PROPERTY::TEMPERATURE_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "TeffCE", "Myr", 24, 15}}, - { ANY_STAR_PROPERTY::THERMAL_TIMESCALE_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Tau_Thermal BINARY_PROPERTY_DETAIL = { - { BINARY_PROPERTY::CIRCULARIZATION_TIMESCALE, { TYPENAME::DOUBLE, "Tau_Circ", "Myr", 24, 15}}, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_FORMED, { TYPENAME::BOOL, "CBD", "Event", 0, 0 }}, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_FORMATION_TIME, { TYPENAME::DOUBLE, "Time", "Myr", 24, 15}}, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_1_AT_FORMATION, { TYPENAME::DOUBLE, "Mass(1)", "Msol", 24, 15}}, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_2_AT_FORMATION, { TYPENAME::DOUBLE, "Mass(2)", "Msol", 24, 15}}, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_STELLAR_TYPE_1_AT_FORMATION, { TYPENAME::STELLAR_TYPE, "Stellar_Type(1)", "-", 4, 1 }}, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_STELLAR_TYPE_2_AT_FORMATION, { TYPENAME::STELLAR_TYPE, "Stellar_Type(2)", "-", 4, 1 }}, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_INITIAL_MASS, { TYPENAME::DOUBLE, "Initial_CBD_Mass", "Msol", 24, 15}}, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_1, { TYPENAME::DOUBLE, "CBD_Mass_Retained(1)", "Msol", 24, 15}}, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_2, { TYPENAME::DOUBLE, "CBD_Mass_Retained(2)", "Msol", 24, 15}}, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_SUPPLIED, { TYPENAME::DOUBLE, "CBD_Mass_Supplied", "Msol", 24, 15}}, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_PRE, { TYPENAME::DOUBLE, "SemiMajorAxisCBD", "Rsol", 24, 15}}, - { BINARY_PROPERTY::CIRCUMBINARY_DISK_ECCENTRICITY_PRE, { TYPENAME::DOUBLE, "EccentricityCBD", "-", 24, 15}}, - { BINARY_PROPERTY::COMMON_ENVELOPE_AT_LEAST_ONCE, { TYPENAME::BOOL, "CEE", "Event", 0, 0 }}, - { BINARY_PROPERTY::COMMON_ENVELOPE_EVENT_COUNT, { TYPENAME::UINT, "CE_Event_Counter", "Count", 6, 1 }}, - { BINARY_PROPERTY::DOUBLE_CORE_COMMON_ENVELOPE, { TYPENAME::BOOL, "Double_Core_CE", "Event", 0, 0 }}, - { BINARY_PROPERTY::DT, { TYPENAME::DOUBLE, "dT", "Myr", 24, 15}}, - { BINARY_PROPERTY::ECCENTRICITY, { TYPENAME::DOUBLE, "Eccentricity", "-", 24, 15}}, - { BINARY_PROPERTY::ECCENTRICITY_AT_DCO_FORMATION, { TYPENAME::DOUBLE, "Eccentricity@DCO", "-", 24, 15}}, - { BINARY_PROPERTY::ECCENTRICITY_INITIAL, { TYPENAME::DOUBLE, "Eccentricity@ZAMS", "-", 24, 15}}, - { BINARY_PROPERTY::ECCENTRICITY_POST_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Eccentricity>CE", "-", 24, 15}}, - { BINARY_PROPERTY::ECCENTRICITY_PRE_SUPERNOVA, { TYPENAME::DOUBLE, "EccentricityCE", "Event", 0, 0 }}, - { BINARY_PROPERTY::MASS_1_POST_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Mass(1)>CE", "Msol", 24, 15}}, - { BINARY_PROPERTY::MASS_1_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Mass(1)CE", "Msol", 24, 15}}, - { BINARY_PROPERTY::MASS_2_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Mass(2)SN_X", "-", 24, 15}}, - { BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_Y, { TYPENAME::DOUBLE, "Orbital_AM_Vector>SN_Y", "-", 24, 15}}, - { BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_Z, { TYPENAME::DOUBLE, "Orbital_AM_Vector>SN_Z", "-", 24, 15}}, - { BINARY_PROPERTY::ORBITAL_ANGULAR_VELOCITY, { TYPENAME::DOUBLE, "Orbital_Angular_Velocity", "kms^-1", 24, 15}}, - { BINARY_PROPERTY::ORBITAL_VELOCITY_PRE_SUPERNOVA, { TYPENAME::DOUBLE, "Orb_VelocityCE", "Rsol", 24, 15}}, - { BINARY_PROPERTY::RADIUS_1_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Radius(1)CE", "Rsol", 24, 15}}, - { BINARY_PROPERTY::RADIUS_2_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Radius(2)MT", "State", 0, 0 }}, - { BINARY_PROPERTY::RLOF_POST_MT_ECCENTRICITY, { TYPENAME::DOUBLE, "Eccentricity>MT", "-", 24, 15}}, - { BINARY_PROPERTY::RLOF_POST_MT_EVENT_COUNTER, { TYPENAME::UINT, "MT_Event_Counter", "Count", 6, 1 }}, - { BINARY_PROPERTY::RLOF_POST_MT_ID, { TYPENAME::OBJECT_ID, "ID>MT", "-", 12, 1 }}, - { BINARY_PROPERTY::RLOF_POST_MT_SEMI_MAJOR_AXIS, { TYPENAME::DOUBLE, "SemiMajorAxis>MT", "Rsol", 24, 15}}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_MASS, { TYPENAME::DOUBLE, "Mass(1)>MT", "Msol", 24, 15}}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_MASS, { TYPENAME::DOUBLE, "Mass(2)>MT", "Msol", 24, 15}}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_RADIUS, { TYPENAME::DOUBLE, "Radius(1)>MT", "Rsol", 24, 15}}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_RADIUS, { TYPENAME::DOUBLE, "Radius(2)>MT", "Rsol", 24, 15}}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_TEFF, { TYPENAME::DOUBLE, "Teff(1)>MT", "K", 24, 15}}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_TEFF, { TYPENAME::DOUBLE, "Teff(2)>MT", "K", 24, 15}}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_LUM, { TYPENAME::DOUBLE, "Lum(1)>MT", "Lsol", 24, 15}}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_LUM, { TYPENAME::DOUBLE, "Lum(2)>MT", "Lsol", 24, 15}}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_RLOF, { TYPENAME::BOOL, "RLOF(1)>MT", "State", 0, 0 }}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_RLOF, { TYPENAME::BOOL, "RLOF(2)>MT", "State", 0, 0 }}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_STELLAR_TYPE, { TYPENAME::STELLAR_TYPE, "Stellar_Type(1)>MT", "-", 4, 1 }}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR1_STELLAR_TYPE_NAME, { TYPENAME::STRING, "Stellar_Type(1)>MT", "-", 42, 1 }}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_STELLAR_TYPE, { TYPENAME::STELLAR_TYPE, "Stellar_Type(2)>MT", "-", 4, 1 }}, - { BINARY_PROPERTY::RLOF_POST_MT_STAR2_STELLAR_TYPE_NAME, { TYPENAME::STRING, "Stellar_Type(2)>MT", "-", 42, 1 }}, - { BINARY_PROPERTY::RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, { TYPENAME::DOUBLE, "Radius(1)|RL>step", "-", 24, 15}}, - { BINARY_PROPERTY::RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, { TYPENAME::DOUBLE, "Radius(2)|RL>step", "-", 24, 15}}, - { BINARY_PROPERTY::RLOF_PRE_MT_ECCENTRICITY, { TYPENAME::DOUBLE, "EccentricityCE", "Event", 0, 0 }}, - { BINARY_PROPERTY::RLOF_TIME_POST_MT, { TYPENAME::DOUBLE, "Time>MT", "Myr", 24, 15}}, - { BINARY_PROPERTY::RLOF_TIME_PRE_MT, { TYPENAME::DOUBLE, "TimeCE", "Rsol", 24, 15}}, - { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "RocheLobe(1)CE", "Rsol", 24, 15}}, - { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "RocheLobe(2)CE", "Rsol", 24, 15}}, - { BINARY_PROPERTY::SEMI_MAJOR_AXIS_POST_STAGE_1_CE, { TYPENAME::DOUBLE, "SemiMajorAxisStage1>CE", "Rsol", 24, 15}}, - { BINARY_PROPERTY::SEMI_MAJOR_AXIS_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "SemiMajorAxisCE", "State", 0, 0 }}, - { BINARY_PROPERTY::STELLAR_MERGER, { TYPENAME::BOOL, "Merger", "Event", 0, 0 }}, - { BINARY_PROPERTY::STELLAR_MERGER_AT_BIRTH, { TYPENAME::BOOL, "Merger_At_Birth", "Event", 0, 0 }}, - { BINARY_PROPERTY::STELLAR_TYPE_1_POST_COMMON_ENVELOPE, { TYPENAME::STELLAR_TYPE, "Stellar_Type(1)>CE", "-", 4, 1 }}, - { BINARY_PROPERTY::STELLAR_TYPE_1_PRE_COMMON_ENVELOPE, { TYPENAME::STELLAR_TYPE, "Stellar_Type(1)CE", "-", 4, 1 }}, - { BINARY_PROPERTY::STELLAR_TYPE_2_PRE_COMMON_ENVELOPE, { TYPENAME::STELLAR_TYPE, "Stellar_Type(2)CE", "-", 42, 1 }}, - { BINARY_PROPERTY::STELLAR_TYPE_NAME_1_PRE_COMMON_ENVELOPE, { TYPENAME::STRING, "Stellar_Type(1)CE", "-", 42, 1 }}, - { BINARY_PROPERTY::STELLAR_TYPE_NAME_2_PRE_COMMON_ENVELOPE, { TYPENAME::STRING, "Stellar_Type(2) PROGRAM_OPTION_DETAIL = { - - { PROGRAM_OPTION::ADD_OPTIONS_TO_SYSPARMS, { TYPENAME::INT, "PO_Add_Options_To_SysParms", "-", 4, 1 }}, - { PROGRAM_OPTION::ALLOW_NON_STRIPPED_ECSN, { TYPENAME::BOOL, "PO_Allow_Non_Stripped_ECSN", "Flag", 0, 0 }}, - { PROGRAM_OPTION::ALLOW_MS_STAR_TO_SURVIVE_COMMON_ENVELOPE, { TYPENAME::BOOL, "PO_Allow_MS_To_Survive_CE", "Flag", 0, 0 }}, - { PROGRAM_OPTION::ALLOW_RADIATIVE_ENVELOPE_STAR_TO_SURVIVE_COMMON_ENVELOPE, { TYPENAME::BOOL, "PO_Allow_Radiative_Envelope_To_Survive_CE", "Flag", 0, 0 }}, - { PROGRAM_OPTION::ALLOW_IMMEDIATE_RLOF_POST_CE_TO_SURVIVE_COMMON_ENVELOPE, { TYPENAME::BOOL, "PO_Allow_Immediate_RLOF>CE_To_Survive_CE", "Flag", 0, 0 }}, - { PROGRAM_OPTION::ALLOW_RLOF_AT_BIRTH, { TYPENAME::BOOL, "PO_Allow_RLOF@Birth", "Flag", 0, 0 }}, - { PROGRAM_OPTION::ALLOW_TOUCHING_AT_BIRTH, { TYPENAME::BOOL, "PO_Allow_Touching@Birth", "Flag", 0, 0 }}, - { PROGRAM_OPTION::ANG_MOM_CONSERVATION_DURING_CIRCULARISATION, { TYPENAME::BOOL, "PO_Conserve_AngMom@Circ", "Flag", 0, 0 }}, - - { PROGRAM_OPTION::BLACK_HOLE_KICKS_MODE, { TYPENAME::INT, "PO_BH_Kicks_Mode", "-", 4, 1 }}, - - { PROGRAM_OPTION::CASE_BB_STABILITY_PRESCRIPTION, { TYPENAME::INT, "PO_BB_Mass_xFer_Stblty_Prscrptn", "-", 4, 1 }}, - - { PROGRAM_OPTION::CHECK_PHOTON_TIRING_LIMIT, { TYPENAME::BOOL, "PO_Check_Photon_Tiring_Limit", "Flag", 0, 0 }}, - - { PROGRAM_OPTION::CHE_MODE, { TYPENAME::INT, "PO_CHE_Mode", "-", 4, 1 }}, - - { PROGRAM_OPTION::CIRCULARISE_BINARY_DURING_MT, { TYPENAME::BOOL, "PO_Circularise@MT", "Flag", 0, 0 }}, - - { PROGRAM_OPTION::CIRCUMBINARY_DISK, { TYPENAME::BOOL, "PO_CBD", "Flag", 0, 0 }}, - { PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_MODE, { TYPENAME::INT, "PO_CBD_Eddington_Mode", "-", 4, 1 }}, - { PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_CAP_FACTOR, { TYPENAME::DOUBLE, "PO_CBD_Eddington_Cap_Factor", "-", 24, 15}}, - { PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_GE23_FACTOR, { TYPENAME::DOUBLE, "PO_CBD_Eddington_GE23_Factor", "-", 24, 15}}, - { PROGRAM_OPTION::CIRCUMBINARY_DISK_BETA, { TYPENAME::DOUBLE, "PO_CBD_Beta", "-", 24, 15}}, - { PROGRAM_OPTION::CIRCUMBINARY_DISK_INNER_RADIUS_OVER_SEPARATION, { TYPENAME::DOUBLE, "PO_CBD_Inner_Radius_Over_Separation", "-", 24, 15}}, - { PROGRAM_OPTION::CIRCUMBINARY_DISK_LIFETIME, { TYPENAME::DOUBLE, "PO_CBD_Lifetime", "yr", 24, 15}}, - { PROGRAM_OPTION::CIRCUMBINARY_DISK_STRUCTURE_FACTOR, { TYPENAME::DOUBLE, "PO_CBD_Structure_Factor", "-", 24, 15}}, - { PROGRAM_OPTION::CIRCUMBINARY_DISK_ENVELOPE_MASS_FRACTION_SUPPLIED, { TYPENAME::DOUBLE, "PO_CBD_Envelope_Mass_Fraction_Supplied", "-", 24, 15}}, - { PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_CAP, { TYPENAME::DOUBLE, "PO_Post_CE_Eccentricity_Cap", "-", 24, 15}}, - { PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_FRACTION, { TYPENAME::DOUBLE, "PO_Post_CE_Eccentricity_Fraction", "-", 24, 15}}, - { PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION, { TYPENAME::INT, "PO_Post_CE_Eccentricity_Prescription", "-", 4, 1}}, - - { PROGRAM_OPTION::COMMON_ENVELOPE_ALPHA, { TYPENAME::DOUBLE, "PO_CE_Alpha", "-", 24, 15}}, - { PROGRAM_OPTION::COMMON_ENVELOPE_ALPHA_THERMAL, { TYPENAME::DOUBLE, "PO_CE_Alpha_Thermal", "-", 24, 15}}, - { PROGRAM_OPTION::COMMON_ENVELOPE_FORMALISM, { TYPENAME::INT, "PO_CE_Formalism", "-", 4, 1 }}, - { PROGRAM_OPTION::COMMON_ENVELOPE_LAMBDA, { TYPENAME::DOUBLE, "PO_CE_Lambda", "-", 24, 15}}, - { PROGRAM_OPTION::COMMON_ENVELOPE_LAMBDA_MULTIPLIER, { TYPENAME::DOUBLE, "PO_CE_Lambda_Multiplier", "-", 24, 15}}, - { PROGRAM_OPTION::COMMON_ENVELOPE_LAMBDA_PRESCRIPTION, { TYPENAME::INT, "PO_CE_Lambda_Prscrptn", "-", 4, 1 }}, - { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_CONSTANT, { TYPENAME::DOUBLE, "PO_CE_Mass_Accr_Constant", "-", 24, 15}}, - { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_MAX, { TYPENAME::DOUBLE, "PO_CE_Mass_Accr_Max", "Msol", 24, 15}}, - { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_MIN, { TYPENAME::DOUBLE, "PO_CE_Mass_Accr_Min", "Msol", 24, 15}}, - { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_PRESCRIPTION, { TYPENAME::INT, "PO_CE_Mass_Accr_Prscrptn", "-", 4, 1 }}, - { PROGRAM_OPTION::COMMON_ENVELOPE_RECOMBINATION_ENERGY_DENSITY, { TYPENAME::DOUBLE, "PO_CE_Recomb_Enrgy_Dnsty", "erg g^-1", 24, 15}}, - { PROGRAM_OPTION::COMMON_ENVELOPE_SECOND_STAGE_BETA, { TYPENAME::DOUBLE, "PO_CE_Second_Stage_Beta", "-", 24, 15}}, - { PROGRAM_OPTION::COMMON_ENVELOPE_SECOND_STAGE_GAMMA_PRESCRIPTION, { TYPENAME::INT, "PO_CE_Second_Stage_Gamma_Prescription", "-", 24, 15}}, - { PROGRAM_OPTION::COMMON_ENVELOPE_SLOPE_KRUCKOW, { TYPENAME::DOUBLE, "PO_CE_Slope_Kruckow", "-", 24, 15}}, - - { PROGRAM_OPTION::COOL_WIND_MASS_LOSS_MULTIPLIER, { TYPENAME::DOUBLE, "PO_Cool_WindMassLoss_Multipl", "-", 24, 15}}, - - { PROGRAM_OPTION::ECCENTRICITY, { TYPENAME::DOUBLE, "PO_Eccentricity", "-", 24, 15}}, - { PROGRAM_OPTION::ECCENTRICITY_DISTRIBUTION, { TYPENAME::INT, "PO_Eccentricity_Dstrbtn", "-", 4, 1 }}, - { PROGRAM_OPTION::ECCENTRICITY_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Eccentricity_Dstrbtn_Max", "-", 24, 15}}, - { PROGRAM_OPTION::ECCENTRICITY_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Eccentricity_Dstrbtn_Min", "-", 24, 15}}, - { PROGRAM_OPTION::EDDINGTON_ACCRETION_FACTOR, { TYPENAME::DOUBLE, "PO_Eddington_Accr_Factor", "-", 24, 15}}, - { PROGRAM_OPTION::ENABLE_ROTATIONALLY_ENHANCED_MASS_LOSS, { TYPENAME::BOOL, "PO_Enable_Rotationally_Enhanced_Mass_Loss", "Flag", 0, 0}}, - { PROGRAM_OPTION::ENHANCE_CHE_LIFETIMES_LUMINOSITIES, { TYPENAME::BOOL, "PO_Enhance_CHE_lifetimes_luminosities", "Flag", 0, 0}}, - { PROGRAM_OPTION::ENVELOPE_STATE_PRESCRIPTION, { TYPENAME::INT, "PO_Envelope_State_Prscrptn", "-", 4, 1 }}, - { PROGRAM_OPTION::EVOLUTION_MODE, { TYPENAME::INT, "PO_Evolution_Mode", "Mode", 4, 1 }}, - - { PROGRAM_OPTION::FP_ERROR_MODE, { TYPENAME::INT, "PO_FP_Error_Mode", "Mode", 4, 1 }}, - - { PROGRAM_OPTION::FRYER_SUPERNOVA_ENGINE, { TYPENAME::INT, "PO_Fryer_SN_Engine", "-", 4, 1 }}, - - { PROGRAM_OPTION::FRYER22_FMIX, { TYPENAME::DOUBLE, "PO_Fryer22_mixing_fraction", "-", 24, 15}}, - { PROGRAM_OPTION::FRYER22_MCRIT, { TYPENAME::DOUBLE, "PO_Fryer22_crit_COcore_Mass", "Msol", 24, 15}}, - - { PROGRAM_OPTION::INITIAL_MASS, { TYPENAME::DOUBLE, "PO_Initial_Mass", "Msol", 24, 15}}, - { PROGRAM_OPTION::INITIAL_MASS_1, { TYPENAME::DOUBLE, "PO_Initial_Mass(1)", "Msol", 24, 15}}, - { PROGRAM_OPTION::INITIAL_MASS_2, { TYPENAME::DOUBLE, "PO_Initial_Mass(2)", "Msol", 24, 15}}, - - { PROGRAM_OPTION::INITIAL_MASS_FUNCTION, { TYPENAME::INT, "PO_Initial_Mass_Function", "-", 4, 1 }}, - { PROGRAM_OPTION::INITIAL_MASS_FUNCTION_MAX, { TYPENAME::DOUBLE, "PO_Initial_Mass_Func_Max", "Msol", 24, 15}}, - { PROGRAM_OPTION::INITIAL_MASS_FUNCTION_MIN, { TYPENAME::DOUBLE, "PO_Initial_Mass_Func_Min", "Msol", 24, 15}}, - { PROGRAM_OPTION::INITIAL_MASS_FUNCTION_POWER, { TYPENAME::DOUBLE, "PO_Initial_Mass_Func_Power", "-", 24, 15}}, - - { PROGRAM_OPTION::KICK_DIRECTION_DISTRIBUTION, { TYPENAME::INT, "PO_Kick_Direction_Dstrbtn", "-", 4, 1 }}, - { PROGRAM_OPTION::KICK_DIRECTION_POWER, { TYPENAME::DOUBLE, "PO_Kick_Direction_Power", "-", 24, 15}}, - { PROGRAM_OPTION::KICK_SCALING_FACTOR, { TYPENAME::DOUBLE, "PO_Kick_Scaling_Factor", "-", 24, 15}}, - { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION, { TYPENAME::INT, "PO_Kick_Magnitude_Dstrbtn", "-", 4, 1 }}, - { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_MAXIMUM, { TYPENAME::DOUBLE, "PO_Kick_Magnitude_Dstrbtn_Max", "-", 24, 15}}, - - { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH, { TYPENAME::DOUBLE, "PO_Sigma_Kick_CCSN_BH", "kms^-1", 24, 15}}, - { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS, { TYPENAME::DOUBLE, "PO_Sigma_Kick_CCSN_NS", "kms^-1", 24, 15}}, - { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN, { TYPENAME::DOUBLE, "PO_Sigma_Kick_ECSN", "kms^-1", 24, 15}}, - { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN, { TYPENAME::DOUBLE, "PO_Sigma_Kick_USSN", "kms^-1", 24, 15}}, - - { PROGRAM_OPTION::KICK_MAGNITUDE, { TYPENAME::DOUBLE, "PO_Kick_Magnitude", "kms^-1", 24, 15}}, - { PROGRAM_OPTION::KICK_MAGNITUDE_1, { TYPENAME::DOUBLE, "PO_Kick_Magnitude(1)", "kms^-1", 24, 15}}, - { PROGRAM_OPTION::KICK_MAGNITUDE_2, { TYPENAME::DOUBLE, "PO_Kick_Magnitude(2)", "kms^-1", 24, 15}}, - - { PROGRAM_OPTION::KICK_MAGNITUDE_RANDOM, { TYPENAME::DOUBLE, "PO_Kick_Magnitude_Random", "-", 24, 15}}, - { PROGRAM_OPTION::KICK_MAGNITUDE_RANDOM_1, { TYPENAME::DOUBLE, "PO_Kick_Magnitude_Random(1)", "-", 24, 15}}, - { PROGRAM_OPTION::KICK_MAGNITUDE_RANDOM_2, { TYPENAME::DOUBLE, "PO_Kick_Magnitude_Random(2)", "-", 24, 15}}, - - { PROGRAM_OPTION::KICK_MEAN_ANOMALY_1, { TYPENAME::DOUBLE, "PO_Kick_Mean_Anomaly(1)", "-", 24, 15}}, - { PROGRAM_OPTION::KICK_MEAN_ANOMALY_2, { TYPENAME::DOUBLE, "PO_Kick_Mean_Anomaly(2)", "-", 24, 15}}, - { PROGRAM_OPTION::KICK_PHI_1, { TYPENAME::DOUBLE, "PO_Kick_Phi(1)", "-", 24, 15}}, - { PROGRAM_OPTION::KICK_PHI_2, { TYPENAME::DOUBLE, "PO_Kick_Phi(2)", "-", 24, 15}}, - { PROGRAM_OPTION::KICK_THETA_1, { TYPENAME::DOUBLE, "PO_Kick_Theta(1)", "-", 24, 15}}, - { PROGRAM_OPTION::KICK_THETA_2, { TYPENAME::DOUBLE, "PO_Kick_Theta(2)", "-", 24, 15}}, - - { PROGRAM_OPTION::LBV_FACTOR, { TYPENAME::DOUBLE, "PO_LBV_Factor", "-", 24, 15}}, - { PROGRAM_OPTION::LBV_MASS_LOSS_PRESCRIPTION, { TYPENAME::INT, "PO_LBV_Mass_Loss_Prscrptn", "-", 4, 1 }}, - - { PROGRAM_OPTION::MALTSEV_FALLBACK, { TYPENAME::DOUBLE, "PO_Maltsev_Fallback", "-", 24, 15}}, - { PROGRAM_OPTION::MALTSEV_MODE, { TYPENAME::INT, "PO_Maltsev_Mode", "-", 4, 1 }}, - { PROGRAM_OPTION::MASS_LOSS_PRESCRIPTION, { TYPENAME::INT, "PO_Mass_Loss_Prscrptn", "-", 4, 1 }}, - - { PROGRAM_OPTION::MASS_RATIO, { TYPENAME::DOUBLE, "PO_Mass_Ratio", "-", 24, 15}}, - { PROGRAM_OPTION::MASS_RATIO_DISTRIBUTION, { TYPENAME::INT, "PO_Mass_Ratio_Dstrbtn", "-", 4, 1 }}, - { PROGRAM_OPTION::MASS_RATIO_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Mass_Ratio_Dstrbtn_Max", "-", 24, 15}}, - { PROGRAM_OPTION::MASS_RATIO_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Mass_Ratio_Dstrbtn_Min", "-", 24, 15}}, - - { PROGRAM_OPTION::MAXIMUM_EVOLUTION_TIME, { TYPENAME::DOUBLE, "PO_Max_Evolution_Time", "Myr", 24, 15}}, - { PROGRAM_OPTION::MAXIMUM_DONOR_MASS, { TYPENAME::DOUBLE, "PO_Max_Donor_Mass", "Msol", 24, 15}}, - { PROGRAM_OPTION::MAXIMUM_NEUTRON_STAR_MASS, { TYPENAME::DOUBLE, "PO_Max_NS_Mass", "Msol", 24, 15}}, - { PROGRAM_OPTION::MAXIMUM_TIMESTEPS, { TYPENAME::ULONGINT, "PO_Max_Timesteps", "Count", 10, 1 }}, - - { PROGRAM_OPTION::MCBUR1, { TYPENAME::DOUBLE, "PO_MCBUR1", "Msol", 24, 15}}, - - { PROGRAM_OPTION::METALLICITY, { TYPENAME::DOUBLE, "PO_Metallicity", "-", 24, 15}}, - { PROGRAM_OPTION::METALLICITY_DISTRIBUTION, { TYPENAME::INT, "PO_Metallicity_Dstrbtn", "-", 4, 1 }}, - { PROGRAM_OPTION::METALLICITY_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Metallicity_Dstrbtn_Max", "-", 24, 15}}, - { PROGRAM_OPTION::METALLICITY_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Metallicity_Dstrbtn_Min", "-", 24, 15}}, - - { PROGRAM_OPTION::MINIMUM_SAMPLED_SECONDARY_MASS, { TYPENAME::DOUBLE, "PO_Min_Sampled_Secondary_Mass", "Msol", 24, 15}}, - - { PROGRAM_OPTION::MT_ACCRETION_EFFICIENCY_PRESCRIPTION, { TYPENAME::INT, "PO_MT_Acc_Efficiency_Prscrptn", "-", 4, 1 }}, - { PROGRAM_OPTION::MT_ANG_MOM_LOSS_PRESCRIPTION, { TYPENAME::INT, "PO_MT_AngMom_Loss_Prscrptn", "-", 4, 1 }}, - { PROGRAM_OPTION::MT_THERMAL_LIMIT_C, { TYPENAME::DOUBLE, "PO_MT_Thermal_Limit_C", "-", 24, 15}}, - - { PROGRAM_OPTION::MT_CRIT_MR_MS_LOW_MASS_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_MS_Low_Mass_Deg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_MS_LOW_MASS_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_MS_Low_Mass_NonDeg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_MS_HIGH_MASS_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_MS_High_Mass_Deg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_MS_HIGH_MASS_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_MS_High_Mass_NonDeg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_GIANT_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_Giant_Deg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_GIANT_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_Giant_NonDeg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_HG_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HG_Deg_Acc", "-", 24, 15}}, - - { PROGRAM_OPTION::MT_CRIT_MR_HG_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HG_NonDeg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_HE_GIANT_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HE_Giant_Deg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_HE_GIANT_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HE_Giant_NonDeg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_HE_HG_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HE_HG_Deg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_HE_HG_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HE_HG_NonDeg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_HE_MS_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HE_MS_Deg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_HE_MS_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HE_MS_NonDeg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_WD_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_WD_Deg_Acc", "-", 24, 15}}, - { PROGRAM_OPTION::MT_CRIT_MR_WD_NONDEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_WD_NonDeg_Acc", "-", 24, 15}}, - - { PROGRAM_OPTION::MT_FRACTION_ACCRETED, { TYPENAME::DOUBLE, "PO_MT_Fraction_Accreted", "-", 24, 15}}, - { PROGRAM_OPTION::MT_JLOSS, { TYPENAME::DOUBLE, "PO_MT_JLoss", "-", 24, 15}}, - { PROGRAM_OPTION::MT_JLOSS_LINEAR_FRACTION_DEGEN, { TYPENAME::DOUBLE, "PO_MT_JLoss_Linear_Frac_Degen", "-", 24, 15}}, - { PROGRAM_OPTION::MT_JLOSS_LINEAR_FRACTION_NON_DEGEN, { TYPENAME::DOUBLE, "PO_MT_JLoss_Linear_Frac_Non_Degen", "-", 24, 15}}, - { PROGRAM_OPTION::MT_REJUVENATION_PRESCRIPTION, { TYPENAME::INT, "PO_MT_Rejuvenation_Prscrptn", "-", 4, 1 }}, - { PROGRAM_OPTION::MT_THERMALLY_LIMITED_VARIATION, { TYPENAME::INT, "PO_MT_Thermally_Lmtd_Variation", "-", 4, 1 }}, - - { PROGRAM_OPTION::MULLER_MANDEL_KICK_MULTIPLIER_BH, { TYPENAME::DOUBLE, "PO_MM_Kick_Multiplier_BH", "-", 24, 15}}, - { PROGRAM_OPTION::MULLER_MANDEL_KICK_MULTIPLIER_NS, { TYPENAME::DOUBLE, "PO_MM_Kick_Multiplier_NS", "-", 24, 15}}, - { PROGRAM_OPTION::MULLER_MANDEL_SIGMA_KICK_BH, { TYPENAME::DOUBLE, "PO_MM_Sigma_Kick_BH", "-", 24, 15}}, - { PROGRAM_OPTION::MULLER_MANDEL_SIGMA_KICK_NS, { TYPENAME::DOUBLE, "PO_MM_Sigma_Kick_NS", "-", 24, 15}}, - - { PROGRAM_OPTION::NEUTRINO_MASS_LOSS_ASSUMPTION_BH, { TYPENAME::INT, "PO_Neutrino_Mass_Loss_Assmptn", "-", 4, 1 }}, - { PROGRAM_OPTION::NEUTRINO_MASS_LOSS_VALUE_BH, { TYPENAME::DOUBLE, "PO_Neutrino_Mass_Loss_Value", "-", 24, 15}}, - - { PROGRAM_OPTION::NS_ACCRETION_IN_CE, { TYPENAME::INT, "PO_NS_ACCRETION_IN_CE", "-", 4, 1 }}, - { PROGRAM_OPTION::NS_EOS, { TYPENAME::INT, "PO_NS_EOS", "-", 4, 1 }}, - - { PROGRAM_OPTION::ORBITAL_PERIOD, { TYPENAME::DOUBLE, "PO_Orbital_Period", "days", 24, 15}}, - { PROGRAM_OPTION::ORBITAL_PERIOD_DISTRIBUTION, { TYPENAME::INT, "PO_Orbital_Period_Dstrbtn", "-", 4, 1 }}, - { PROGRAM_OPTION::ORBITAL_PERIOD_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Orbital_Period_Max", "days", 24, 15}}, - { PROGRAM_OPTION::ORBITAL_PERIOD_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Orbital_Period_Min", "days", 24, 15}}, - - { PROGRAM_OPTION::OVERALL_WIND_MASS_LOSS_MULTIPLIER, { TYPENAME::DOUBLE, "PO_Overall_WindMassLoss_Multipl", "-", 24, 15}}, - - { PROGRAM_OPTION::PISN_LOWER_LIMIT, { TYPENAME::DOUBLE, "PO_PISN_Lower_Limit", "Msol", 24, 15}}, - { PROGRAM_OPTION::PISN_UPPER_LIMIT, { TYPENAME::DOUBLE, "PO_PISN_Upper_Limit", "Msol", 24, 15}}, - - { PROGRAM_OPTION::PPI_LOWER_LIMIT, { TYPENAME::DOUBLE, "PO_PPI_Lower_Limit", "Msol", 24, 15}}, - { PROGRAM_OPTION::PPI_PRESCRIPTION, { TYPENAME::INT, "PO_PPI_Prscrptn", "-", 4, 1 }}, - { PROGRAM_OPTION::PPI_UPPER_LIMIT, { TYPENAME::DOUBLE, "PO_PPI_Upper_Limit", "Msol", 24, 15}}, - { PROGRAM_OPTION::PPI_CO_CORE_SHIFT_HENDRIKS, { TYPENAME::DOUBLE, "PO_PPI_CO_CORE_SHIFT_HENDRIKS", "Msol", 24, 15}}, - - { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DISTRIBUTION, { TYPENAME::INT, "PO_Pulsar_Mag_Field_Dstrbtn", "-", 4, 1 }}, - { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Pulsar_Mag_Field_Dstrbtn_Max", "AU", 24, 15}}, - { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Pulsar_Mag_Field_Dstrbtn_Min", "AU", 24, 15}}, - - { PROGRAM_OPTION::PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION, { TYPENAME::INT, "PO_Pulsar_Spin_Period_Dstrbtn", "-", 4, 1 }}, - { PROGRAM_OPTION::PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Pulsar_Spin_Period_Dstrbtn_Max", "AU", 24, 15}}, - { PROGRAM_OPTION::PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Pulsar_Spin_Period_Dstrbtn_Min", "AU", 24, 15}}, - - { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DECAY_MASS_SCALE, { TYPENAME::DOUBLE, "PO_Pulsar_Mag_Field_Decay_mScale", "Msol", 24, 15}}, - { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DECAY_TIME_SCALE, { TYPENAME::DOUBLE, "PO_Pulsar_Mag_Field_Decay_tScale", "Myr", 24, 15}}, - - { PROGRAM_OPTION::PULSAR_MINIMUM_MAGNETIC_FIELD, { TYPENAME::DOUBLE, "PO_Pulsar_Minimum_Mag_Field", "Gauss", 24, 15}}, - - { PROGRAM_OPTION::QCRIT_PRESCRIPTION, { TYPENAME::INT, "PO_qCrit_Prescription", "-", 4, 1 }}, - - { PROGRAM_OPTION::RANDOM_SEED, { TYPENAME::ULONGINT, "PO_SEED(OPTION)", "-", 12, 1 }}, - { PROGRAM_OPTION::RANDOM_SEED_CMDLINE, { TYPENAME::ULONGINT, "PO_SEED(CMDLINE)", "-", 12, 1 }}, - - { PROGRAM_OPTION::REMNANT_MASS_PRESCRIPTION, { TYPENAME::INT, "PO_Remnant_Mass_Prscrptn", "-", 4, 1 }}, - - { PROGRAM_OPTION::RESPONSE_TO_SPIN_UP, { TYPENAME::INT, "PO_Response_To_Spin_Up", "-", 4, 1 }}, - - { PROGRAM_OPTION::ROCKET_KICK_MAGNITUDE_1, { TYPENAME::DOUBLE, "PO_Rocket_Kick_Magnitude(1)", "kms^-1", 24, 15}}, - { PROGRAM_OPTION::ROCKET_KICK_MAGNITUDE_2, { TYPENAME::DOUBLE, "PO_Rocket_Kick_Magnitude(2)", "kms^-1", 24, 15}}, - { PROGRAM_OPTION::ROCKET_KICK_PHI_1, { TYPENAME::DOUBLE, "PO_Rocket_Kick_Phi(1)", "-", 24, 15}}, - { PROGRAM_OPTION::ROCKET_KICK_PHI_2, { TYPENAME::DOUBLE, "PO_Rocket_Kick_Phi(2)", "-", 24, 15}}, - { PROGRAM_OPTION::ROCKET_KICK_THETA_1, { TYPENAME::DOUBLE, "PO_Rocket_Kick_Theta(1)", "-", 24, 15}}, - { PROGRAM_OPTION::ROCKET_KICK_THETA_2, { TYPENAME::DOUBLE, "PO_Rocket_Kick_Theta(2)", "-", 24, 15}}, - - { PROGRAM_OPTION::ROTATIONAL_VELOCITY_DISTRIBUTION, { TYPENAME::INT, "PO_Rotational_Velocity_Dstrbtn", "-", 4, 1 }}, - { PROGRAM_OPTION::ROTATIONAL_FREQUENCY, { TYPENAME::DOUBLE, "PO_Rotational_Frequency", "Hz", 24, 15}}, - { PROGRAM_OPTION::ROTATIONAL_FREQUENCY_1, { TYPENAME::DOUBLE, "PO_Rotational_Frequency(1)", "Hz", 24, 15}}, - { PROGRAM_OPTION::ROTATIONAL_FREQUENCY_2, { TYPENAME::DOUBLE, "PO_Rotational_Frequency(2)", "Hz", 24, 15}}, - - { PROGRAM_OPTION::SCALE_CHE_MASS_LOSS_SURF_HE_ABUNDANCE, { TYPENAME::BOOL, "PO_Scale_CHE_Mass_Loss_Surf_He_Abundance", "flag", 0, 0}}, - { PROGRAM_OPTION::SCALE_TERMINAL_WIND_VEL_METALLICITY_POWER, { TYPENAME::DOUBLE, "PO_Scale_Terminal_Wind_Vel_Metallicity_Power", "-", 24, 15}}, - { PROGRAM_OPTION::SEMI_MAJOR_AXIS, { TYPENAME::DOUBLE, "PO_Semi-Major_Axis", "AU", 24, 15}}, - { PROGRAM_OPTION::SEMI_MAJOR_AXIS_DISTRIBUTION, { TYPENAME::INT, "PO_Semi-Major_Axis_Dstrbtn", "-", 4, 1 }}, - { PROGRAM_OPTION::SEMI_MAJOR_AXIS_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Semi-Major_Axis_Dstrbtn_Max", "AU", 24, 15}}, - { PROGRAM_OPTION::SEMI_MAJOR_AXIS_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Semi-Major_Axis_Dstrbtn_Min", "AU", 24, 15}}, - - { PROGRAM_OPTION::STELLAR_ZETA_PRESCRIPTION, { TYPENAME::INT, "PO_Stellar_Zeta_Prscrptn", "-", 4, 1 }}, - - { PROGRAM_OPTION::TIDES_PRESCRIPTION, { TYPENAME::INT, "PO_Tides_Prscrptn", "-", 4, 1 }}, - - { PROGRAM_OPTION::USSN_KICKS_OVERRIDE_MANDEL_MULLER, { TYPENAME::BOOL, "PO_USSN_Kicks_Override_Mandel_Muller", "flag", 0, 0}}, - - { PROGRAM_OPTION::WR_FACTOR, { TYPENAME::DOUBLE, "PO_WR_Factor", "-", 24, 15}}, - - { PROGRAM_OPTION::ZETA_ADIABATIC_ARBITRARY, { TYPENAME::DOUBLE, "PO_Zeta_Adiabatic_Arbitrary", "-", 24, 15}}, - { PROGRAM_OPTION::ZETA_MS, { TYPENAME::DOUBLE, "PO_Zeta_Main_Sequence", "-", 24, 15}}, - { PROGRAM_OPTION::ZETA_RADIATIVE_ENVELOPE_GIANT, { TYPENAME::DOUBLE, "PO_Zeta_Radiative_Envelope_Giant", "-", 24, 15}} -}; - - -// enum class LOGFILE -// Symbolic names for logfiles -enum class LOGFILE: int { - NONE, - - DEBUG_LOG, - ERROR_LOG, - - BSE_COMMON_ENVELOPES, - BSE_CIRCUMBINARY_DISKS, - BSE_DETAILED_OUTPUT, - BSE_DOUBLE_COMPACT_OBJECTS, - BSE_PULSAR_EVOLUTION, - BSE_RLOF_PARAMETERS, - BSE_SUPERNOVAE, - BSE_SWITCH_LOG, - BSE_SYSTEM_SNAPSHOT_LOG, - BSE_SYSTEM_PARAMETERS, - - SSE_DETAILED_OUTPUT, - SSE_PULSAR_EVOLUTION, - SSE_SUPERNOVAE, - SSE_SWITCH_LOG, - SSE_SYSTEM_SNAPSHOT_LOG, - SSE_SYSTEM_PARAMETERS -}; - - -// Logfile record types -// Note all enum classes for log record types start at 1 (and *must* start at 1) -typedef unsigned int LOGRECORDTYPE; - -enum class CE_RECORD_TYPE: unsigned int { // BSE_COMMON_ENVELOPES file record type - DEFAULT = 1 // 1 - default BSE_COMMON_ENVELOPES file record type -}; - -enum class DCO_RECORD_TYPE: unsigned int { // BSE_DOUBLE_COMPACT_OBJECTS file record type - DEFAULT = 1 // 1 - default BSE_DOUBLE_COMPACT_OBJECTS file record type -}; - -enum class BSE_PULSAR_RECORD_TYPE: unsigned int { // BSE_PULSAR_EVOLUTION file record type - PRE_SN = 1, // 1 - record was logged immediately prior to a supernova event - POST_SN, // 2 - record was logged immediately following a supernova event - POST_BINARY_TIMESTEP // 3 - record was logged immediately following binary timestep (i.e. the evolution of the binary system for a single timestep) -}; - -enum class RLOF_RECORD_TYPE: unsigned int { // BSE_RLOF_PARAMETERS file record type - DEFAULT = 1 // 1 - default BSE_RLOF_PARAMETERS file record type -}; - -enum class BSE_DETAILED_RECORD_TYPE: unsigned int { // BSE_DETAILED_OUTPUT file record type - INITIAL_STATE = 1, // 1 - record describes the initial state of the binary - POST_STELLAR_TIMESTEP, // 2 - record was logged immediately following stellar timestep (i.e. the evolution of the constituent stars for a single timestep) - POST_BINARY_TIMESTEP, // 3 - record was logged immediately following binary timestep (i.e. the evolution of the binary system for a single timestep) - TIMESTEP_COMPLETED, // 4 - record was logged immediately following the completion of the timestep (after all changes to the binary and components) - FINAL_STATE, // 5 - record describes the final state of the binary - STELLAR_TYPE_CHANGE_DURING_CEE, // 6 - record was logged immediately following a stellar type change during a common envelope event - STELLAR_TYPE_CHANGE_DURING_MT, // 7 - record was logged immediately following a stellar type change during a mass transfer event - STELLAR_TYPE_CHANGE_DURING_MASS_RESOLUTION, // 8 - record was logged immediately following a stellar type change during mass resolution - STELLAR_TYPE_CHANGE_DURING_CHE_EQUILIBRATION, // 9 - record was logged immediately following a stellar type change during mass equilibration for CHE - POST_MT, // 10 - record was logged immediately following a mass transfer event - POST_WINDS, // 11 - record was logged immediately following winds mass loss - POST_CEE, // 12 - record was logged immediately following a common envelope event - POST_SN, // 13 - record was logged immediately following a supernova event - POST_MASS_RESOLUTION, // 14 - record was logged immediately following mass resolution (i.e. after winds mass loss & mass transfer complete) - POST_MASS_RESOLUTION_MERGER, // 15 - record was logged immediately following a merger after mass resolution - PRE_STELLAR_TIMESTEP // 16 - record was logged immediately prior to stellar timestep (i.e. the evolution of the constituent stars for a single timestep) -}; - -enum class SSE_DETAILED_RECORD_TYPE: unsigned int { // SSE_DETAILED_OUTPUT file record type - INITIAL_STATE = 1, // 1 - record describes the initial state of the star - PRE_MASS_LOSS, // 2 - record was logged after timestep taken, but before mass loss resolution - POST_MASS_LOSS, // 3 - record was logged after after mass loss resolution - TIMESTEP_COMPLETED, // 4 - record was logged immediately following the completion of the timestep (after all changes to the star) - FINAL_STATE // 5 - record describes the final state of the star -}; - -enum class SSE_PULSAR_RECORD_TYPE: unsigned int { // SSE_PULSAR_EVOLUTION file record type - PRE_SN = 1, // 1 - record was logged immediately prior to a supernova event - POST_SN, // 2 - record was logged immediately following a supernova event - TIMESTEP_COMPLETED // 3 - record was logged immediately following the completion of the timestep (after all changes to the star) -}; - -enum class BSE_SN_RECORD_TYPE: unsigned int { // BSE_SUPERNOVAE file record type - DEFAULT = 1 // 1 - default BSE_SUPERNOVAE file record type -}; - -enum class SSE_SN_RECORD_TYPE: unsigned int { // SSE_SUPERNOVAE file record type - DEFAULT = 1 // 1 - default SSE_SUPERNOVAE file record type -}; - -enum class BSE_SYSPARMS_RECORD_TYPE: unsigned int { // BSE_SYSTEM_PARAMETERS file record type - DEFAULT = 1 // 1 - default BSE_SYSTEM_PARAMETERS file record type -}; - -enum class SSE_SYSPARMS_RECORD_TYPE: unsigned int { // SSE_SYSTEM_PARAMETERS file record type - DEFAULT = 1 // 1 - default SSE_SYSTEM_PARAMETERS file record type -}; - -enum class BSE_SYSTEM_SNAPSHOT_RECORD_TYPE: unsigned int { // BSE_SYSTEM_SNAPSHOT_LOG file record type - DEFAULT = 1 // 1 - default BSE_SYSTEM_SNAPSHOT_LOG file record type -}; - -enum class SSE_SYSTEM_SNAPSHOT_RECORD_TYPE: unsigned int { // SSE_SYSTEM_SNAPSHOT_LOG file record type - DEFAULT = 1 // 1 - default SSE_SYSTEM_SNAPSHOT_LOG file record type -}; - - -// enum class RUN_DETAILS_REC -// symbolic names for RUN DETAILS record definitions -// For preamble/stats columns only -// Program options columns are dynamic -// these must be left as default values - their order can be changed with the caveat that the sentinel "SENTINEL" must stay at the end -// it's a bit of a hack, but it lets me iterate over the enum -enum class RUN_DETAILS_COLUMNS: int { COMPAS_VERSION, - RUN_START, - RUN_END, - OBJECTS_REQUESTED, - OBJECTS_CREATED, - CLOCK_TIME, - WALL_TIME, - ACTUAL_RANDOM_SEED, - SENTINEL }; - -const COMPASUnorderedMap> RUN_DETAILS_DETAIL = { - { RUN_DETAILS_COLUMNS::COMPAS_VERSION, { "COMPAS-Version", TYPENAME::STRING, 8 }}, - { RUN_DETAILS_COLUMNS::RUN_START, { "Run-Start", TYPENAME::STRING, 24 }}, - { RUN_DETAILS_COLUMNS::RUN_END, { "Run-End", TYPENAME::STRING, 24 }}, - { RUN_DETAILS_COLUMNS::OBJECTS_REQUESTED, { "Objects-Requested", TYPENAME::INT, 0 }}, - { RUN_DETAILS_COLUMNS::OBJECTS_CREATED, { "Objects-Created", TYPENAME::INT, 0 }}, - { RUN_DETAILS_COLUMNS::CLOCK_TIME, { "Clock-Time", TYPENAME::DOUBLE, 0 }}, - { RUN_DETAILS_COLUMNS::WALL_TIME, { "Wall-Time", TYPENAME::STRING, 10 }}, - { RUN_DETAILS_COLUMNS::ACTUAL_RANDOM_SEED, { "Actual-Random-Seed", TYPENAME::ULONGINT, 0 }} -}; - - -// BSE output record definitions - -// BSE_COMMON_ENVELOPES_REC -// -// Default record definition for the Common Envelopes logfile -// -const ANY_PROPERTY_VECTOR BSE_COMMON_ENVELOPES_REC = { - BINARY_PROPERTY::RANDOM_SEED, - BINARY_PROPERTY::TIME, - STAR_1_PROPERTY::LAMBDA_AT_COMMON_ENVELOPE, - STAR_2_PROPERTY::LAMBDA_AT_COMMON_ENVELOPE, - STAR_1_PROPERTY::BINDING_ENERGY_PRE_COMMON_ENVELOPE, - STAR_2_PROPERTY::BINDING_ENERGY_PRE_COMMON_ENVELOPE, - BINARY_PROPERTY::ECCENTRICITY_PRE_COMMON_ENVELOPE, - BINARY_PROPERTY::ECCENTRICITY_POST_COMMON_ENVELOPE, - BINARY_PROPERTY::SEMI_MAJOR_AXIS_PRE_COMMON_ENVELOPE, - BINARY_PROPERTY::SEMI_MAJOR_AXIS_POST_COMMON_ENVELOPE, - BINARY_PROPERTY::SEMI_MAJOR_AXIS_POST_STAGE_1_CE, - BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1_PRE_COMMON_ENVELOPE, - BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1_POST_COMMON_ENVELOPE, - BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2_PRE_COMMON_ENVELOPE, - BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2_POST_COMMON_ENVELOPE, - BINARY_PROPERTY::MASS_1_PRE_COMMON_ENVELOPE, - BINARY_PROPERTY::MASS_1_POST_COMMON_ENVELOPE, - BINARY_PROPERTY::MASS_ENV_1, - BINARY_PROPERTY::RADIUS_1_PRE_COMMON_ENVELOPE, - BINARY_PROPERTY::RADIUS_1_POST_COMMON_ENVELOPE, - BINARY_PROPERTY::STELLAR_TYPE_1_PRE_COMMON_ENVELOPE, - STAR_1_PROPERTY::STELLAR_TYPE, - STAR_1_PROPERTY::LAMBDA_CONVECTIVE_ENVELOPE, - STAR_1_PROPERTY::LAMBDA_FIXED, - STAR_1_PROPERTY::LAMBDA_NANJING, - STAR_1_PROPERTY::LAMBDA_LOVERIDGE, - STAR_1_PROPERTY::LAMBDA_LOVERIDGE_WINDS, - STAR_1_PROPERTY::LAMBDA_KRUCKOW, - STAR_1_PROPERTY::BINDING_ENERGY_FIXED, - STAR_1_PROPERTY::BINDING_ENERGY_NANJING, - STAR_1_PROPERTY::BINDING_ENERGY_LOVERIDGE, - STAR_1_PROPERTY::BINDING_ENERGY_LOVERIDGE_WINDS, - STAR_1_PROPERTY::BINDING_ENERGY_KRUCKOW, - STAR_1_PROPERTY::CONVECTIVE_ENV_MASS, - BINARY_PROPERTY::MASS_2_PRE_COMMON_ENVELOPE, - BINARY_PROPERTY::MASS_2_POST_COMMON_ENVELOPE, - BINARY_PROPERTY::MASS_ENV_2, - BINARY_PROPERTY::RADIUS_2_PRE_COMMON_ENVELOPE, - BINARY_PROPERTY::RADIUS_2_POST_COMMON_ENVELOPE, - BINARY_PROPERTY::STELLAR_TYPE_2_PRE_COMMON_ENVELOPE, - STAR_2_PROPERTY::STELLAR_TYPE, - STAR_2_PROPERTY::LAMBDA_CONVECTIVE_ENVELOPE, - STAR_2_PROPERTY::LAMBDA_FIXED, - STAR_2_PROPERTY::LAMBDA_NANJING, - STAR_2_PROPERTY::LAMBDA_LOVERIDGE, - STAR_2_PROPERTY::LAMBDA_LOVERIDGE_WINDS, - STAR_2_PROPERTY::LAMBDA_KRUCKOW, - STAR_2_PROPERTY::BINDING_ENERGY_FIXED, - STAR_2_PROPERTY::BINDING_ENERGY_NANJING, - STAR_2_PROPERTY::BINDING_ENERGY_LOVERIDGE, - STAR_2_PROPERTY::BINDING_ENERGY_LOVERIDGE_WINDS, - STAR_2_PROPERTY::BINDING_ENERGY_KRUCKOW, - STAR_2_PROPERTY::CONVECTIVE_ENV_MASS, - BINARY_PROPERTY::MASS_TRANSFER_TRACKER_HISTORY, - BINARY_PROPERTY::STELLAR_MERGER, - BINARY_PROPERTY::OPTIMISTIC_COMMON_ENVELOPE, - BINARY_PROPERTY::COMMON_ENVELOPE_EVENT_COUNT, - BINARY_PROPERTY::DOUBLE_CORE_COMMON_ENVELOPE, - STAR_1_PROPERTY::IS_RLOF, - STAR_1_PROPERTY::LUMINOSITY_PRE_COMMON_ENVELOPE, - STAR_1_PROPERTY::TEMPERATURE_PRE_COMMON_ENVELOPE, - STAR_1_PROPERTY::DYNAMICAL_TIMESCALE_PRE_COMMON_ENVELOPE, - STAR_1_PROPERTY::THERMAL_TIMESCALE_PRE_COMMON_ENVELOPE, - STAR_2_PROPERTY::IS_RLOF, - STAR_2_PROPERTY::LUMINOSITY_PRE_COMMON_ENVELOPE, - STAR_2_PROPERTY::TEMPERATURE_PRE_COMMON_ENVELOPE, - STAR_2_PROPERTY::DYNAMICAL_TIMESCALE_PRE_COMMON_ENVELOPE, - STAR_2_PROPERTY::THERMAL_TIMESCALE_PRE_COMMON_ENVELOPE, - BINARY_PROPERTY::ZETA_STAR, - BINARY_PROPERTY::ZETA_LOBE, - BINARY_PROPERTY::SYNCHRONIZATION_TIMESCALE_1, - BINARY_PROPERTY::SYNCHRONIZATION_TIMESCALE_2, - BINARY_PROPERTY::CIRCULARIZATION_TIMESCALE, - STAR_1_PROPERTY::RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE, - STAR_2_PROPERTY::RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE, - BINARY_PROPERTY::IMMEDIATE_RLOF_POST_COMMON_ENVELOPE, - BINARY_PROPERTY::SIMULTANEOUS_RLOF -}; - - -// BSE_DETAILED_OUTPUT_REC -// -// Default record definition for the BSE Detailed Output logfile -// -const ANY_PROPERTY_VECTOR BSE_DETAILED_OUTPUT_REC = { - BINARY_PROPERTY::RANDOM_SEED, - BINARY_PROPERTY::DT, - BINARY_PROPERTY::TIME, - BINARY_PROPERTY::UNBOUND, - BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, - BINARY_PROPERTY::ECCENTRICITY, - STAR_1_PROPERTY::MZAMS, - STAR_2_PROPERTY::MZAMS, - STAR_1_PROPERTY::MASS_0, - STAR_2_PROPERTY::MASS_0, - STAR_1_PROPERTY::MASS, - STAR_2_PROPERTY::MASS, - STAR_1_PROPERTY::ENV_MASS, - STAR_2_PROPERTY::ENV_MASS, - STAR_1_PROPERTY::CORE_MASS, - STAR_2_PROPERTY::CORE_MASS, - STAR_1_PROPERTY::HE_CORE_MASS, - STAR_2_PROPERTY::HE_CORE_MASS, - STAR_1_PROPERTY::CO_CORE_MASS, - STAR_2_PROPERTY::CO_CORE_MASS, - STAR_1_PROPERTY::RADIUS, - STAR_2_PROPERTY::RADIUS, - BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1, - BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2, - STAR_1_PROPERTY::OMEGA, - STAR_2_PROPERTY::OMEGA, - STAR_1_PROPERTY::OMEGA_BREAK, - STAR_2_PROPERTY::OMEGA_BREAK, - STAR_1_PROPERTY::INITIAL_STELLAR_TYPE, - STAR_2_PROPERTY::INITIAL_STELLAR_TYPE, - STAR_1_PROPERTY::STELLAR_TYPE, - STAR_2_PROPERTY::STELLAR_TYPE, - STAR_1_PROPERTY::AGE, - STAR_2_PROPERTY::AGE, - STAR_1_PROPERTY::LUMINOSITY, - STAR_2_PROPERTY::LUMINOSITY, - STAR_1_PROPERTY::TEMPERATURE, - STAR_2_PROPERTY::TEMPERATURE, - STAR_1_PROPERTY::ANGULAR_MOMENTUM, - STAR_2_PROPERTY::ANGULAR_MOMENTUM, - STAR_1_PROPERTY::DYNAMICAL_TIMESCALE, - STAR_2_PROPERTY::DYNAMICAL_TIMESCALE, - STAR_1_PROPERTY::THERMAL_TIMESCALE, - STAR_2_PROPERTY::THERMAL_TIMESCALE, - STAR_1_PROPERTY::ZETA_SOBERMAN, - STAR_2_PROPERTY::ZETA_SOBERMAN, - STAR_1_PROPERTY::ZETA_SOBERMAN_HE, - STAR_2_PROPERTY::ZETA_SOBERMAN_HE, - STAR_1_PROPERTY::ZETA_HURLEY, - STAR_2_PROPERTY::ZETA_HURLEY, - STAR_1_PROPERTY::ZETA_HURLEY_HE, - STAR_2_PROPERTY::ZETA_HURLEY_HE, - STAR_1_PROPERTY::MASS_LOSS_DIFF, - STAR_2_PROPERTY::MASS_LOSS_DIFF, - STAR_1_PROPERTY::DOMINANT_MASS_LOSS_RATE, - STAR_2_PROPERTY::DOMINANT_MASS_LOSS_RATE, - STAR_1_PROPERTY::MASS_TRANSFER_DIFF, - STAR_2_PROPERTY::MASS_TRANSFER_DIFF, - STAR_1_PROPERTY::MDOT, - STAR_2_PROPERTY::MDOT, - BINARY_PROPERTY::TOTAL_ANGULAR_MOMENTUM, - BINARY_PROPERTY::TOTAL_ENERGY, - STAR_1_PROPERTY::METALLICITY, - STAR_2_PROPERTY::METALLICITY, - BINARY_PROPERTY::MASS_TRANSFER_TRACKER_HISTORY, - STAR_1_PROPERTY::PULSAR_MAGNETIC_FIELD, - STAR_2_PROPERTY::PULSAR_MAGNETIC_FIELD, - STAR_1_PROPERTY::PULSAR_SPIN_PERIOD, - STAR_2_PROPERTY::PULSAR_SPIN_PERIOD, - STAR_1_PROPERTY::PULSAR_SPIN_DOWN_RATE, - STAR_2_PROPERTY::PULSAR_SPIN_DOWN_RATE, - STAR_1_PROPERTY::PULSAR_BIRTH_PERIOD, - STAR_2_PROPERTY::PULSAR_BIRTH_PERIOD, - STAR_1_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, - STAR_2_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, - STAR_1_PROPERTY::RADIAL_EXPANSION_TIMESCALE, - STAR_2_PROPERTY::RADIAL_EXPANSION_TIMESCALE, - BINARY_PROPERTY::RLOF_MASS_LOSS_RATE, - BINARY_PROPERTY::RLOF_MASS_TRANSFER_TIMESCALE, - BINARY_PROPERTY::RLOF_ACCRETION_EFFICIENCY -}; - - -// BSE_CIRCUMBINARY_DISKS_REC -// -// Default record definition for the BSE Circumbinary Disks logfile. -// -// This file is event-based: one row is written for each CBD that forms. -// The row is written when the active disk is exhausted or truncated by an -// ordinary COMPAS termination/event boundary. Time, Mass(1/2), and -// Stellar_Type(1/2) are cached at CBD formation rather than sampled at write time. -// Initial_CBD_Mass is the disk -// reservoir defined at formation; CBD_Mass_Supplied is the amount actually -// processed before the row is written. -// -const ANY_PROPERTY_VECTOR BSE_CIRCUMBINARY_DISKS_REC = { - BINARY_PROPERTY::RANDOM_SEED, - BINARY_PROPERTY::CIRCUMBINARY_DISK_FORMATION_TIME, - BINARY_PROPERTY::CIRCUMBINARY_DISK_INITIAL_MASS, - BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_SUPPLIED, - BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_1, - BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_2, - BINARY_PROPERTY::CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_PRE, - BINARY_PROPERTY::CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_POST, - BINARY_PROPERTY::CIRCUMBINARY_DISK_ECCENTRICITY_PRE, - BINARY_PROPERTY::CIRCUMBINARY_DISK_ECCENTRICITY_POST, - BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_1_AT_FORMATION, - BINARY_PROPERTY::CIRCUMBINARY_DISK_STELLAR_TYPE_1_AT_FORMATION, - BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_2_AT_FORMATION, - BINARY_PROPERTY::CIRCUMBINARY_DISK_STELLAR_TYPE_2_AT_FORMATION -}; -// BSE_DOUBLE_COMPACT_OBJECT_REC -// -// Default record definition for the Double Compact Objects logfile -// -const ANY_PROPERTY_VECTOR BSE_DOUBLE_COMPACT_OBJECTS_REC = { - BINARY_PROPERTY::RANDOM_SEED, - BINARY_PROPERTY::SEMI_MAJOR_AXIS_AT_DCO_FORMATION, - BINARY_PROPERTY::ECCENTRICITY_AT_DCO_FORMATION, - STAR_1_PROPERTY::MASS, - STAR_1_PROPERTY::STELLAR_TYPE, - STAR_2_PROPERTY::MASS, - STAR_2_PROPERTY::STELLAR_TYPE, - BINARY_PROPERTY::TIME_TO_COALESCENCE, - BINARY_PROPERTY::TIME, - BINARY_PROPERTY::MERGES_IN_HUBBLE_TIME, - STAR_1_PROPERTY::RECYCLED_NEUTRON_STAR, - STAR_2_PROPERTY::RECYCLED_NEUTRON_STAR -}; - - -// BSE_PULSAR_EVOLUTION_REC -// -// Default record definition for the BSE Pulsar Evolution logfile -// -const ANY_PROPERTY_VECTOR BSE_PULSAR_EVOLUTION_REC = { - BINARY_PROPERTY::RANDOM_SEED, - STAR_1_PROPERTY::MASS, - STAR_2_PROPERTY::MASS, - STAR_1_PROPERTY::STELLAR_TYPE, - STAR_2_PROPERTY::STELLAR_TYPE, - BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, - BINARY_PROPERTY::MASS_TRANSFER_TRACKER_HISTORY, - STAR_1_PROPERTY::PULSAR_MAGNETIC_FIELD, - STAR_2_PROPERTY::PULSAR_MAGNETIC_FIELD, - STAR_1_PROPERTY::PULSAR_SPIN_PERIOD, - STAR_2_PROPERTY::PULSAR_SPIN_PERIOD, - STAR_1_PROPERTY::PULSAR_SPIN_DOWN_RATE, - STAR_2_PROPERTY::PULSAR_SPIN_DOWN_RATE, - STAR_1_PROPERTY::PULSAR_BIRTH_PERIOD, - STAR_2_PROPERTY::PULSAR_BIRTH_PERIOD, - STAR_1_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, - STAR_2_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, - BINARY_PROPERTY::TIME, - BINARY_PROPERTY::DT -}; - - -// BSE_RLOF_PARAMETERS_REC -// -// Default record definition for the RLOF Parameters logfile -// -const ANY_PROPERTY_VECTOR BSE_RLOF_PARAMETERS_REC = { - BINARY_PROPERTY::RANDOM_SEED, - BINARY_PROPERTY::RLOF_TIME_POST_MT, - BINARY_PROPERTY::RLOF_TIME_PRE_MT, - BINARY_PROPERTY::RLOF_POST_MT_STAR1_MASS, - BINARY_PROPERTY::RLOF_POST_MT_STAR2_MASS, - BINARY_PROPERTY::RLOF_POST_MT_STAR1_RADIUS, - BINARY_PROPERTY::RLOF_POST_MT_STAR2_RADIUS, - BINARY_PROPERTY::RLOF_POST_MT_STAR1_STELLAR_TYPE, - BINARY_PROPERTY::RLOF_POST_MT_STAR2_STELLAR_TYPE, - BINARY_PROPERTY::RLOF_POST_MT_SEMI_MAJOR_AXIS, - BINARY_PROPERTY::RLOF_POST_MT_ECCENTRICITY, - BINARY_PROPERTY::RLOF_POST_MT_EVENT_COUNTER, - BINARY_PROPERTY::RLOF_POST_MT_STAR1_RLOF, - BINARY_PROPERTY::RLOF_POST_MT_STAR2_RLOF, - BINARY_PROPERTY::STELLAR_MERGER, - BINARY_PROPERTY::RLOF_POST_MT_COMMON_ENVELOPE, - BINARY_PROPERTY::RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, - BINARY_PROPERTY::RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, - BINARY_PROPERTY::RLOF_PRE_MT_STAR1_MASS, - BINARY_PROPERTY::RLOF_PRE_MT_STAR2_MASS, - BINARY_PROPERTY::RLOF_PRE_MT_STAR1_RADIUS, - BINARY_PROPERTY::RLOF_PRE_MT_STAR2_RADIUS, - BINARY_PROPERTY::RLOF_PRE_MT_STAR1_STELLAR_TYPE, - BINARY_PROPERTY::RLOF_PRE_MT_STAR2_STELLAR_TYPE, - BINARY_PROPERTY::RLOF_PRE_MT_SEMI_MAJOR_AXIS, - BINARY_PROPERTY::RLOF_PRE_MT_ECCENTRICITY, - BINARY_PROPERTY::RLOF_PRE_MT_STAR1_RLOF, - BINARY_PROPERTY::RLOF_PRE_MT_STAR2_RLOF, - BINARY_PROPERTY::RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, - BINARY_PROPERTY::RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, - BINARY_PROPERTY::RLOF_ACCRETION_EFFICIENCY, - BINARY_PROPERTY::RLOF_MASS_LOSS_RATE, - BINARY_PROPERTY::RLOF_MASS_TRANSFER_TIMESCALE, - STAR_1_PROPERTY::ZETA_SOBERMAN, - STAR_1_PROPERTY::ZETA_SOBERMAN_HE, - STAR_1_PROPERTY::ZETA_HURLEY, - STAR_1_PROPERTY::ZETA_HURLEY_HE, - STAR_2_PROPERTY::ZETA_SOBERMAN, - STAR_2_PROPERTY::ZETA_SOBERMAN_HE, - STAR_2_PROPERTY::ZETA_HURLEY, - STAR_2_PROPERTY::ZETA_HURLEY_HE -}; - - -// BSE_SUPERNOVAE_REC -// -// Default record definition for the BSE Supernovae logfile -// -const ANY_PROPERTY_VECTOR BSE_SUPERNOVAE_REC = { - BINARY_PROPERTY::RANDOM_SEED, - SUPERNOVA_PROPERTY::DRAWN_KICK_MAGNITUDE, - SUPERNOVA_PROPERTY::KICK_MAGNITUDE, - SUPERNOVA_PROPERTY::FALLBACK_FRACTION, - BINARY_PROPERTY::ORBITAL_VELOCITY_PRE_SUPERNOVA, - SUPERNOVA_PROPERTY::MEAN_ANOMALY, - SUPERNOVA_PROPERTY::SUPERNOVA_THETA, - SUPERNOVA_PROPERTY::SUPERNOVA_PHI, - SUPERNOVA_PROPERTY::SN_TYPE, - BINARY_PROPERTY::ECCENTRICITY_PRE_SUPERNOVA, - BINARY_PROPERTY::ECCENTRICITY, - BINARY_PROPERTY::SEMI_MAJOR_AXIS_PRE_SUPERNOVA_RSOL, - BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, - BINARY_PROPERTY::TIME, - BINARY_PROPERTY::SUPERNOVA_STATE, - BINARY_PROPERTY::UNBOUND, - COMPANION_PROPERTY::STELLAR_TYPE, - SUPERNOVA_PROPERTY::STELLAR_TYPE, - SUPERNOVA_PROPERTY::STELLAR_TYPE_PREV, - COMPANION_PROPERTY::MASS, - SUPERNOVA_PROPERTY::TOTAL_MASS_AT_COMPACT_OBJECT_FORMATION, - SUPERNOVA_PROPERTY::TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, - SUPERNOVA_PROPERTY::CORE_MASS_AT_COMPACT_OBJECT_FORMATION, - SUPERNOVA_PROPERTY::CO_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, - SUPERNOVA_PROPERTY::HE_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, - SUPERNOVA_PROPERTY::CORE_RADIUS_AT_COMPACT_OBJECT_FORMATION, - SUPERNOVA_PROPERTY::MASS, - SUPERNOVA_PROPERTY::EXPERIENCED_RLOF, - SUPERNOVA_PROPERTY::MASS_TRANSFER_DONOR_HISTORY, - SUPERNOVA_PROPERTY::SPEED, - COMPANION_PROPERTY::SPEED, - BINARY_PROPERTY::SYSTEMIC_SPEED, - SUPERNOVA_PROPERTY::IS_HYDROGEN_POOR, - BINARY_PROPERTY::SUPERNOVA_ORBIT_INCLINATION_ANGLE, - BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_X, - BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_Y, - BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_Z, - BINARY_PROPERTY::SYSTEMIC_VELOCITY_X, - BINARY_PROPERTY::SYSTEMIC_VELOCITY_Y, - BINARY_PROPERTY::SYSTEMIC_VELOCITY_Z, -}; - - -// BSE_SWITCH_LOG -// -// Default record definition for the BSE Switch Log logfile -// -const ANY_PROPERTY_VECTOR BSE_SWITCH_LOG_REC = { - BINARY_PROPERTY::RANDOM_SEED, - BINARY_PROPERTY::TIME, - BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, - BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1, - BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2, - STAR_1_PROPERTY::MASS, - STAR_2_PROPERTY::MASS, - STAR_1_PROPERTY::STELLAR_TYPE, - STAR_2_PROPERTY::STELLAR_TYPE, - STAR_1_PROPERTY::RADIUS, - STAR_2_PROPERTY::RADIUS -}; - - -// BSE_SYSTEM_PARAMETERS_REC -// -// Default record definition for the System Parameters logfile -// -const ANY_PROPERTY_VECTOR BSE_SYSTEM_PARAMETERS_REC = { - BINARY_PROPERTY::RANDOM_SEED, - STAR_1_PROPERTY::MZAMS, - STAR_2_PROPERTY::MZAMS, - BINARY_PROPERTY::SEMI_MAJOR_AXIS_INITIAL, - BINARY_PROPERTY::ECCENTRICITY_INITIAL, - STAR_1_PROPERTY::SUPERNOVA_KICK_MAGNITUDE_RANDOM_NUMBER, - STAR_2_PROPERTY::SUPERNOVA_KICK_MAGNITUDE_RANDOM_NUMBER, - STAR_1_PROPERTY::OMEGA_ZAMS, - STAR_2_PROPERTY::OMEGA_ZAMS, - PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS, - PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH, - PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN, - PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN, - PROGRAM_OPTION::LBV_FACTOR, - PROGRAM_OPTION::WR_FACTOR, - PROGRAM_OPTION::COMMON_ENVELOPE_ALPHA, - PROGRAM_OPTION::COMMON_ENVELOPE_FORMALISM, - STAR_1_PROPERTY::METALLICITY, - STAR_2_PROPERTY::METALLICITY, - BINARY_PROPERTY::UNBOUND, - BINARY_PROPERTY::STELLAR_MERGER, - BINARY_PROPERTY::STELLAR_MERGER_AT_BIRTH, - BINARY_PROPERTY::MASSES_EQUILIBRATED_AT_BIRTH, - STAR_1_PROPERTY::INITIAL_STELLAR_TYPE, - STAR_1_PROPERTY::STELLAR_TYPE, - STAR_2_PROPERTY::INITIAL_STELLAR_TYPE, - STAR_2_PROPERTY::STELLAR_TYPE, - STAR_1_PROPERTY::CHEMICALLY_HOMOGENEOUS_MAIN_SEQUENCE, - STAR_2_PROPERTY::CHEMICALLY_HOMOGENEOUS_MAIN_SEQUENCE, - BINARY_PROPERTY::EVOL_STATUS, - BINARY_PROPERTY::ERROR, - PROGRAM_OPTION::NOTES -}; - - -// BSE_SYSTEM_SNAPSHOT_LOG_REC -// -// Default record definition for the BSE System Snapshot logfile -// -const ANY_PROPERTY_VECTOR BSE_SYSTEM_SNAPSHOT_LOG_REC = { - BINARY_PROPERTY::RANDOM_SEED, - BINARY_PROPERTY::DT, - BINARY_PROPERTY::TIME, - BINARY_PROPERTY::UNBOUND, - BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, - BINARY_PROPERTY::ECCENTRICITY, - STAR_1_PROPERTY::MZAMS, - STAR_2_PROPERTY::MZAMS, - STAR_1_PROPERTY::MASS_0, - STAR_2_PROPERTY::MASS_0, - STAR_1_PROPERTY::MASS, - STAR_2_PROPERTY::MASS, - STAR_1_PROPERTY::ENV_MASS, - STAR_2_PROPERTY::ENV_MASS, - STAR_1_PROPERTY::CORE_MASS, - STAR_2_PROPERTY::CORE_MASS, - STAR_1_PROPERTY::HE_CORE_MASS, - STAR_2_PROPERTY::HE_CORE_MASS, - STAR_1_PROPERTY::CO_CORE_MASS, - STAR_2_PROPERTY::CO_CORE_MASS, - STAR_1_PROPERTY::RADIUS, - STAR_2_PROPERTY::RADIUS, - BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1, - BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2, - STAR_1_PROPERTY::OMEGA, - STAR_2_PROPERTY::OMEGA, - STAR_1_PROPERTY::OMEGA_BREAK, - STAR_2_PROPERTY::OMEGA_BREAK, - STAR_1_PROPERTY::INITIAL_STELLAR_TYPE, - STAR_2_PROPERTY::INITIAL_STELLAR_TYPE, - STAR_1_PROPERTY::STELLAR_TYPE, - STAR_2_PROPERTY::STELLAR_TYPE, - STAR_1_PROPERTY::AGE, - STAR_2_PROPERTY::AGE, - STAR_1_PROPERTY::LUMINOSITY, - STAR_2_PROPERTY::LUMINOSITY, - STAR_1_PROPERTY::TEMPERATURE, - STAR_2_PROPERTY::TEMPERATURE, - STAR_1_PROPERTY::ANGULAR_MOMENTUM, - STAR_2_PROPERTY::ANGULAR_MOMENTUM, - STAR_1_PROPERTY::DYNAMICAL_TIMESCALE, - STAR_2_PROPERTY::DYNAMICAL_TIMESCALE, - STAR_1_PROPERTY::THERMAL_TIMESCALE, - STAR_2_PROPERTY::THERMAL_TIMESCALE, - STAR_1_PROPERTY::ZETA_SOBERMAN, - STAR_2_PROPERTY::ZETA_SOBERMAN, - STAR_1_PROPERTY::ZETA_SOBERMAN_HE, - STAR_2_PROPERTY::ZETA_SOBERMAN_HE, - STAR_1_PROPERTY::ZETA_HURLEY, - STAR_2_PROPERTY::ZETA_HURLEY, - STAR_1_PROPERTY::ZETA_HURLEY_HE, - STAR_2_PROPERTY::ZETA_HURLEY_HE, - STAR_1_PROPERTY::MASS_LOSS_DIFF, - STAR_2_PROPERTY::MASS_LOSS_DIFF, - STAR_1_PROPERTY::DOMINANT_MASS_LOSS_RATE, - STAR_2_PROPERTY::DOMINANT_MASS_LOSS_RATE, - STAR_1_PROPERTY::MASS_TRANSFER_DIFF, - STAR_2_PROPERTY::MASS_TRANSFER_DIFF, - STAR_1_PROPERTY::MDOT, - STAR_2_PROPERTY::MDOT, - BINARY_PROPERTY::TOTAL_ANGULAR_MOMENTUM, - BINARY_PROPERTY::TOTAL_ENERGY, - STAR_1_PROPERTY::METALLICITY, - STAR_2_PROPERTY::METALLICITY, - BINARY_PROPERTY::MASS_TRANSFER_TRACKER_HISTORY, - STAR_1_PROPERTY::PULSAR_MAGNETIC_FIELD, - STAR_2_PROPERTY::PULSAR_MAGNETIC_FIELD, - STAR_1_PROPERTY::PULSAR_SPIN_PERIOD, - STAR_2_PROPERTY::PULSAR_SPIN_PERIOD, - STAR_1_PROPERTY::PULSAR_SPIN_DOWN_RATE, - STAR_2_PROPERTY::PULSAR_SPIN_DOWN_RATE, - STAR_1_PROPERTY::PULSAR_BIRTH_PERIOD, - STAR_2_PROPERTY::PULSAR_BIRTH_PERIOD, - STAR_1_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, - STAR_2_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, - STAR_1_PROPERTY::RADIAL_EXPANSION_TIMESCALE, - STAR_2_PROPERTY::RADIAL_EXPANSION_TIMESCALE, - BINARY_PROPERTY::RLOF_MASS_LOSS_RATE, - BINARY_PROPERTY::RLOF_MASS_TRANSFER_TIMESCALE, - BINARY_PROPERTY::RLOF_ACCRETION_EFFICIENCY -}; - - -// SSE output record definitions - -// SSE_DETAILED_OUTPUT_REC -// -// Default record definition for the SSE Detailed Output logfile -// -const ANY_PROPERTY_VECTOR SSE_DETAILED_OUTPUT_REC = { - STAR_PROPERTY::AGE, - STAR_PROPERTY::DT, - STAR_PROPERTY::TIME, - STAR_PROPERTY::STELLAR_TYPE, - STAR_PROPERTY::METALLICITY, - STAR_PROPERTY::MASS_0, - STAR_PROPERTY::MASS, - STAR_PROPERTY::RADIUS, - STAR_PROPERTY::RZAMS, - STAR_PROPERTY::LUMINOSITY, - STAR_PROPERTY::TEMPERATURE, - STAR_PROPERTY::CORE_MASS, - STAR_PROPERTY::CO_CORE_MASS, - STAR_PROPERTY::HE_CORE_MASS, - STAR_PROPERTY::MDOT, - STAR_PROPERTY::DOMINANT_MASS_LOSS_RATE, - STAR_PROPERTY::TIMESCALE_MS, - STAR_PROPERTY::OMEGA, - STAR_PROPERTY::OMEGA_BREAK -}; - -// SSE_PULSAR_EVOLUTION_REC -// -// Default record definition for the SSE Pulsar Evolution logfile -// -const ANY_PROPERTY_VECTOR SSE_PULSAR_EVOLUTION_REC = { - STAR_PROPERTY::RANDOM_SEED, - STAR_PROPERTY::MASS, - STAR_PROPERTY::STELLAR_TYPE, - STAR_PROPERTY::PULSAR_MAGNETIC_FIELD, - STAR_PROPERTY::PULSAR_SPIN_PERIOD, - STAR_PROPERTY::PULSAR_SPIN_DOWN_RATE, - STAR_PROPERTY::PULSAR_BIRTH_PERIOD, - STAR_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, - STAR_PROPERTY::TIME, - STAR_PROPERTY::DT -}; - -// SSE_SUPERNOVAE_REC -// -// Default record definition for the SSE Supernovae logfile -// -const ANY_PROPERTY_VECTOR SSE_SUPERNOVAE_REC = { - STAR_PROPERTY::RANDOM_SEED, - STAR_PROPERTY::DRAWN_KICK_MAGNITUDE, - STAR_PROPERTY::KICK_MAGNITUDE, - STAR_PROPERTY::FALLBACK_FRACTION, - STAR_PROPERTY::MEAN_ANOMALY, - STAR_PROPERTY::SN_TYPE, - STAR_PROPERTY::TOTAL_MASS_AT_COMPACT_OBJECT_FORMATION, - STAR_PROPERTY::TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, - STAR_PROPERTY::CO_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, - STAR_PROPERTY::MASS, - STAR_PROPERTY::STELLAR_TYPE, - STAR_PROPERTY::STELLAR_TYPE_PREV, - STAR_PROPERTY::CORE_MASS_AT_COMPACT_OBJECT_FORMATION, - STAR_PROPERTY::CORE_RADIUS_AT_COMPACT_OBJECT_FORMATION, - STAR_PROPERTY::HE_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, - STAR_PROPERTY::TIME, - STAR_PROPERTY::IS_HYDROGEN_POOR -}; - - -// SSE_SWITCH_LOG -// -// Default record definition for the SSE Switch Log logfile -// -const ANY_PROPERTY_VECTOR SSE_SWITCH_LOG_REC = { - STAR_PROPERTY::RANDOM_SEED, - STAR_PROPERTY::TIME, - STAR_PROPERTY::MASS, - STAR_PROPERTY::STELLAR_TYPE, - STAR_PROPERTY::RADIUS -}; - - -// SSE_SYSTEM_PARAMETERS_REC -// -// Default record definition for the SSE System Parameters logfile -// -const ANY_PROPERTY_VECTOR SSE_SYSTEM_PARAMETERS_REC = { - STAR_PROPERTY::RANDOM_SEED, - STAR_PROPERTY::MZAMS, - STAR_PROPERTY::RZAMS, - STAR_PROPERTY::METALLICITY, - STAR_PROPERTY::OMEGA_ZAMS, - STAR_PROPERTY::INITIAL_STELLAR_TYPE, - STAR_PROPERTY::STELLAR_TYPE, - STAR_PROPERTY::SUPERNOVA_KICK_MAGNITUDE_RANDOM_NUMBER, - STAR_PROPERTY::MASS, - STAR_PROPERTY::CHEMICALLY_HOMOGENEOUS_MAIN_SEQUENCE, - STAR_PROPERTY::EVOL_STATUS, - STAR_PROPERTY::ERROR, - PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS, - PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH, - PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN, - PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN, - PROGRAM_OPTION::LBV_FACTOR, - PROGRAM_OPTION::WR_FACTOR, - PROGRAM_OPTION::NOTES -}; - - -// SSE_SYSTEM_SNAPSHOT_LOG_REC -// -// Default record definition for the SSE System Snapshot logfile -// -const ANY_PROPERTY_VECTOR SSE_SYSTEM_SNAPSHOT_LOG_REC = { - STAR_PROPERTY::AGE, - STAR_PROPERTY::DT, - STAR_PROPERTY::TIME, - STAR_PROPERTY::STELLAR_TYPE, - STAR_PROPERTY::METALLICITY, - STAR_PROPERTY::MASS_0, - STAR_PROPERTY::MASS, - STAR_PROPERTY::RADIUS, - STAR_PROPERTY::RZAMS, - STAR_PROPERTY::LUMINOSITY, - STAR_PROPERTY::TEMPERATURE, - STAR_PROPERTY::CORE_MASS, - STAR_PROPERTY::CO_CORE_MASS, - STAR_PROPERTY::HE_CORE_MASS, - STAR_PROPERTY::MDOT, - STAR_PROPERTY::DOMINANT_MASS_LOSS_RATE, - STAR_PROPERTY::TIMESCALE_MS, - STAR_PROPERTY::OMEGA, - STAR_PROPERTY::OMEGA_BREAK -}; - - -// enum class LOGFILE_CLASS -// Symbolic names for logfile types -enum class LOGFILE_CLASS: int { NONE, STELLAR, BINARY }; - -// descriptors for logfiles -// unordered_map - key is integer logfile (from enum class LOGFILE above) -// fields are: {default filename, record descriptor, short file name, short record name, type} -// (the short names are for logfile definitions file parsing) -typedef std::tuple LOGFILE_DESCRIPTOR_T; -const std::map LOGFILE_DESCRIPTOR = { - { LOGFILE::NONE, { "" , {}, "", "", LOGFILE_CLASS::NONE}}, - - { LOGFILE::DEBUG_LOG, { "Debug_Log", {}, "", "", LOGFILE_CLASS::NONE }}, - { LOGFILE::ERROR_LOG, { "Error_Log", {}, "", "", LOGFILE_CLASS::NONE }}, - - { LOGFILE::BSE_COMMON_ENVELOPES, { "BSE_Common_Envelopes", BSE_COMMON_ENVELOPES_REC, "BSE_CEE", "BSE_CEE_REC", LOGFILE_CLASS::BINARY }}, - { LOGFILE::BSE_CIRCUMBINARY_DISKS, { "BSE_Circumbinary_Disks", BSE_CIRCUMBINARY_DISKS_REC, "BSE_CBD", "BSE_CBD_REC", LOGFILE_CLASS::BINARY }}, - { LOGFILE::BSE_DETAILED_OUTPUT, { "BSE_Detailed_Output", BSE_DETAILED_OUTPUT_REC, "BSE_DETAILED", "BSE_DETAILED_REC", LOGFILE_CLASS::BINARY }}, - { LOGFILE::BSE_DOUBLE_COMPACT_OBJECTS, { "BSE_Double_Compact_Objects", BSE_DOUBLE_COMPACT_OBJECTS_REC, "BSE_DCO", "BSE_DCO_REC", LOGFILE_CLASS::BINARY }}, - { LOGFILE::BSE_PULSAR_EVOLUTION, { "BSE_Pulsar_Evolution", BSE_PULSAR_EVOLUTION_REC, "BSE_PULSARS", "BSE_PULSARS_REC", LOGFILE_CLASS::BINARY }}, - { LOGFILE::BSE_RLOF_PARAMETERS, { "BSE_RLOF", BSE_RLOF_PARAMETERS_REC, "BSE_RLOF", "BSE_RLOF_REC", LOGFILE_CLASS::BINARY }}, - { LOGFILE::BSE_SUPERNOVAE, { "BSE_Supernovae", BSE_SUPERNOVAE_REC, "BSE_SNE", "BSE_SNE_REC", LOGFILE_CLASS::BINARY }}, - { LOGFILE::BSE_SWITCH_LOG, { "BSE_Switch_Log", BSE_SWITCH_LOG_REC, "BSE_SWITCH_LOG", "BSE_SWITCH_REC", LOGFILE_CLASS::BINARY }}, - { LOGFILE::BSE_SYSTEM_PARAMETERS, { "BSE_System_Parameters", BSE_SYSTEM_PARAMETERS_REC, "BSE_SYSPARMS", "BSE_SYSPARMS_REC", LOGFILE_CLASS::BINARY }}, - { LOGFILE::BSE_SYSTEM_SNAPSHOT_LOG, { "BSE_System_Snapshot_Log", BSE_SYSTEM_SNAPSHOT_LOG_REC, "BSE_SYS_SNAPSHOT", "BSE_SYS_SNAPSHOT_REC", LOGFILE_CLASS::BINARY }}, - - { LOGFILE::SSE_DETAILED_OUTPUT, { "SSE_Detailed_Output", SSE_DETAILED_OUTPUT_REC, "SSE_DETAILED", "SSE_DETAILED_REC", LOGFILE_CLASS::STELLAR }}, - { LOGFILE::SSE_PULSAR_EVOLUTION, { "SSE_Pulsar_Evolution", SSE_PULSAR_EVOLUTION_REC, "SSE_PULSARS", "SSE_PULSARS_REC", LOGFILE_CLASS::STELLAR }}, - { LOGFILE::SSE_SUPERNOVAE, { "SSE_Supernovae", SSE_SUPERNOVAE_REC, "SSE_SNE", "SSE_SNE_REC", LOGFILE_CLASS::STELLAR }}, - { LOGFILE::SSE_SWITCH_LOG, { "SSE_Switch_Log", SSE_SWITCH_LOG_REC, "SSE_SWITCH_LOG", "SSE_SWITCH_REC", LOGFILE_CLASS::STELLAR }}, - { LOGFILE::SSE_SYSTEM_PARAMETERS, { "SSE_System_Parameters", SSE_SYSTEM_PARAMETERS_REC, "SSE_SYSPARMS", "SSE_SYSPARMS_REC", LOGFILE_CLASS::STELLAR }}, - { LOGFILE::SSE_SYSTEM_SNAPSHOT_LOG, { "SSE_System_Snapshot_Log", SSE_SYSTEM_SNAPSHOT_LOG_REC, "SSE_SYS_SNAPSHOT", "SSE_SYS_SNAPSHOT_REC", LOGFILE_CLASS::STELLAR }} -}; - -#endif // __LogTypedefs_h__ +#ifndef __LogTypedefs_h__ +#define __LogTypedefs_h__ + + +// This is where developer-defined types that pertain directly to the COMPAS looging functionality +// (including the definitions of the default record composition for the various log files) are +// defined. Non-logging tyedefs are listed in typedefs.h + + +#include "constants.h" + + +// logfile file types +enum class LOGFILETYPE: int { HDF5, CSV, TSV, TXT }; // need this declared here so can declare the constant... +const COMPASUnorderedMap LOGFILETYPELabel = { // file types + { LOGFILETYPE::HDF5, "HDF5" }, + { LOGFILETYPE::CSV, "CSV" }, + { LOGFILETYPE::TSV, "TSV" }, + { LOGFILETYPE::TXT, "TXT" } +}; +const COMPASUnorderedMap LOGFILETYPEFileExt = { // file extensions + { LOGFILETYPE::HDF5, "h5" }, + { LOGFILETYPE::CSV, "csv" }, + { LOGFILETYPE::TSV, "tsv" }, + { LOGFILETYPE::TXT, "txt" } +}; + + +// enum class TYPENAME +// Symbolic names for variable typenames (for printing) +enum class TYPENAME: int { + NONE, + BOOL, + SHORTINT, + INT, + LONGINT, + LONGLONGINT, + USHORTINT, + UINT, + ULONGINT, + ULONGLONGINT, + FLOAT, + DOUBLE, + DOUBLE_VECTOR, + LONGDOUBLE, + STRING, + OBJECT_ID, + ERROR, + STELLAR_TYPE, + MT_CASE, + MT_TRACKING, + MT_TIMESCALE, + SN_EVENT, + SN_STATE, + STRING_VECTOR, + EVOLUTION_STATUS +}; +// labels (long and short) for typenames +// unordered_map - key is integer typename (from enum class TYPENAME above) +const COMPASUnorderedMap TYPENAME_LABEL = { + { TYPENAME::NONE, { "NONE", "NONE" }}, + { TYPENAME::BOOL, { "BOOL", "BOOL" }}, + { TYPENAME::SHORTINT, { "SHORT INT", "INT" }}, + { TYPENAME::INT, { "INT", "INT" }}, + { TYPENAME::LONGINT, { "LONG_INT", "INT" }}, + { TYPENAME::LONGLONGINT, { "LONG_LONG_INT", "INT" }}, + { TYPENAME::USHORTINT, { "UNSIGNED_SHORT_INT", "INT" }}, + { TYPENAME::UINT, { "UNSIGNED_INT", "INT" }}, + { TYPENAME::ULONGINT, { "UNSIGNED_LONG_INT", "INT" }}, + { TYPENAME::ULONGLONGINT, { "UNSIGNED_LONG_LONG_INT", "INT" }}, + { TYPENAME::FLOAT, { "FLOAT", "FLOAT" }}, + { TYPENAME::DOUBLE, { "DOUBLE", "FLOAT" }}, + { TYPENAME::LONGDOUBLE, { "LONG_DOUBLE", "FLOAT" }}, + { TYPENAME::STRING, { "STRING", "STRING" }}, + { TYPENAME::OBJECT_ID, { "OBJECT_ID", "INT" }}, + { TYPENAME::ERROR, { "ERROR", "INT" }}, + { TYPENAME::STELLAR_TYPE, { "STELLAR_TYPE", "INT" }}, + { TYPENAME::MT_CASE, { "MT_CASE", "INT" }}, + { TYPENAME::MT_TRACKING, { "MT_TRACKING", "INT" }}, + { TYPENAME::MT_TIMESCALE, { "MT_TIMESCALE", "INT" }}, + { TYPENAME::SN_EVENT, { "SN_EVENT", "INT" }}, + { TYPENAME::SN_STATE, { "SN_STATE", "INT" }}, + { TYPENAME::STRING_VECTOR, { "STRING_VECTOR", "VECTOR" }}, + { TYPENAME::EVOLUTION_STATUS, { "EVOLUTION_STATUS", "INT" }} +}; + + +// (convenience) initializer list for INT data types +const std::initializer_list INT_TYPES = { + TYPENAME::SHORTINT, + TYPENAME::INT, + TYPENAME::LONGINT, + TYPENAME::LONGLONGINT, + TYPENAME::USHORTINT, + TYPENAME::UINT, + TYPENAME::ULONGINT, + TYPENAME::ULONGLONGINT +}; + +// (convenience) initializer list for FLOAT data types +const std::initializer_list FLOAT_TYPES = { + TYPENAME::FLOAT, + TYPENAME::DOUBLE, + TYPENAME::LONGDOUBLE +}; + + +// enum class STRING_QUALIFIER +// Qualifier for typename STRING: FIXED_LENGTH or VARIABLE_LENGTH (used for printing to HDF5 files) +enum class STRING_QUALIFIER: int { NONE, FIXED_LENGTH, VARIABLE_LENGTH }; + + +// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +// !!! !!! +// !!! Do not change the following enum classes and maps unless you are adding !!! +// !!! or deleting a new property (or changing the name of an existing property !!! +// !!! for some reason) !!! +// !!! !!! +// !!! The STAR_PROPERTIES #define below defines the STELLAR variables allowed !!! +// !!! for logfile record definition - if a property is not on the list it !!! +// !!! cannot be selected for inclusion in a logfile via the !!! +// !!! --logfile-definitions option. !!! +// !!! !!! +// !!! The enum classes STAR_PROPERTY, BINARY_PROPERTY, and PROGRAM_OPTION !!! +// !!! defined below defines the STELLAR and BINARY properties, and the !!! +// !!! PROGRAM_OPTIONs allowed for logfile record definition - if a property is !!! +// !!! not on those lists it cannot be selected for inclusion in a logfile via !!! +// !!! --logfile-definitions option. !!! +// !!! !!! +// !!! *NOTE* !!! +// !!! The following enum classes and maps are not where header strings should !!! +// !!! be changed! These classes and maps are a lookup facility for the logfile !!! +// !!! definitions file parser. !!! +// !!! !!! +// !!! Header strings are in the following maps, and should be changed there: !!! +// !!! !!! +// !!! std::map ANY_STAR_PROPERTY_DETAIL !!! +// !!! std::map BINARY_PROPERTY_DETAIL !!! +// !!! !!! +// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +// The #define below defines the STELLAR variables allowed for logfile record definition +// Add new property names here to make the property available for specification in a logfile +// #define is used so that the same list of variables can be used for the various stellar property enum classes (see below) +#define STAR_PROPERTIES \ + NONE, \ + AGE, \ + ANGULAR_MOMENTUM, \ + BINDING_ENERGY_AT_COMMON_ENVELOPE, \ + BINDING_ENERGY_CONVECTIVE_ENVELOPE, \ + BINDING_ENERGY_FIXED, \ + BINDING_ENERGY_NANJING, \ + BINDING_ENERGY_PRE_COMMON_ENVELOPE, \ + BINDING_ENERGY_LOVERIDGE, \ + BINDING_ENERGY_LOVERIDGE_WINDS, \ + BINDING_ENERGY_KRUCKOW, \ + CHEMICALLY_HOMOGENEOUS_MAIN_SEQUENCE, \ + CO_CORE_MASS, \ + CO_CORE_MASS_AT_COMMON_ENVELOPE, \ + CO_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, \ + CONVECTIVE_ENV_MASS, \ + CORE_MASS, \ + CORE_MASS_AT_COMMON_ENVELOPE, \ + CORE_MASS_AT_COMPACT_OBJECT_FORMATION, \ + CORE_RADIUS_AT_COMPACT_OBJECT_FORMATION, \ + DRAWN_KICK_MAGNITUDE, \ + DOMINANT_MASS_LOSS_RATE, \ + DT, \ + DYNAMICAL_TIMESCALE, \ + DYNAMICAL_TIMESCALE_POST_COMMON_ENVELOPE, \ + DYNAMICAL_TIMESCALE_PRE_COMMON_ENVELOPE, \ + ECCENTRIC_ANOMALY, \ + ENV_MASS, \ + ERROR, \ + EVOL_STATUS, \ + EXPERIENCED_AIC, \ + EXPERIENCED_CCSN, \ + EXPERIENCED_HeSD, \ + EXPERIENCED_ECSN, \ + EXPERIENCED_PISN, \ + EXPERIENCED_PPISN, \ + EXPERIENCED_RLOF, \ + EXPERIENCED_SNIA, \ + EXPERIENCED_SN_TYPE, \ + EXPERIENCED_USSN, \ + FALLBACK_FRACTION, \ + HE_CORE_MASS, \ + HE_CORE_MASS_AT_COMMON_ENVELOPE, \ + HE_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, \ + HELIUM_ABUNDANCE_CORE, \ + HELIUM_ABUNDANCE_SURFACE, \ + HYDROGEN_ABUNDANCE_CORE, \ + HYDROGEN_ABUNDANCE_SURFACE, \ + ID, \ + INITIAL_HELIUM_ABUNDANCE, \ + INITIAL_HYDROGEN_ABUNDANCE, \ + INITIAL_STELLAR_TYPE, \ + INITIAL_STELLAR_TYPE_NAME, \ + IS_AIC, \ + IS_CCSN, \ + IS_HeSD, \ + IS_ECSN, \ + IS_HYDROGEN_POOR, \ + IS_PISN, \ + IS_PPISN, \ + IS_RLOF, \ + IS_SNIA, \ + IS_USSN, \ + KICK_MAGNITUDE, \ + LAMBDA_AT_COMMON_ENVELOPE, \ + LAMBDA_CONVECTIVE_ENVELOPE, \ + LAMBDA_DEWI, \ + LAMBDA_FIXED, \ + LAMBDA_KRUCKOW, \ + LAMBDA_KRUCKOW_BOTTOM, \ + LAMBDA_KRUCKOW_MIDDLE, \ + LAMBDA_KRUCKOW_TOP, \ + LAMBDA_LOVERIDGE, \ + LAMBDA_LOVERIDGE_WINDS, \ + LAMBDA_NANJING, \ + LBV_PHASE_FLAG, \ + LUMINOSITY, \ + LUMINOSITY_POST_COMMON_ENVELOPE, \ + LUMINOSITY_PRE_COMMON_ENVELOPE, \ + MASS, \ + MASS_0, \ + MASS_LOSS_DIFF, \ + MASS_TRANSFER_DIFF, \ + MASS_TRANSFER_DONOR_HISTORY, \ + MDOT, \ + MEAN_ANOMALY, \ + METALLICITY, \ + MOMENT_OF_INERTIA, \ + MZAMS, \ + OMEGA, \ + OMEGA_BREAK, \ + OMEGA_ZAMS, \ + ORBITAL_ENERGY_POST_SUPERNOVA, \ + ORBITAL_ENERGY_PRE_SUPERNOVA, \ + PULSAR_MAGNETIC_FIELD, \ + PULSAR_SPIN_DOWN_RATE, \ + PULSAR_BIRTH_PERIOD, \ + PULSAR_BIRTH_SPIN_DOWN_RATE, \ + PULSAR_SPIN_FREQUENCY, \ + PULSAR_SPIN_PERIOD, \ + RADIAL_EXPANSION_TIMESCALE, \ + RADIAL_EXPANSION_TIMESCALE_POST_COMMON_ENVELOPE, \ + RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE, \ + RADIUS, \ + RANDOM_SEED, \ + RECYCLED_NEUTRON_STAR, \ + ROCKET_KICK_MAGNITUDE, \ + ROCKET_KICK_PHI, \ + ROCKET_KICK_THETA, \ + RZAMS, \ + SN_TYPE, \ + SPEED, \ + STELLAR_TYPE, \ + STELLAR_TYPE_NAME, \ + STELLAR_TYPE_PREV, \ + STELLAR_TYPE_PREV_NAME, \ + SUPERNOVA_KICK_MAGNITUDE_RANDOM_NUMBER, \ + SUPERNOVA_PHI, \ + SUPERNOVA_THETA, \ + TEMPERATURE, \ + TEMPERATURE_POST_COMMON_ENVELOPE, \ + TEMPERATURE_PRE_COMMON_ENVELOPE, \ + THERMAL_TIMESCALE, \ + THERMAL_TIMESCALE_POST_COMMON_ENVELOPE, \ + THERMAL_TIMESCALE_PRE_COMMON_ENVELOPE, \ + TIME, \ + TIMESCALE_MS, \ + TOTAL_MASS_AT_COMPACT_OBJECT_FORMATION, \ + TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, \ + TRUE_ANOMALY, \ + TZAMS, \ + VELOCITY_X, \ + VELOCITY_Y, \ + VELOCITY_Z, \ + ZETA_HURLEY, \ + ZETA_HURLEY_HE, \ + ZETA_SOBERMAN, \ + ZETA_SOBERMAN_HE + + +// enum class STAR_PROPERTY +// Symbolic names for variables of an individual star that can be selected for printing +// STAR_PROPERTY refers to an individual star of type BaseStar for SSE (differences are where the data comes from, and the column header) +enum class STAR_PROPERTY: int { STAR_PROPERTIES }; + +// map STAR PROPERTY to string identifying the property +// for lookup by the printing functions +// this map serves as the lookup for: STAR_PROPERTY, STAR_1_PROPERTY, STAR_2_PROPERTY, SUPERNOVA_PROPERTY, COMPANION_PROPERTY and ANY_STAR_PROPERTY +// +// Properties only need to be here if they are required to be available for printing in the logfiles. +// All keys present here should also be in the STAR_PROPERTIES #define and ANY_STAR_PROPERTY_DETAIL +const COMPASUnorderedMap STAR_PROPERTY_LABEL = { + { STAR_PROPERTY::NONE, "NONE" }, + { STAR_PROPERTY::AGE, "AGE" }, + { STAR_PROPERTY::ANGULAR_MOMENTUM, "ANGULAR_MOMENTUM" }, + { STAR_PROPERTY::BINDING_ENERGY_AT_COMMON_ENVELOPE, "BINDING_ENERGY_AT_COMMON_ENVELOPE" }, + { STAR_PROPERTY::BINDING_ENERGY_CONVECTIVE_ENVELOPE, "BINDING_ENERGY_CONVECTIVE_ENVELOPE" }, + { STAR_PROPERTY::BINDING_ENERGY_FIXED, "BINDING_ENERGY_FIXED" }, + { STAR_PROPERTY::BINDING_ENERGY_NANJING, "BINDING_ENERGY_NANJING" }, + { STAR_PROPERTY::BINDING_ENERGY_PRE_COMMON_ENVELOPE, "BINDING_ENERGY_PRE_COMMON_ENVELOPE" }, + { STAR_PROPERTY::BINDING_ENERGY_LOVERIDGE, "BINDING_ENERGY_LOVERIDGE" }, + { STAR_PROPERTY::BINDING_ENERGY_LOVERIDGE_WINDS, "BINDING_ENERGY_LOVERIDGE_WINDS" }, + { STAR_PROPERTY::BINDING_ENERGY_KRUCKOW, "BINDING_ENERGY_KRUCKOW" }, + { STAR_PROPERTY::CHEMICALLY_HOMOGENEOUS_MAIN_SEQUENCE, "CHEMICALLY_HOMOGENEOUS_MAIN_SEQUENCE" }, + { STAR_PROPERTY::CO_CORE_MASS, "CO_CORE_MASS" }, + { STAR_PROPERTY::CO_CORE_MASS_AT_COMMON_ENVELOPE, "CO_CORE_MASS_AT_COMMON_ENVELOPE" }, + { STAR_PROPERTY::CO_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, "CO_CORE_MASS_AT_COMPACT_OBJECT_FORMATION" }, + { STAR_PROPERTY::CONVECTIVE_ENV_MASS, "CONVECTIVE_ENV_MASS" }, + { STAR_PROPERTY::CORE_MASS, "CORE_MASS" }, + { STAR_PROPERTY::CORE_MASS_AT_COMMON_ENVELOPE, "CORE_MASS_AT_COMMON_ENVELOPE" }, + { STAR_PROPERTY::CORE_MASS_AT_COMPACT_OBJECT_FORMATION, "CORE_MASS_AT_COMPACT_OBJECT_FORMATION" }, + { STAR_PROPERTY::CORE_RADIUS_AT_COMPACT_OBJECT_FORMATION, "CORE_RADIUS_AT_COMPACT_OBJECT_FORMATION" }, + { STAR_PROPERTY::DRAWN_KICK_MAGNITUDE, "DRAWN_KICK_MAGNITUDE" }, + { STAR_PROPERTY::DOMINANT_MASS_LOSS_RATE, "DOMINANT_MASS_LOSS_RATE"}, + { STAR_PROPERTY::DT, "DT" }, + { STAR_PROPERTY::DYNAMICAL_TIMESCALE, "DYNAMICAL_TIMESCALE" }, + { STAR_PROPERTY::DYNAMICAL_TIMESCALE_POST_COMMON_ENVELOPE, "DYNAMICAL_TIMESCALE_POST_COMMON_ENVELOPE" }, + { STAR_PROPERTY::DYNAMICAL_TIMESCALE_PRE_COMMON_ENVELOPE, "DYNAMICAL_TIMESCALE_PRE_COMMON_ENVELOPE" }, + { STAR_PROPERTY::ECCENTRIC_ANOMALY, "ECCENTRIC_ANOMALY" }, + { STAR_PROPERTY::ENV_MASS, "ENV_MASS" }, + { STAR_PROPERTY::ERROR, "ERROR" }, + { STAR_PROPERTY::EVOL_STATUS, "EVOL_STATUS" }, + { STAR_PROPERTY::EXPERIENCED_AIC, "EXPERIENCED_AIC" }, + { STAR_PROPERTY::EXPERIENCED_CCSN, "EXPERIENCED_CCSN" }, + { STAR_PROPERTY::EXPERIENCED_HeSD, "EXPERIENCED_HeSD" }, + { STAR_PROPERTY::EXPERIENCED_ECSN, "EXPERIENCED_ECSN" }, + { STAR_PROPERTY::EXPERIENCED_PISN, "EXPERIENCED_PISN" }, + { STAR_PROPERTY::EXPERIENCED_PPISN, "EXPERIENCED_PPISN" }, + { STAR_PROPERTY::EXPERIENCED_RLOF, "EXPERIENCED_RLOF" }, + { STAR_PROPERTY::EXPERIENCED_SNIA, "EXPERIENCED_SNIA" }, + { STAR_PROPERTY::EXPERIENCED_SN_TYPE, "EXPERIENCED_SN_TYPE" }, + { STAR_PROPERTY::EXPERIENCED_USSN, "EXPERIENCED_USSN" }, + { STAR_PROPERTY::FALLBACK_FRACTION, "FALLBACK_FRACTION" }, + { STAR_PROPERTY::HE_CORE_MASS, "HE_CORE_MASS" }, + { STAR_PROPERTY::HE_CORE_MASS_AT_COMMON_ENVELOPE, "HE_CORE_MASS_AT_COMMON_ENVELOPE" }, + { STAR_PROPERTY::HE_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, "HE_CORE_MASS_AT_COMPACT_OBJECT_FORMATION" }, + { STAR_PROPERTY::HELIUM_ABUNDANCE_CORE, "HELIUM_ABUNDANCE_CORE" }, + { STAR_PROPERTY::HELIUM_ABUNDANCE_SURFACE, "HELIUM_ABUNDANCE_SURFACE" }, + { STAR_PROPERTY::HYDROGEN_ABUNDANCE_CORE, "HYDROGEN_ABUNDANCE_CORE" }, + { STAR_PROPERTY::HYDROGEN_ABUNDANCE_SURFACE, "HYDROGEN_ABUNDANCE_SURFACE" }, + { STAR_PROPERTY::ID, "ID" }, + { STAR_PROPERTY::INITIAL_HELIUM_ABUNDANCE, "INITIAL_HELIUM_ABUNDANCE" }, + { STAR_PROPERTY::INITIAL_HYDROGEN_ABUNDANCE, "INITIAL_HYDROGEN_ABUNDANCE" }, + { STAR_PROPERTY::INITIAL_STELLAR_TYPE, "INITIAL_STELLAR_TYPE" }, + { STAR_PROPERTY::INITIAL_STELLAR_TYPE, "INITIAL_STELLAR_TYPE" }, + { STAR_PROPERTY::INITIAL_STELLAR_TYPE_NAME, "INITIAL_STELLAR_TYPE_NAME" }, + { STAR_PROPERTY::IS_AIC, "IS_AIC" }, + { STAR_PROPERTY::IS_CCSN, "IS_CCSN" }, + { STAR_PROPERTY::IS_HeSD, "IS_HeSD" }, + { STAR_PROPERTY::IS_ECSN, "IS_ECSN" }, + { STAR_PROPERTY::IS_HYDROGEN_POOR, "IS_HYDROGEN_POOR" }, + { STAR_PROPERTY::IS_PISN, "IS_PISN" }, + { STAR_PROPERTY::IS_PPISN, "IS_PPISN" }, + { STAR_PROPERTY::IS_RLOF, "IS_RLOF" }, + { STAR_PROPERTY::IS_SNIA, "IS_SNIA" }, + { STAR_PROPERTY::IS_USSN, "IS_USSN" }, + { STAR_PROPERTY::KICK_MAGNITUDE, "KICK_MAGNITUDE" }, + { STAR_PROPERTY::LAMBDA_AT_COMMON_ENVELOPE, "LAMBDA_AT_COMMON_ENVELOPE" }, + { STAR_PROPERTY::LAMBDA_CONVECTIVE_ENVELOPE, "LAMBDA_CONVECTIVE_ENVELOPE" }, + { STAR_PROPERTY::LAMBDA_DEWI, "LAMBDA_DEWI" }, + { STAR_PROPERTY::LAMBDA_FIXED, "LAMBDA_FIXED" }, + { STAR_PROPERTY::LAMBDA_KRUCKOW, "LAMBDA_KRUCKOW" }, + { STAR_PROPERTY::LAMBDA_KRUCKOW_BOTTOM, "LAMBDA_KRUCKOW_BOTTOM" }, + { STAR_PROPERTY::LAMBDA_KRUCKOW_MIDDLE, "LAMBDA_KRUCKOW_MIDDLE" }, + { STAR_PROPERTY::LAMBDA_KRUCKOW_TOP, "LAMBDA_KRUCKOW_TOP" }, + { STAR_PROPERTY::LAMBDA_LOVERIDGE, "LAMBDA_LOVERIDGE" }, + { STAR_PROPERTY::LAMBDA_LOVERIDGE_WINDS, "LAMBDA_LOVERIDGE_WINDS" }, + { STAR_PROPERTY::LAMBDA_NANJING, "LAMBDA_NANJING" }, + { STAR_PROPERTY::LBV_PHASE_FLAG, "LBV_PHASE_FLAG" }, + { STAR_PROPERTY::LUMINOSITY, "LUMINOSITY" }, + { STAR_PROPERTY::LUMINOSITY_POST_COMMON_ENVELOPE, "LUMINOSITY_POST_COMMON_ENVELOPE" }, + { STAR_PROPERTY::LUMINOSITY_PRE_COMMON_ENVELOPE, "LUMINOSITY_PRE_COMMON_ENVELOPE" }, + { STAR_PROPERTY::MASS, "MASS" }, + { STAR_PROPERTY::MASS_0, "MASS_0" }, + { STAR_PROPERTY::MASS_LOSS_DIFF, "MASS_LOSS_DIFF" }, + { STAR_PROPERTY::MASS_TRANSFER_DIFF, "MASS_TRANSFER_DIFF" }, + { STAR_PROPERTY::MASS_TRANSFER_DONOR_HISTORY, "MASS_TRANSFER_DONOR_HISTORY" }, + { STAR_PROPERTY::MDOT, "MDOT" }, + { STAR_PROPERTY::MEAN_ANOMALY, "MEAN_ANOMALY" }, + { STAR_PROPERTY::METALLICITY, "METALLICITY" }, + { STAR_PROPERTY::MOMENT_OF_INERTIA, "MOMENT_OF_INERTIA"}, + { STAR_PROPERTY::MZAMS, "MZAMS" }, + { STAR_PROPERTY::OMEGA, "OMEGA" }, + { STAR_PROPERTY::OMEGA_BREAK, "OMEGA_BREAK" }, + { STAR_PROPERTY::OMEGA_ZAMS, "OMEGA_ZAMS" }, + { STAR_PROPERTY::ORBITAL_ENERGY_POST_SUPERNOVA, "ORBITAL_ENERGY_POST_SUPERNOVA" }, + { STAR_PROPERTY::ORBITAL_ENERGY_PRE_SUPERNOVA, "ORBITAL_ENERGY_PRE_SUPERNOVA" }, + { STAR_PROPERTY::PULSAR_MAGNETIC_FIELD, "PULSAR_MAGNETIC_FIELD" }, + { STAR_PROPERTY::PULSAR_SPIN_DOWN_RATE, "PULSAR_SPIN_DOWN_RATE" }, + { STAR_PROPERTY::PULSAR_BIRTH_PERIOD, "PULSAR_BIRTH_PERIOD" }, + { STAR_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, "PULSAR_BIRTH_SPIN_DOWN_RATE" }, + { STAR_PROPERTY::PULSAR_SPIN_FREQUENCY, "PULSAR_SPIN_FREQUENCY" }, + { STAR_PROPERTY::PULSAR_SPIN_PERIOD, "PULSAR_SPIN_PERIOD" }, + { STAR_PROPERTY::RADIAL_EXPANSION_TIMESCALE, "RADIAL_EXPANSION_TIMESCALE" }, + { STAR_PROPERTY::RADIAL_EXPANSION_TIMESCALE_POST_COMMON_ENVELOPE, "RADIAL_EXPANSION_TIMESCALE_POST_COMMON_ENVELOPE" }, + { STAR_PROPERTY::RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE, "RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE" }, + { STAR_PROPERTY::RADIUS, "RADIUS" }, + { STAR_PROPERTY::RANDOM_SEED, "RANDOM_SEED" }, + { STAR_PROPERTY::RECYCLED_NEUTRON_STAR, "RECYCLED_NEUTRON_STAR" }, + { STAR_PROPERTY::ROCKET_KICK_MAGNITUDE, "ROCKET_KICK_MAGNITUDE" }, + { STAR_PROPERTY::ROCKET_KICK_PHI, "ROCKET_KICK_PHI" }, + { STAR_PROPERTY::ROCKET_KICK_THETA, "ROCKET_KICK_THETA" }, + { STAR_PROPERTY::RZAMS, "RZAMS" }, + { STAR_PROPERTY::SN_TYPE, "SN_TYPE" }, + { STAR_PROPERTY::SPEED, "SPEED" }, + { STAR_PROPERTY::STELLAR_TYPE, "STELLAR_TYPE" }, + { STAR_PROPERTY::STELLAR_TYPE_NAME, "STELLAR_TYPE_NAME" }, + { STAR_PROPERTY::STELLAR_TYPE_PREV, "STELLAR_TYPE_PREV" }, + { STAR_PROPERTY::STELLAR_TYPE_PREV_NAME, "STELLAR_TYPE_PREV_NAME" }, + { STAR_PROPERTY::SUPERNOVA_KICK_MAGNITUDE_RANDOM_NUMBER, "SUPERNOVA_KICK_MAGNITUDE_RANDOM_NUMBER" }, + { STAR_PROPERTY::SUPERNOVA_PHI, "SUPERNOVA_PHI" }, + { STAR_PROPERTY::SUPERNOVA_THETA, "SUPERNOVA_THETA" }, + { STAR_PROPERTY::TEMPERATURE, "TEMPERATURE" }, + { STAR_PROPERTY::TEMPERATURE_POST_COMMON_ENVELOPE, "TEMPERATURE_POST_COMMON_ENVELOPE" }, + { STAR_PROPERTY::TEMPERATURE_PRE_COMMON_ENVELOPE, "TEMPERATURE_PRE_COMMON_ENVELOPE" }, + { STAR_PROPERTY::THERMAL_TIMESCALE, "THERMAL_TIMESCALE" }, + { STAR_PROPERTY::THERMAL_TIMESCALE_POST_COMMON_ENVELOPE, "THERMAL_TIMESCALE_POST_COMMON_ENVELOPE" }, + { STAR_PROPERTY::THERMAL_TIMESCALE_PRE_COMMON_ENVELOPE, "THERMAL_TIMESCALE_PRE_COMMON_ENVELOPE" }, + { STAR_PROPERTY::TIME, "TIME" }, + { STAR_PROPERTY::TIMESCALE_MS, "TIMESCALE_MS" }, + { STAR_PROPERTY::TOTAL_MASS_AT_COMPACT_OBJECT_FORMATION, "TOTAL_MASS_AT_COMPACT_OBJECT_FORMATION" }, + { STAR_PROPERTY::TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, "TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION" }, + { STAR_PROPERTY::TRUE_ANOMALY, "TRUE_ANOMALY" }, + { STAR_PROPERTY::TZAMS, "TZAMS" }, + { STAR_PROPERTY::VELOCITY_X, "VELOCITY_X" }, + { STAR_PROPERTY::VELOCITY_Y, "VELOCITY_Y" }, + { STAR_PROPERTY::VELOCITY_Z, "VELOCITY_Z" }, + { STAR_PROPERTY::ZETA_HURLEY, "ZETA_HURLEY" }, + { STAR_PROPERTY::ZETA_HURLEY_HE, "ZETA_HURLEY_HE" }, + { STAR_PROPERTY::ZETA_SOBERMAN, "ZETA_SOBERMAN" }, + { STAR_PROPERTY::ZETA_SOBERMAN_HE, "ZETA_SOBERMAN_HE" } +}; + + +// enum class STAR_1_PROPERTY +// Symbolic names for variables of an individual star that can be selected for printing +// STAR_1_PROPERTY refers to star 1 (of type BinaryConstituentStar) of a binary for BSE (differences are where the data comes from, and the column header) +enum class STAR_1_PROPERTY: int { STAR_PROPERTIES }; + + +// enum class STAR_2_PROPERTY +// Symbolic names for variables of an individual star that can be selected for printing +// STAR_2_PROPERTY refers to star 2 (of type BinaryConstituentStar) of a binary for BSE (differences are where the data comes from, and the column header) +enum class STAR_2_PROPERTY: int { STAR_PROPERTIES }; + + +// enum class SUPERNOVA_PROPERTY +// Symbolic names for variables of an individual star that can be selected for printing +// SUPERNOVA_PROPERTY refers to the supernova star (of type BinaryConstituentStar) of a binary where one star has experienced a SN event for BSE (differences are where the data comes from, and the column header) +enum class SUPERNOVA_PROPERTY: int { STAR_PROPERTIES }; + + +// enum class COMPANION_PROPERTY +// Symbolic names for variables of an individual star that can be selected for printing +// COMPANION_PROPERTY refers to the companion star (of type BinaryConstituentStar) of a binary where one star has experienced a SN event for BSE (differences are where the data comes from, and the column header) +enum class COMPANION_PROPERTY: int { STAR_PROPERTIES }; + + +// enum class ANY_STAR_PROPERTY +// Symbolic names for variables of an individual star that can be selected for printing +// ANY_STAR_PROPERTY refers to the any individual star +enum class ANY_STAR_PROPERTY: int { STAR_PROPERTIES }; + + +// enum class BINARY_PROPERTY +// Symbolic names for variables of binary stars that can be selected for printing +// BINARY_PROPERTY refers to a binary star of type BaseBinaryStar) for BSE +// +// Properties only need to be here if they are required to be available for +// printing in the logfiles - all keys present here should also be in BINARY_PROPERTY_LABEL +// and BINARY_PROPERTY_DETAIL +enum class BINARY_PROPERTY: int { + NONE, + CIRCULARIZATION_TIMESCALE, + CIRCUMBINARY_DISK_FORMED, + CIRCUMBINARY_DISK_FORMATION_TIME, + CIRCUMBINARY_DISK_MASS_1_AT_FORMATION, + CIRCUMBINARY_DISK_MASS_2_AT_FORMATION, + CIRCUMBINARY_DISK_STELLAR_TYPE_1_AT_FORMATION, + CIRCUMBINARY_DISK_STELLAR_TYPE_2_AT_FORMATION, + CIRCUMBINARY_DISK_INITIAL_MASS, + CIRCUMBINARY_DISK_MASS_RETAINED_1, + CIRCUMBINARY_DISK_MASS_RETAINED_2, + CIRCUMBINARY_DISK_MASS_SUPPLIED, + CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_PRE, + CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_POST, + CIRCUMBINARY_DISK_ECCENTRICITY_PRE, + CIRCUMBINARY_DISK_ECCENTRICITY_POST, + COMMON_ENVELOPE_AT_LEAST_ONCE, + COMMON_ENVELOPE_EVENT_COUNT, + UNBOUND, + DOUBLE_CORE_COMMON_ENVELOPE, + DT, + ECCENTRICITY, + ECCENTRICITY_AT_DCO_FORMATION, + ECCENTRICITY_INITIAL, + ECCENTRICITY_POST_COMMON_ENVELOPE, + ECCENTRICITY_PRE_SUPERNOVA, + ECCENTRICITY_PRE_COMMON_ENVELOPE, + ERROR, + EVOL_STATUS, + ID, + IMMEDIATE_RLOF_POST_COMMON_ENVELOPE, + MASS_1_POST_COMMON_ENVELOPE, + MASS_1_PRE_COMMON_ENVELOPE, + MASS_2_POST_COMMON_ENVELOPE, + MASS_2_PRE_COMMON_ENVELOPE, + MASS_ENV_1, + MASS_ENV_2, + MASSES_EQUILIBRATED, + MASSES_EQUILIBRATED_AT_BIRTH, + MASS_TRANSFER_TRACKER_HISTORY, + MERGES_IN_HUBBLE_TIME, + OPTIMISTIC_COMMON_ENVELOPE, + ORBITAL_ANGULAR_MOMENTUM_VECTOR_X, + ORBITAL_ANGULAR_MOMENTUM_VECTOR_Y, + ORBITAL_ANGULAR_MOMENTUM_VECTOR_Z, + ORBITAL_ANGULAR_VELOCITY, + ORBITAL_VELOCITY_PRE_SUPERNOVA, + RADIUS_1_POST_COMMON_ENVELOPE, + RADIUS_1_PRE_COMMON_ENVELOPE, + RADIUS_2_POST_COMMON_ENVELOPE, + RADIUS_2_PRE_COMMON_ENVELOPE, + RANDOM_SEED, + RLOF_ACCRETION_EFFICIENCY, + RLOF_MASS_LOSS_RATE, + RLOF_MASS_TRANSFER_TIMESCALE, + RLOF_POST_MT_COMMON_ENVELOPE, + RLOF_POST_MT_ECCENTRICITY, + RLOF_POST_MT_EVENT_COUNTER, + RLOF_POST_MT_ID, + RLOF_POST_MT_SEMI_MAJOR_AXIS, + RLOF_POST_MT_STAR1_MASS, + RLOF_POST_MT_STAR2_MASS, + RLOF_POST_MT_STAR1_RADIUS, + RLOF_POST_MT_STAR2_RADIUS, + RLOF_POST_MT_STAR1_TEFF, + RLOF_POST_MT_STAR2_TEFF, + RLOF_POST_MT_STAR1_LUM, + RLOF_POST_MT_STAR2_LUM, + RLOF_POST_MT_STAR1_RLOF, + RLOF_POST_MT_STAR2_RLOF, + RLOF_POST_MT_STAR1_STELLAR_TYPE, + RLOF_POST_MT_STAR1_STELLAR_TYPE_NAME, + RLOF_POST_MT_STAR2_STELLAR_TYPE, + RLOF_POST_MT_STAR2_STELLAR_TYPE_NAME, + RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, + RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, + RLOF_PRE_MT_ECCENTRICITY, + RLOF_PRE_MT_SEMI_MAJOR_AXIS, + RLOF_PRE_MT_STAR1_MASS, + RLOF_PRE_MT_STAR2_MASS, + RLOF_PRE_MT_STAR1_RADIUS, + RLOF_PRE_MT_STAR2_RADIUS, + RLOF_PRE_MT_STAR1_TEFF, + RLOF_PRE_MT_STAR2_TEFF, + RLOF_PRE_MT_STAR1_LUM, + RLOF_PRE_MT_STAR2_LUM, + RLOF_PRE_MT_STAR1_RLOF, + RLOF_PRE_MT_STAR2_RLOF, + RLOF_PRE_MT_STAR1_STELLAR_TYPE, + RLOF_PRE_MT_STAR1_STELLAR_TYPE_NAME, + RLOF_PRE_MT_STAR2_STELLAR_TYPE, + RLOF_PRE_MT_STAR2_STELLAR_TYPE_NAME, + RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, + RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, + RLOF_SECONDARY_POST_COMMON_ENVELOPE, + RLOF_TIME_POST_MT, + RLOF_TIME_PRE_MT, + ROCHE_LOBE_RADIUS_1, + ROCHE_LOBE_RADIUS_2, + ROCHE_LOBE_RADIUS_1_POST_COMMON_ENVELOPE, + ROCHE_LOBE_RADIUS_2_POST_COMMON_ENVELOPE, + ROCHE_LOBE_RADIUS_1_PRE_COMMON_ENVELOPE, + ROCHE_LOBE_RADIUS_2_PRE_COMMON_ENVELOPE, + STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, + STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, + SEMI_MAJOR_AXIS_AT_DCO_FORMATION, + SEMI_MAJOR_AXIS_INITIAL, + SEMI_MAJOR_AXIS_POST_COMMON_ENVELOPE, + SEMI_MAJOR_AXIS_POST_STAGE_1_CE, + SEMI_MAJOR_AXIS_PRE_SUPERNOVA, + SEMI_MAJOR_AXIS_PRE_SUPERNOVA_RSOL, + SEMI_MAJOR_AXIS_PRE_COMMON_ENVELOPE, + SEMI_MAJOR_AXIS, + SEMI_MAJOR_AXIS_RSOL, + SIMULTANEOUS_RLOF, + STABLE_RLOF_POST_COMMON_ENVELOPE, + STELLAR_MERGER, + STELLAR_MERGER_AT_BIRTH, + STELLAR_TYPE_1_POST_COMMON_ENVELOPE, + STELLAR_TYPE_1_PRE_COMMON_ENVELOPE, + STELLAR_TYPE_2_POST_COMMON_ENVELOPE, + STELLAR_TYPE_2_PRE_COMMON_ENVELOPE, + STELLAR_TYPE_NAME_1_POST_COMMON_ENVELOPE, + STELLAR_TYPE_NAME_1_PRE_COMMON_ENVELOPE, + STELLAR_TYPE_NAME_2_POST_COMMON_ENVELOPE, + STELLAR_TYPE_NAME_2_PRE_COMMON_ENVELOPE, + SUPERNOVA_ORBIT_INCLINATION_ANGLE, + SUPERNOVA_STATE, + SYNCHRONIZATION_TIMESCALE_1, + SYNCHRONIZATION_TIMESCALE_2, + SYSTEMIC_SPEED, + SYSTEMIC_VELOCITY_X, + SYSTEMIC_VELOCITY_Y, + SYSTEMIC_VELOCITY_Z, + TIDAL_POTENTIAL_LOVE_NUMBER_10_1, + TIDAL_POTENTIAL_LOVE_NUMBER_12_1, + TIDAL_POTENTIAL_LOVE_NUMBER_22_1, + TIDAL_POTENTIAL_LOVE_NUMBER_32_1, + TIDAL_POTENTIAL_LOVE_NUMBER_10_2, + TIDAL_POTENTIAL_LOVE_NUMBER_12_2, + TIDAL_POTENTIAL_LOVE_NUMBER_22_2, + TIDAL_POTENTIAL_LOVE_NUMBER_32_2, + TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_1, + TIDAL_POTENTIAL_LOVE_NUMBER_12_EQ_1, + TIDAL_POTENTIAL_LOVE_NUMBER_22_EQ_1, + TIDAL_POTENTIAL_LOVE_NUMBER_32_EQ_1, + TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_2, + TIDAL_POTENTIAL_LOVE_NUMBER_12_EQ_2, + TIDAL_POTENTIAL_LOVE_NUMBER_22_EQ_2, + TIDAL_POTENTIAL_LOVE_NUMBER_32_EQ_2, + TIDAL_POTENTIAL_LOVE_NUMBER_10_DYN_1, + TIDAL_POTENTIAL_LOVE_NUMBER_12_DYN_1, + TIDAL_POTENTIAL_LOVE_NUMBER_22_DYN_1, + TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_1, + TIDAL_POTENTIAL_LOVE_NUMBER_10_DYN_2, + TIDAL_POTENTIAL_LOVE_NUMBER_12_DYN_2, + TIDAL_POTENTIAL_LOVE_NUMBER_22_DYN_2, + TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_2, + TIME, + TIME_TO_COALESCENCE, + TOTAL_ANGULAR_MOMENTUM, + TOTAL_ENERGY, + ZETA_LOBE, + ZETA_STAR +}; +// map BINARY_PROPERTY to string identifying the property +// for lookup by the printing functions +// +// Property names only need to be here if they are required to be available for +// printing in the logfiles - all keys present here should also be in BINARY_PROPERTY +// and BINARY_PROPERTY_DETAIL +const COMPASUnorderedMap BINARY_PROPERTY_LABEL = { + { BINARY_PROPERTY::NONE, "NONE" }, + { BINARY_PROPERTY::CIRCULARIZATION_TIMESCALE, "CIRCULARIZATION_TIMESCALE" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_FORMED, "CIRCUMBINARY_DISK_FORMED" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_FORMATION_TIME, "CIRCUMBINARY_DISK_FORMATION_TIME" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_1_AT_FORMATION, "CIRCUMBINARY_DISK_MASS_1_AT_FORMATION" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_2_AT_FORMATION, "CIRCUMBINARY_DISK_MASS_2_AT_FORMATION" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_STELLAR_TYPE_1_AT_FORMATION, "CIRCUMBINARY_DISK_STELLAR_TYPE_1_AT_FORMATION" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_STELLAR_TYPE_2_AT_FORMATION, "CIRCUMBINARY_DISK_STELLAR_TYPE_2_AT_FORMATION" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_INITIAL_MASS, "CIRCUMBINARY_DISK_INITIAL_MASS" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_1, "CIRCUMBINARY_DISK_MASS_RETAINED_1" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_2, "CIRCUMBINARY_DISK_MASS_RETAINED_2" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_SUPPLIED, "CIRCUMBINARY_DISK_MASS_SUPPLIED" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_PRE, "CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_PRE" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_POST, "CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_POST" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_ECCENTRICITY_PRE, "CIRCUMBINARY_DISK_ECCENTRICITY_PRE" }, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_ECCENTRICITY_POST, "CIRCUMBINARY_DISK_ECCENTRICITY_POST" }, + { BINARY_PROPERTY::COMMON_ENVELOPE_AT_LEAST_ONCE, "COMMON_ENVELOPE_AT_LEAST_ONCE" }, + { BINARY_PROPERTY::COMMON_ENVELOPE_EVENT_COUNT, "COMMON_ENVELOPE_EVENT_COUNT" }, + { BINARY_PROPERTY::UNBOUND, "UNBOUND" }, + { BINARY_PROPERTY::DOUBLE_CORE_COMMON_ENVELOPE, "DOUBLE_CORE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::DT, "DT" }, + { BINARY_PROPERTY::ECCENTRICITY, "ECCENTRICITY" }, + { BINARY_PROPERTY::ECCENTRICITY_AT_DCO_FORMATION, "ECCENTRICITY_AT_DCO_FORMATION" }, + { BINARY_PROPERTY::ECCENTRICITY_INITIAL, "ECCENTRICITY_INITIAL" }, + { BINARY_PROPERTY::ECCENTRICITY_POST_COMMON_ENVELOPE, "ECCENTRICITY_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::ECCENTRICITY_PRE_SUPERNOVA, "ECCENTRICITY_PRE_SUPERNOVA" }, + { BINARY_PROPERTY::ECCENTRICITY_PRE_COMMON_ENVELOPE, "ECCENTRICITY_PRE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::ERROR, "ERROR" }, + { BINARY_PROPERTY::EVOL_STATUS, "EVOL_STATUS" }, + { BINARY_PROPERTY::ID, "ID" }, + { BINARY_PROPERTY::IMMEDIATE_RLOF_POST_COMMON_ENVELOPE, "IMMEDIATE_RLOF_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::MASS_1_POST_COMMON_ENVELOPE, "MASS_1_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::MASS_1_PRE_COMMON_ENVELOPE, "MASS_1_PRE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::MASS_2_POST_COMMON_ENVELOPE, "MASS_2_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::MASS_2_PRE_COMMON_ENVELOPE, "MASS_2_PRE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::MASS_ENV_1, "MASS_ENV_1" }, + { BINARY_PROPERTY::MASS_ENV_2, "MASS_ENV_2" }, + { BINARY_PROPERTY::MASSES_EQUILIBRATED, "MASSES_EQUILIBRATED" }, + { BINARY_PROPERTY::MASSES_EQUILIBRATED_AT_BIRTH, "MASSES_EQUILIBRATED_AT_BIRTH" }, + { BINARY_PROPERTY::MASS_TRANSFER_TRACKER_HISTORY, "MASS_TRANSFER_TRACKER_HISTORY" }, + { BINARY_PROPERTY::MERGES_IN_HUBBLE_TIME, "MERGES_IN_HUBBLE_TIME" }, + { BINARY_PROPERTY::OPTIMISTIC_COMMON_ENVELOPE, "OPTIMISTIC_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_X, "ORBITAL_ANGULAR_MOMENTUM_VECTOR_X" }, + { BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_Y, "ORBITAL_ANGULAR_MOMENTUM_VECTOR_Y" }, + { BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_Z, "ORBITAL_ANGULAR_MOMENTUM_VECTOR_Z" }, + { BINARY_PROPERTY::ORBITAL_ANGULAR_VELOCITY, "ORBITAL_ANGULAR_VELOCITY" }, + { BINARY_PROPERTY::ORBITAL_VELOCITY_PRE_SUPERNOVA, "ORBITAL_VELOCITY_PRE_SUPERNOVA" }, + { BINARY_PROPERTY::RADIUS_1_POST_COMMON_ENVELOPE, "RADIUS_1_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::RADIUS_1_PRE_COMMON_ENVELOPE, "RADIUS_1_PRE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::RADIUS_2_POST_COMMON_ENVELOPE, "RADIUS_2_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::RADIUS_2_PRE_COMMON_ENVELOPE, "RADIUS_2_PRE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::RANDOM_SEED, "RANDOM_SEED" }, + { BINARY_PROPERTY::RLOF_ACCRETION_EFFICIENCY, "RLOF_ACCRETION_EFFICIENCY"}, + { BINARY_PROPERTY::RLOF_MASS_LOSS_RATE, "RLOF_MASS_LOSS_RATE"}, + { BINARY_PROPERTY::RLOF_MASS_TRANSFER_TIMESCALE, "RLOF_MASS_TRANSFER_TIMESCALE"}, + { BINARY_PROPERTY::RLOF_POST_MT_COMMON_ENVELOPE, "RLOF_POST_MT_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::RLOF_POST_MT_ECCENTRICITY, "RLOF_POST_MT_ECCENTRICITY" }, + { BINARY_PROPERTY::RLOF_POST_MT_EVENT_COUNTER, "RLOF_POST_MT_EVENT_COUNTER" }, + { BINARY_PROPERTY::RLOF_POST_MT_ID, "RLOF_POST_MT_ID" }, + { BINARY_PROPERTY::RLOF_POST_MT_SEMI_MAJOR_AXIS, "RLOF_POST_MT_SEMI_MAJOR_AXIS" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_MASS, "RLOF_POST_MT_STAR1_MASS" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_MASS, "RLOF_POST_MT_STAR2_MASS" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_RADIUS, "RLOF_POST_MT_STAR1_RADIUS" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_RADIUS, "RLOF_POST_MT_STAR2_RADIUS" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_TEFF, "RLOF_POST_MT_STAR1_TEFF" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_TEFF, "RLOF_POST_MT_STAR2_TEFF" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_LUM, "RLOF_POST_MT_STAR1_LUM" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_LUM, "RLOF_POST_MT_STAR2_LUM" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_RLOF, "RLOF_POST_MT_STAR1_RLOF" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_RLOF, "RLOF_POST_MT_STAR2_RLOF" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_STELLAR_TYPE, "RLOF_POST_MT_STAR1_STELLAR_TYPE" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_STELLAR_TYPE_NAME, "RLOF_POST_MT_STAR1_STELLAR_TYPE_NAME" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_STELLAR_TYPE, "RLOF_POST_MT_STAR2_STELLAR_TYPE" }, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_STELLAR_TYPE_NAME, "RLOF_POST_MT_STAR2_STELLAR_TYPE_NAME" }, + { BINARY_PROPERTY::RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, "RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1" }, + { BINARY_PROPERTY::RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, "RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2" }, + { BINARY_PROPERTY::RLOF_PRE_MT_ECCENTRICITY, "RLOF_PRE_MT_ECCENTRICITY" }, + { BINARY_PROPERTY::RLOF_PRE_MT_SEMI_MAJOR_AXIS, "RLOF_PRE_MT_SEMI_MAJOR_AXIS" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_MASS, "RLOF_PRE_MT_STAR1_MASS" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_MASS, "RLOF_PRE_MT_STAR2_MASS" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_RADIUS, "RLOF_PRE_MT_STAR1_RADIUS" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_RADIUS, "RLOF_PRE_MT_STAR2_RADIUS" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_TEFF, "RLOF_PRE_MT_STAR1_TEFF" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_TEFF, "RLOF_PRE_MT_STAR2_TEFF" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_LUM, "RLOF_PRE_MT_STAR1_LUM" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_LUM, "RLOF_PRE_MT_STAR2_LUM" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_RLOF, "RLOF_PRE_MT_STAR1_RLOF" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_RLOF, "RLOF_PRE_MT_STAR2_RLOF" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_STELLAR_TYPE, "RLOF_PRE_MT_STAR1_STELLAR_TYPE" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR1_STELLAR_TYPE_NAME, "RLOF_PRE_MT_STAR1_STELLAR_TYPE_NAME" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_STELLAR_TYPE, "RLOF_PRE_MT_STAR2_STELLAR_TYPE" }, + { BINARY_PROPERTY::RLOF_PRE_MT_STAR2_STELLAR_TYPE_NAME, "RLOF_PRE_MT_STAR2_STELLAR_TYPE_NAME" }, + { BINARY_PROPERTY::RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, "RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1" }, + { BINARY_PROPERTY::RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, "RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2" }, + { BINARY_PROPERTY::RLOF_SECONDARY_POST_COMMON_ENVELOPE, "RLOF_SECONDARY_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::RLOF_TIME_POST_MT, "RLOF_TIME_POST_MT" }, + { BINARY_PROPERTY::RLOF_TIME_PRE_MT, "RLOF_TIME_PRE_MT" }, + { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1, "ROCHE_LOBE_RADIUS_1" }, + { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1_POST_COMMON_ENVELOPE, "ROCHE_LOBE_RADIUS_1_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1_PRE_COMMON_ENVELOPE, "ROCHE_LOBE_RADIUS_1_PRE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2, "ROCHE_LOBE_RADIUS_2" }, + { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2_POST_COMMON_ENVELOPE, "ROCHE_LOBE_RADIUS_2_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2_PRE_COMMON_ENVELOPE, "ROCHE_LOBE_RADIUS_2_PRE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, "STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1" }, + { BINARY_PROPERTY::STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, "STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2" }, + { BINARY_PROPERTY::SEMI_MAJOR_AXIS_AT_DCO_FORMATION, "SEMI_MAJOR_AXIS_AT_DCO_FORMATION" }, + { BINARY_PROPERTY::SEMI_MAJOR_AXIS_INITIAL, "SEMI_MAJOR_AXIS_INITIAL" }, + { BINARY_PROPERTY::SEMI_MAJOR_AXIS_POST_COMMON_ENVELOPE, "SEMI_MAJOR_AXIS_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::SEMI_MAJOR_AXIS_POST_STAGE_1_CE, "SEMI_MAJOR_AXIS_POST_STAGE_1_CE" }, + { BINARY_PROPERTY::SEMI_MAJOR_AXIS_PRE_SUPERNOVA, "SEMI_MAJOR_AXIS_PRE_SUPERNOVA" }, + { BINARY_PROPERTY::SEMI_MAJOR_AXIS_PRE_SUPERNOVA_RSOL, "SEMI_MAJOR_AXIS_PRE_SUPERNOVA_RSOL" }, + { BINARY_PROPERTY::SEMI_MAJOR_AXIS_PRE_COMMON_ENVELOPE, "SEMI_MAJOR_AXIS_PRE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::SEMI_MAJOR_AXIS, "SEMI_MAJOR_AXIS" }, + { BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, "SEMI_MAJOR_AXIS_RSOL" }, + { BINARY_PROPERTY::SIMULTANEOUS_RLOF, "SIMULTANEOUS_RLOF" }, + { BINARY_PROPERTY::STABLE_RLOF_POST_COMMON_ENVELOPE, "STABLE_RLOF_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::STELLAR_MERGER, "STELLAR_MERGER" }, + { BINARY_PROPERTY::STELLAR_MERGER_AT_BIRTH, "STELLAR_MERGER_AT_BIRTH" }, + { BINARY_PROPERTY::STELLAR_TYPE_1_POST_COMMON_ENVELOPE, "STELLAR_TYPE_1_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::STELLAR_TYPE_1_PRE_COMMON_ENVELOPE, "STELLAR_TYPE_1_PRE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::STELLAR_TYPE_2_POST_COMMON_ENVELOPE, "STELLAR_TYPE_2_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::STELLAR_TYPE_2_PRE_COMMON_ENVELOPE, "STELLAR_TYPE_2_PRE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::STELLAR_TYPE_NAME_1_POST_COMMON_ENVELOPE, "STELLAR_TYPE_NAME_1_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::STELLAR_TYPE_NAME_1_PRE_COMMON_ENVELOPE, "STELLAR_TYPE_NAME_1_PRE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::STELLAR_TYPE_NAME_2_POST_COMMON_ENVELOPE, "STELLAR_TYPE_NAME_2_POST_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::STELLAR_TYPE_NAME_2_PRE_COMMON_ENVELOPE, "STELLAR_TYPE_NAME_2_PRE_COMMON_ENVELOPE" }, + { BINARY_PROPERTY::SUPERNOVA_ORBIT_INCLINATION_ANGLE, "SUPERNOVA_ORBIT_INCLINATION_ANGLE" }, + { BINARY_PROPERTY::SUPERNOVA_STATE, "SUPERNOVA_STATE" }, + { BINARY_PROPERTY::SYNCHRONIZATION_TIMESCALE_1, "SYNCHRONIZATION_TIMESCALE_1" }, + { BINARY_PROPERTY::SYNCHRONIZATION_TIMESCALE_2, "SYNCHRONIZATION_TIMESCALE_2" }, + { BINARY_PROPERTY::SYSTEMIC_SPEED, "SYSTEMIC_SPEED" }, + { BINARY_PROPERTY::SYSTEMIC_VELOCITY_X, "SYSTEMIC_VELOCITY_X" }, + { BINARY_PROPERTY::SYSTEMIC_VELOCITY_Y, "SYSTEMIC_VELOCITY_Y" }, + { BINARY_PROPERTY::SYSTEMIC_VELOCITY_Z, "SYSTEMIC_VELOCITY_Z" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_10_1, "TIDAL_POTENTIAL_LOVE_NUMBER_10_1" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_12_1, "TIDAL_POTENTIAL_LOVE_NUMBER_12_1" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_22_1, "TIDAL_POTENTIAL_LOVE_NUMBER_22_1" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_32_1, "TIDAL_POTENTIAL_LOVE_NUMBER_32_1" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_10_2, "TIDAL_POTENTIAL_LOVE_NUMBER_10_2" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_12_2, "TIDAL_POTENTIAL_LOVE_NUMBER_12_2" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_22_2, "TIDAL_POTENTIAL_LOVE_NUMBER_22_2" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_32_2, "TIDAL_POTENTIAL_LOVE_NUMBER_32_2" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_1, "TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_1" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_12_EQ_1, "TIDAL_POTENTIAL_LOVE_NUMBER_12_EQ_1" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_22_EQ_1, "TIDAL_POTENTIAL_LOVE_NUMBER_22_EQ_1" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_32_EQ_1, "TIDAL_POTENTIAL_LOVE_NUMBER_32_EQ_1" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_2, "TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_2" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_12_EQ_2, "TIDAL_POTENTIAL_LOVE_NUMBER_12_EQ_2" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_22_EQ_2, "TIDAL_POTENTIAL_LOVE_NUMBER_22_EQ_2" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_32_EQ_2, "TIDAL_POTENTIAL_LOVE_NUMBER_32_EQ_2" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_10_DYN_1, "TIDAL_POTENTIAL_LOVE_NUMBER_10_DYN_1" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_12_DYN_1, "TIDAL_POTENTIAL_LOVE_NUMBER_12_DYN_1" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_22_DYN_1, "TIDAL_POTENTIAL_LOVE_NUMBER_22_DYN_1" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_1, "TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_1" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_10_DYN_2, "TIDAL_POTENTIAL_LOVE_NUMBER_10_DYN_2" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_12_DYN_2, "TIDAL_POTENTIAL_LOVE_NUMBER_12_DYN_2" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_22_DYN_2, "TIDAL_POTENTIAL_LOVE_NUMBER_22_DYN_2" }, + { BINARY_PROPERTY::TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_2, "TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_2" }, + { BINARY_PROPERTY::TIME, "TIME" }, + { BINARY_PROPERTY::TIME_TO_COALESCENCE, "TIME_TO_COALESCENCE" }, + { BINARY_PROPERTY::TOTAL_ANGULAR_MOMENTUM, "TOTAL_ANGULAR_MOMENTUM" }, + { BINARY_PROPERTY::TOTAL_ENERGY, "TOTAL_ENERGY" }, + { BINARY_PROPERTY::ZETA_LOBE, "ZETA_LOBE" }, + { BINARY_PROPERTY::ZETA_STAR, "ZETA_STAR" } +}; + + +// enum class PROGRAM_OPTION +// Symbolic names for program option values +// +// Options only need to be here if they are required to be +// available for printing in the logfiles +enum class PROGRAM_OPTION: int { + + NONE, + + ADD_OPTIONS_TO_SYSPARMS, + ALLOW_NON_STRIPPED_ECSN, + ALLOW_IMMEDIATE_RLOF_POST_CE_TO_SURVIVE_COMMON_ENVELOPE, + ALLOW_MS_STAR_TO_SURVIVE_COMMON_ENVELOPE, + ALLOW_RADIATIVE_ENVELOPE_STAR_TO_SURVIVE_COMMON_ENVELOPE, + ALLOW_RLOF_AT_BIRTH, + ALLOW_TOUCHING_AT_BIRTH, + ANG_MOM_CONSERVATION_DURING_CIRCULARISATION, + + BLACK_HOLE_KICKS_MODE, + + CASE_BB_STABILITY_PRESCRIPTION, + + CHECK_PHOTON_TIRING_LIMIT, + + CHE_MODE, + + CIRCULARISE_BINARY_DURING_MT, + + CIRCUMBINARY_DISK, + CIRCUMBINARY_DISK_BETA, + CIRCUMBINARY_DISK_EDDINGTON_CAP_FACTOR, + CIRCUMBINARY_DISK_EDDINGTON_GE23_FACTOR, + CIRCUMBINARY_DISK_EDDINGTON_MODE, + CIRCUMBINARY_DISK_INNER_RADIUS_OVER_SEPARATION, + CIRCUMBINARY_DISK_LIFETIME, + CIRCUMBINARY_DISK_STRUCTURE_FACTOR, + CIRCUMBINARY_DISK_ENVELOPE_MASS_FRACTION_SUPPLIED, + POST_COMMON_ENVELOPE_ECCENTRICITY_CAP, + POST_COMMON_ENVELOPE_ECCENTRICITY_FRACTION, + POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION, + + COMMON_ENVELOPE_ALPHA, + COMMON_ENVELOPE_ALPHA_THERMAL, + COMMON_ENVELOPE_FORMALISM, + COMMON_ENVELOPE_LAMBDA, + COMMON_ENVELOPE_LAMBDA_MULTIPLIER, + COMMON_ENVELOPE_LAMBDA_PRESCRIPTION, + COMMON_ENVELOPE_MASS_ACCRETION_CONSTANT, + COMMON_ENVELOPE_MASS_ACCRETION_MAX, + COMMON_ENVELOPE_MASS_ACCRETION_MIN, + COMMON_ENVELOPE_MASS_ACCRETION_PRESCRIPTION, + COMMON_ENVELOPE_RECOMBINATION_ENERGY_DENSITY, + COMMON_ENVELOPE_SECOND_STAGE_BETA, + COMMON_ENVELOPE_SECOND_STAGE_GAMMA_PRESCRIPTION, + COMMON_ENVELOPE_SLOPE_KRUCKOW, + + CONVECTIVE_ENVELOPE_MASS_THRESHOLD, + CONVECTIVE_ENVELOPE_TEMPERATURE_THRESHOLD, + + COOL_WIND_MASS_LOSS_MULTIPLIER, + + ECCENTRICITY, + ECCENTRICITY_DISTRIBUTION, + ECCENTRICITY_DISTRIBUTION_MAX, + ECCENTRICITY_DISTRIBUTION_MIN, + EDDINGTON_ACCRETION_FACTOR, + ENABLE_ROTATIONALLY_ENHANCED_MASS_LOSS, + ENHANCE_CHE_LIFETIMES_LUMINOSITIES, + ENVELOPE_STATE_PRESCRIPTION, + EVOLUTION_MODE, + + FP_ERROR_MODE, + + FRYER_SUPERNOVA_ENGINE, + + FRYER22_FMIX, + FRYER22_MCRIT, + + INITIAL_MASS, + INITIAL_MASS_1, + INITIAL_MASS_2, + + INITIAL_MASS_FUNCTION, + INITIAL_MASS_FUNCTION_MAX, + INITIAL_MASS_FUNCTION_MIN, + INITIAL_MASS_FUNCTION_POWER, + + KICK_DIRECTION_DISTRIBUTION, + KICK_DIRECTION_POWER, + KICK_SCALING_FACTOR, + KICK_MAGNITUDE_DISTRIBUTION, + KICK_MAGNITUDE_DISTRIBUTION_MAXIMUM, + + KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH, + KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS, + KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN, + KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN, + + KICK_MAGNITUDE, + KICK_MAGNITUDE_1, + KICK_MAGNITUDE_2, + + KICK_MAGNITUDE_RANDOM, + KICK_MAGNITUDE_RANDOM_1, + KICK_MAGNITUDE_RANDOM_2, + + KICK_MEAN_ANOMALY_1, + KICK_MEAN_ANOMALY_2, + KICK_PHI_1, + KICK_PHI_2, + KICK_THETA_1, + KICK_THETA_2, + + LBV_FACTOR, + LBV_MASS_LOSS_PRESCRIPTION, + + MALTSEV_FALLBACK, + MALTSEV_MODE, + + MASS_LOSS_PRESCRIPTION, + + MASS_RATIO, + MASS_RATIO_DISTRIBUTION, + MASS_RATIO_DISTRIBUTION_MAX, + MASS_RATIO_DISTRIBUTION_MIN, + + MAXIMUM_EVOLUTION_TIME, + MAXIMUM_DONOR_MASS, + MAXIMUM_NEUTRON_STAR_MASS, + MAXIMUM_TIMESTEPS, + + MCBUR1, + + METALLICITY, + METALLICITY_DISTRIBUTION, + METALLICITY_DISTRIBUTION_MAX, + METALLICITY_DISTRIBUTION_MIN, + + MINIMUM_SAMPLED_SECONDARY_MASS, + + MT_ACCRETION_EFFICIENCY_PRESCRIPTION, + MT_ANG_MOM_LOSS_PRESCRIPTION, + MT_THERMAL_LIMIT_C, + + MT_CRIT_MR_MS_LOW_MASS_DEGENERATE_ACCRETOR, + MT_CRIT_MR_MS_LOW_MASS_NON_DEGENERATE_ACCRETOR, + MT_CRIT_MR_MS_HIGH_MASS_DEGENERATE_ACCRETOR, + MT_CRIT_MR_MS_HIGH_MASS_NON_DEGENERATE_ACCRETOR, + MT_CRIT_MR_GIANT_DEGENERATE_ACCRETOR, + MT_CRIT_MR_GIANT_NON_DEGENERATE_ACCRETOR, + MT_CRIT_MR_HG_DEGENERATE_ACCRETOR, + MT_CRIT_MR_HG_NON_DEGENERATE_ACCRETOR, + MT_CRIT_MR_HE_GIANT_DEGENERATE_ACCRETOR, + MT_CRIT_MR_HE_GIANT_NON_DEGENERATE_ACCRETOR, + MT_CRIT_MR_HE_HG_DEGENERATE_ACCRETOR, + MT_CRIT_MR_HE_HG_NON_DEGENERATE_ACCRETOR, + MT_CRIT_MR_HE_MS_DEGENERATE_ACCRETOR, + MT_CRIT_MR_HE_MS_NON_DEGENERATE_ACCRETOR, + MT_CRIT_MR_WD_DEGENERATE_ACCRETOR, + MT_CRIT_MR_WD_NONDEGENERATE_ACCRETOR, + + MT_FRACTION_ACCRETED, + MT_JLOSS, + MT_JLOSS_LINEAR_FRACTION_DEGEN, + MT_JLOSS_LINEAR_FRACTION_NON_DEGEN, + MT_REJUVENATION_PRESCRIPTION, + MT_THERMALLY_LIMITED_VARIATION, + + MULLER_MANDEL_KICK_MULTIPLIER_BH, + MULLER_MANDEL_KICK_MULTIPLIER_NS, + MULLER_MANDEL_SIGMA_KICK_BH, + MULLER_MANDEL_SIGMA_KICK_NS, + + NEUTRINO_MASS_LOSS_ASSUMPTION_BH, + NEUTRINO_MASS_LOSS_VALUE_BH, + + NOTES, + + NS_ACCRETION_IN_CE, + NS_EOS, + + ORBITAL_PERIOD, + ORBITAL_PERIOD_DISTRIBUTION, + ORBITAL_PERIOD_DISTRIBUTION_MAX, + ORBITAL_PERIOD_DISTRIBUTION_MIN, + + OVERALL_WIND_MASS_LOSS_MULTIPLIER, + + PISN_LOWER_LIMIT, + PISN_UPPER_LIMIT, + + PPI_LOWER_LIMIT, + PPI_PRESCRIPTION, + PPI_UPPER_LIMIT, + PPI_CO_CORE_SHIFT_HENDRIKS, + + PULSAR_MAGNETIC_FIELD_DISTRIBUTION, + PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MAX, + PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MIN, + + PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION, + PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MAX, + PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MIN, + + PULSAR_MAGNETIC_FIELD_DECAY_MASS_SCALE, + PULSAR_MAGNETIC_FIELD_DECAY_TIME_SCALE, + + PULSAR_MINIMUM_MAGNETIC_FIELD, + + QCRIT_PRESCRIPTION, + + RANDOM_SEED, + RANDOM_SEED_CMDLINE, + + REMNANT_MASS_PRESCRIPTION, + + RESPONSE_TO_SPIN_UP, + + ROCKET_KICK_MAGNITUDE_1, + ROCKET_KICK_MAGNITUDE_2, + ROCKET_KICK_PHI_1, + ROCKET_KICK_PHI_2, + ROCKET_KICK_THETA_1, + ROCKET_KICK_THETA_2, + + ROTATIONAL_VELOCITY_DISTRIBUTION, + ROTATIONAL_FREQUENCY, + ROTATIONAL_FREQUENCY_1, + ROTATIONAL_FREQUENCY_2, + + SCALE_CHE_MASS_LOSS_SURF_HE_ABUNDANCE, + SCALE_TERMINAL_WIND_VEL_METALLICITY_POWER, + SEMI_MAJOR_AXIS, + SEMI_MAJOR_AXIS_DISTRIBUTION, + SEMI_MAJOR_AXIS_DISTRIBUTION_MAX, + SEMI_MAJOR_AXIS_DISTRIBUTION_MIN, + + STELLAR_ZETA_PRESCRIPTION, + + TIDES_PRESCRIPTION, + + USSN_KICKS_OVERRIDE_MANDEL_MULLER, + + WR_FACTOR, + + ZETA_ADIABATIC_ARBITRARY, + ZETA_MS, + ZETA_RADIATIVE_ENVELOPE_GIANT +}; +// map PROGRAM_OPTION to string identifying the property +// for lookup by the printing functions +// +// Options only need to be here if they are required to be +// available for printing in the logfiles - all keys present here +// should also be in PROGRAM_OPTION_DETAIL ( except PROGRAM_OPTION::NOTES) +const COMPASUnorderedMap PROGRAM_OPTION_LABEL = { + + { PROGRAM_OPTION::NONE, "NONE" }, + + { PROGRAM_OPTION::ALLOW_NON_STRIPPED_ECSN, "ALLOW_NON_STRIPPED_ECSN" }, + { PROGRAM_OPTION::ADD_OPTIONS_TO_SYSPARMS, "ADD_OPTIONS_TO_SYSPARMS" }, + { PROGRAM_OPTION::ALLOW_MS_STAR_TO_SURVIVE_COMMON_ENVELOPE, "ALLOW_MS_STAR_TO_SURVIVE_COMMON_ENVELOPE" }, + { PROGRAM_OPTION::ALLOW_RADIATIVE_ENVELOPE_STAR_TO_SURVIVE_COMMON_ENVELOPE, "ALLOW_RADIATIVE_ENVELOPE_STAR_TO_SURVIVE_COMMON_ENVELOPE" }, + { PROGRAM_OPTION::ALLOW_IMMEDIATE_RLOF_POST_CE_TO_SURVIVE_COMMON_ENVELOPE, "ALLOW_IMMEDIATE_RLOF_POST_CE_TO_SURVIVE_COMMON_ENVELOPE" }, + { PROGRAM_OPTION::ALLOW_RLOF_AT_BIRTH, "ALLOW_RLOF_AT_BIRTH" }, + { PROGRAM_OPTION::ALLOW_TOUCHING_AT_BIRTH, "ALLOW_TOUCHING_AT_BIRTH" }, + { PROGRAM_OPTION::ANG_MOM_CONSERVATION_DURING_CIRCULARISATION, "ANG_MOM_CONSERVATION_DURING_CIRCULARISATION" }, + + { PROGRAM_OPTION::BLACK_HOLE_KICKS_MODE, "BLACK_HOLE_KICKS_MODE" }, + + { PROGRAM_OPTION::CASE_BB_STABILITY_PRESCRIPTION, "CASE_BB_STABILITY_PRESCRIPTION" }, + + { PROGRAM_OPTION::CHECK_PHOTON_TIRING_LIMIT, "CHECK_PHOTON_TIRING_LIMIT" }, + + { PROGRAM_OPTION::CHE_MODE, "CHE_MODE" }, + + { PROGRAM_OPTION::CIRCULARISE_BINARY_DURING_MT, "CIRCULARISE_BINARY_DURING_MT" }, + + { PROGRAM_OPTION::CIRCUMBINARY_DISK, "CIRCUMBINARY_DISK" }, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_BETA, "CIRCUMBINARY_DISK_BETA" }, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_CAP_FACTOR, "CIRCUMBINARY_DISK_EDDINGTON_CAP_FACTOR" }, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_GE23_FACTOR, "CIRCUMBINARY_DISK_EDDINGTON_GE23_FACTOR" }, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_MODE, "CIRCUMBINARY_DISK_EDDINGTON_MODE" }, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_INNER_RADIUS_OVER_SEPARATION, "CIRCUMBINARY_DISK_INNER_RADIUS_OVER_SEPARATION" }, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_LIFETIME, "CIRCUMBINARY_DISK_LIFETIME" }, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_STRUCTURE_FACTOR, "CIRCUMBINARY_DISK_STRUCTURE_FACTOR" }, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_ENVELOPE_MASS_FRACTION_SUPPLIED, "CIRCUMBINARY_DISK_ENVELOPE_MASS_FRACTION_SUPPLIED" }, + { PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_CAP, "POST_COMMON_ENVELOPE_ECCENTRICITY_CAP" }, + { PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_FRACTION, "POST_COMMON_ENVELOPE_ECCENTRICITY_FRACTION" }, + { PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION, "POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION" }, + + { PROGRAM_OPTION::COMMON_ENVELOPE_ALPHA, "COMMON_ENVELOPE_ALPHA" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_ALPHA_THERMAL, "COMMON_ENVELOPE_ALPHA_THERMAL" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_FORMALISM, "COMMON_ENVELOPE_FORMALISM" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_LAMBDA, "COMMON_ENVELOPE_LAMBDA" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_LAMBDA_MULTIPLIER, "COMMON_ENVELOPE_LAMBDA_MULTIPLIER" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_LAMBDA_PRESCRIPTION, "COMMON_ENVELOPE_LAMBDA_PRESCRIPTION" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_CONSTANT, "COMMON_ENVELOPE_MASS_ACCRETION_CONSTANT" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_MAX, "COMMON_ENVELOPE_MASS_ACCRETION_MAX" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_MIN, "COMMON_ENVELOPE_MASS_ACCRETION_MIN" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_PRESCRIPTION, "COMMON_ENVELOPE_MASS_ACCRETION_PRESCRIPTION" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_RECOMBINATION_ENERGY_DENSITY, "COMMON_ENVELOPE_RECOMBINATION_ENERGY_DENSITY" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_SECOND_STAGE_BETA, "COMMON_ENVELOPE_SECOND_STAGE_BETA" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_SECOND_STAGE_GAMMA_PRESCRIPTION, "COMMON_ENVELOPE_SECOND_STAGE_GAMMA_PRESCRIPTION" }, + { PROGRAM_OPTION::COMMON_ENVELOPE_SLOPE_KRUCKOW, "COMMON_ENVELOPE_SLOPE_KRUCKOW" }, + + { PROGRAM_OPTION::COOL_WIND_MASS_LOSS_MULTIPLIER, "COOL_WIND_MASS_LOSS_MULTIPLIER" }, + + { PROGRAM_OPTION::ECCENTRICITY, "ECCENTRICITY" }, + { PROGRAM_OPTION::ECCENTRICITY_DISTRIBUTION, "ECCENTRICITY_DISTRIBUTION" }, + { PROGRAM_OPTION::ECCENTRICITY_DISTRIBUTION_MAX, "ECCENTRICITY_DISTRIBUTION_MAX" }, + { PROGRAM_OPTION::ECCENTRICITY_DISTRIBUTION_MIN, "ECCENTRICITY_DISTRIBUTION_MIN" }, + { PROGRAM_OPTION::EDDINGTON_ACCRETION_FACTOR, "EDDINGTON_ACCRETION_FACTOR" }, + { PROGRAM_OPTION::ENABLE_ROTATIONALLY_ENHANCED_MASS_LOSS, "ENABLE_ROTATIONALLY_ENHANCED_MASS_LOSS" }, + { PROGRAM_OPTION::ENHANCE_CHE_LIFETIMES_LUMINOSITIES, "ENHANCE_CHE_LIFETIMES_LUMINOSITIES" }, + { PROGRAM_OPTION::ENVELOPE_STATE_PRESCRIPTION, "ENVELOPE_STATE_PRESCRIPTION" }, + { PROGRAM_OPTION::EVOLUTION_MODE, "EVOLUTION_MODE" }, + + { PROGRAM_OPTION::FP_ERROR_MODE, "FP_ERROR_MODE" }, + + { PROGRAM_OPTION::FRYER_SUPERNOVA_ENGINE, "FRYER_SUPERNOVA_ENGINE" }, + + { PROGRAM_OPTION::FRYER22_FMIX, "FRYER22_FMIX" }, + { PROGRAM_OPTION::FRYER22_MCRIT, "FRYER22_MCRIT" }, + + { PROGRAM_OPTION::INITIAL_MASS, "INITIAL_MASS" }, + { PROGRAM_OPTION::INITIAL_MASS_1, "INITIAL_MASS_1" }, + { PROGRAM_OPTION::INITIAL_MASS_2, "INITIAL_MASS_2" }, + + { PROGRAM_OPTION::INITIAL_MASS_FUNCTION, "INITIAL_MASS_FUNCTION" }, + { PROGRAM_OPTION::INITIAL_MASS_FUNCTION_MAX, "INITIAL_MASS_FUNCTION_MAX" }, + { PROGRAM_OPTION::INITIAL_MASS_FUNCTION_MIN, "INITIAL_MASS_FUNCTION_MIN" }, + { PROGRAM_OPTION::INITIAL_MASS_FUNCTION_POWER, "INITIAL_MASS_FUNCTION_POWER" }, + { PROGRAM_OPTION::KICK_DIRECTION_DISTRIBUTION, "KICK_DIRECTION_DISTRIBUTION" }, + { PROGRAM_OPTION::KICK_DIRECTION_POWER, "KICK_DIRECTION_POWER" }, + { PROGRAM_OPTION::KICK_SCALING_FACTOR, "KICK_SCALING_FACTOR" }, + { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION, "KICK_MAGNITUDE_DISTRIBUTION" }, + { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_MAXIMUM, "KICK_MAGNITUDE_DISTRIBUTION_MAXIMUM" }, + + { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH, "KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH" }, + { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS, "KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS" }, + { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN, "KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN" }, + { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN, "KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN" }, + + { PROGRAM_OPTION::KICK_MAGNITUDE, "KICK_MAGNITUDE" }, + { PROGRAM_OPTION::KICK_MAGNITUDE_1, "KICK_MAGNITUDE_1" }, + { PROGRAM_OPTION::KICK_MAGNITUDE_2, "KICK_MAGNITUDE_2" }, + + { PROGRAM_OPTION::KICK_MAGNITUDE_RANDOM, "KICK_MAGNITUDE_RANDOM" }, + { PROGRAM_OPTION::KICK_MAGNITUDE_RANDOM_1, "KICK_MAGNITUDE_RANDOM_1" }, + { PROGRAM_OPTION::KICK_MAGNITUDE_RANDOM_2, "KICK_MAGNITUDE_RANDOM_2" }, + + { PROGRAM_OPTION::KICK_MEAN_ANOMALY_1, "KICK_MEAN_ANOMALY_1" }, + { PROGRAM_OPTION::KICK_MEAN_ANOMALY_2, "KICK_MEAN_ANOMALY_2" }, + { PROGRAM_OPTION::KICK_PHI_1, "KICK_PHI_1" }, + { PROGRAM_OPTION::KICK_PHI_2, "KICK_PHI_2" }, + { PROGRAM_OPTION::KICK_THETA_1, "KICK_THETA_1" }, + { PROGRAM_OPTION::KICK_THETA_2, "KICK_THETA_2" }, + + { PROGRAM_OPTION::LBV_FACTOR, "LBV_FACTOR" }, + { PROGRAM_OPTION::LBV_MASS_LOSS_PRESCRIPTION, "LBV_MASS_LOSS_PRESCRIPTION" }, + + { PROGRAM_OPTION::MALTSEV_FALLBACK, "MALTSEV_FALLBACK" }, + { PROGRAM_OPTION::MALTSEV_MODE, "MALTSEV_MODE" }, + { PROGRAM_OPTION::MASS_LOSS_PRESCRIPTION, "MASS_LOSS_PRESCRIPTION" }, + + { PROGRAM_OPTION::MASS_RATIO, "MASS_RATIO" }, + { PROGRAM_OPTION::MASS_RATIO_DISTRIBUTION, "MASS_RATIO_DISTRIBUTION" }, + { PROGRAM_OPTION::MASS_RATIO_DISTRIBUTION_MAX, "MASS_RATIO_DISTRIBUTION_MAX" }, + { PROGRAM_OPTION::MASS_RATIO_DISTRIBUTION_MIN, "MASS_RATIO_DISTRIBUTION_MIN" }, + + { PROGRAM_OPTION::MAXIMUM_EVOLUTION_TIME, "MAXIMUM_EVOLUTION_TIME" }, + { PROGRAM_OPTION::MAXIMUM_DONOR_MASS, "MAXIMUM_DONOR_MASS" }, + { PROGRAM_OPTION::MAXIMUM_NEUTRON_STAR_MASS, "MAXIMUM_NEUTRON_STAR_MASS" }, + { PROGRAM_OPTION::MAXIMUM_TIMESTEPS, "MAXIMUM_TIMESTEPS" }, + + { PROGRAM_OPTION::MCBUR1, "MCBUR1" }, + + { PROGRAM_OPTION::METALLICITY, "METALLICITY" }, + { PROGRAM_OPTION::METALLICITY_DISTRIBUTION, "METALLICITY_DISTRIBUTION" }, + { PROGRAM_OPTION::METALLICITY_DISTRIBUTION_MAX, "METALLICITY_DISTRIBUTION_MAX" }, + { PROGRAM_OPTION::METALLICITY_DISTRIBUTION_MIN, "METALLICITY_DISTRIBUTION_MIN" }, + + { PROGRAM_OPTION::MINIMUM_SAMPLED_SECONDARY_MASS, "MINIMUM_SAMPLED_SECONDARY_MASS" }, + + { PROGRAM_OPTION::MT_ACCRETION_EFFICIENCY_PRESCRIPTION, "MT_ACCRETION_EFFICIENCY_PRESCRIPTION" }, + { PROGRAM_OPTION::MT_ANG_MOM_LOSS_PRESCRIPTION, "MT_ANG_MOM_LOSS_PRESCRIPTION" }, + { PROGRAM_OPTION::MT_THERMAL_LIMIT_C, "MT_THERMAL_LIMIT_C" }, + + { PROGRAM_OPTION::MT_CRIT_MR_MS_LOW_MASS_DEGENERATE_ACCRETOR, "MT_CRIT_MR_MS_LOW_MASS_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_MS_LOW_MASS_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_MS_LOW_MASS_NON_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_MS_HIGH_MASS_DEGENERATE_ACCRETOR, "MT_CRIT_MR_MS_HIGH_MASS_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_MS_HIGH_MASS_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_MS_HIGH_MASS_NON_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_GIANT_DEGENERATE_ACCRETOR, "MT_CRIT_MR_GIANT_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_GIANT_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_GIANT_NON_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_HG_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HG_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_HG_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HG_NON_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_HE_GIANT_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HE_GIANT_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_HE_GIANT_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HE_GIANT_NON_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_HE_HG_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HE_HG_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_HE_HG_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HE_HG_NON_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_HE_MS_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HE_MS_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_HE_MS_NON_DEGENERATE_ACCRETOR, "MT_CRIT_MR_HE_MS_NON_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_WD_DEGENERATE_ACCRETOR, "MT_CRIT_MR_WD_DEGENERATE_ACCRETOR" }, + { PROGRAM_OPTION::MT_CRIT_MR_WD_NONDEGENERATE_ACCRETOR, "MT_CRIT_MR_WD_NONDEGENERATE_ACCRETOR" }, + + { PROGRAM_OPTION::MT_FRACTION_ACCRETED, "MT_FRACTION_ACCRETED" }, + { PROGRAM_OPTION::MT_JLOSS, "MT_JLOSS" }, + { PROGRAM_OPTION::MT_JLOSS_LINEAR_FRACTION_DEGEN, "MT_JLOSS_LINEAR_FRACTION_DEGEN" }, + { PROGRAM_OPTION::MT_JLOSS_LINEAR_FRACTION_NON_DEGEN, "MT_JLOSS_LINEAR_FRACTION_NON_DEGEN" }, + { PROGRAM_OPTION::MT_REJUVENATION_PRESCRIPTION, "MT_REJUVENATION_PRESCRIPTION" }, + { PROGRAM_OPTION::MT_THERMALLY_LIMITED_VARIATION, "MT_THERMALLY_LIMITED_VARIATION" }, + + { PROGRAM_OPTION::MULLER_MANDEL_KICK_MULTIPLIER_BH, "MULLER_MANDEL_KICK_MULTIPLIER_BH" }, + { PROGRAM_OPTION::MULLER_MANDEL_KICK_MULTIPLIER_NS, "MULLER_MANDEL_KICK_MULTIPLIER_NS" }, + { PROGRAM_OPTION::MULLER_MANDEL_SIGMA_KICK_BH, "MULLER_MANDEL_SIGMA_KICK_BH" }, + { PROGRAM_OPTION::MULLER_MANDEL_SIGMA_KICK_NS, "MULLER_MANDEL_SIGMA_KICK_NS" }, + + { PROGRAM_OPTION::NEUTRINO_MASS_LOSS_ASSUMPTION_BH, "NEUTRINO_MASS_LOSS_ASSUMPTION_BH" }, + { PROGRAM_OPTION::NEUTRINO_MASS_LOSS_VALUE_BH, "NEUTRINO_MASS_LOSS_VALUE_BH" }, + + { PROGRAM_OPTION::NOTES, "NOTES" }, + + { PROGRAM_OPTION::NS_ACCRETION_IN_CE, "NS_ACCRETION_IN_CE" }, + { PROGRAM_OPTION::NS_EOS, "NS_EOS" }, + + { PROGRAM_OPTION::ORBITAL_PERIOD, "ORBITAL_PERIOD" }, + { PROGRAM_OPTION::ORBITAL_PERIOD_DISTRIBUTION, "ORBITAL_PERIOD_DISTRIBUTION" }, + { PROGRAM_OPTION::ORBITAL_PERIOD_DISTRIBUTION_MAX, "ORBITAL_PERIOD_DISTRIBUTION_MAX" }, + { PROGRAM_OPTION::ORBITAL_PERIOD_DISTRIBUTION_MIN, "ORBITAL_PERIOD_DISTRIBUTION_MIN" }, + + { PROGRAM_OPTION::OVERALL_WIND_MASS_LOSS_MULTIPLIER, "OVERALL_WIND_MASS_LOSS_MULTIPLIER" }, + + { PROGRAM_OPTION::PISN_LOWER_LIMIT, "PISN_LOWER_LIMIT" }, + { PROGRAM_OPTION::PISN_UPPER_LIMIT, "PISN_UPPER_LIMIT" }, + + { PROGRAM_OPTION::PPI_LOWER_LIMIT, "PPI_LOWER_LIMIT" }, + { PROGRAM_OPTION::PPI_PRESCRIPTION, "PPI_PRESCRIPTION" }, + { PROGRAM_OPTION::PPI_UPPER_LIMIT, "PPI_UPPER_LIMIT" }, + { PROGRAM_OPTION::PPI_CO_CORE_SHIFT_HENDRIKS, "PPI_CO_CORE_SHIFT_HENDRIKS"}, + + { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DISTRIBUTION, "PULSAR_MAGNETIC_FIELD_DISTRIBUTION" }, + { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MAX, "PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MAX" }, + { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MIN, "PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MIN" }, + + { PROGRAM_OPTION::PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION, "PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION" }, + { PROGRAM_OPTION::PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MAX, "PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MAX" }, + { PROGRAM_OPTION::PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MIN, "PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MIN" }, + + { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DECAY_MASS_SCALE, "PULSAR_MAGNETIC_FIELD_DECAY_MASS_SCALE" }, + { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DECAY_TIME_SCALE, "PULSAR_MAGNETIC_FIELD_DECAY_TIME_SCALE" }, + + { PROGRAM_OPTION::PULSAR_MINIMUM_MAGNETIC_FIELD, "PULSAR_MINIMUM_MAGNETIC_FIELD" }, + + { PROGRAM_OPTION::QCRIT_PRESCRIPTION, "QCRIT_PRESCRIPTION" }, + + { PROGRAM_OPTION::RANDOM_SEED, "RANDOM_SEED" }, + { PROGRAM_OPTION::RANDOM_SEED_CMDLINE, "RANDOM_SEED_CMDLINE" }, + + { PROGRAM_OPTION::REMNANT_MASS_PRESCRIPTION, "REMNANT_MASS_PRESCRIPTION" }, + + { PROGRAM_OPTION::ROCKET_KICK_MAGNITUDE_1, "ROCKET_KICK_MAGNITUDE_1" }, + { PROGRAM_OPTION::ROCKET_KICK_MAGNITUDE_2, "ROCKET_KICK_MAGNITUDE_2" }, + { PROGRAM_OPTION::ROCKET_KICK_PHI_1, "ROCKET_KICK_PHI_1" }, + { PROGRAM_OPTION::ROCKET_KICK_PHI_2, "ROCKET_KICK_PHI_2" }, + { PROGRAM_OPTION::ROCKET_KICK_THETA_1, "ROCKET_KICK_THETA_1" }, + { PROGRAM_OPTION::ROCKET_KICK_THETA_2, "ROCKET_KICK_THETA_2" }, + + { PROGRAM_OPTION::ROTATIONAL_VELOCITY_DISTRIBUTION, "ROTATIONAL_VELOCITY_DISTRIBUTION" }, + { PROGRAM_OPTION::ROTATIONAL_FREQUENCY, "ROTATIONAL_FREQUENCY" }, + { PROGRAM_OPTION::ROTATIONAL_FREQUENCY_1, "ROTATIONAL_FREQUENCY_1" }, + { PROGRAM_OPTION::ROTATIONAL_FREQUENCY_2, "ROTATIONAL_FREQUENCY_2" }, + + { PROGRAM_OPTION::SCALE_CHE_MASS_LOSS_SURF_HE_ABUNDANCE, "SCALE_CHE_MASS_LOSS_SURF_HE_ABUNDANCE" }, + { PROGRAM_OPTION::SCALE_TERMINAL_WIND_VEL_METALLICITY_POWER, "SCALE_TERMINAL_WIND_VEL_METALLICITY_POWER" }, + { PROGRAM_OPTION::SEMI_MAJOR_AXIS, "SEMI_MAJOR_AXIS" }, + { PROGRAM_OPTION::SEMI_MAJOR_AXIS_DISTRIBUTION, "SEMI_MAJOR_AXIS_DISTRIBUTION" }, + { PROGRAM_OPTION::SEMI_MAJOR_AXIS_DISTRIBUTION_MAX, "SEMI_MAJOR_AXIS_DISTRIBUTION_MAX" }, + { PROGRAM_OPTION::SEMI_MAJOR_AXIS_DISTRIBUTION_MIN, "SEMI_MAJOR_AXIS_DISTRIBUTION_MIN" }, + + { PROGRAM_OPTION::STELLAR_ZETA_PRESCRIPTION, "STELLAR_ZETA_PRESCRIPTION" }, + + { PROGRAM_OPTION::TIDES_PRESCRIPTION, "TIDES_PRESCRIPTION" }, + + { PROGRAM_OPTION::USSN_KICKS_OVERRIDE_MANDEL_MULLER, "USSN_KICKS_OVERRIDE_MANDEL_MULLER" }, + + { PROGRAM_OPTION::WR_FACTOR, "WR_FACTOR" }, + + { PROGRAM_OPTION::ZETA_ADIABATIC_ARBITRARY, "ZETA_ADIABATIC_ARBITRARY" }, + { PROGRAM_OPTION::ZETA_MS, "ZETA_MS" }, + { PROGRAM_OPTION::ZETA_RADIATIVE_ENVELOPE_GIANT, "ZETA_RADIATIVE_ENVELOPE_GIANT" } +}; + + +enum class ANY_PROPERTY_TYPE: int { T_STAR_1_PROPERTY, T_STAR_2_PROPERTY, T_SUPERNOVA_PROPERTY, T_COMPANION_PROPERTY, T_STAR_PROPERTY, T_BINARY_PROPERTY, T_PROGRAM_OPTION }; + +typedef boost::variant T_ANY_PROPERTY; +typedef boost::variant T_ANY_STAR_PROPERTY; +typedef boost::variant T_ANY_BINARY_CONSTITUENT_PROPERTY; +typedef boost::variant T_ANY_BINARY_PROPERTY; + + +typedef std::vector ANY_PROPERTY_VECTOR; + + +class VariantPropertyType: public boost::static_visitor { +public: + ANY_PROPERTY_TYPE operator()(STAR_PROPERTY prop) const { return ANY_PROPERTY_TYPE::T_STAR_PROPERTY; } + ANY_PROPERTY_TYPE operator()(STAR_1_PROPERTY prop) const { return ANY_PROPERTY_TYPE::T_STAR_1_PROPERTY; } + ANY_PROPERTY_TYPE operator()(STAR_2_PROPERTY prop) const { return ANY_PROPERTY_TYPE::T_STAR_2_PROPERTY; } + ANY_PROPERTY_TYPE operator()(SUPERNOVA_PROPERTY prop) const { return ANY_PROPERTY_TYPE::T_SUPERNOVA_PROPERTY; } + ANY_PROPERTY_TYPE operator()(COMPANION_PROPERTY prop) const { return ANY_PROPERTY_TYPE::T_COMPANION_PROPERTY; } + ANY_PROPERTY_TYPE operator()(BINARY_PROPERTY prop) const { return ANY_PROPERTY_TYPE::T_BINARY_PROPERTY; } + ANY_PROPERTY_TYPE operator()(PROGRAM_OPTION prop) const { return ANY_PROPERTY_TYPE::T_PROGRAM_OPTION; } +}; + + +// Property types +enum class PROPERTY_TYPE: int { NONE, STAR_PROPERTY, STAR_1_PROPERTY, STAR_2_PROPERTY, SUPERNOVA_PROPERTY, COMPANION_PROPERTY, ANY_STAR_PROPERTY, BINARY_PROPERTY, PROGRAM_OPTION }; +const COMPASUnorderedMap PROPERTY_TYPE_LABEL = { + { PROPERTY_TYPE::NONE, "" }, + { PROPERTY_TYPE::STAR_PROPERTY, "STAR_PROPERTY" }, + { PROPERTY_TYPE::STAR_1_PROPERTY, "STAR_1_PROPERTY" }, + { PROPERTY_TYPE::STAR_2_PROPERTY, "STAR_2_PROPERTY" }, + { PROPERTY_TYPE::SUPERNOVA_PROPERTY, "SUPERNOVA_PROPERTY" }, + { PROPERTY_TYPE::COMPANION_PROPERTY, "COMPANION_PROPERTY" }, + { PROPERTY_TYPE::ANY_STAR_PROPERTY, "ANY_STAR_PROPERTY" }, + { PROPERTY_TYPE::BINARY_PROPERTY, "BINARY_PROPERTY" }, + { PROPERTY_TYPE::PROGRAM_OPTION, "PROGRAM_OPTION" } +}; + + +// typedef for property details +// the property details provide information about the property to assist in printing the property value +// the property_details tuple contains: +// +// +// +// where: +// +// data type is, as the name suggest, the data type of the property, from the TYPENAME enum class (above) +// header string is the string to be printed as the column header for the property +// units string is the string to be printed as the units header for the property +// field width is the printf() field width of the property (does not apply to HDF5 files; meaning varies per the data type, refer to printf() documentation) +// field precision is the printf() field precision of the property (does not apply to HDF5 files; meaning varies per the data type, refer to printf() documentation) +typedef std::tuple PROPERTY_DETAILS; + +// map ANY_STAR_PROPERTY_DETAIL +// Records the details of STELLAR properties. The STELLAR properties are those that pertain +// to individual stars, whether they be a single star being evolved for SSE, or one of the +// constituent stars being evolved as part of a binary for BSE +// +// Properties only need to be here if they are required to be available for printing in +// the logfiles - all keys present here should also be in the STAR_PROPERTIES #define and +// STAR_PROPERTIES_LABEL +const std::map ANY_STAR_PROPERTY_DETAIL = { + { ANY_STAR_PROPERTY::AGE, { TYPENAME::DOUBLE, "Age", "Myr", 24, 15}}, + { ANY_STAR_PROPERTY::ANGULAR_MOMENTUM, { TYPENAME::DOUBLE, "Ang_Momentum", "Msol AU^2 yr^-1", 24, 15}}, + { ANY_STAR_PROPERTY::BINDING_ENERGY_AT_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Binding_Energy@CE", "erg", 24, 15}}, + { ANY_STAR_PROPERTY::BINDING_ENERGY_CONVECTIVE_ENVELOPE, { TYPENAME::DOUBLE, "BE_ConvectiveEnvelope", "erg", 24, 15}}, + { ANY_STAR_PROPERTY::BINDING_ENERGY_FIXED, { TYPENAME::DOUBLE, "BE_Fixed", "erg", 24, 15}}, + { ANY_STAR_PROPERTY::BINDING_ENERGY_NANJING, { TYPENAME::DOUBLE, "BE_Nanjing", "erg", 24, 15}}, + { ANY_STAR_PROPERTY::BINDING_ENERGY_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Binding_EnergyCE", "Myr", 24, 15}}, + { ANY_STAR_PROPERTY::DYNAMICAL_TIMESCALE_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Tau_DynamicalCE", "Lsol", 24, 15}}, + { ANY_STAR_PROPERTY::LUMINOSITY_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "LuminositySN", "Msol^2AU^-1", 24, 15}}, + { ANY_STAR_PROPERTY::ORBITAL_ENERGY_PRE_SUPERNOVA, { TYPENAME::DOUBLE, "Orbital_EnergyCE", "Myr", 24, 15}}, + { ANY_STAR_PROPERTY::RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Tau_RadialCE", "K", 24, 15}}, + { ANY_STAR_PROPERTY::TEMPERATURE_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "TeffCE", "Myr", 24, 15}}, + { ANY_STAR_PROPERTY::THERMAL_TIMESCALE_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Tau_Thermal BINARY_PROPERTY_DETAIL = { + { BINARY_PROPERTY::CIRCULARIZATION_TIMESCALE, { TYPENAME::DOUBLE, "Tau_Circ", "Myr", 24, 15}}, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_FORMED, { TYPENAME::BOOL, "CBD", "Event", 0, 0 }}, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_FORMATION_TIME, { TYPENAME::DOUBLE, "Time", "Myr", 24, 15}}, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_1_AT_FORMATION, { TYPENAME::DOUBLE, "Mass(1)", "Msol", 24, 15}}, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_2_AT_FORMATION, { TYPENAME::DOUBLE, "Mass(2)", "Msol", 24, 15}}, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_STELLAR_TYPE_1_AT_FORMATION, { TYPENAME::STELLAR_TYPE, "Stellar_Type(1)", "-", 4, 1 }}, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_STELLAR_TYPE_2_AT_FORMATION, { TYPENAME::STELLAR_TYPE, "Stellar_Type(2)", "-", 4, 1 }}, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_INITIAL_MASS, { TYPENAME::DOUBLE, "Initial_CBD_Mass", "Msol", 24, 15}}, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_1, { TYPENAME::DOUBLE, "CBD_Mass_Retained(1)", "Msol", 24, 15}}, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_2, { TYPENAME::DOUBLE, "CBD_Mass_Retained(2)", "Msol", 24, 15}}, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_SUPPLIED, { TYPENAME::DOUBLE, "CBD_Mass_Supplied", "Msol", 24, 15}}, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_PRE, { TYPENAME::DOUBLE, "SemiMajorAxisCBD", "Rsol", 24, 15}}, + { BINARY_PROPERTY::CIRCUMBINARY_DISK_ECCENTRICITY_PRE, { TYPENAME::DOUBLE, "EccentricityCBD", "-", 24, 15}}, + { BINARY_PROPERTY::COMMON_ENVELOPE_AT_LEAST_ONCE, { TYPENAME::BOOL, "CEE", "Event", 0, 0 }}, + { BINARY_PROPERTY::COMMON_ENVELOPE_EVENT_COUNT, { TYPENAME::UINT, "CE_Event_Counter", "Count", 6, 1 }}, + { BINARY_PROPERTY::DOUBLE_CORE_COMMON_ENVELOPE, { TYPENAME::BOOL, "Double_Core_CE", "Event", 0, 0 }}, + { BINARY_PROPERTY::DT, { TYPENAME::DOUBLE, "dT", "Myr", 24, 15}}, + { BINARY_PROPERTY::ECCENTRICITY, { TYPENAME::DOUBLE, "Eccentricity", "-", 24, 15}}, + { BINARY_PROPERTY::ECCENTRICITY_AT_DCO_FORMATION, { TYPENAME::DOUBLE, "Eccentricity@DCO", "-", 24, 15}}, + { BINARY_PROPERTY::ECCENTRICITY_INITIAL, { TYPENAME::DOUBLE, "Eccentricity@ZAMS", "-", 24, 15}}, + { BINARY_PROPERTY::ECCENTRICITY_POST_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Eccentricity>CE", "-", 24, 15}}, + { BINARY_PROPERTY::ECCENTRICITY_PRE_SUPERNOVA, { TYPENAME::DOUBLE, "EccentricityCE", "Event", 0, 0 }}, + { BINARY_PROPERTY::MASS_1_POST_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Mass(1)>CE", "Msol", 24, 15}}, + { BINARY_PROPERTY::MASS_1_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Mass(1)CE", "Msol", 24, 15}}, + { BINARY_PROPERTY::MASS_2_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Mass(2)SN_X", "-", 24, 15}}, + { BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_Y, { TYPENAME::DOUBLE, "Orbital_AM_Vector>SN_Y", "-", 24, 15}}, + { BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_Z, { TYPENAME::DOUBLE, "Orbital_AM_Vector>SN_Z", "-", 24, 15}}, + { BINARY_PROPERTY::ORBITAL_ANGULAR_VELOCITY, { TYPENAME::DOUBLE, "Orbital_Angular_Velocity", "kms^-1", 24, 15}}, + { BINARY_PROPERTY::ORBITAL_VELOCITY_PRE_SUPERNOVA, { TYPENAME::DOUBLE, "Orb_VelocityCE", "Rsol", 24, 15}}, + { BINARY_PROPERTY::RADIUS_1_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Radius(1)CE", "Rsol", 24, 15}}, + { BINARY_PROPERTY::RADIUS_2_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "Radius(2)MT", "State", 0, 0 }}, + { BINARY_PROPERTY::RLOF_POST_MT_ECCENTRICITY, { TYPENAME::DOUBLE, "Eccentricity>MT", "-", 24, 15}}, + { BINARY_PROPERTY::RLOF_POST_MT_EVENT_COUNTER, { TYPENAME::UINT, "MT_Event_Counter", "Count", 6, 1 }}, + { BINARY_PROPERTY::RLOF_POST_MT_ID, { TYPENAME::OBJECT_ID, "ID>MT", "-", 12, 1 }}, + { BINARY_PROPERTY::RLOF_POST_MT_SEMI_MAJOR_AXIS, { TYPENAME::DOUBLE, "SemiMajorAxis>MT", "Rsol", 24, 15}}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_MASS, { TYPENAME::DOUBLE, "Mass(1)>MT", "Msol", 24, 15}}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_MASS, { TYPENAME::DOUBLE, "Mass(2)>MT", "Msol", 24, 15}}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_RADIUS, { TYPENAME::DOUBLE, "Radius(1)>MT", "Rsol", 24, 15}}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_RADIUS, { TYPENAME::DOUBLE, "Radius(2)>MT", "Rsol", 24, 15}}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_TEFF, { TYPENAME::DOUBLE, "Teff(1)>MT", "K", 24, 15}}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_TEFF, { TYPENAME::DOUBLE, "Teff(2)>MT", "K", 24, 15}}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_LUM, { TYPENAME::DOUBLE, "Lum(1)>MT", "Lsol", 24, 15}}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_LUM, { TYPENAME::DOUBLE, "Lum(2)>MT", "Lsol", 24, 15}}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_RLOF, { TYPENAME::BOOL, "RLOF(1)>MT", "State", 0, 0 }}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_RLOF, { TYPENAME::BOOL, "RLOF(2)>MT", "State", 0, 0 }}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_STELLAR_TYPE, { TYPENAME::STELLAR_TYPE, "Stellar_Type(1)>MT", "-", 4, 1 }}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR1_STELLAR_TYPE_NAME, { TYPENAME::STRING, "Stellar_Type(1)>MT", "-", 42, 1 }}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_STELLAR_TYPE, { TYPENAME::STELLAR_TYPE, "Stellar_Type(2)>MT", "-", 4, 1 }}, + { BINARY_PROPERTY::RLOF_POST_MT_STAR2_STELLAR_TYPE_NAME, { TYPENAME::STRING, "Stellar_Type(2)>MT", "-", 42, 1 }}, + { BINARY_PROPERTY::RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, { TYPENAME::DOUBLE, "Radius(1)|RL>step", "-", 24, 15}}, + { BINARY_PROPERTY::RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, { TYPENAME::DOUBLE, "Radius(2)|RL>step", "-", 24, 15}}, + { BINARY_PROPERTY::RLOF_PRE_MT_ECCENTRICITY, { TYPENAME::DOUBLE, "EccentricityCE", "Event", 0, 0 }}, + { BINARY_PROPERTY::RLOF_TIME_POST_MT, { TYPENAME::DOUBLE, "Time>MT", "Myr", 24, 15}}, + { BINARY_PROPERTY::RLOF_TIME_PRE_MT, { TYPENAME::DOUBLE, "TimeCE", "Rsol", 24, 15}}, + { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "RocheLobe(1)CE", "Rsol", 24, 15}}, + { BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "RocheLobe(2)CE", "Rsol", 24, 15}}, + { BINARY_PROPERTY::SEMI_MAJOR_AXIS_POST_STAGE_1_CE, { TYPENAME::DOUBLE, "SemiMajorAxisStage1>CE", "Rsol", 24, 15}}, + { BINARY_PROPERTY::SEMI_MAJOR_AXIS_PRE_COMMON_ENVELOPE, { TYPENAME::DOUBLE, "SemiMajorAxisCE", "State", 0, 0 }}, + { BINARY_PROPERTY::STELLAR_MERGER, { TYPENAME::BOOL, "Merger", "Event", 0, 0 }}, + { BINARY_PROPERTY::STELLAR_MERGER_AT_BIRTH, { TYPENAME::BOOL, "Merger_At_Birth", "Event", 0, 0 }}, + { BINARY_PROPERTY::STELLAR_TYPE_1_POST_COMMON_ENVELOPE, { TYPENAME::STELLAR_TYPE, "Stellar_Type(1)>CE", "-", 4, 1 }}, + { BINARY_PROPERTY::STELLAR_TYPE_1_PRE_COMMON_ENVELOPE, { TYPENAME::STELLAR_TYPE, "Stellar_Type(1)CE", "-", 4, 1 }}, + { BINARY_PROPERTY::STELLAR_TYPE_2_PRE_COMMON_ENVELOPE, { TYPENAME::STELLAR_TYPE, "Stellar_Type(2)CE", "-", 42, 1 }}, + { BINARY_PROPERTY::STELLAR_TYPE_NAME_1_PRE_COMMON_ENVELOPE, { TYPENAME::STRING, "Stellar_Type(1)CE", "-", 42, 1 }}, + { BINARY_PROPERTY::STELLAR_TYPE_NAME_2_PRE_COMMON_ENVELOPE, { TYPENAME::STRING, "Stellar_Type(2) PROGRAM_OPTION_DETAIL = { + + { PROGRAM_OPTION::ADD_OPTIONS_TO_SYSPARMS, { TYPENAME::INT, "PO_Add_Options_To_SysParms", "-", 4, 1 }}, + { PROGRAM_OPTION::ALLOW_NON_STRIPPED_ECSN, { TYPENAME::BOOL, "PO_Allow_Non_Stripped_ECSN", "Flag", 0, 0 }}, + { PROGRAM_OPTION::ALLOW_MS_STAR_TO_SURVIVE_COMMON_ENVELOPE, { TYPENAME::BOOL, "PO_Allow_MS_To_Survive_CE", "Flag", 0, 0 }}, + { PROGRAM_OPTION::ALLOW_RADIATIVE_ENVELOPE_STAR_TO_SURVIVE_COMMON_ENVELOPE, { TYPENAME::BOOL, "PO_Allow_Radiative_Envelope_To_Survive_CE", "Flag", 0, 0 }}, + { PROGRAM_OPTION::ALLOW_IMMEDIATE_RLOF_POST_CE_TO_SURVIVE_COMMON_ENVELOPE, { TYPENAME::BOOL, "PO_Allow_Immediate_RLOF>CE_To_Survive_CE", "Flag", 0, 0 }}, + { PROGRAM_OPTION::ALLOW_RLOF_AT_BIRTH, { TYPENAME::BOOL, "PO_Allow_RLOF@Birth", "Flag", 0, 0 }}, + { PROGRAM_OPTION::ALLOW_TOUCHING_AT_BIRTH, { TYPENAME::BOOL, "PO_Allow_Touching@Birth", "Flag", 0, 0 }}, + { PROGRAM_OPTION::ANG_MOM_CONSERVATION_DURING_CIRCULARISATION, { TYPENAME::BOOL, "PO_Conserve_AngMom@Circ", "Flag", 0, 0 }}, + + { PROGRAM_OPTION::BLACK_HOLE_KICKS_MODE, { TYPENAME::INT, "PO_BH_Kicks_Mode", "-", 4, 1 }}, + + { PROGRAM_OPTION::CASE_BB_STABILITY_PRESCRIPTION, { TYPENAME::INT, "PO_BB_Mass_xFer_Stblty_Prscrptn", "-", 4, 1 }}, + + { PROGRAM_OPTION::CHECK_PHOTON_TIRING_LIMIT, { TYPENAME::BOOL, "PO_Check_Photon_Tiring_Limit", "Flag", 0, 0 }}, + + { PROGRAM_OPTION::CHE_MODE, { TYPENAME::INT, "PO_CHE_Mode", "-", 4, 1 }}, + + { PROGRAM_OPTION::CIRCULARISE_BINARY_DURING_MT, { TYPENAME::BOOL, "PO_Circularise@MT", "Flag", 0, 0 }}, + + { PROGRAM_OPTION::CIRCUMBINARY_DISK, { TYPENAME::BOOL, "PO_CBD", "Flag", 0, 0 }}, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_MODE, { TYPENAME::INT, "PO_CBD_Eddington_Mode", "-", 4, 1 }}, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_CAP_FACTOR, { TYPENAME::DOUBLE, "PO_CBD_Eddington_Cap_Factor", "-", 24, 15}}, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_EDDINGTON_GE23_FACTOR, { TYPENAME::DOUBLE, "PO_CBD_Eddington_GE23_Factor", "-", 24, 15}}, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_BETA, { TYPENAME::DOUBLE, "PO_CBD_Beta", "-", 24, 15}}, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_INNER_RADIUS_OVER_SEPARATION, { TYPENAME::DOUBLE, "PO_CBD_Inner_Radius_Over_Separation", "-", 24, 15}}, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_LIFETIME, { TYPENAME::DOUBLE, "PO_CBD_Lifetime", "yr", 24, 15}}, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_STRUCTURE_FACTOR, { TYPENAME::DOUBLE, "PO_CBD_Structure_Factor", "-", 24, 15}}, + { PROGRAM_OPTION::CIRCUMBINARY_DISK_ENVELOPE_MASS_FRACTION_SUPPLIED, { TYPENAME::DOUBLE, "PO_CBD_Envelope_Mass_Fraction_Supplied", "-", 24, 15}}, + { PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_CAP, { TYPENAME::DOUBLE, "PO_Post_CE_Eccentricity_Cap", "-", 24, 15}}, + { PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_FRACTION, { TYPENAME::DOUBLE, "PO_Post_CE_Eccentricity_Fraction", "-", 24, 15}}, + { PROGRAM_OPTION::POST_COMMON_ENVELOPE_ECCENTRICITY_PRESCRIPTION, { TYPENAME::INT, "PO_Post_CE_Eccentricity_Prescription", "-", 4, 1}}, + + { PROGRAM_OPTION::COMMON_ENVELOPE_ALPHA, { TYPENAME::DOUBLE, "PO_CE_Alpha", "-", 24, 15}}, + { PROGRAM_OPTION::COMMON_ENVELOPE_ALPHA_THERMAL, { TYPENAME::DOUBLE, "PO_CE_Alpha_Thermal", "-", 24, 15}}, + { PROGRAM_OPTION::COMMON_ENVELOPE_FORMALISM, { TYPENAME::INT, "PO_CE_Formalism", "-", 4, 1 }}, + { PROGRAM_OPTION::COMMON_ENVELOPE_LAMBDA, { TYPENAME::DOUBLE, "PO_CE_Lambda", "-", 24, 15}}, + { PROGRAM_OPTION::COMMON_ENVELOPE_LAMBDA_MULTIPLIER, { TYPENAME::DOUBLE, "PO_CE_Lambda_Multiplier", "-", 24, 15}}, + { PROGRAM_OPTION::COMMON_ENVELOPE_LAMBDA_PRESCRIPTION, { TYPENAME::INT, "PO_CE_Lambda_Prscrptn", "-", 4, 1 }}, + { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_CONSTANT, { TYPENAME::DOUBLE, "PO_CE_Mass_Accr_Constant", "-", 24, 15}}, + { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_MAX, { TYPENAME::DOUBLE, "PO_CE_Mass_Accr_Max", "Msol", 24, 15}}, + { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_MIN, { TYPENAME::DOUBLE, "PO_CE_Mass_Accr_Min", "Msol", 24, 15}}, + { PROGRAM_OPTION::COMMON_ENVELOPE_MASS_ACCRETION_PRESCRIPTION, { TYPENAME::INT, "PO_CE_Mass_Accr_Prscrptn", "-", 4, 1 }}, + { PROGRAM_OPTION::COMMON_ENVELOPE_RECOMBINATION_ENERGY_DENSITY, { TYPENAME::DOUBLE, "PO_CE_Recomb_Enrgy_Dnsty", "erg g^-1", 24, 15}}, + { PROGRAM_OPTION::COMMON_ENVELOPE_SECOND_STAGE_BETA, { TYPENAME::DOUBLE, "PO_CE_Second_Stage_Beta", "-", 24, 15}}, + { PROGRAM_OPTION::COMMON_ENVELOPE_SECOND_STAGE_GAMMA_PRESCRIPTION, { TYPENAME::INT, "PO_CE_Second_Stage_Gamma_Prescription", "-", 24, 15}}, + { PROGRAM_OPTION::COMMON_ENVELOPE_SLOPE_KRUCKOW, { TYPENAME::DOUBLE, "PO_CE_Slope_Kruckow", "-", 24, 15}}, + + { PROGRAM_OPTION::COOL_WIND_MASS_LOSS_MULTIPLIER, { TYPENAME::DOUBLE, "PO_Cool_WindMassLoss_Multipl", "-", 24, 15}}, + + { PROGRAM_OPTION::ECCENTRICITY, { TYPENAME::DOUBLE, "PO_Eccentricity", "-", 24, 15}}, + { PROGRAM_OPTION::ECCENTRICITY_DISTRIBUTION, { TYPENAME::INT, "PO_Eccentricity_Dstrbtn", "-", 4, 1 }}, + { PROGRAM_OPTION::ECCENTRICITY_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Eccentricity_Dstrbtn_Max", "-", 24, 15}}, + { PROGRAM_OPTION::ECCENTRICITY_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Eccentricity_Dstrbtn_Min", "-", 24, 15}}, + { PROGRAM_OPTION::EDDINGTON_ACCRETION_FACTOR, { TYPENAME::DOUBLE, "PO_Eddington_Accr_Factor", "-", 24, 15}}, + { PROGRAM_OPTION::ENABLE_ROTATIONALLY_ENHANCED_MASS_LOSS, { TYPENAME::BOOL, "PO_Enable_Rotationally_Enhanced_Mass_Loss", "Flag", 0, 0}}, + { PROGRAM_OPTION::ENHANCE_CHE_LIFETIMES_LUMINOSITIES, { TYPENAME::BOOL, "PO_Enhance_CHE_lifetimes_luminosities", "Flag", 0, 0}}, + { PROGRAM_OPTION::ENVELOPE_STATE_PRESCRIPTION, { TYPENAME::INT, "PO_Envelope_State_Prscrptn", "-", 4, 1 }}, + { PROGRAM_OPTION::EVOLUTION_MODE, { TYPENAME::INT, "PO_Evolution_Mode", "Mode", 4, 1 }}, + + { PROGRAM_OPTION::FP_ERROR_MODE, { TYPENAME::INT, "PO_FP_Error_Mode", "Mode", 4, 1 }}, + + { PROGRAM_OPTION::FRYER_SUPERNOVA_ENGINE, { TYPENAME::INT, "PO_Fryer_SN_Engine", "-", 4, 1 }}, + + { PROGRAM_OPTION::FRYER22_FMIX, { TYPENAME::DOUBLE, "PO_Fryer22_mixing_fraction", "-", 24, 15}}, + { PROGRAM_OPTION::FRYER22_MCRIT, { TYPENAME::DOUBLE, "PO_Fryer22_crit_COcore_Mass", "Msol", 24, 15}}, + + { PROGRAM_OPTION::INITIAL_MASS, { TYPENAME::DOUBLE, "PO_Initial_Mass", "Msol", 24, 15}}, + { PROGRAM_OPTION::INITIAL_MASS_1, { TYPENAME::DOUBLE, "PO_Initial_Mass(1)", "Msol", 24, 15}}, + { PROGRAM_OPTION::INITIAL_MASS_2, { TYPENAME::DOUBLE, "PO_Initial_Mass(2)", "Msol", 24, 15}}, + + { PROGRAM_OPTION::INITIAL_MASS_FUNCTION, { TYPENAME::INT, "PO_Initial_Mass_Function", "-", 4, 1 }}, + { PROGRAM_OPTION::INITIAL_MASS_FUNCTION_MAX, { TYPENAME::DOUBLE, "PO_Initial_Mass_Func_Max", "Msol", 24, 15}}, + { PROGRAM_OPTION::INITIAL_MASS_FUNCTION_MIN, { TYPENAME::DOUBLE, "PO_Initial_Mass_Func_Min", "Msol", 24, 15}}, + { PROGRAM_OPTION::INITIAL_MASS_FUNCTION_POWER, { TYPENAME::DOUBLE, "PO_Initial_Mass_Func_Power", "-", 24, 15}}, + + { PROGRAM_OPTION::KICK_DIRECTION_DISTRIBUTION, { TYPENAME::INT, "PO_Kick_Direction_Dstrbtn", "-", 4, 1 }}, + { PROGRAM_OPTION::KICK_DIRECTION_POWER, { TYPENAME::DOUBLE, "PO_Kick_Direction_Power", "-", 24, 15}}, + { PROGRAM_OPTION::KICK_SCALING_FACTOR, { TYPENAME::DOUBLE, "PO_Kick_Scaling_Factor", "-", 24, 15}}, + { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION, { TYPENAME::INT, "PO_Kick_Magnitude_Dstrbtn", "-", 4, 1 }}, + { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_MAXIMUM, { TYPENAME::DOUBLE, "PO_Kick_Magnitude_Dstrbtn_Max", "-", 24, 15}}, + + { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH, { TYPENAME::DOUBLE, "PO_Sigma_Kick_CCSN_BH", "kms^-1", 24, 15}}, + { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS, { TYPENAME::DOUBLE, "PO_Sigma_Kick_CCSN_NS", "kms^-1", 24, 15}}, + { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN, { TYPENAME::DOUBLE, "PO_Sigma_Kick_ECSN", "kms^-1", 24, 15}}, + { PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN, { TYPENAME::DOUBLE, "PO_Sigma_Kick_USSN", "kms^-1", 24, 15}}, + + { PROGRAM_OPTION::KICK_MAGNITUDE, { TYPENAME::DOUBLE, "PO_Kick_Magnitude", "kms^-1", 24, 15}}, + { PROGRAM_OPTION::KICK_MAGNITUDE_1, { TYPENAME::DOUBLE, "PO_Kick_Magnitude(1)", "kms^-1", 24, 15}}, + { PROGRAM_OPTION::KICK_MAGNITUDE_2, { TYPENAME::DOUBLE, "PO_Kick_Magnitude(2)", "kms^-1", 24, 15}}, + + { PROGRAM_OPTION::KICK_MAGNITUDE_RANDOM, { TYPENAME::DOUBLE, "PO_Kick_Magnitude_Random", "-", 24, 15}}, + { PROGRAM_OPTION::KICK_MAGNITUDE_RANDOM_1, { TYPENAME::DOUBLE, "PO_Kick_Magnitude_Random(1)", "-", 24, 15}}, + { PROGRAM_OPTION::KICK_MAGNITUDE_RANDOM_2, { TYPENAME::DOUBLE, "PO_Kick_Magnitude_Random(2)", "-", 24, 15}}, + + { PROGRAM_OPTION::KICK_MEAN_ANOMALY_1, { TYPENAME::DOUBLE, "PO_Kick_Mean_Anomaly(1)", "-", 24, 15}}, + { PROGRAM_OPTION::KICK_MEAN_ANOMALY_2, { TYPENAME::DOUBLE, "PO_Kick_Mean_Anomaly(2)", "-", 24, 15}}, + { PROGRAM_OPTION::KICK_PHI_1, { TYPENAME::DOUBLE, "PO_Kick_Phi(1)", "-", 24, 15}}, + { PROGRAM_OPTION::KICK_PHI_2, { TYPENAME::DOUBLE, "PO_Kick_Phi(2)", "-", 24, 15}}, + { PROGRAM_OPTION::KICK_THETA_1, { TYPENAME::DOUBLE, "PO_Kick_Theta(1)", "-", 24, 15}}, + { PROGRAM_OPTION::KICK_THETA_2, { TYPENAME::DOUBLE, "PO_Kick_Theta(2)", "-", 24, 15}}, + + { PROGRAM_OPTION::LBV_FACTOR, { TYPENAME::DOUBLE, "PO_LBV_Factor", "-", 24, 15}}, + { PROGRAM_OPTION::LBV_MASS_LOSS_PRESCRIPTION, { TYPENAME::INT, "PO_LBV_Mass_Loss_Prscrptn", "-", 4, 1 }}, + + { PROGRAM_OPTION::MALTSEV_FALLBACK, { TYPENAME::DOUBLE, "PO_Maltsev_Fallback", "-", 24, 15}}, + { PROGRAM_OPTION::MALTSEV_MODE, { TYPENAME::INT, "PO_Maltsev_Mode", "-", 4, 1 }}, + { PROGRAM_OPTION::MASS_LOSS_PRESCRIPTION, { TYPENAME::INT, "PO_Mass_Loss_Prscrptn", "-", 4, 1 }}, + + { PROGRAM_OPTION::MASS_RATIO, { TYPENAME::DOUBLE, "PO_Mass_Ratio", "-", 24, 15}}, + { PROGRAM_OPTION::MASS_RATIO_DISTRIBUTION, { TYPENAME::INT, "PO_Mass_Ratio_Dstrbtn", "-", 4, 1 }}, + { PROGRAM_OPTION::MASS_RATIO_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Mass_Ratio_Dstrbtn_Max", "-", 24, 15}}, + { PROGRAM_OPTION::MASS_RATIO_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Mass_Ratio_Dstrbtn_Min", "-", 24, 15}}, + + { PROGRAM_OPTION::MAXIMUM_EVOLUTION_TIME, { TYPENAME::DOUBLE, "PO_Max_Evolution_Time", "Myr", 24, 15}}, + { PROGRAM_OPTION::MAXIMUM_DONOR_MASS, { TYPENAME::DOUBLE, "PO_Max_Donor_Mass", "Msol", 24, 15}}, + { PROGRAM_OPTION::MAXIMUM_NEUTRON_STAR_MASS, { TYPENAME::DOUBLE, "PO_Max_NS_Mass", "Msol", 24, 15}}, + { PROGRAM_OPTION::MAXIMUM_TIMESTEPS, { TYPENAME::ULONGINT, "PO_Max_Timesteps", "Count", 10, 1 }}, + + { PROGRAM_OPTION::MCBUR1, { TYPENAME::DOUBLE, "PO_MCBUR1", "Msol", 24, 15}}, + + { PROGRAM_OPTION::METALLICITY, { TYPENAME::DOUBLE, "PO_Metallicity", "-", 24, 15}}, + { PROGRAM_OPTION::METALLICITY_DISTRIBUTION, { TYPENAME::INT, "PO_Metallicity_Dstrbtn", "-", 4, 1 }}, + { PROGRAM_OPTION::METALLICITY_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Metallicity_Dstrbtn_Max", "-", 24, 15}}, + { PROGRAM_OPTION::METALLICITY_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Metallicity_Dstrbtn_Min", "-", 24, 15}}, + + { PROGRAM_OPTION::MINIMUM_SAMPLED_SECONDARY_MASS, { TYPENAME::DOUBLE, "PO_Min_Sampled_Secondary_Mass", "Msol", 24, 15}}, + + { PROGRAM_OPTION::MT_ACCRETION_EFFICIENCY_PRESCRIPTION, { TYPENAME::INT, "PO_MT_Acc_Efficiency_Prscrptn", "-", 4, 1 }}, + { PROGRAM_OPTION::MT_ANG_MOM_LOSS_PRESCRIPTION, { TYPENAME::INT, "PO_MT_AngMom_Loss_Prscrptn", "-", 4, 1 }}, + { PROGRAM_OPTION::MT_THERMAL_LIMIT_C, { TYPENAME::DOUBLE, "PO_MT_Thermal_Limit_C", "-", 24, 15}}, + + { PROGRAM_OPTION::MT_CRIT_MR_MS_LOW_MASS_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_MS_Low_Mass_Deg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_MS_LOW_MASS_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_MS_Low_Mass_NonDeg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_MS_HIGH_MASS_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_MS_High_Mass_Deg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_MS_HIGH_MASS_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_MS_High_Mass_NonDeg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_GIANT_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_Giant_Deg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_GIANT_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_Giant_NonDeg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_HG_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HG_Deg_Acc", "-", 24, 15}}, + + { PROGRAM_OPTION::MT_CRIT_MR_HG_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HG_NonDeg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_HE_GIANT_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HE_Giant_Deg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_HE_GIANT_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HE_Giant_NonDeg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_HE_HG_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HE_HG_Deg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_HE_HG_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HE_HG_NonDeg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_HE_MS_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HE_MS_Deg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_HE_MS_NON_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_HE_MS_NonDeg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_WD_DEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_WD_Deg_Acc", "-", 24, 15}}, + { PROGRAM_OPTION::MT_CRIT_MR_WD_NONDEGENERATE_ACCRETOR, { TYPENAME::DOUBLE, "PO_MT_Crit_MR_WD_NonDeg_Acc", "-", 24, 15}}, + + { PROGRAM_OPTION::MT_FRACTION_ACCRETED, { TYPENAME::DOUBLE, "PO_MT_Fraction_Accreted", "-", 24, 15}}, + { PROGRAM_OPTION::MT_JLOSS, { TYPENAME::DOUBLE, "PO_MT_JLoss", "-", 24, 15}}, + { PROGRAM_OPTION::MT_JLOSS_LINEAR_FRACTION_DEGEN, { TYPENAME::DOUBLE, "PO_MT_JLoss_Linear_Frac_Degen", "-", 24, 15}}, + { PROGRAM_OPTION::MT_JLOSS_LINEAR_FRACTION_NON_DEGEN, { TYPENAME::DOUBLE, "PO_MT_JLoss_Linear_Frac_Non_Degen", "-", 24, 15}}, + { PROGRAM_OPTION::MT_REJUVENATION_PRESCRIPTION, { TYPENAME::INT, "PO_MT_Rejuvenation_Prscrptn", "-", 4, 1 }}, + { PROGRAM_OPTION::MT_THERMALLY_LIMITED_VARIATION, { TYPENAME::INT, "PO_MT_Thermally_Lmtd_Variation", "-", 4, 1 }}, + + { PROGRAM_OPTION::MULLER_MANDEL_KICK_MULTIPLIER_BH, { TYPENAME::DOUBLE, "PO_MM_Kick_Multiplier_BH", "-", 24, 15}}, + { PROGRAM_OPTION::MULLER_MANDEL_KICK_MULTIPLIER_NS, { TYPENAME::DOUBLE, "PO_MM_Kick_Multiplier_NS", "-", 24, 15}}, + { PROGRAM_OPTION::MULLER_MANDEL_SIGMA_KICK_BH, { TYPENAME::DOUBLE, "PO_MM_Sigma_Kick_BH", "-", 24, 15}}, + { PROGRAM_OPTION::MULLER_MANDEL_SIGMA_KICK_NS, { TYPENAME::DOUBLE, "PO_MM_Sigma_Kick_NS", "-", 24, 15}}, + + { PROGRAM_OPTION::NEUTRINO_MASS_LOSS_ASSUMPTION_BH, { TYPENAME::INT, "PO_Neutrino_Mass_Loss_Assmptn", "-", 4, 1 }}, + { PROGRAM_OPTION::NEUTRINO_MASS_LOSS_VALUE_BH, { TYPENAME::DOUBLE, "PO_Neutrino_Mass_Loss_Value", "-", 24, 15}}, + + { PROGRAM_OPTION::NS_ACCRETION_IN_CE, { TYPENAME::INT, "PO_NS_ACCRETION_IN_CE", "-", 4, 1 }}, + { PROGRAM_OPTION::NS_EOS, { TYPENAME::INT, "PO_NS_EOS", "-", 4, 1 }}, + + { PROGRAM_OPTION::ORBITAL_PERIOD, { TYPENAME::DOUBLE, "PO_Orbital_Period", "days", 24, 15}}, + { PROGRAM_OPTION::ORBITAL_PERIOD_DISTRIBUTION, { TYPENAME::INT, "PO_Orbital_Period_Dstrbtn", "-", 4, 1 }}, + { PROGRAM_OPTION::ORBITAL_PERIOD_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Orbital_Period_Max", "days", 24, 15}}, + { PROGRAM_OPTION::ORBITAL_PERIOD_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Orbital_Period_Min", "days", 24, 15}}, + + { PROGRAM_OPTION::OVERALL_WIND_MASS_LOSS_MULTIPLIER, { TYPENAME::DOUBLE, "PO_Overall_WindMassLoss_Multipl", "-", 24, 15}}, + + { PROGRAM_OPTION::PISN_LOWER_LIMIT, { TYPENAME::DOUBLE, "PO_PISN_Lower_Limit", "Msol", 24, 15}}, + { PROGRAM_OPTION::PISN_UPPER_LIMIT, { TYPENAME::DOUBLE, "PO_PISN_Upper_Limit", "Msol", 24, 15}}, + + { PROGRAM_OPTION::PPI_LOWER_LIMIT, { TYPENAME::DOUBLE, "PO_PPI_Lower_Limit", "Msol", 24, 15}}, + { PROGRAM_OPTION::PPI_PRESCRIPTION, { TYPENAME::INT, "PO_PPI_Prscrptn", "-", 4, 1 }}, + { PROGRAM_OPTION::PPI_UPPER_LIMIT, { TYPENAME::DOUBLE, "PO_PPI_Upper_Limit", "Msol", 24, 15}}, + { PROGRAM_OPTION::PPI_CO_CORE_SHIFT_HENDRIKS, { TYPENAME::DOUBLE, "PO_PPI_CO_CORE_SHIFT_HENDRIKS", "Msol", 24, 15}}, + + { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DISTRIBUTION, { TYPENAME::INT, "PO_Pulsar_Mag_Field_Dstrbtn", "-", 4, 1 }}, + { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Pulsar_Mag_Field_Dstrbtn_Max", "AU", 24, 15}}, + { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Pulsar_Mag_Field_Dstrbtn_Min", "AU", 24, 15}}, + + { PROGRAM_OPTION::PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION, { TYPENAME::INT, "PO_Pulsar_Spin_Period_Dstrbtn", "-", 4, 1 }}, + { PROGRAM_OPTION::PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Pulsar_Spin_Period_Dstrbtn_Max", "AU", 24, 15}}, + { PROGRAM_OPTION::PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Pulsar_Spin_Period_Dstrbtn_Min", "AU", 24, 15}}, + + { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DECAY_MASS_SCALE, { TYPENAME::DOUBLE, "PO_Pulsar_Mag_Field_Decay_mScale", "Msol", 24, 15}}, + { PROGRAM_OPTION::PULSAR_MAGNETIC_FIELD_DECAY_TIME_SCALE, { TYPENAME::DOUBLE, "PO_Pulsar_Mag_Field_Decay_tScale", "Myr", 24, 15}}, + + { PROGRAM_OPTION::PULSAR_MINIMUM_MAGNETIC_FIELD, { TYPENAME::DOUBLE, "PO_Pulsar_Minimum_Mag_Field", "Gauss", 24, 15}}, + + { PROGRAM_OPTION::QCRIT_PRESCRIPTION, { TYPENAME::INT, "PO_qCrit_Prescription", "-", 4, 1 }}, + + { PROGRAM_OPTION::RANDOM_SEED, { TYPENAME::ULONGINT, "PO_SEED(OPTION)", "-", 12, 1 }}, + { PROGRAM_OPTION::RANDOM_SEED_CMDLINE, { TYPENAME::ULONGINT, "PO_SEED(CMDLINE)", "-", 12, 1 }}, + + { PROGRAM_OPTION::REMNANT_MASS_PRESCRIPTION, { TYPENAME::INT, "PO_Remnant_Mass_Prscrptn", "-", 4, 1 }}, + + { PROGRAM_OPTION::RESPONSE_TO_SPIN_UP, { TYPENAME::INT, "PO_Response_To_Spin_Up", "-", 4, 1 }}, + + { PROGRAM_OPTION::ROCKET_KICK_MAGNITUDE_1, { TYPENAME::DOUBLE, "PO_Rocket_Kick_Magnitude(1)", "kms^-1", 24, 15}}, + { PROGRAM_OPTION::ROCKET_KICK_MAGNITUDE_2, { TYPENAME::DOUBLE, "PO_Rocket_Kick_Magnitude(2)", "kms^-1", 24, 15}}, + { PROGRAM_OPTION::ROCKET_KICK_PHI_1, { TYPENAME::DOUBLE, "PO_Rocket_Kick_Phi(1)", "-", 24, 15}}, + { PROGRAM_OPTION::ROCKET_KICK_PHI_2, { TYPENAME::DOUBLE, "PO_Rocket_Kick_Phi(2)", "-", 24, 15}}, + { PROGRAM_OPTION::ROCKET_KICK_THETA_1, { TYPENAME::DOUBLE, "PO_Rocket_Kick_Theta(1)", "-", 24, 15}}, + { PROGRAM_OPTION::ROCKET_KICK_THETA_2, { TYPENAME::DOUBLE, "PO_Rocket_Kick_Theta(2)", "-", 24, 15}}, + + { PROGRAM_OPTION::ROTATIONAL_VELOCITY_DISTRIBUTION, { TYPENAME::INT, "PO_Rotational_Velocity_Dstrbtn", "-", 4, 1 }}, + { PROGRAM_OPTION::ROTATIONAL_FREQUENCY, { TYPENAME::DOUBLE, "PO_Rotational_Frequency", "Hz", 24, 15}}, + { PROGRAM_OPTION::ROTATIONAL_FREQUENCY_1, { TYPENAME::DOUBLE, "PO_Rotational_Frequency(1)", "Hz", 24, 15}}, + { PROGRAM_OPTION::ROTATIONAL_FREQUENCY_2, { TYPENAME::DOUBLE, "PO_Rotational_Frequency(2)", "Hz", 24, 15}}, + + { PROGRAM_OPTION::SCALE_CHE_MASS_LOSS_SURF_HE_ABUNDANCE, { TYPENAME::BOOL, "PO_Scale_CHE_Mass_Loss_Surf_He_Abundance", "flag", 0, 0}}, + { PROGRAM_OPTION::SCALE_TERMINAL_WIND_VEL_METALLICITY_POWER, { TYPENAME::DOUBLE, "PO_Scale_Terminal_Wind_Vel_Metallicity_Power", "-", 24, 15}}, + { PROGRAM_OPTION::SEMI_MAJOR_AXIS, { TYPENAME::DOUBLE, "PO_Semi-Major_Axis", "AU", 24, 15}}, + { PROGRAM_OPTION::SEMI_MAJOR_AXIS_DISTRIBUTION, { TYPENAME::INT, "PO_Semi-Major_Axis_Dstrbtn", "-", 4, 1 }}, + { PROGRAM_OPTION::SEMI_MAJOR_AXIS_DISTRIBUTION_MAX, { TYPENAME::DOUBLE, "PO_Semi-Major_Axis_Dstrbtn_Max", "AU", 24, 15}}, + { PROGRAM_OPTION::SEMI_MAJOR_AXIS_DISTRIBUTION_MIN, { TYPENAME::DOUBLE, "PO_Semi-Major_Axis_Dstrbtn_Min", "AU", 24, 15}}, + + { PROGRAM_OPTION::STELLAR_ZETA_PRESCRIPTION, { TYPENAME::INT, "PO_Stellar_Zeta_Prscrptn", "-", 4, 1 }}, + + { PROGRAM_OPTION::TIDES_PRESCRIPTION, { TYPENAME::INT, "PO_Tides_Prscrptn", "-", 4, 1 }}, + + { PROGRAM_OPTION::USSN_KICKS_OVERRIDE_MANDEL_MULLER, { TYPENAME::BOOL, "PO_USSN_Kicks_Override_Mandel_Muller", "flag", 0, 0}}, + + { PROGRAM_OPTION::WR_FACTOR, { TYPENAME::DOUBLE, "PO_WR_Factor", "-", 24, 15}}, + + { PROGRAM_OPTION::ZETA_ADIABATIC_ARBITRARY, { TYPENAME::DOUBLE, "PO_Zeta_Adiabatic_Arbitrary", "-", 24, 15}}, + { PROGRAM_OPTION::ZETA_MS, { TYPENAME::DOUBLE, "PO_Zeta_Main_Sequence", "-", 24, 15}}, + { PROGRAM_OPTION::ZETA_RADIATIVE_ENVELOPE_GIANT, { TYPENAME::DOUBLE, "PO_Zeta_Radiative_Envelope_Giant", "-", 24, 15}} +}; + + +// enum class LOGFILE +// Symbolic names for logfiles +enum class LOGFILE: int { + NONE, + + DEBUG_LOG, + ERROR_LOG, + + BSE_COMMON_ENVELOPES, + BSE_CIRCUMBINARY_DISKS, + BSE_DETAILED_OUTPUT, + BSE_DOUBLE_COMPACT_OBJECTS, + BSE_PULSAR_EVOLUTION, + BSE_RLOF_PARAMETERS, + BSE_SUPERNOVAE, + BSE_SWITCH_LOG, + BSE_SYSTEM_SNAPSHOT_LOG, + BSE_SYSTEM_PARAMETERS, + + SSE_DETAILED_OUTPUT, + SSE_PULSAR_EVOLUTION, + SSE_SUPERNOVAE, + SSE_SWITCH_LOG, + SSE_SYSTEM_SNAPSHOT_LOG, + SSE_SYSTEM_PARAMETERS +}; + + +// Logfile record types +// Note all enum classes for log record types start at 1 (and *must* start at 1) +typedef unsigned int LOGRECORDTYPE; + +enum class CE_RECORD_TYPE: unsigned int { // BSE_COMMON_ENVELOPES file record type + DEFAULT = 1 // 1 - default BSE_COMMON_ENVELOPES file record type +}; + +enum class DCO_RECORD_TYPE: unsigned int { // BSE_DOUBLE_COMPACT_OBJECTS file record type + DEFAULT = 1 // 1 - default BSE_DOUBLE_COMPACT_OBJECTS file record type +}; + +enum class BSE_PULSAR_RECORD_TYPE: unsigned int { // BSE_PULSAR_EVOLUTION file record type + PRE_SN = 1, // 1 - record was logged immediately prior to a supernova event + POST_SN, // 2 - record was logged immediately following a supernova event + POST_BINARY_TIMESTEP // 3 - record was logged immediately following binary timestep (i.e. the evolution of the binary system for a single timestep) +}; + +enum class RLOF_RECORD_TYPE: unsigned int { // BSE_RLOF_PARAMETERS file record type + DEFAULT = 1 // 1 - default BSE_RLOF_PARAMETERS file record type +}; + +enum class BSE_DETAILED_RECORD_TYPE: unsigned int { // BSE_DETAILED_OUTPUT file record type + INITIAL_STATE = 1, // 1 - record describes the initial state of the binary + POST_STELLAR_TIMESTEP, // 2 - record was logged immediately following stellar timestep (i.e. the evolution of the constituent stars for a single timestep) + POST_BINARY_TIMESTEP, // 3 - record was logged immediately following binary timestep (i.e. the evolution of the binary system for a single timestep) + TIMESTEP_COMPLETED, // 4 - record was logged immediately following the completion of the timestep (after all changes to the binary and components) + FINAL_STATE, // 5 - record describes the final state of the binary + STELLAR_TYPE_CHANGE_DURING_CEE, // 6 - record was logged immediately following a stellar type change during a common envelope event + STELLAR_TYPE_CHANGE_DURING_MT, // 7 - record was logged immediately following a stellar type change during a mass transfer event + STELLAR_TYPE_CHANGE_DURING_MASS_RESOLUTION, // 8 - record was logged immediately following a stellar type change during mass resolution + STELLAR_TYPE_CHANGE_DURING_CHE_EQUILIBRATION, // 9 - record was logged immediately following a stellar type change during mass equilibration for CHE + POST_MT, // 10 - record was logged immediately following a mass transfer event + POST_WINDS, // 11 - record was logged immediately following winds mass loss + POST_CEE, // 12 - record was logged immediately following a common envelope event + POST_SN, // 13 - record was logged immediately following a supernova event + POST_MASS_RESOLUTION, // 14 - record was logged immediately following mass resolution (i.e. after winds mass loss & mass transfer complete) + POST_MASS_RESOLUTION_MERGER, // 15 - record was logged immediately following a merger after mass resolution + PRE_STELLAR_TIMESTEP // 16 - record was logged immediately prior to stellar timestep (i.e. the evolution of the constituent stars for a single timestep) +}; + +enum class SSE_DETAILED_RECORD_TYPE: unsigned int { // SSE_DETAILED_OUTPUT file record type + INITIAL_STATE = 1, // 1 - record describes the initial state of the star + PRE_MASS_LOSS, // 2 - record was logged after timestep taken, but before mass loss resolution + POST_MASS_LOSS, // 3 - record was logged after after mass loss resolution + TIMESTEP_COMPLETED, // 4 - record was logged immediately following the completion of the timestep (after all changes to the star) + FINAL_STATE // 5 - record describes the final state of the star +}; + +enum class SSE_PULSAR_RECORD_TYPE: unsigned int { // SSE_PULSAR_EVOLUTION file record type + PRE_SN = 1, // 1 - record was logged immediately prior to a supernova event + POST_SN, // 2 - record was logged immediately following a supernova event + TIMESTEP_COMPLETED // 3 - record was logged immediately following the completion of the timestep (after all changes to the star) +}; + +enum class BSE_SN_RECORD_TYPE: unsigned int { // BSE_SUPERNOVAE file record type + DEFAULT = 1 // 1 - default BSE_SUPERNOVAE file record type +}; + +enum class SSE_SN_RECORD_TYPE: unsigned int { // SSE_SUPERNOVAE file record type + DEFAULT = 1 // 1 - default SSE_SUPERNOVAE file record type +}; + +enum class BSE_SYSPARMS_RECORD_TYPE: unsigned int { // BSE_SYSTEM_PARAMETERS file record type + DEFAULT = 1 // 1 - default BSE_SYSTEM_PARAMETERS file record type +}; + +enum class SSE_SYSPARMS_RECORD_TYPE: unsigned int { // SSE_SYSTEM_PARAMETERS file record type + DEFAULT = 1 // 1 - default SSE_SYSTEM_PARAMETERS file record type +}; + +enum class BSE_SYSTEM_SNAPSHOT_RECORD_TYPE: unsigned int { // BSE_SYSTEM_SNAPSHOT_LOG file record type + DEFAULT = 1 // 1 - default BSE_SYSTEM_SNAPSHOT_LOG file record type +}; + +enum class SSE_SYSTEM_SNAPSHOT_RECORD_TYPE: unsigned int { // SSE_SYSTEM_SNAPSHOT_LOG file record type + DEFAULT = 1 // 1 - default SSE_SYSTEM_SNAPSHOT_LOG file record type +}; + + +// enum class RUN_DETAILS_REC +// symbolic names for RUN DETAILS record definitions +// For preamble/stats columns only +// Program options columns are dynamic +// these must be left as default values - their order can be changed with the caveat that the sentinel "SENTINEL" must stay at the end +// it's a bit of a hack, but it lets me iterate over the enum +enum class RUN_DETAILS_COLUMNS: int { COMPAS_VERSION, + RUN_START, + RUN_END, + OBJECTS_REQUESTED, + OBJECTS_CREATED, + CLOCK_TIME, + WALL_TIME, + ACTUAL_RANDOM_SEED, + SENTINEL }; + +const COMPASUnorderedMap> RUN_DETAILS_DETAIL = { + { RUN_DETAILS_COLUMNS::COMPAS_VERSION, { "COMPAS-Version", TYPENAME::STRING, 8 }}, + { RUN_DETAILS_COLUMNS::RUN_START, { "Run-Start", TYPENAME::STRING, 24 }}, + { RUN_DETAILS_COLUMNS::RUN_END, { "Run-End", TYPENAME::STRING, 24 }}, + { RUN_DETAILS_COLUMNS::OBJECTS_REQUESTED, { "Objects-Requested", TYPENAME::INT, 0 }}, + { RUN_DETAILS_COLUMNS::OBJECTS_CREATED, { "Objects-Created", TYPENAME::INT, 0 }}, + { RUN_DETAILS_COLUMNS::CLOCK_TIME, { "Clock-Time", TYPENAME::DOUBLE, 0 }}, + { RUN_DETAILS_COLUMNS::WALL_TIME, { "Wall-Time", TYPENAME::STRING, 10 }}, + { RUN_DETAILS_COLUMNS::ACTUAL_RANDOM_SEED, { "Actual-Random-Seed", TYPENAME::ULONGINT, 0 }} +}; + + +// BSE output record definitions + +// BSE_COMMON_ENVELOPES_REC +// +// Default record definition for the Common Envelopes logfile +// +const ANY_PROPERTY_VECTOR BSE_COMMON_ENVELOPES_REC = { + BINARY_PROPERTY::RANDOM_SEED, + BINARY_PROPERTY::TIME, + STAR_1_PROPERTY::LAMBDA_AT_COMMON_ENVELOPE, + STAR_2_PROPERTY::LAMBDA_AT_COMMON_ENVELOPE, + STAR_1_PROPERTY::BINDING_ENERGY_PRE_COMMON_ENVELOPE, + STAR_2_PROPERTY::BINDING_ENERGY_PRE_COMMON_ENVELOPE, + BINARY_PROPERTY::ECCENTRICITY_PRE_COMMON_ENVELOPE, + BINARY_PROPERTY::ECCENTRICITY_POST_COMMON_ENVELOPE, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_PRE_COMMON_ENVELOPE, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_POST_COMMON_ENVELOPE, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_POST_STAGE_1_CE, + BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1_PRE_COMMON_ENVELOPE, + BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1_POST_COMMON_ENVELOPE, + BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2_PRE_COMMON_ENVELOPE, + BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2_POST_COMMON_ENVELOPE, + BINARY_PROPERTY::MASS_1_PRE_COMMON_ENVELOPE, + BINARY_PROPERTY::MASS_1_POST_COMMON_ENVELOPE, + BINARY_PROPERTY::MASS_ENV_1, + BINARY_PROPERTY::RADIUS_1_PRE_COMMON_ENVELOPE, + BINARY_PROPERTY::RADIUS_1_POST_COMMON_ENVELOPE, + BINARY_PROPERTY::STELLAR_TYPE_1_PRE_COMMON_ENVELOPE, + STAR_1_PROPERTY::STELLAR_TYPE, + STAR_1_PROPERTY::LAMBDA_CONVECTIVE_ENVELOPE, + STAR_1_PROPERTY::LAMBDA_FIXED, + STAR_1_PROPERTY::LAMBDA_NANJING, + STAR_1_PROPERTY::LAMBDA_LOVERIDGE, + STAR_1_PROPERTY::LAMBDA_LOVERIDGE_WINDS, + STAR_1_PROPERTY::LAMBDA_KRUCKOW, + STAR_1_PROPERTY::BINDING_ENERGY_FIXED, + STAR_1_PROPERTY::BINDING_ENERGY_NANJING, + STAR_1_PROPERTY::BINDING_ENERGY_LOVERIDGE, + STAR_1_PROPERTY::BINDING_ENERGY_LOVERIDGE_WINDS, + STAR_1_PROPERTY::BINDING_ENERGY_KRUCKOW, + STAR_1_PROPERTY::CONVECTIVE_ENV_MASS, + BINARY_PROPERTY::MASS_2_PRE_COMMON_ENVELOPE, + BINARY_PROPERTY::MASS_2_POST_COMMON_ENVELOPE, + BINARY_PROPERTY::MASS_ENV_2, + BINARY_PROPERTY::RADIUS_2_PRE_COMMON_ENVELOPE, + BINARY_PROPERTY::RADIUS_2_POST_COMMON_ENVELOPE, + BINARY_PROPERTY::STELLAR_TYPE_2_PRE_COMMON_ENVELOPE, + STAR_2_PROPERTY::STELLAR_TYPE, + STAR_2_PROPERTY::LAMBDA_CONVECTIVE_ENVELOPE, + STAR_2_PROPERTY::LAMBDA_FIXED, + STAR_2_PROPERTY::LAMBDA_NANJING, + STAR_2_PROPERTY::LAMBDA_LOVERIDGE, + STAR_2_PROPERTY::LAMBDA_LOVERIDGE_WINDS, + STAR_2_PROPERTY::LAMBDA_KRUCKOW, + STAR_2_PROPERTY::BINDING_ENERGY_FIXED, + STAR_2_PROPERTY::BINDING_ENERGY_NANJING, + STAR_2_PROPERTY::BINDING_ENERGY_LOVERIDGE, + STAR_2_PROPERTY::BINDING_ENERGY_LOVERIDGE_WINDS, + STAR_2_PROPERTY::BINDING_ENERGY_KRUCKOW, + STAR_2_PROPERTY::CONVECTIVE_ENV_MASS, + BINARY_PROPERTY::MASS_TRANSFER_TRACKER_HISTORY, + BINARY_PROPERTY::STELLAR_MERGER, + BINARY_PROPERTY::OPTIMISTIC_COMMON_ENVELOPE, + BINARY_PROPERTY::COMMON_ENVELOPE_EVENT_COUNT, + BINARY_PROPERTY::DOUBLE_CORE_COMMON_ENVELOPE, + STAR_1_PROPERTY::IS_RLOF, + STAR_1_PROPERTY::LUMINOSITY_PRE_COMMON_ENVELOPE, + STAR_1_PROPERTY::TEMPERATURE_PRE_COMMON_ENVELOPE, + STAR_1_PROPERTY::DYNAMICAL_TIMESCALE_PRE_COMMON_ENVELOPE, + STAR_1_PROPERTY::THERMAL_TIMESCALE_PRE_COMMON_ENVELOPE, + STAR_2_PROPERTY::IS_RLOF, + STAR_2_PROPERTY::LUMINOSITY_PRE_COMMON_ENVELOPE, + STAR_2_PROPERTY::TEMPERATURE_PRE_COMMON_ENVELOPE, + STAR_2_PROPERTY::DYNAMICAL_TIMESCALE_PRE_COMMON_ENVELOPE, + STAR_2_PROPERTY::THERMAL_TIMESCALE_PRE_COMMON_ENVELOPE, + BINARY_PROPERTY::ZETA_STAR, + BINARY_PROPERTY::ZETA_LOBE, + BINARY_PROPERTY::SYNCHRONIZATION_TIMESCALE_1, + BINARY_PROPERTY::SYNCHRONIZATION_TIMESCALE_2, + BINARY_PROPERTY::CIRCULARIZATION_TIMESCALE, + STAR_1_PROPERTY::RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE, + STAR_2_PROPERTY::RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE, + BINARY_PROPERTY::IMMEDIATE_RLOF_POST_COMMON_ENVELOPE, + BINARY_PROPERTY::SIMULTANEOUS_RLOF +}; + + +// BSE_DETAILED_OUTPUT_REC +// +// Default record definition for the BSE Detailed Output logfile +// +const ANY_PROPERTY_VECTOR BSE_DETAILED_OUTPUT_REC = { + BINARY_PROPERTY::RANDOM_SEED, + BINARY_PROPERTY::DT, + BINARY_PROPERTY::TIME, + BINARY_PROPERTY::UNBOUND, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, + BINARY_PROPERTY::ECCENTRICITY, + STAR_1_PROPERTY::MZAMS, + STAR_2_PROPERTY::MZAMS, + STAR_1_PROPERTY::MASS_0, + STAR_2_PROPERTY::MASS_0, + STAR_1_PROPERTY::MASS, + STAR_2_PROPERTY::MASS, + STAR_1_PROPERTY::ENV_MASS, + STAR_2_PROPERTY::ENV_MASS, + STAR_1_PROPERTY::CORE_MASS, + STAR_2_PROPERTY::CORE_MASS, + STAR_1_PROPERTY::HE_CORE_MASS, + STAR_2_PROPERTY::HE_CORE_MASS, + STAR_1_PROPERTY::CO_CORE_MASS, + STAR_2_PROPERTY::CO_CORE_MASS, + STAR_1_PROPERTY::RADIUS, + STAR_2_PROPERTY::RADIUS, + BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1, + BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2, + STAR_1_PROPERTY::OMEGA, + STAR_2_PROPERTY::OMEGA, + STAR_1_PROPERTY::OMEGA_BREAK, + STAR_2_PROPERTY::OMEGA_BREAK, + STAR_1_PROPERTY::INITIAL_STELLAR_TYPE, + STAR_2_PROPERTY::INITIAL_STELLAR_TYPE, + STAR_1_PROPERTY::STELLAR_TYPE, + STAR_2_PROPERTY::STELLAR_TYPE, + STAR_1_PROPERTY::AGE, + STAR_2_PROPERTY::AGE, + STAR_1_PROPERTY::LUMINOSITY, + STAR_2_PROPERTY::LUMINOSITY, + STAR_1_PROPERTY::TEMPERATURE, + STAR_2_PROPERTY::TEMPERATURE, + STAR_1_PROPERTY::ANGULAR_MOMENTUM, + STAR_2_PROPERTY::ANGULAR_MOMENTUM, + STAR_1_PROPERTY::DYNAMICAL_TIMESCALE, + STAR_2_PROPERTY::DYNAMICAL_TIMESCALE, + STAR_1_PROPERTY::THERMAL_TIMESCALE, + STAR_2_PROPERTY::THERMAL_TIMESCALE, + STAR_1_PROPERTY::ZETA_SOBERMAN, + STAR_2_PROPERTY::ZETA_SOBERMAN, + STAR_1_PROPERTY::ZETA_SOBERMAN_HE, + STAR_2_PROPERTY::ZETA_SOBERMAN_HE, + STAR_1_PROPERTY::ZETA_HURLEY, + STAR_2_PROPERTY::ZETA_HURLEY, + STAR_1_PROPERTY::ZETA_HURLEY_HE, + STAR_2_PROPERTY::ZETA_HURLEY_HE, + STAR_1_PROPERTY::MASS_LOSS_DIFF, + STAR_2_PROPERTY::MASS_LOSS_DIFF, + STAR_1_PROPERTY::DOMINANT_MASS_LOSS_RATE, + STAR_2_PROPERTY::DOMINANT_MASS_LOSS_RATE, + STAR_1_PROPERTY::MASS_TRANSFER_DIFF, + STAR_2_PROPERTY::MASS_TRANSFER_DIFF, + STAR_1_PROPERTY::MDOT, + STAR_2_PROPERTY::MDOT, + BINARY_PROPERTY::TOTAL_ANGULAR_MOMENTUM, + BINARY_PROPERTY::TOTAL_ENERGY, + STAR_1_PROPERTY::METALLICITY, + STAR_2_PROPERTY::METALLICITY, + BINARY_PROPERTY::MASS_TRANSFER_TRACKER_HISTORY, + STAR_1_PROPERTY::PULSAR_MAGNETIC_FIELD, + STAR_2_PROPERTY::PULSAR_MAGNETIC_FIELD, + STAR_1_PROPERTY::PULSAR_SPIN_PERIOD, + STAR_2_PROPERTY::PULSAR_SPIN_PERIOD, + STAR_1_PROPERTY::PULSAR_SPIN_DOWN_RATE, + STAR_2_PROPERTY::PULSAR_SPIN_DOWN_RATE, + STAR_1_PROPERTY::PULSAR_BIRTH_PERIOD, + STAR_2_PROPERTY::PULSAR_BIRTH_PERIOD, + STAR_1_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, + STAR_2_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, + STAR_1_PROPERTY::RADIAL_EXPANSION_TIMESCALE, + STAR_2_PROPERTY::RADIAL_EXPANSION_TIMESCALE, + BINARY_PROPERTY::RLOF_MASS_LOSS_RATE, + BINARY_PROPERTY::RLOF_MASS_TRANSFER_TIMESCALE, + BINARY_PROPERTY::RLOF_ACCRETION_EFFICIENCY +}; + + +// BSE_CIRCUMBINARY_DISKS_REC +// +// Default record definition for the BSE Circumbinary Disks logfile. +// +// This file is event-based: one row is written for each CBD that forms. +// The row is written when the active disk is exhausted or truncated by an +// ordinary COMPAS termination/event boundary. Time, Mass(1/2), and +// Stellar_Type(1/2) are cached at CBD formation rather than sampled at write time. +// Initial_CBD_Mass is the disk +// reservoir defined at formation; CBD_Mass_Supplied is the amount actually +// processed before the row is written. +// +const ANY_PROPERTY_VECTOR BSE_CIRCUMBINARY_DISKS_REC = { + BINARY_PROPERTY::RANDOM_SEED, + BINARY_PROPERTY::CIRCUMBINARY_DISK_FORMATION_TIME, + BINARY_PROPERTY::CIRCUMBINARY_DISK_INITIAL_MASS, + BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_SUPPLIED, + BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_1, + BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_RETAINED_2, + BINARY_PROPERTY::CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_PRE, + BINARY_PROPERTY::CIRCUMBINARY_DISK_SEMI_MAJOR_AXIS_POST, + BINARY_PROPERTY::CIRCUMBINARY_DISK_ECCENTRICITY_PRE, + BINARY_PROPERTY::CIRCUMBINARY_DISK_ECCENTRICITY_POST, + BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_1_AT_FORMATION, + BINARY_PROPERTY::CIRCUMBINARY_DISK_STELLAR_TYPE_1_AT_FORMATION, + BINARY_PROPERTY::CIRCUMBINARY_DISK_MASS_2_AT_FORMATION, + BINARY_PROPERTY::CIRCUMBINARY_DISK_STELLAR_TYPE_2_AT_FORMATION +}; +// BSE_DOUBLE_COMPACT_OBJECT_REC +// +// Default record definition for the Double Compact Objects logfile +// +const ANY_PROPERTY_VECTOR BSE_DOUBLE_COMPACT_OBJECTS_REC = { + BINARY_PROPERTY::RANDOM_SEED, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_AT_DCO_FORMATION, + BINARY_PROPERTY::ECCENTRICITY_AT_DCO_FORMATION, + STAR_1_PROPERTY::MASS, + STAR_1_PROPERTY::STELLAR_TYPE, + STAR_2_PROPERTY::MASS, + STAR_2_PROPERTY::STELLAR_TYPE, + BINARY_PROPERTY::TIME_TO_COALESCENCE, + BINARY_PROPERTY::TIME, + BINARY_PROPERTY::MERGES_IN_HUBBLE_TIME, + STAR_1_PROPERTY::RECYCLED_NEUTRON_STAR, + STAR_2_PROPERTY::RECYCLED_NEUTRON_STAR +}; + + +// BSE_PULSAR_EVOLUTION_REC +// +// Default record definition for the BSE Pulsar Evolution logfile +// +const ANY_PROPERTY_VECTOR BSE_PULSAR_EVOLUTION_REC = { + BINARY_PROPERTY::RANDOM_SEED, + STAR_1_PROPERTY::MASS, + STAR_2_PROPERTY::MASS, + STAR_1_PROPERTY::STELLAR_TYPE, + STAR_2_PROPERTY::STELLAR_TYPE, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, + BINARY_PROPERTY::MASS_TRANSFER_TRACKER_HISTORY, + STAR_1_PROPERTY::PULSAR_MAGNETIC_FIELD, + STAR_2_PROPERTY::PULSAR_MAGNETIC_FIELD, + STAR_1_PROPERTY::PULSAR_SPIN_PERIOD, + STAR_2_PROPERTY::PULSAR_SPIN_PERIOD, + STAR_1_PROPERTY::PULSAR_SPIN_DOWN_RATE, + STAR_2_PROPERTY::PULSAR_SPIN_DOWN_RATE, + STAR_1_PROPERTY::PULSAR_BIRTH_PERIOD, + STAR_2_PROPERTY::PULSAR_BIRTH_PERIOD, + STAR_1_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, + STAR_2_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, + BINARY_PROPERTY::TIME, + BINARY_PROPERTY::DT +}; + + +// BSE_RLOF_PARAMETERS_REC +// +// Default record definition for the RLOF Parameters logfile +// +const ANY_PROPERTY_VECTOR BSE_RLOF_PARAMETERS_REC = { + BINARY_PROPERTY::RANDOM_SEED, + BINARY_PROPERTY::RLOF_TIME_POST_MT, + BINARY_PROPERTY::RLOF_TIME_PRE_MT, + BINARY_PROPERTY::RLOF_POST_MT_STAR1_MASS, + BINARY_PROPERTY::RLOF_POST_MT_STAR2_MASS, + BINARY_PROPERTY::RLOF_POST_MT_STAR1_RADIUS, + BINARY_PROPERTY::RLOF_POST_MT_STAR2_RADIUS, + BINARY_PROPERTY::RLOF_POST_MT_STAR1_STELLAR_TYPE, + BINARY_PROPERTY::RLOF_POST_MT_STAR2_STELLAR_TYPE, + BINARY_PROPERTY::RLOF_POST_MT_SEMI_MAJOR_AXIS, + BINARY_PROPERTY::RLOF_POST_MT_ECCENTRICITY, + BINARY_PROPERTY::RLOF_POST_MT_EVENT_COUNTER, + BINARY_PROPERTY::RLOF_POST_MT_STAR1_RLOF, + BINARY_PROPERTY::RLOF_POST_MT_STAR2_RLOF, + BINARY_PROPERTY::STELLAR_MERGER, + BINARY_PROPERTY::RLOF_POST_MT_COMMON_ENVELOPE, + BINARY_PROPERTY::RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, + BINARY_PROPERTY::RLOF_POST_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, + BINARY_PROPERTY::RLOF_PRE_MT_STAR1_MASS, + BINARY_PROPERTY::RLOF_PRE_MT_STAR2_MASS, + BINARY_PROPERTY::RLOF_PRE_MT_STAR1_RADIUS, + BINARY_PROPERTY::RLOF_PRE_MT_STAR2_RADIUS, + BINARY_PROPERTY::RLOF_PRE_MT_STAR1_STELLAR_TYPE, + BINARY_PROPERTY::RLOF_PRE_MT_STAR2_STELLAR_TYPE, + BINARY_PROPERTY::RLOF_PRE_MT_SEMI_MAJOR_AXIS, + BINARY_PROPERTY::RLOF_PRE_MT_ECCENTRICITY, + BINARY_PROPERTY::RLOF_PRE_MT_STAR1_RLOF, + BINARY_PROPERTY::RLOF_PRE_MT_STAR2_RLOF, + BINARY_PROPERTY::RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_1, + BINARY_PROPERTY::RLOF_PRE_STEP_STAR_TO_ROCHE_LOBE_RADIUS_RATIO_2, + BINARY_PROPERTY::RLOF_ACCRETION_EFFICIENCY, + BINARY_PROPERTY::RLOF_MASS_LOSS_RATE, + BINARY_PROPERTY::RLOF_MASS_TRANSFER_TIMESCALE, + STAR_1_PROPERTY::ZETA_SOBERMAN, + STAR_1_PROPERTY::ZETA_SOBERMAN_HE, + STAR_1_PROPERTY::ZETA_HURLEY, + STAR_1_PROPERTY::ZETA_HURLEY_HE, + STAR_2_PROPERTY::ZETA_SOBERMAN, + STAR_2_PROPERTY::ZETA_SOBERMAN_HE, + STAR_2_PROPERTY::ZETA_HURLEY, + STAR_2_PROPERTY::ZETA_HURLEY_HE +}; + + +// BSE_SUPERNOVAE_REC +// +// Default record definition for the BSE Supernovae logfile +// +const ANY_PROPERTY_VECTOR BSE_SUPERNOVAE_REC = { + BINARY_PROPERTY::RANDOM_SEED, + SUPERNOVA_PROPERTY::DRAWN_KICK_MAGNITUDE, + SUPERNOVA_PROPERTY::KICK_MAGNITUDE, + SUPERNOVA_PROPERTY::FALLBACK_FRACTION, + BINARY_PROPERTY::ORBITAL_VELOCITY_PRE_SUPERNOVA, + SUPERNOVA_PROPERTY::MEAN_ANOMALY, + SUPERNOVA_PROPERTY::SUPERNOVA_THETA, + SUPERNOVA_PROPERTY::SUPERNOVA_PHI, + SUPERNOVA_PROPERTY::SN_TYPE, + BINARY_PROPERTY::ECCENTRICITY_PRE_SUPERNOVA, + BINARY_PROPERTY::ECCENTRICITY, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_PRE_SUPERNOVA_RSOL, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, + BINARY_PROPERTY::TIME, + BINARY_PROPERTY::SUPERNOVA_STATE, + BINARY_PROPERTY::UNBOUND, + COMPANION_PROPERTY::STELLAR_TYPE, + SUPERNOVA_PROPERTY::STELLAR_TYPE, + SUPERNOVA_PROPERTY::STELLAR_TYPE_PREV, + COMPANION_PROPERTY::MASS, + SUPERNOVA_PROPERTY::TOTAL_MASS_AT_COMPACT_OBJECT_FORMATION, + SUPERNOVA_PROPERTY::TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, + SUPERNOVA_PROPERTY::CORE_MASS_AT_COMPACT_OBJECT_FORMATION, + SUPERNOVA_PROPERTY::CO_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, + SUPERNOVA_PROPERTY::HE_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, + SUPERNOVA_PROPERTY::CORE_RADIUS_AT_COMPACT_OBJECT_FORMATION, + SUPERNOVA_PROPERTY::MASS, + SUPERNOVA_PROPERTY::EXPERIENCED_RLOF, + SUPERNOVA_PROPERTY::MASS_TRANSFER_DONOR_HISTORY, + SUPERNOVA_PROPERTY::SPEED, + COMPANION_PROPERTY::SPEED, + BINARY_PROPERTY::SYSTEMIC_SPEED, + SUPERNOVA_PROPERTY::IS_HYDROGEN_POOR, + BINARY_PROPERTY::SUPERNOVA_ORBIT_INCLINATION_ANGLE, + BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_X, + BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_Y, + BINARY_PROPERTY::ORBITAL_ANGULAR_MOMENTUM_VECTOR_Z, + BINARY_PROPERTY::SYSTEMIC_VELOCITY_X, + BINARY_PROPERTY::SYSTEMIC_VELOCITY_Y, + BINARY_PROPERTY::SYSTEMIC_VELOCITY_Z, +}; + + +// BSE_SWITCH_LOG +// +// Default record definition for the BSE Switch Log logfile +// +const ANY_PROPERTY_VECTOR BSE_SWITCH_LOG_REC = { + BINARY_PROPERTY::RANDOM_SEED, + BINARY_PROPERTY::TIME, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, + BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1, + BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2, + STAR_1_PROPERTY::MASS, + STAR_2_PROPERTY::MASS, + STAR_1_PROPERTY::STELLAR_TYPE, + STAR_2_PROPERTY::STELLAR_TYPE, + STAR_1_PROPERTY::RADIUS, + STAR_2_PROPERTY::RADIUS +}; + + +// BSE_SYSTEM_PARAMETERS_REC +// +// Default record definition for the System Parameters logfile +// +const ANY_PROPERTY_VECTOR BSE_SYSTEM_PARAMETERS_REC = { + BINARY_PROPERTY::RANDOM_SEED, + STAR_1_PROPERTY::MZAMS, + STAR_2_PROPERTY::MZAMS, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_INITIAL, + BINARY_PROPERTY::ECCENTRICITY_INITIAL, + STAR_1_PROPERTY::SUPERNOVA_KICK_MAGNITUDE_RANDOM_NUMBER, + STAR_2_PROPERTY::SUPERNOVA_KICK_MAGNITUDE_RANDOM_NUMBER, + STAR_1_PROPERTY::OMEGA_ZAMS, + STAR_2_PROPERTY::OMEGA_ZAMS, + PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS, + PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH, + PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN, + PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN, + PROGRAM_OPTION::LBV_FACTOR, + PROGRAM_OPTION::WR_FACTOR, + PROGRAM_OPTION::COMMON_ENVELOPE_ALPHA, + PROGRAM_OPTION::COMMON_ENVELOPE_FORMALISM, + STAR_1_PROPERTY::METALLICITY, + STAR_2_PROPERTY::METALLICITY, + BINARY_PROPERTY::UNBOUND, + BINARY_PROPERTY::STELLAR_MERGER, + BINARY_PROPERTY::STELLAR_MERGER_AT_BIRTH, + BINARY_PROPERTY::MASSES_EQUILIBRATED_AT_BIRTH, + STAR_1_PROPERTY::INITIAL_STELLAR_TYPE, + STAR_1_PROPERTY::STELLAR_TYPE, + STAR_2_PROPERTY::INITIAL_STELLAR_TYPE, + STAR_2_PROPERTY::STELLAR_TYPE, + STAR_1_PROPERTY::CHEMICALLY_HOMOGENEOUS_MAIN_SEQUENCE, + STAR_2_PROPERTY::CHEMICALLY_HOMOGENEOUS_MAIN_SEQUENCE, + BINARY_PROPERTY::EVOL_STATUS, + BINARY_PROPERTY::ERROR, + PROGRAM_OPTION::NOTES +}; + + +// BSE_SYSTEM_SNAPSHOT_LOG_REC +// +// Default record definition for the BSE System Snapshot logfile +// +const ANY_PROPERTY_VECTOR BSE_SYSTEM_SNAPSHOT_LOG_REC = { + BINARY_PROPERTY::RANDOM_SEED, + BINARY_PROPERTY::DT, + BINARY_PROPERTY::TIME, + BINARY_PROPERTY::UNBOUND, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, + BINARY_PROPERTY::ECCENTRICITY, + STAR_1_PROPERTY::MZAMS, + STAR_2_PROPERTY::MZAMS, + STAR_1_PROPERTY::MASS_0, + STAR_2_PROPERTY::MASS_0, + STAR_1_PROPERTY::MASS, + STAR_2_PROPERTY::MASS, + STAR_1_PROPERTY::ENV_MASS, + STAR_2_PROPERTY::ENV_MASS, + STAR_1_PROPERTY::CORE_MASS, + STAR_2_PROPERTY::CORE_MASS, + STAR_1_PROPERTY::HE_CORE_MASS, + STAR_2_PROPERTY::HE_CORE_MASS, + STAR_1_PROPERTY::CO_CORE_MASS, + STAR_2_PROPERTY::CO_CORE_MASS, + STAR_1_PROPERTY::RADIUS, + STAR_2_PROPERTY::RADIUS, + BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1, + BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2, + STAR_1_PROPERTY::OMEGA, + STAR_2_PROPERTY::OMEGA, + STAR_1_PROPERTY::OMEGA_BREAK, + STAR_2_PROPERTY::OMEGA_BREAK, + STAR_1_PROPERTY::INITIAL_STELLAR_TYPE, + STAR_2_PROPERTY::INITIAL_STELLAR_TYPE, + STAR_1_PROPERTY::STELLAR_TYPE, + STAR_2_PROPERTY::STELLAR_TYPE, + STAR_1_PROPERTY::AGE, + STAR_2_PROPERTY::AGE, + STAR_1_PROPERTY::LUMINOSITY, + STAR_2_PROPERTY::LUMINOSITY, + STAR_1_PROPERTY::TEMPERATURE, + STAR_2_PROPERTY::TEMPERATURE, + STAR_1_PROPERTY::ANGULAR_MOMENTUM, + STAR_2_PROPERTY::ANGULAR_MOMENTUM, + STAR_1_PROPERTY::DYNAMICAL_TIMESCALE, + STAR_2_PROPERTY::DYNAMICAL_TIMESCALE, + STAR_1_PROPERTY::THERMAL_TIMESCALE, + STAR_2_PROPERTY::THERMAL_TIMESCALE, + STAR_1_PROPERTY::ZETA_SOBERMAN, + STAR_2_PROPERTY::ZETA_SOBERMAN, + STAR_1_PROPERTY::ZETA_SOBERMAN_HE, + STAR_2_PROPERTY::ZETA_SOBERMAN_HE, + STAR_1_PROPERTY::ZETA_HURLEY, + STAR_2_PROPERTY::ZETA_HURLEY, + STAR_1_PROPERTY::ZETA_HURLEY_HE, + STAR_2_PROPERTY::ZETA_HURLEY_HE, + STAR_1_PROPERTY::MASS_LOSS_DIFF, + STAR_2_PROPERTY::MASS_LOSS_DIFF, + STAR_1_PROPERTY::DOMINANT_MASS_LOSS_RATE, + STAR_2_PROPERTY::DOMINANT_MASS_LOSS_RATE, + STAR_1_PROPERTY::MASS_TRANSFER_DIFF, + STAR_2_PROPERTY::MASS_TRANSFER_DIFF, + STAR_1_PROPERTY::MDOT, + STAR_2_PROPERTY::MDOT, + BINARY_PROPERTY::TOTAL_ANGULAR_MOMENTUM, + BINARY_PROPERTY::TOTAL_ENERGY, + STAR_1_PROPERTY::METALLICITY, + STAR_2_PROPERTY::METALLICITY, + BINARY_PROPERTY::MASS_TRANSFER_TRACKER_HISTORY, + STAR_1_PROPERTY::PULSAR_MAGNETIC_FIELD, + STAR_2_PROPERTY::PULSAR_MAGNETIC_FIELD, + STAR_1_PROPERTY::PULSAR_SPIN_PERIOD, + STAR_2_PROPERTY::PULSAR_SPIN_PERIOD, + STAR_1_PROPERTY::PULSAR_SPIN_DOWN_RATE, + STAR_2_PROPERTY::PULSAR_SPIN_DOWN_RATE, + STAR_1_PROPERTY::PULSAR_BIRTH_PERIOD, + STAR_2_PROPERTY::PULSAR_BIRTH_PERIOD, + STAR_1_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, + STAR_2_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, + STAR_1_PROPERTY::RADIAL_EXPANSION_TIMESCALE, + STAR_2_PROPERTY::RADIAL_EXPANSION_TIMESCALE, + BINARY_PROPERTY::RLOF_MASS_LOSS_RATE, + BINARY_PROPERTY::RLOF_MASS_TRANSFER_TIMESCALE, + BINARY_PROPERTY::RLOF_ACCRETION_EFFICIENCY +}; + + +// SSE output record definitions + +// SSE_DETAILED_OUTPUT_REC +// +// Default record definition for the SSE Detailed Output logfile +// +const ANY_PROPERTY_VECTOR SSE_DETAILED_OUTPUT_REC = { + STAR_PROPERTY::AGE, + STAR_PROPERTY::DT, + STAR_PROPERTY::TIME, + STAR_PROPERTY::STELLAR_TYPE, + STAR_PROPERTY::METALLICITY, + STAR_PROPERTY::MASS_0, + STAR_PROPERTY::MASS, + STAR_PROPERTY::RADIUS, + STAR_PROPERTY::RZAMS, + STAR_PROPERTY::LUMINOSITY, + STAR_PROPERTY::TEMPERATURE, + STAR_PROPERTY::CORE_MASS, + STAR_PROPERTY::CO_CORE_MASS, + STAR_PROPERTY::HE_CORE_MASS, + STAR_PROPERTY::MDOT, + STAR_PROPERTY::DOMINANT_MASS_LOSS_RATE, + STAR_PROPERTY::TIMESCALE_MS, + STAR_PROPERTY::OMEGA, + STAR_PROPERTY::OMEGA_BREAK +}; + +// SSE_PULSAR_EVOLUTION_REC +// +// Default record definition for the SSE Pulsar Evolution logfile +// +const ANY_PROPERTY_VECTOR SSE_PULSAR_EVOLUTION_REC = { + STAR_PROPERTY::RANDOM_SEED, + STAR_PROPERTY::MASS, + STAR_PROPERTY::STELLAR_TYPE, + STAR_PROPERTY::PULSAR_MAGNETIC_FIELD, + STAR_PROPERTY::PULSAR_SPIN_PERIOD, + STAR_PROPERTY::PULSAR_SPIN_DOWN_RATE, + STAR_PROPERTY::PULSAR_BIRTH_PERIOD, + STAR_PROPERTY::PULSAR_BIRTH_SPIN_DOWN_RATE, + STAR_PROPERTY::TIME, + STAR_PROPERTY::DT +}; + +// SSE_SUPERNOVAE_REC +// +// Default record definition for the SSE Supernovae logfile +// +const ANY_PROPERTY_VECTOR SSE_SUPERNOVAE_REC = { + STAR_PROPERTY::RANDOM_SEED, + STAR_PROPERTY::DRAWN_KICK_MAGNITUDE, + STAR_PROPERTY::KICK_MAGNITUDE, + STAR_PROPERTY::FALLBACK_FRACTION, + STAR_PROPERTY::MEAN_ANOMALY, + STAR_PROPERTY::SN_TYPE, + STAR_PROPERTY::TOTAL_MASS_AT_COMPACT_OBJECT_FORMATION, + STAR_PROPERTY::TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, + STAR_PROPERTY::CO_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, + STAR_PROPERTY::MASS, + STAR_PROPERTY::STELLAR_TYPE, + STAR_PROPERTY::STELLAR_TYPE_PREV, + STAR_PROPERTY::CORE_MASS_AT_COMPACT_OBJECT_FORMATION, + STAR_PROPERTY::CORE_RADIUS_AT_COMPACT_OBJECT_FORMATION, + STAR_PROPERTY::HE_CORE_MASS_AT_COMPACT_OBJECT_FORMATION, + STAR_PROPERTY::TIME, + STAR_PROPERTY::IS_HYDROGEN_POOR +}; + + +// SSE_SWITCH_LOG +// +// Default record definition for the SSE Switch Log logfile +// +const ANY_PROPERTY_VECTOR SSE_SWITCH_LOG_REC = { + STAR_PROPERTY::RANDOM_SEED, + STAR_PROPERTY::TIME, + STAR_PROPERTY::MASS, + STAR_PROPERTY::STELLAR_TYPE, + STAR_PROPERTY::RADIUS +}; + + +// SSE_SYSTEM_PARAMETERS_REC +// +// Default record definition for the SSE System Parameters logfile +// +const ANY_PROPERTY_VECTOR SSE_SYSTEM_PARAMETERS_REC = { + STAR_PROPERTY::RANDOM_SEED, + STAR_PROPERTY::MZAMS, + STAR_PROPERTY::RZAMS, + STAR_PROPERTY::METALLICITY, + STAR_PROPERTY::OMEGA_ZAMS, + STAR_PROPERTY::INITIAL_STELLAR_TYPE, + STAR_PROPERTY::STELLAR_TYPE, + STAR_PROPERTY::SUPERNOVA_KICK_MAGNITUDE_RANDOM_NUMBER, + STAR_PROPERTY::MASS, + STAR_PROPERTY::CHEMICALLY_HOMOGENEOUS_MAIN_SEQUENCE, + STAR_PROPERTY::EVOL_STATUS, + STAR_PROPERTY::ERROR, + PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_NS, + PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_CCSN_BH, + PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_ECSN, + PROGRAM_OPTION::KICK_MAGNITUDE_DISTRIBUTION_SIGMA_FOR_USSN, + PROGRAM_OPTION::LBV_FACTOR, + PROGRAM_OPTION::WR_FACTOR, + PROGRAM_OPTION::NOTES +}; + + +// SSE_SYSTEM_SNAPSHOT_LOG_REC +// +// Default record definition for the SSE System Snapshot logfile +// +const ANY_PROPERTY_VECTOR SSE_SYSTEM_SNAPSHOT_LOG_REC = { + STAR_PROPERTY::AGE, + STAR_PROPERTY::DT, + STAR_PROPERTY::TIME, + STAR_PROPERTY::STELLAR_TYPE, + STAR_PROPERTY::METALLICITY, + STAR_PROPERTY::MASS_0, + STAR_PROPERTY::MASS, + STAR_PROPERTY::RADIUS, + STAR_PROPERTY::RZAMS, + STAR_PROPERTY::LUMINOSITY, + STAR_PROPERTY::TEMPERATURE, + STAR_PROPERTY::CORE_MASS, + STAR_PROPERTY::CO_CORE_MASS, + STAR_PROPERTY::HE_CORE_MASS, + STAR_PROPERTY::MDOT, + STAR_PROPERTY::DOMINANT_MASS_LOSS_RATE, + STAR_PROPERTY::TIMESCALE_MS, + STAR_PROPERTY::OMEGA, + STAR_PROPERTY::OMEGA_BREAK +}; + + +// enum class LOGFILE_CLASS +// Symbolic names for logfile types +enum class LOGFILE_CLASS: int { NONE, STELLAR, BINARY }; + +// descriptors for logfiles +// unordered_map - key is integer logfile (from enum class LOGFILE above) +// fields are: {default filename, record descriptor, short file name, short record name, type} +// (the short names are for logfile definitions file parsing) +typedef std::tuple LOGFILE_DESCRIPTOR_T; +const std::map LOGFILE_DESCRIPTOR = { + { LOGFILE::NONE, { "" , {}, "", "", LOGFILE_CLASS::NONE}}, + + { LOGFILE::DEBUG_LOG, { "Debug_Log", {}, "", "", LOGFILE_CLASS::NONE }}, + { LOGFILE::ERROR_LOG, { "Error_Log", {}, "", "", LOGFILE_CLASS::NONE }}, + + { LOGFILE::BSE_COMMON_ENVELOPES, { "BSE_Common_Envelopes", BSE_COMMON_ENVELOPES_REC, "BSE_CEE", "BSE_CEE_REC", LOGFILE_CLASS::BINARY }}, + { LOGFILE::BSE_CIRCUMBINARY_DISKS, { "BSE_Circumbinary_Disks", BSE_CIRCUMBINARY_DISKS_REC, "BSE_CBD", "BSE_CBD_REC", LOGFILE_CLASS::BINARY }}, + { LOGFILE::BSE_DETAILED_OUTPUT, { "BSE_Detailed_Output", BSE_DETAILED_OUTPUT_REC, "BSE_DETAILED", "BSE_DETAILED_REC", LOGFILE_CLASS::BINARY }}, + { LOGFILE::BSE_DOUBLE_COMPACT_OBJECTS, { "BSE_Double_Compact_Objects", BSE_DOUBLE_COMPACT_OBJECTS_REC, "BSE_DCO", "BSE_DCO_REC", LOGFILE_CLASS::BINARY }}, + { LOGFILE::BSE_PULSAR_EVOLUTION, { "BSE_Pulsar_Evolution", BSE_PULSAR_EVOLUTION_REC, "BSE_PULSARS", "BSE_PULSARS_REC", LOGFILE_CLASS::BINARY }}, + { LOGFILE::BSE_RLOF_PARAMETERS, { "BSE_RLOF", BSE_RLOF_PARAMETERS_REC, "BSE_RLOF", "BSE_RLOF_REC", LOGFILE_CLASS::BINARY }}, + { LOGFILE::BSE_SUPERNOVAE, { "BSE_Supernovae", BSE_SUPERNOVAE_REC, "BSE_SNE", "BSE_SNE_REC", LOGFILE_CLASS::BINARY }}, + { LOGFILE::BSE_SWITCH_LOG, { "BSE_Switch_Log", BSE_SWITCH_LOG_REC, "BSE_SWITCH_LOG", "BSE_SWITCH_REC", LOGFILE_CLASS::BINARY }}, + { LOGFILE::BSE_SYSTEM_PARAMETERS, { "BSE_System_Parameters", BSE_SYSTEM_PARAMETERS_REC, "BSE_SYSPARMS", "BSE_SYSPARMS_REC", LOGFILE_CLASS::BINARY }}, + { LOGFILE::BSE_SYSTEM_SNAPSHOT_LOG, { "BSE_System_Snapshot_Log", BSE_SYSTEM_SNAPSHOT_LOG_REC, "BSE_SYS_SNAPSHOT", "BSE_SYS_SNAPSHOT_REC", LOGFILE_CLASS::BINARY }}, + + { LOGFILE::SSE_DETAILED_OUTPUT, { "SSE_Detailed_Output", SSE_DETAILED_OUTPUT_REC, "SSE_DETAILED", "SSE_DETAILED_REC", LOGFILE_CLASS::STELLAR }}, + { LOGFILE::SSE_PULSAR_EVOLUTION, { "SSE_Pulsar_Evolution", SSE_PULSAR_EVOLUTION_REC, "SSE_PULSARS", "SSE_PULSARS_REC", LOGFILE_CLASS::STELLAR }}, + { LOGFILE::SSE_SUPERNOVAE, { "SSE_Supernovae", SSE_SUPERNOVAE_REC, "SSE_SNE", "SSE_SNE_REC", LOGFILE_CLASS::STELLAR }}, + { LOGFILE::SSE_SWITCH_LOG, { "SSE_Switch_Log", SSE_SWITCH_LOG_REC, "SSE_SWITCH_LOG", "SSE_SWITCH_REC", LOGFILE_CLASS::STELLAR }}, + { LOGFILE::SSE_SYSTEM_PARAMETERS, { "SSE_System_Parameters", SSE_SYSTEM_PARAMETERS_REC, "SSE_SYSPARMS", "SSE_SYSPARMS_REC", LOGFILE_CLASS::STELLAR }}, + { LOGFILE::SSE_SYSTEM_SNAPSHOT_LOG, { "SSE_System_Snapshot_Log", SSE_SYSTEM_SNAPSHOT_LOG_REC, "SSE_SYS_SNAPSHOT", "SSE_SYS_SNAPSHOT_REC", LOGFILE_CLASS::STELLAR }} +}; + +#endif // __LogTypedefs_h__ diff --git a/src/WhiteDwarfs.h b/src/WhiteDwarfs.h index dd6048f9b..4868a10b6 100644 --- a/src/WhiteDwarfs.h +++ b/src/WhiteDwarfs.h @@ -1,113 +1,113 @@ -#ifndef __WhiteDwarfs_h__ -#define __WhiteDwarfs_h__ - -#include "constants.h" -#include "typedefs.h" -#include "profiling.h" -#include "utils.h" - -#include "Remnants.h" - - -class BaseStar; -class Remnants; - -class WhiteDwarfs: virtual public BaseStar, public Remnants { - -public: - - WhiteDwarfs(){}; - - WhiteDwarfs(const BaseStar &p_BaseStar) : BaseStar(p_BaseStar), Remnants(p_BaseStar) {} - - - // member functions - static double CalculateLuminosityOnPhase_Static(const double p_Mass, - const double p_Time, - const double p_Metallicity, - const double p_BaryonNumber); - - static double CalculateRadiusOnPhase_Static(const double p_Mass); - - MT_CASE DetermineMassTransferTypeAsDonor() const { return MT_CASE::OTHER; } // Not A, B, C, or NONE - - ACCRETION_REGIME DetermineAccretionRegime(const double p_DonorThermalMassLossRate, const bool p_HeRich); // Get the current accretion regime. Can also change m_HeShellDetonation and m_OffCenterIgnition flags. - - void ResolveShellChange(const double p_AccretedMass); - - -protected: - // member variables - - bool m_HeShellDetonation; // Flag to initialize He-Shell detonation (i.e. as described in Wang. 2018, sect 5 2018RAA....18...49W) - double m_HeShell; // Current WD He-shell size (Msol). Increases through accretion. - double m_HShell; // Current WD H-shell size (Msol). Increases through accretion. - double m_L0Ritter; // Parameter from numerical calculations, see Ritter 1999, section 3. Eqs 10 and 12, as well as table 2. Corresponds to L0. - double m_LambdaRitter; // Parameter from numerical calculations, see Ritter 1999, section 3. Eqs 10 and 12, as well as table 2. - bool m_OffCenterIgnition; // Flag for CO WD evolution into ONe WD - bool m_ShouldRejuvenate; // Flag for evolution of HeWD back into HeMS - bool m_IsSubChandrasekharTypeIa; // Flag for SubCh SN of HeWD - double m_XRitter; // Assumed hydrogen-mass fraction of material being accreted by He WD, as in Ritter 1999, table 2. - ACCRETION_REGIME m_AccretionRegime; - - // member functions - alphabetically - double CalculateAccretionRegime(const bool p_DonorIsHeRich, - const bool p_DonorIsGiant, - const double p_DonorThermalMassLossRate, - const double p_MassLostByDonor); - - double CalculateCriticalMassRatio(const bool p_AccretorIsDegenerate, - const double p_massTransferEfficiencyBeta) { return CalculateCriticalMassRatioHurleyHjellmingWebbink(); } - double CalculateCriticalMassRatioClaeys14(const bool p_AccretorIsDegenerate) const { return CalculateCriticalMassRatioHurleyHjellmingWebbink(); } - double CalculateCriticalMassRatioGeEtAl(const QCRIT_PRESCRIPTION p_qCritPrescription, - const double p_massTransferEfficiencyBeta) { return CalculateCriticalMassRatioHurleyHjellmingWebbink(); } - double CalculateCriticalMassRatioHurleyHjellmingWebbink() const { return HURLEY_HJELLMING_WEBBINK_QCRIT_WD; } - - double CalculateCOCoreMassOnPhase() const { return m_COCoreMass; } // NO-OP - - double CalculateHeCoreMassOnPhase() const { return m_HeCoreMass; } // NO-OP - - double CalculateHeliumAbundanceCoreOnPhase() const { return 0.0; } - double CalculateHeliumAbundanceSurfaceOnPhase() const { return 0.0; } - - double CalculateHydrogenAbundanceCoreOnPhase() const { return 0.0; } - double CalculateHydrogenAbundanceSurfaceOnPhase() const { return 0.0; } - - double CalculateEtaH(const double p_MassIntakeRate); - - double CalculateEtaHe(const double p_MassIntakeRate); - - double CalculateEtaPTY(const double p_MassIntakeRate); - - double Calculatel0Ritter() const { return (m_Metallicity > 0.01) ? L0_RITTER_HIGH_Z : L0_RITTER_LOW_Z; } - - DBL_DBL CalculateMassAcceptanceRate(const double p_DonorMassRate, - const bool p_IsHeRich); - DBL_DBL CalculateMassAcceptanceRate(const double p_DonorMassRate, - const double p_AccretorMassRate, - const bool p_IsHeRich) { return CalculateMassAcceptanceRate(p_DonorMassRate, p_IsHeRich); } - - double CalculateXRitter() const { return utils::Compare(m_Metallicity, 0.01) > 0 ? 0.7 : 0.8; } // Assumed Hydrogen-mass fraction - - double CalculateLambdaRitter() const { return utils::Compare(m_Metallicity, 0.01) > 0 ? 8.0 : 5.0; } // Exponent for the assumed core-mass and luminosity relationship in Ritter 1999 - - double CalculateInitialSupernovaMass() const { return 0.0; } - - double CalculateRadiusOnPhase(const double p_Mass) const { return CalculateRadiusOnPhase_Static(p_Mass); } - double CalculateRadiusOnPhase(double p_Mass, double p_Luminosity) const { return CalculateRadiusOnPhase(p_Mass); } // Ignore luminosity argument for WDs - double CalculateRadiusOnPhase() const { return CalculateRadiusOnPhase(m_Mass); } // Use class member variables - - ENVELOPE DetermineEnvelopeType() const { return ENVELOPE::CONVECTIVE; } // Always CONVECTIVE - - bool IsMassAboveChandrasekhar() const { return (utils::Compare(m_Mass, MCH) > 0); } // Mass exceeds Chandrasekhar limit - - STELLAR_TYPE ResolveAIC(); - STELLAR_TYPE ResolveSNIa(); - STELLAR_TYPE ResolveHeSD(); - STELLAR_TYPE ResolveSupernova() { return EvolveToNextPhase(); } // SNe for WDs are handled internally to each WD type - - ACCRETION_REGIME WhiteDwarfAccretionRegime() const { return m_AccretionRegime; } - -}; - -#endif // __WhiteDwarfs_h__ +#ifndef __WhiteDwarfs_h__ +#define __WhiteDwarfs_h__ + +#include "constants.h" +#include "typedefs.h" +#include "profiling.h" +#include "utils.h" + +#include "Remnants.h" + + +class BaseStar; +class Remnants; + +class WhiteDwarfs: virtual public BaseStar, public Remnants { + +public: + + WhiteDwarfs(){}; + + WhiteDwarfs(const BaseStar &p_BaseStar) : BaseStar(p_BaseStar), Remnants(p_BaseStar) {} + + + // member functions + static double CalculateLuminosityOnPhase_Static(const double p_Mass, + const double p_Time, + const double p_Metallicity, + const double p_BaryonNumber); + + static double CalculateRadiusOnPhase_Static(const double p_Mass); + + MT_CASE DetermineMassTransferTypeAsDonor() const { return MT_CASE::OTHER; } // Not A, B, C, or NONE + + ACCRETION_REGIME DetermineAccretionRegime(const double p_DonorThermalMassLossRate, const bool p_HeRich); // Get the current accretion regime. Can also change m_HeShellDetonation and m_OffCenterIgnition flags. + + void ResolveShellChange(const double p_AccretedMass); + + +protected: + // member variables + + bool m_HeShellDetonation; // Flag to initialize He-Shell detonation (i.e. as described in Wang. 2018, sect 5 2018RAA....18...49W) + double m_HeShell; // Current WD He-shell size (Msol). Increases through accretion. + double m_HShell; // Current WD H-shell size (Msol). Increases through accretion. + double m_L0Ritter; // Parameter from numerical calculations, see Ritter 1999, section 3. Eqs 10 and 12, as well as table 2. Corresponds to L0. + double m_LambdaRitter; // Parameter from numerical calculations, see Ritter 1999, section 3. Eqs 10 and 12, as well as table 2. + bool m_OffCenterIgnition; // Flag for CO WD evolution into ONe WD + bool m_ShouldRejuvenate; // Flag for evolution of HeWD back into HeMS + bool m_IsSubChandrasekharTypeIa; // Flag for SubCh SN of HeWD + double m_XRitter; // Assumed hydrogen-mass fraction of material being accreted by He WD, as in Ritter 1999, table 2. + ACCRETION_REGIME m_AccretionRegime; + + // member functions - alphabetically + double CalculateAccretionRegime(const bool p_DonorIsHeRich, + const bool p_DonorIsGiant, + const double p_DonorThermalMassLossRate, + const double p_MassLostByDonor); + + double CalculateCriticalMassRatio(const bool p_AccretorIsDegenerate, + const double p_massTransferEfficiencyBeta) { return CalculateCriticalMassRatioHurleyHjellmingWebbink(); } + double CalculateCriticalMassRatioClaeys14(const bool p_AccretorIsDegenerate) const { return CalculateCriticalMassRatioHurleyHjellmingWebbink(); } + double CalculateCriticalMassRatioGeEtAl(const QCRIT_PRESCRIPTION p_qCritPrescription, + const double p_massTransferEfficiencyBeta) { return CalculateCriticalMassRatioHurleyHjellmingWebbink(); } + double CalculateCriticalMassRatioHurleyHjellmingWebbink() const { return HURLEY_HJELLMING_WEBBINK_QCRIT_WD; } + + double CalculateCOCoreMassOnPhase() const { return m_COCoreMass; } // NO-OP + + double CalculateHeCoreMassOnPhase() const { return m_HeCoreMass; } // NO-OP + + double CalculateHeliumAbundanceCoreOnPhase() const { return 0.0; } + double CalculateHeliumAbundanceSurfaceOnPhase() const { return 0.0; } + + double CalculateHydrogenAbundanceCoreOnPhase() const { return 0.0; } + double CalculateHydrogenAbundanceSurfaceOnPhase() const { return 0.0; } + + double CalculateEtaH(const double p_MassIntakeRate); + + double CalculateEtaHe(const double p_MassIntakeRate); + + double CalculateEtaPTY(const double p_MassIntakeRate); + + double Calculatel0Ritter() const { return (m_Metallicity > 0.01) ? L0_RITTER_HIGH_Z : L0_RITTER_LOW_Z; } + + DBL_DBL CalculateMassAcceptanceRate(const double p_DonorMassRate, + const bool p_IsHeRich); + DBL_DBL CalculateMassAcceptanceRate(const double p_DonorMassRate, + const double p_AccretorMassRate, + const bool p_IsHeRich) { return CalculateMassAcceptanceRate(p_DonorMassRate, p_IsHeRich); } + + double CalculateXRitter() const { return utils::Compare(m_Metallicity, 0.01) > 0 ? 0.7 : 0.8; } // Assumed Hydrogen-mass fraction + + double CalculateLambdaRitter() const { return utils::Compare(m_Metallicity, 0.01) > 0 ? 8.0 : 5.0; } // Exponent for the assumed core-mass and luminosity relationship in Ritter 1999 + + double CalculateInitialSupernovaMass() const { return 0.0; } + + double CalculateRadiusOnPhase(const double p_Mass) const { return CalculateRadiusOnPhase_Static(p_Mass); } + double CalculateRadiusOnPhase(double p_Mass, double p_Luminosity) const { return CalculateRadiusOnPhase(p_Mass); } // Ignore luminosity argument for WDs + double CalculateRadiusOnPhase() const { return CalculateRadiusOnPhase(m_Mass); } // Use class member variables + + ENVELOPE DetermineEnvelopeType() const { return ENVELOPE::CONVECTIVE; } // Always CONVECTIVE + + bool IsMassAboveChandrasekhar() const { return (utils::Compare(m_Mass, MCH) > 0); } // Mass exceeds Chandrasekhar limit + + STELLAR_TYPE ResolveAIC(); + STELLAR_TYPE ResolveSNIa(); + STELLAR_TYPE ResolveHeSD(); + STELLAR_TYPE ResolveSupernova() { return EvolveToNextPhase(); } // SNe for WDs are handled internally to each WD type + + ACCRETION_REGIME WhiteDwarfAccretionRegime() const { return m_AccretionRegime; } + +}; + +#endif // __WhiteDwarfs_h__ diff --git a/src/changelog.h b/src/changelog.h index b01127338..975820a21 100644 --- a/src/changelog.h +++ b/src/changelog.h @@ -1713,14 +1713,14 @@ // - Defect repair: // - Corrected orbital separation re-computation following pulsational (L/M threshold) mass loss // 03.31.00 AG - November 01, 2026 - Enhancement: -// Added a post-common-envelope circumbinary disk (CBD) framework – disabled by default - based on the formalism -// described in Grichener et al. (2026). The framework assumes that after common-envelope -// evolution (CEE), a fraction of the pre-RLOF envelope mass and the binary's total angular +// Added a post-common-envelope circumbinary disk (CBD) framework – disabled by default - based on the formalism +// described in Grichener et al. (2026). The framework assumes that after common-envelope +// evolution (CEE), a fraction of the pre-RLOF envelope mass and the binary's total angular // momentum (AM) might remain available for CBD formation. If the available AM suffices to support a CBD of the retained mass, one is formed. -// The CBD is then accreted back by the binary, with the evolution based on spindler-c (*), modified to account for the Eddington accretion limit. +// The CBD is then accreted back by the binary, with the evolution based on spindler-c (*), modified to account for the Eddington accretion limit. // Non-accreted material is assumed to be lost in winds carrying the accretor's specific orbital angular momentum. -// CBD related output is written in a new file called BSE_Circumbinary_Disks. -// Main user options: +// CBD related output is written in a new file called BSE_Circumbinary_Disks. +// Main user options: // --circumbinary-disk enables the CBD framework // --circumbinary-disk-beta controls the likelihood of CBD formation // --circumbinary-disk-envelope-mass-fraction-supplied controls the CBD mass diff --git a/src/profiling.cpp b/src/profiling.cpp index c77ddae30..0ab6a3903 100644 --- a/src/profiling.cpp +++ b/src/profiling.cpp @@ -1,249 +1,249 @@ -// This is the profiling namespace, and exists to provide profiling of function calls -// (e.g. pow(), sqrt() etc., but not limited to system functions - user defined functions can be -// profiled here too). -// -// See the "#define PROFILING" statement in profiling.h to learn how to turn profiling on and off - - -#include -#include "profiling.h" - -#ifdef DOPROFILING - - -namespace profiling { - - std::unordered_map m_CallMap; // map to record call signatures and counts - - - // put any variables here that are to be reported by the profiling code - // namespace variables need to be declared and initialised here - - double m_PowBaseMin = __DBL_MAX__; // minimum value of 'base' in calls to std::pow(base, exponent) - double m_PowBaseMax = -__DBL_MAX__; // maximum value of 'base' in calls to std::pow(base, exponent) - double m_PowExponentMin = __DBL_MAX__; // minimum value of 'exponent' in calls to std::pow(base, exponent) - double m_PowExponentMax = -__DBL_MAX__; // maximum value of 'exponent' in calls to std::pow(base, exponent) - - int m_PowCallCount = 0; // Total (accumulated) call count for std::pow() - - - // member functions - - /* - * Initialises profiling functionality - * - * Put any code here required for initialisation of profiling functionality - * This function should be called once immediately after program start - * - * - * void Initialise() - * - */ - void Initialise() { - InitialisePow(); - } - - /* - * Report profiling outcomes - * - * Put any code here required for reporting of profiling functionality - * This function should be called once immediately prior to program termination - * - * - * void Report() - * - */ - void Report() { - - std::cout << "\n"; - std::cout << "========== BEGIN PROFILING OUTCOMES ==========\n"; - std::cout << "\n"; - - ReportPow(); - - std::cout << "=========== END PROFILING OUTCOMES ===========\n"; - } - - - - /* - * Initialises variables used for profiling std::pow() - * - * - * void InitialisePow() - * - */ - void InitialisePow() { - - m_PowBaseMin = __DBL_MAX__; // minimum value of 'base' in calls to std::pow(base, exponent) - m_PowBaseMax = -__DBL_MAX__; // maximum value of 'base' in calls to std::pow(base, exponent) - m_PowExponentMin = __DBL_MAX__; // minimum value of 'exponent' in calls to std::pow(base, exponent) - m_PowExponentMax = -__DBL_MAX__; // maximum value of 'exponent' in calls to std::pow(base, exponent) - - m_PowCallCount = 0; // Total (accumulated) call count for std::pow() - } - - - /* - * Check call map to determine if specified signature and call count exists - * - * This function ostensibly checks the call map for a signature and call count, and returns - * true if an entry exists that matches both. The map is checked - for the same thing - - * a number of times in a loop (number determined by call count). This is purely to chew up - * CPU cycles. - * - * The real purpose of this function is to expend some CPU time so this call is identified - * by an external profiling tool so the full stack trace can be identified. This can be - * disabled if all we want is the immediate calling function and call count. - * - * The function could really be named 'expendCPU', but it does actually check the map for - * duplicate calls and the return value is valid, so 'CheckDuplicate' is appropriate (even - * though it really only does the check to prevent the code from being optimised away by - * the compiler - a plain loop that did nothing other than spin to soak up CPU cycles - * would be optimised out of the code by a good compiler). - * - * - * bool CheckDuplicate(const std::string &p_Signature, const int p_Count) - * - * @param [IN] p_Signature The signature of the call we're profiling - * @param [IN] p_Count The call clount we're checking for - * @return Boolean flag indicating if the signature and call count were found in the map - * - */ - bool CheckDuplicate(const std::string &p_Signature, const int p_Count) { - - bool duplicate = false; // result - - #ifndef PROFILING_COUNTS_ONLY // counts only? (i.e. no CPU spinning...) - - int cycles = 0; // measure of CPU cycles to expend - - // soak up some CPU cycles - // the CPU time expended depends on the call count - // p_Count should never be < 1, but just in case we include it with < 5 - // (previously it was being included with <100) - - if (p_Count < 5) cycles = 0; - else if (p_Count < 10) cycles = p_Count; - else if (p_Count < 100) cycles = 10; - else if (p_Count < 500) cycles = 20; - else if (p_Count < 1000) cycles = 100; - else if (p_Count < 5000) cycles = 200; - else if (p_Count < 10000) cycles = 1000; - else cycles = 2000; - - for (int i = 0; i < cycles; i++) { // spin some CPU cycles - duplicate = (m_CallMap[p_Signature] == p_Count); // and don't get optimised away... - } - - #endif - - return duplicate; - } - - - /* - * Profiling function to replace std::pow when profiling is enabled - * - * Gathers profiling statistics for calls to std::pow(base, exponent), - * and returns the valued of std::pow(base, exponent) - * - * Statistics gathered/recorded are: - * - * - minimum value of 'base' - * - maximum value of 'base' - * - minimum value of 'exponent' - * - maximum value of 'exponent' - * - call signatures - * - counts for call signatures - * - * - * double pow(const double p_Base, const double p_Exponent) (if PROFILING_CALLER_NAME is not #defined) - * double pow(const double p_Base, const double p_Exponent, const std::string &p_CallerName) (if PROFILING_CALLER_NAME is #defined) - * - * @param [IN] p_Base Floating point number to be raised to a power - * @param [IN] p_Exponent Floating point exponent to which p_Base is to be raised - * @param [IN] p_CallerName String containing the name of the calling function (if PROFILING_CALLER_NAME is #defined) - * @return Value of std::pow(p_Base, p_Exponent) - * - */ - #ifdef PROFILING_CALLER_NAME // add caller name to signature? - double pow(const double p_Base, const double p_Exponent, const std::string &p_CallerName) { // yes - #else - double pow(const double p_Base, const double p_Exponent) { // no - #endif - - // update minimums and maximums for parameters - m_PowBaseMin = std::min(p_Base, m_PowBaseMin); // minimum value of 'base' - m_PowBaseMax = std::max(p_Base, m_PowBaseMax); // maximum value of 'base' - m_PowExponentMin = std::min(p_Exponent, m_PowExponentMin); // minimum value of 'exponent' - m_PowExponentMax = std::max(p_Exponent, m_PowExponentMax); // maximum value of 'exponent' - - m_PowCallCount++; // increment accumulated call count - - std::string signature = ""; // call signature - - #ifdef PROFILING_CALLER_NAME // add caller name to signature? - signature = p_CallerName + "->"; // yes - #endif - - signature += "pow(" + std::to_string(p_Base) + "," + std::to_string(p_Exponent) + ")"; // call signature - - auto index = m_CallMap.find(signature); // look for signature map - if (index == m_CallMap.end()) { // found? - m_CallMap[signature] = 1; // no - insert it - first call - } - else { // yes - found - int count = m_CallMap[signature]++; // increment call count - (void)CheckDuplicate(signature, count); // check for duplicates - actually spin some CPU cycles - } - - return std::pow(p_Base, p_Exponent); // and return the actual value - } - - - /* - * Report profiling statistics for std::pow() - * - * Minimamly formatted for machine parsing. If the record contains a ":", then - * the ": " is the delimiter, the LHS is the identifier, and the RHS is the value - * associated with the identifier - * - * - * void ReportPow() - * - */ - void ReportPow() { - - std::cout << "Begin profiling outcomes for std::pow()\n"; - std::cout << "---------------------------------------\n"; - std::cout << "Total accumulated call count: " << m_PowCallCount << "\n"; - std::cout << "\n"; - std::cout << "Minimum base passed : " << m_PowBaseMin << "\n"; - std::cout << "Maximum base passed : " << m_PowBaseMax << "\n"; - std::cout << "Minimum exponent passed : " << m_PowExponentMin << "\n"; - std::cout << "Maximum exponent passed : " << m_PowExponentMax << "\n"; - - std::cout << "\n"; - std::cout << "---------------------------------------\n"; - std::cout << "\n"; - - // print the call map entries - std::unordered_map::iterator it = m_CallMap.begin(); - while (it != m_CallMap.end()) - { - std::string signature = it->first; // call signature - int count = it->second; // call count - std::cout << signature << ": " << count << "\n"; // print it - it++; // next map entry - } - - std::cout << "\n"; - std::cout << "End profiling outcomes for std::pow()\n"; - std::cout << "---------------------------------------\n"; - std::cout << "\n"; - } - -} - -#endif // DOPROFILING +// This is the profiling namespace, and exists to provide profiling of function calls +// (e.g. pow(), sqrt() etc., but not limited to system functions - user defined functions can be +// profiled here too). +// +// See the "#define PROFILING" statement in profiling.h to learn how to turn profiling on and off + + +#include +#include "profiling.h" + +#ifdef DOPROFILING + + +namespace profiling { + + std::unordered_map m_CallMap; // map to record call signatures and counts + + + // put any variables here that are to be reported by the profiling code + // namespace variables need to be declared and initialised here + + double m_PowBaseMin = __DBL_MAX__; // minimum value of 'base' in calls to std::pow(base, exponent) + double m_PowBaseMax = -__DBL_MAX__; // maximum value of 'base' in calls to std::pow(base, exponent) + double m_PowExponentMin = __DBL_MAX__; // minimum value of 'exponent' in calls to std::pow(base, exponent) + double m_PowExponentMax = -__DBL_MAX__; // maximum value of 'exponent' in calls to std::pow(base, exponent) + + int m_PowCallCount = 0; // Total (accumulated) call count for std::pow() + + + // member functions + + /* + * Initialises profiling functionality + * + * Put any code here required for initialisation of profiling functionality + * This function should be called once immediately after program start + * + * + * void Initialise() + * + */ + void Initialise() { + InitialisePow(); + } + + /* + * Report profiling outcomes + * + * Put any code here required for reporting of profiling functionality + * This function should be called once immediately prior to program termination + * + * + * void Report() + * + */ + void Report() { + + std::cout << "\n"; + std::cout << "========== BEGIN PROFILING OUTCOMES ==========\n"; + std::cout << "\n"; + + ReportPow(); + + std::cout << "=========== END PROFILING OUTCOMES ===========\n"; + } + + + + /* + * Initialises variables used for profiling std::pow() + * + * + * void InitialisePow() + * + */ + void InitialisePow() { + + m_PowBaseMin = __DBL_MAX__; // minimum value of 'base' in calls to std::pow(base, exponent) + m_PowBaseMax = -__DBL_MAX__; // maximum value of 'base' in calls to std::pow(base, exponent) + m_PowExponentMin = __DBL_MAX__; // minimum value of 'exponent' in calls to std::pow(base, exponent) + m_PowExponentMax = -__DBL_MAX__; // maximum value of 'exponent' in calls to std::pow(base, exponent) + + m_PowCallCount = 0; // Total (accumulated) call count for std::pow() + } + + + /* + * Check call map to determine if specified signature and call count exists + * + * This function ostensibly checks the call map for a signature and call count, and returns + * true if an entry exists that matches both. The map is checked - for the same thing - + * a number of times in a loop (number determined by call count). This is purely to chew up + * CPU cycles. + * + * The real purpose of this function is to expend some CPU time so this call is identified + * by an external profiling tool so the full stack trace can be identified. This can be + * disabled if all we want is the immediate calling function and call count. + * + * The function could really be named 'expendCPU', but it does actually check the map for + * duplicate calls and the return value is valid, so 'CheckDuplicate' is appropriate (even + * though it really only does the check to prevent the code from being optimised away by + * the compiler - a plain loop that did nothing other than spin to soak up CPU cycles + * would be optimised out of the code by a good compiler). + * + * + * bool CheckDuplicate(const std::string &p_Signature, const int p_Count) + * + * @param [IN] p_Signature The signature of the call we're profiling + * @param [IN] p_Count The call clount we're checking for + * @return Boolean flag indicating if the signature and call count were found in the map + * + */ + bool CheckDuplicate(const std::string &p_Signature, const int p_Count) { + + bool duplicate = false; // result + + #ifndef PROFILING_COUNTS_ONLY // counts only? (i.e. no CPU spinning...) + + int cycles = 0; // measure of CPU cycles to expend + + // soak up some CPU cycles + // the CPU time expended depends on the call count + // p_Count should never be < 1, but just in case we include it with < 5 + // (previously it was being included with <100) + + if (p_Count < 5) cycles = 0; + else if (p_Count < 10) cycles = p_Count; + else if (p_Count < 100) cycles = 10; + else if (p_Count < 500) cycles = 20; + else if (p_Count < 1000) cycles = 100; + else if (p_Count < 5000) cycles = 200; + else if (p_Count < 10000) cycles = 1000; + else cycles = 2000; + + for (int i = 0; i < cycles; i++) { // spin some CPU cycles + duplicate = (m_CallMap[p_Signature] == p_Count); // and don't get optimised away... + } + + #endif + + return duplicate; + } + + + /* + * Profiling function to replace std::pow when profiling is enabled + * + * Gathers profiling statistics for calls to std::pow(base, exponent), + * and returns the valued of std::pow(base, exponent) + * + * Statistics gathered/recorded are: + * + * - minimum value of 'base' + * - maximum value of 'base' + * - minimum value of 'exponent' + * - maximum value of 'exponent' + * - call signatures + * - counts for call signatures + * + * + * double pow(const double p_Base, const double p_Exponent) (if PROFILING_CALLER_NAME is not #defined) + * double pow(const double p_Base, const double p_Exponent, const std::string &p_CallerName) (if PROFILING_CALLER_NAME is #defined) + * + * @param [IN] p_Base Floating point number to be raised to a power + * @param [IN] p_Exponent Floating point exponent to which p_Base is to be raised + * @param [IN] p_CallerName String containing the name of the calling function (if PROFILING_CALLER_NAME is #defined) + * @return Value of std::pow(p_Base, p_Exponent) + * + */ + #ifdef PROFILING_CALLER_NAME // add caller name to signature? + double pow(const double p_Base, const double p_Exponent, const std::string &p_CallerName) { // yes + #else + double pow(const double p_Base, const double p_Exponent) { // no + #endif + + // update minimums and maximums for parameters + m_PowBaseMin = std::min(p_Base, m_PowBaseMin); // minimum value of 'base' + m_PowBaseMax = std::max(p_Base, m_PowBaseMax); // maximum value of 'base' + m_PowExponentMin = std::min(p_Exponent, m_PowExponentMin); // minimum value of 'exponent' + m_PowExponentMax = std::max(p_Exponent, m_PowExponentMax); // maximum value of 'exponent' + + m_PowCallCount++; // increment accumulated call count + + std::string signature = ""; // call signature + + #ifdef PROFILING_CALLER_NAME // add caller name to signature? + signature = p_CallerName + "->"; // yes + #endif + + signature += "pow(" + std::to_string(p_Base) + "," + std::to_string(p_Exponent) + ")"; // call signature + + auto index = m_CallMap.find(signature); // look for signature map + if (index == m_CallMap.end()) { // found? + m_CallMap[signature] = 1; // no - insert it - first call + } + else { // yes - found + int count = m_CallMap[signature]++; // increment call count + (void)CheckDuplicate(signature, count); // check for duplicates - actually spin some CPU cycles + } + + return std::pow(p_Base, p_Exponent); // and return the actual value + } + + + /* + * Report profiling statistics for std::pow() + * + * Minimamly formatted for machine parsing. If the record contains a ":", then + * the ": " is the delimiter, the LHS is the identifier, and the RHS is the value + * associated with the identifier + * + * + * void ReportPow() + * + */ + void ReportPow() { + + std::cout << "Begin profiling outcomes for std::pow()\n"; + std::cout << "---------------------------------------\n"; + std::cout << "Total accumulated call count: " << m_PowCallCount << "\n"; + std::cout << "\n"; + std::cout << "Minimum base passed : " << m_PowBaseMin << "\n"; + std::cout << "Maximum base passed : " << m_PowBaseMax << "\n"; + std::cout << "Minimum exponent passed : " << m_PowExponentMin << "\n"; + std::cout << "Maximum exponent passed : " << m_PowExponentMax << "\n"; + + std::cout << "\n"; + std::cout << "---------------------------------------\n"; + std::cout << "\n"; + + // print the call map entries + std::unordered_map::iterator it = m_CallMap.begin(); + while (it != m_CallMap.end()) + { + std::string signature = it->first; // call signature + int count = it->second; // call count + std::cout << signature << ": " << count << "\n"; // print it + it++; // next map entry + } + + std::cout << "\n"; + std::cout << "End profiling outcomes for std::pow()\n"; + std::cout << "---------------------------------------\n"; + std::cout << "\n"; + } + +} + +#endif // DOPROFILING diff --git a/src/profiling.h b/src/profiling.h index 3fa6cb437..923f1ecbe 100644 --- a/src/profiling.h +++ b/src/profiling.h @@ -1,75 +1,75 @@ -#ifndef __profiling_h__ -#define __profiling_h__ - -// configure the profiling functionality here by defining or undefining these variables - -#define DOPROFILING // comment this line out, or #undef DOPROFILING, to build production executable (i.e. no PROFILING code) -#undef DOPROFILING - -#ifdef DOPROFILING // profiling enabled? - // yes - profiling enabled - -#define PROFILING_COUNTS_ONLY // comment this line out, or #undef PROFILING_COUNTS_ONLY, to include CPU penalties for calls to profiling functions (for use with external profiling tools) -#define PROFILING_CALLER_NAME // comment this line out, or #undef PROFILING_CALLER_NAME, to NOT include the name of the calling function in the call signature of the function being profiled - - -#include "constants.h" - - -// Put any definitions of functions to be profiled here - and ensure that their "real", -// non-profiling definitions are in the "else" section below. -// Supporting functions for the functions being profiled go inside the namespace below. - -#define InitialiseProfiling profiling::Initialise() // initialise profiling functionality -#define ReportProfiling profiling::Report() // report profiling outcomes - -// define profiler calls to std::pow() -#ifdef PROFILING_CALLER_NAME // add caller name to signature? -#define PPOW(base, exponent) profiling::pow(base, exponent, __PRETTY_FUNCTION__) // yes -#else -#define PPOW(base, exponent) profiling::pow(base, exponent) // no -#endif - - -namespace profiling { - - - // object identifiers - all classes have these (adding here (no class) for error handling) - inline OBJECT_ID ObjectId() { return static_cast(OBJECT_TYPE::PROFILING); } // object id for profiling - ordinal value from enum - inline OBJECT_TYPE ObjectType() { return OBJECT_TYPE::PROFILING; } // object type for profiling - always "PROFILING" - inline OBJECT_PERSISTENCE ObjectPersistence() { return OBJECT_PERSISTENCE::PERMANENT; } // object persistence for profiling - always "PERMANENT" - inline STELLAR_TYPE StellarType() { return STELLAR_TYPE::NONE; } // stellar type for profiling - always "NONE" - - - // namespace functions - void Initialise(); // should be called once immediately after program start - void Report(); // should be called once immediately prior to program termination - - - // put any functions here that are to be reported on by the profiling code - - // std::pow() related functions - void InitialisePow(); // initialisation function for std::pow() profiling - void ReportPow(); // reporting function for std::pow() profiling - - bool CheckDuplicate(const std::string &p_Signature, const int p_Count); // checks for duplicate calls to std::pow() - - // profiling function for std::pow() - #ifdef PROFILING_CALLER_NAME // add caller name to signature? - double pow(const double p_Base, const double p_Exponent, const std::string &p_CallerName); // yes - #else - double pow(const double p_Base, const double p_Exponent); // no - #endif - -} - -#else // no - profiling not enabled - -#define InitialiseProfiling {} // initialise profiling functionality -#define ReportProfiling {} // report profiling outcomes - -#define PPOW(base, exponent) std::pow(base, exponent) // not profiling calls to pow() - -#endif // DOPROFILING - -#endif // __profiling_h__ +#ifndef __profiling_h__ +#define __profiling_h__ + +// configure the profiling functionality here by defining or undefining these variables + +#define DOPROFILING // comment this line out, or #undef DOPROFILING, to build production executable (i.e. no PROFILING code) +#undef DOPROFILING + +#ifdef DOPROFILING // profiling enabled? + // yes - profiling enabled + +#define PROFILING_COUNTS_ONLY // comment this line out, or #undef PROFILING_COUNTS_ONLY, to include CPU penalties for calls to profiling functions (for use with external profiling tools) +#define PROFILING_CALLER_NAME // comment this line out, or #undef PROFILING_CALLER_NAME, to NOT include the name of the calling function in the call signature of the function being profiled + + +#include "constants.h" + + +// Put any definitions of functions to be profiled here - and ensure that their "real", +// non-profiling definitions are in the "else" section below. +// Supporting functions for the functions being profiled go inside the namespace below. + +#define InitialiseProfiling profiling::Initialise() // initialise profiling functionality +#define ReportProfiling profiling::Report() // report profiling outcomes + +// define profiler calls to std::pow() +#ifdef PROFILING_CALLER_NAME // add caller name to signature? +#define PPOW(base, exponent) profiling::pow(base, exponent, __PRETTY_FUNCTION__) // yes +#else +#define PPOW(base, exponent) profiling::pow(base, exponent) // no +#endif + + +namespace profiling { + + + // object identifiers - all classes have these (adding here (no class) for error handling) + inline OBJECT_ID ObjectId() { return static_cast(OBJECT_TYPE::PROFILING); } // object id for profiling - ordinal value from enum + inline OBJECT_TYPE ObjectType() { return OBJECT_TYPE::PROFILING; } // object type for profiling - always "PROFILING" + inline OBJECT_PERSISTENCE ObjectPersistence() { return OBJECT_PERSISTENCE::PERMANENT; } // object persistence for profiling - always "PERMANENT" + inline STELLAR_TYPE StellarType() { return STELLAR_TYPE::NONE; } // stellar type for profiling - always "NONE" + + + // namespace functions + void Initialise(); // should be called once immediately after program start + void Report(); // should be called once immediately prior to program termination + + + // put any functions here that are to be reported on by the profiling code + + // std::pow() related functions + void InitialisePow(); // initialisation function for std::pow() profiling + void ReportPow(); // reporting function for std::pow() profiling + + bool CheckDuplicate(const std::string &p_Signature, const int p_Count); // checks for duplicate calls to std::pow() + + // profiling function for std::pow() + #ifdef PROFILING_CALLER_NAME // add caller name to signature? + double pow(const double p_Base, const double p_Exponent, const std::string &p_CallerName); // yes + #else + double pow(const double p_Base, const double p_Exponent); // no + #endif + +} + +#else // no - profiling not enabled + +#define InitialiseProfiling {} // initialise profiling functionality +#define ReportProfiling {} // report profiling outcomes + +#define PPOW(base, exponent) std::pow(base, exponent) // not profiling calls to pow() + +#endif // DOPROFILING + +#endif // __profiling_h__ diff --git a/src/yaml.cpp b/src/yaml.cpp index 787e6c622..557e5ea72 100644 --- a/src/yaml.cpp +++ b/src/yaml.cpp @@ -1,568 +1,568 @@ -#include -#include -#include -#include -#include - -#include "Options.h" -#include "yaml.h" -#include "utils.h" - - -/* - * YAML file creation - * - * Code to create a new YAML file based on current COMPAS defaults and any user-input option values. - * See yaml.h for description of the YAML template. - * - * There is no doubt that some of the code here is not the most efficient way of doing this, but realistically - * this will be run once or twice every not very often - and it runs in a fraction of a second - so I'm not going - * to engage in premature optimisation... - */ - -namespace yaml { - - /* - * Read content from YAML template file - * - * Read YAML template from file passed in p_YAMLtemplateName. - * Replace content of default template 'yamlTemplate' declared in yaml.h if read ok. - * - * - * int ReadYAMLtemplate(const std::string p_YAMLtemplateName) - * - * @param [IN] p_YAMLtemplateName Filename to be read - should be fully qualified - * @return Integer result: - * -1 indicates IO error - * 0 indicates non-existent file - * 1 indicates file exists but contains no content - * 2 indicates contents read ok (and replace the default template declared in yaml.h) - */ - int ReadYAMLtemplate(const std::string p_YAMLtemplateName) { - int result = -1; // result - initially error - - if (utils::FileExists(p_YAMLtemplateName)) { // template file exists? - - std::ifstream yamlTemplateFile(p_YAMLtemplateName); // yes - open the file - if (yamlTemplateFile.is_open()) { // open ok? - - std::vector yamlTemplateContent; // yes - file content - - std::string rec; // record read from file - while (std::getline(yamlTemplateFile, rec)) { // for all records in file - get record from template file - yamlTemplateContent.push_back(rec); // add record to content vector - } - - result = 1; // template file read ok - no content - if (yamlTemplateContent.size() > 0) { // template file has content? - yamlTemplate = yamlTemplateContent; // yes - replace yamlTemplate content - result = 2; // template file read ok - content ok - } - } - } - else result = 0; // no - YAML template file does not exist - - return result; - } - - - /* - * Write YAML content to YAML file - * - * Writes YAML file content passed in p_YAMLcontent to file passed in p_YAMLname. - * Will prompt user for overwrite if file already exists. - * - * - * int WriteYAMLfile(const std::string p_YAMLname, const std::vector p_YAMLcontent) - * - * @param [IN] p_YAMLname Filename to be written - should be fully qualified - * @param [IN] p_YAMLcontent YAML content to be written - vector of strings - * @return Integer result: - * -1 indicates IO error - * 0 indicates file already exists - no overwrite - * 1 indicates success - file written (possibly overwritten) ok - */ - int WriteYAMLfile(const std::string p_YAMLname, const std::vector p_YAMLcontent) { - int result = -1; // result - initially error - - bool doWrite = true; // should write (overwrite)? - if (utils::FileExists(p_YAMLname)) { // file exists? - // yes - ask user whether to overwrite - std::string prompt = "YAML file '" + p_YAMLname + "' already exists - overwrite (Y/N)?"; // set prompt string for overwrite - std::string response = ""; // user response - - do { - std::cout << prompt << std::flush; // prompt use for input - std::string ch = ""; // user response character - std::string lastCh = ""; // last user response character (will always be newline) - size_t charsInput = 0; // number of characters input (including newline) - do { - lastCh = ch; // set last response character - ch = std::cin.get(); // get response character (one character at a time) - charsInput++; // count of characters input - } while (ch != "\n"); // while not newline - ch = charsInput == 2 ? lastCh : ""; // we want just 1 character + newline - character prior to newline - if (!ch.empty()) response = utils::ToLower(ch); // set user response - } while (response != "y" && response != "n"); // while not valid response - doWrite = response == "y"; // set write flag - } - - result = 0; // file not written (no overwrite) result - if (doWrite) { // should write? - result = 1; // yes - set file written result - std::ofstream yamlFile(p_YAMLname); // open the file - if (yamlFile.is_open()) { // open ok? - for (std::size_t i = 0; i < p_YAMLcontent.size(); i++) { // yes - for each record - if (!yamlFile.write(p_YAMLcontent[i].substr(3).c_str(), p_YAMLcontent[i].length() - 3)) { // remove the marker ("HDR" / "OPT") and write - result = false; // failed - set result ... - break; // ... and stop - } - } - } - else result = -1; // no - not open ok - set IO error - } - return result; - } - - - /* - * Construct YAML file content and write to file passed in p_YAMLfilename - * - * Constructs YAML file content based on YAML template read from file passed in - * p_YAMLtemplateName. If no filename passed in p_YAMLtemplateName, the default - * template from yaml.h is used. - * - * Constructed content is written to file passed in p_YAMLfilename. - * - * - * void MakeYAMLfile(const std::string p_YAMLfilename, const std::string p_YAMLtemplateName) - * - * @param [IN] p_YAMLfilename Filename to be written - should be fully qualified - * @param [IN] p_YAMLtemplateName Template filename to be read - should be fully qualified - */ - - void MakeYAMLfile(const std::string p_YAMLfilename, const std::string p_YAMLtemplateName) { - // following macro is for convenience and readability - undefined at end of function - // sets strings to be written to the new YAML file - #define SET_STRINGS(preamble, option, value, allowed, dfault, comment) { \ - yamlPreambleStrings.push_back(preamble); \ - yamlOptionStrings.push_back(option); \ - yamlValueStrings.push_back(value); \ - yamlAllowedStrings.push_back(allowed); \ - yamlDefaultStrings.push_back(dfault); \ - yamlCommentStrings.push_back(comment); } - - - std::vector yamlPreambleStrings; // new YAML file content - preamble strings - std::vector yamlOptionStrings; // new YAML file content - option name strings - std::vector yamlValueStrings; // new YAML file content - option value strings - std::vector yamlAllowedStrings; // new YAML file content - allowed values strings - std::vector yamlDefaultStrings; // new YAML file content - default values strings - std::vector yamlCommentStrings; // new YAML file content - comment strings - - - // process the option - // - format strings as required and populate the yaml vectors (declared above) - auto ProcessOption = [&] (const std::string p_OptionStr, // option name string - const std::string p_ValueStr, // option value string - const std::vector p_AllowedStr, // option allowed value strings - const std::string p_DefaultStr, // option default string - const std::string p_CommentStr, // comment string - const bool p_UserSpecified, // user specified option value? - const TYPENAME p_DataType, // short data type - const std::string p_TypeStr) { // detailed data type - - // format option value/default string - // fix floating point precision - // fix bool for python (0/true, 1/false -> True, False) - // add '' for string options if not already present - // not all data types need to be formatted - some just pass through - auto FormatString = [&] (const std::string p_Str, // string to be formatted - const TYPENAME p_shortType, // short data type - const std::string p_detailedType) { // detailed data type - std::stringstream ss; - switch (p_shortType) { - case TYPENAME::FLOAT : { float v = std::stof(p_Str); ss << std::fixed << std::setprecision(v < 100 ? 6 : 2) << v; } break; - case TYPENAME::DOUBLE : { double v = std::stod(p_Str); ss << std::fixed << std::setprecision(v < 100 ? 6 : 2) << v; } break; - case TYPENAME::LONGDOUBLE: { long double v = std::stold(p_Str); ss << std::fixed << std::setprecision(v < 100 ? 6 : 2) << v; } break; - case TYPENAME::BOOL : { std::string s = p_Str; s = utils::trim(s); ss << (s == "1" || utils::Equals(s, "true") ? "True" : "False"); } break; - case TYPENAME::STRING : { - bool vecType = (p_detailedType == "VECTOR"); // vector of strings? - size_t len = p_Str.length(); // str length - if (len == 0) { // empty str? - ss << (vecType ? "{ }" : "''"); // yes - just quotes/braces (for vector) - } - else { // no - str not empty - // add quotes if necessary - // the assumption here is that if the string already has opening and closing quotes - // then we're good - do nothing, but if it has only an opening quote or a closing quote, - // or neither, then we need to add both opening and closing quotes - // (same assumption for open and close brace for vector strings - if it has braces we leave it alone) - - if (!vecType) { // VECTOR ? - if (p_Str[0] != '\'' || p_Str[len - 1] != '\'') { ss << "'"; ss << p_Str; ss << "'"; } // no - add quotes if necessary - else ss << p_Str; // has quotes - just pass through - } - else { // yes - string vector - parse and format string - std::string str = p_Str; // string to be formatted - str = utils::trim(str); // trim whitespace both ends - if (str[0] != '{' || str[len - 1] != '}') { // has open and close brace? - ss << "{ "; // no - add open brace - size_t start = str[0] == '{' ? 1 : 0; // start position for find - size_t end = 0; // found position - bool first = true; // for comma placement - while ((end = p_Str.find(' ', start)) != std::string::npos) { // find space - std::string v = p_Str.substr(start, end - start); // got it - extract the substring - if (v.length() > 0) { // skip empty substring - if (!first) ss << ", "; // add comma if not first element - if (v[0] != '\'' || v[len - 1] != '\'') { ss << "'"; ss << v; ss << "'"; } // add quotes if necessary - else ss << v; // has quotes - just pass through - } - start = end + 1; // for next space - first = false; // not first element - } - std::string v = p_Str.substr(start, end - start); // extract (possible) last substring - if (v.length() > 0) { // anything there? - if (!first) ss << ", "; // yes - add comma if not first element (shouldn't be, but just in case...) - if (v[0] != '\'' || v[len - 1] != '\'') { ss << "'"; ss << v; ss << "'"; } // add quotes if necessary - else ss << v; // has quotes - just pass through - } - if (str[0] != '{' || str[len - 1] != '}') ss << " }"; // add close brace if necessary - } - else ss << p_Str; // has braces - just pass it through - } - } - } break; - default: ss << p_Str; // just pass it through - } - return ss.str(); // formatted string - }; - - std::string valueStr = FormatString(p_ValueStr, p_DataType, p_TypeStr); - std::string defaultStr = FormatString(p_DefaultStr, p_DataType, p_TypeStr); - - std::string preamble = p_UserSpecified ? " --" : "# --"; // preamble - all option records are commented, except options that are user specified - - if (p_AllowedStr.size() == 0) { // multiple option values? - SET_STRINGS(preamble, p_OptionStr, valueStr, "", defaultStr, p_CommentStr); // no - record for YAML file output - value set - } - else { // yes - multiple option values - // We list the allowed values in the order they are stored in the COMPASUnorderedMap - // in constants.h. We could instead list in alphabetical order, but the assumption - // is that the order in constants.h was deliberate, so we'll maintain it - if that's - // not true then we could just sort alphabetically here - std::string allowedValuesStr = "Options: ["; // records allowed option values - for (size_t idx = 0; idx < p_AllowedStr.size(); idx++) { // for each allowed value - allowedValuesStr += p_AllowedStr[idx]; // show allowed value - if (idx < p_AllowedStr.size() - 1) allowedValuesStr += ","; // add delimiter if necessary - } - allowedValuesStr += "]"; // close bracket - SET_STRINGS(preamble, p_OptionStr, valueStr, allowedValuesStr, defaultStr, p_CommentStr); // option record for YAML file output - } - }; - - - // begin MakeYAMLfile() body - - // get COMPAS option details - std::vector optionDetails = OPTIONS->CmdLineOptionsDetails(); - - if (optionDetails.empty()) { // have COMPAS option details? - std::cerr << "Unable to access COMPAS option details - no YAML file created.\n"; // no - announce error - } - else { // yes - have options - // process options/create YAML file - auto wallTime = std::chrono::system_clock::now(); // get wall time - std::time_t timeNow = std::chrono::system_clock::to_time_t(wallTime); // current time and date ... - std::string currentTime = std::string(std::ctime(&timeNow)); // ... as a string ... - currentTime = utils::trim(currentTime); // ... trimmed of whitespace (including newline etc.) - - // read YAML template file if supplied - - if (p_YAMLtemplateName.length() > 0) { // have YAML template filename? - int readResult = ReadYAMLtemplate(p_YAMLtemplateName); // yes - read YAML template file - std::string preamble = "*WARNING* File '" + p_YAMLtemplateName + "' "; // preamble for warnings - std::string warn = ""; // warning string - if (readResult < 0) warn += "not read: IO error. COMPAS default template will be used."; // IO error - else if (readResult == 0) warn += "not read: file does not exist. COMPAS default template will be used."; // file not found - else if (readResult == 1) warn += "is empty. COMPAS default template will be used."; // no content in file - if (warn.length() > 0) std::cout << preamble << warn << "\n"; // announce warning if necessary - } - - // add default records (file headers) - - SET_STRINGS("##~!!~## COMPAS option values", "", "", "", "", ""); // header record for YAML file output - - std::string s = "##~!!~## File Created " + currentTime + " by COMPAS v" + VERSION_STRING; // time and version stamp - if (s[23] == ' ') s[23] = '0'; // add leading zero for day if necessary - SET_STRINGS(s, "", "", "", "", ""); // time and version stamp record for YAML file output - - SET_STRINGS("##~!!~##", "", "", "", "", ""); // Blank header line - SET_STRINGS("##~!!~## The default COMPAS YAML file (``compasConfigDefault.yaml``), as distributed, has", "", "", "", "", ""); // Notice regarding commented line in default YAML // time and version stamp record for YAML file output - SET_STRINGS("##~!!~## all COMPAS option entries commented so that the COMPAS default value for the", "", "", "", "", ""); // Notice regarding commented line in default YAML // time and version stamp record for YAML file output - SET_STRINGS("##~!!~## option is used by default. To use a value other than the COMPAS default value,", "", "", "", "", ""); // Notice regarding commented line in default YAML // time and version stamp record for YAML file output - SET_STRINGS("##~!!~## users must uncomment the entry and change the option value to the desired value.", "", "", "", "", ""); // Notice regarding commented line in default YAML // time and version stamp record for YAML file output - - size_t numTemplateRecords = yamlTemplate.size(); // number of records in the YAML template - - // create YAML content - - if (numTemplateRecords == 0) { // have YAML template? - // no... - // we have no template - this should never happen (we've got a default template in the code, - // but we need to deal with that being missing just in case) - so we'll just write the COMPAS - // options alphabetically within the datatype categories (booleanChoices, numericalChoices, - // stringChoices, listChoices) - - std::cerr << "*WARNING* No YAML template - will write COMPAS options alphabetically.\n"; // announce warning - - // this is not pretty - we're going to iterate over the COMPAS options 4 times - once - // for each of the datatype categories mentioned above (see note about premature optimisation - // at the top of this file) - - std::vector categories { "booleanChoices", "numericalChoices", "stringChoices", "listChoices" }; // category names for headers - - for (size_t idx = 0; idx < categories.size(); idx++) { // for each category - - std::string category = categories[idx]; // which category? - SET_STRINGS("", "", "", "", "", ""); // blank record for YAML file output - SET_STRINGS(category + ":", "", "", "", "", ""); // category header for YAML file output - - for (size_t optionIdx = 0; optionIdx < optionDetails.size(); optionIdx++) { // for each COMPAS option - - if (optionDetails[optionIdx].dataType == TYPENAME::BOOL) { // boolean option? - if (category != "booleanChoices") continue; // skip if this category is not booleanChoices - } - else if (optionDetails[optionIdx].dataType == TYPENAME::STRING) { // string, or vector of strings, option? - if (optionDetails[optionIdx].typeStr == "VECTOR") { // ... vector of strings - if (category != "listChoices") continue; // skip if this category is not listChoices - } - else { // ... string - if (category != "stringChoices") continue; // skip if this category is not stringChoices - } - } - else { // assume numerical option - if (category != "numericalChoices") continue; // skip if this category is not numericalChoices - } - - // process the option - ProcessOption(optionDetails[optionIdx].optionStr, // option name string - optionDetails[optionIdx].valueStr, // option value string - optionDetails[optionIdx].allowedStr, // option allowed value strings - optionDetails[optionIdx].defaultStr, // option default string - "", // no comment - utils::Equals(optionDetails[optionIdx].sourceStr, "user_supplied"), // user specified option value? - optionDetails[optionIdx].dataType, // option (short) data type - optionDetails[optionIdx].typeStr); // option (detailed) data type - } - } - } - else { // yes - have YAML template - // use template to format YAML file - for (size_t rec = 0; rec < numTemplateRecords; rec++) { // for each template record - - std::string thisRec = yamlTemplate[rec]; // template record ... - thisRec = utils::trim(thisRec); // ... trimmed of whitespace - - // need to allow for commented options in template, especially since the template - // might be an existing YAML file. Since the template may have the hash character - // ("#") throughout, I'll refer to the hash at the start of the record (or as the - // first non-whitespace character) as the "leading hash" to differentiate it from - // other instances of the hash character in a template record - bool optRec = false; // option template record? - size_t startPos = 0; // where to start looking for non-leading hash - - if (thisRec.length() > 3) { // record long enough to be option record? - if (thisRec.substr(0, 2) == "--") { // yes - has leading "--"? - optRec = true; // yes - assume option record - } - else if (thisRec[0] == '#') { // no - not leading "--": leading hash? - optRec = false; // for now... - if (thisRec.length() > 4) { // enough characters to be option record? - std::string s = thisRec.substr(1); // yes... strip leading hash - s = utils::ltrim(s); // trim whitespace from start - if (s.length() > 2 && s.substr(0, 2) == "--") { // more than 2 characters, and option indicater? - optRec = true; // yes - looks like it might be an option record - startPos = 1; // skip over leading hash in later searches - } - } - } - } - - // parse template record - if (!optRec) { // option record? - if (yamlTemplate[rec].length() < 8 || yamlTemplate[rec].substr(0, 8) != "##~!!~##") { // no - skip COMPAS generated headers, and ... - SET_STRINGS(yamlTemplate[rec], "", "", "", "", ""); // ... output the record as is - } - } - else { // yes - option record - - // look for a comment on the option record and, if present, preserve it. - // I refer to the hash indication comment on the option record as the - // "comment hash" to differentiate it from all the other hashes that might - // be there... Because the template might be an existing YAML file, one or - // both of the (special) strings "# Default:" and "# Options:" may be present, - // and if so we just skip over them looking for any comment on the option record - - size_t hashStart = startPos; // where to start looking for the comment hash - size_t p; // position in string - if ((p = yamlTemplate[rec].find("# Default:", hashStart)) != std::string::npos) { // "# Default:" present? - if (p > hashStart) hashStart = p + 1; // yes - adjust starting position for comment hash search - } - - if ((p = yamlTemplate[rec].find("# Options:", hashStart)) != std::string::npos) { // "# Options:" present? - if (p > hashStart) hashStart = p + 1; // yes - adjust starting position for comment hash search - } - - std::string optionStr; // string to hold option name and value - std::string commentStr; // string to hold optional comment - size_t hashLoc = yamlTemplate[rec].find_first_of("#", hashStart); // find the comment if there is one - if (hashLoc == std::string::npos) { // found hash? - optionStr = yamlTemplate[rec].substr(startPos); // no - no comment present - option string is the record (from startPos) - commentStr = ""; // no comment - } - else { // yes - hash (comment present) - optionStr = yamlTemplate[rec].substr(startPos, hashLoc); // option string is the record up to hash - commentStr = yamlTemplate[rec].substr(hashLoc); // comment string (includes "#") - } - - optionStr = utils::trim(optionStr); // trim whitespace from both ends of option string - - // need to allow for option values in template, especially since the template might - // be an existing YAML file. Values in the template are not preserved - we only use - // the template to preserve header records, blank records, option groupings, and comments. - size_t colonLoc = optionStr.find_first_of(":"); // find the first colon if there is one - if (colonLoc != std::string::npos) { // found colon? - optionStr = optionStr.substr(0, colonLoc); // option string is everything prior to the ":"" - } - - // Find the value for the option (COMPAS value, not any value present in the template) - // - note: could be user supplied - size_t pos = optionStr.find_first_not_of("\t -"); // find option indicator - std::string templateOptionStr = optionStr.substr(pos); // strip "--" from template option string - - bool found = false; // matching COMPAS option string found? Not initially... - for (std::size_t optionIdx = 0; optionIdx < optionDetails.size(); optionIdx++) { // for each COMPAS option - - std::string compasOptionStr = optionDetails[optionIdx].optionStr; // COMPAS option name string - if (utils::Equals(optionDetails[optionIdx].sourceStr, "calculated")) continue; // ignore calculated options - if (utils::Equals(compasOptionStr, templateOptionStr)) { // match? - - found = true; // yes - ProcessOption(templateOptionStr, // option name string (as written in the YAML template) - optionDetails[optionIdx].valueStr, // option (COMPAS) value string - optionDetails[optionIdx].allowedStr, // option allowed value strings - optionDetails[optionIdx].defaultStr, // option default string - commentStr, // comment string (as written in the YAML template) - utils::Equals(optionDetails[optionIdx].sourceStr, "user_supplied"), // user specified option value? - optionDetails[optionIdx].dataType, // option (short) data type - optionDetails[optionIdx].typeStr); // option (detailed) data type - break; // we're done - } - } - - if (!found) { // matching COMPAS option string found? - std::cerr << "*WARNING* Option '" - << templateOptionStr - << "' in YAML template is not a valid COMPAS option - ignored.\n"; // no - announce warning - } - } - } - } - - // add any COMPAS options not in the YAML template - alphabetically at end - - bool extra = false; // extra records? Initially false - for (std::size_t optionIdx = 0; optionIdx < optionDetails.size(); optionIdx++) { // for each COMPAS option - - std::string compasOptionStr = optionDetails[optionIdx].optionStr; // option name string - - if (utils::Equals(optionDetails[optionIdx].sourceStr, "calculated")) continue; // ignore calculated options - if (utils::Equals(compasOptionStr, "help")) continue; // ignore 'help' option - if (utils::Equals(compasOptionStr, "version")) continue; // ignore 'version' option - if (utils::Equals(compasOptionStr, "create-YAML-file")) continue; // ignore 'create-yaml-file' option - if (utils::Equals(compasOptionStr, "YAML-template")) continue; // ignore 'YAML-template' option - - bool match = false; - for (size_t yamlIdx = 0; yamlIdx < yamlOptionStrings.size(); yamlIdx++) { // for each YAML option name - if (utils::Equals(compasOptionStr, yamlOptionStrings[yamlIdx])) { // match? - match = true; // yes - flag it - break; // no need to look further - } - } - - if (!match) { // COMPAS option in YAML options? - if (!extra) { // no - first extra record? - extra = true; // yes - flag it - SET_STRINGS("\n\n### Additional COMPAS options not found in YAML template ###", "", "", "", "", "");// header record for YAML file output - } - ProcessOption(compasOptionStr, // option name string (as written in the COMPAS OPTIONS class) - optionDetails[optionIdx].valueStr, // option value string - optionDetails[optionIdx].allowedStr, // option allowed value strings - optionDetails[optionIdx].defaultStr, // option default string - "", // no comment - utils::Equals(optionDetails[optionIdx].sourceStr, "user supplied"), // user specified option value? - optionDetails[optionIdx].dataType, // option (short) data type - optionDetails[optionIdx].typeStr); // option (detailed) data type - } - } - - // partially build new YAML file records - // for now, just any header or blank records, and preamble, option name, and option value - // for option records set maximum default str length and maximum allowed str length - std::vector yamlRecords; // new YAML file records - size_t maxOptionStrLen = 0; // maximum length of option strings (to locate default string) - size_t maxDefaultStrLen = 0; // maximum length of default strings (to locate allowed string) - size_t maxAllowedStrLen = 0; // maximum length of allowed strings (to locate comment string) - for (std::size_t yamlIdx = 0; yamlIdx < yamlPreambleStrings.size(); yamlIdx++) { // for each YAML option - if (yamlOptionStrings[yamlIdx].empty()) { // header or blank record? - yamlRecords.push_back("HDR" + yamlPreambleStrings[yamlIdx]); // yes - marker and just preamble - } - else { // no - not header or blank record - std::string s = "OPT" + yamlPreambleStrings[yamlIdx] + yamlOptionStrings[yamlIdx] + ": " + yamlValueStrings[yamlIdx]; // construct string including value - if (s.length() > maxOptionStrLen) maxOptionStrLen = s.length(); // get maximum length of YAML option strings - yamlRecords.push_back(s); // partial record for YAML file output - } - if (yamlDefaultStrings[yamlIdx].length() > maxDefaultStrLen) maxDefaultStrLen = yamlDefaultStrings[yamlIdx].length(); // maximum length of default strings - if (yamlAllowedStrings[yamlIdx].length() > maxAllowedStrLen) maxAllowedStrLen = yamlAllowedStrings[yamlIdx].length(); // maximum length of allowed strings - } - - // add default values, allowed values, and template comment as necessary - - size_t defaultPos = maxOptionStrLen + 2; // position of default string - size_t allowedPos = defaultPos + maxDefaultStrLen + 13; // position of allowed strings - size_t commentPos = allowedPos + maxAllowedStrLen + 4; // position of comment string - for (size_t idx = 0; idx < yamlRecords.size(); idx++) { // for each YAML record - std::string s = yamlRecords[idx]; // start with partially constructed record - - if (yamlRecords[idx].substr(0, 3) == "OPT") { // option record? - // yes - header and blank records skipped here - size_t len = s.length(); // current length of record - for (size_t pos = len; pos < defaultPos; pos++) s += " "; // pad with spaces up to option default field - s += "# Default: " + yamlDefaultStrings[idx]; // yes add default values string - - if (!yamlAllowedStrings[idx].empty()) { // have allowed values? - size_t len = s.length(); // yes - current length of record - for (size_t pos = len; pos < allowedPos; pos++) s += " "; // pad with spaces up to allowed strings field - s += "# " + yamlAllowedStrings[idx]; // yes add allowed values string - } - - if (!yamlCommentStrings[idx].empty()) { // have comment? - size_t len = s.length(); // yes - current length of record - for (size_t pos = len; pos < commentPos; pos++) s += " "; // pad with space ups to comment strings field - s += " " + yamlCommentStrings[idx]; // yes add comment string - } - } - yamlRecords[idx] = s + "\n"; // set YAML file record - } - - // write new YAML file - - int writeResult = WriteYAMLfile(p_YAMLfilename, yamlRecords); // write records to file - if (writeResult < 0) std::cerr << "*ERROR* File '" << p_YAMLfilename << "' not written: IO error.\n"; // announce IO error - else if (writeResult == 0) std::cout << "File '" << p_YAMLfilename << "' not written - file already exists.\n"; // announce already exists - else std::cout << "File '" << p_YAMLfilename << "' written.\n"; // announce success - } - } - #undef SET_STRINGS -} +#include +#include +#include +#include +#include + +#include "Options.h" +#include "yaml.h" +#include "utils.h" + + +/* + * YAML file creation + * + * Code to create a new YAML file based on current COMPAS defaults and any user-input option values. + * See yaml.h for description of the YAML template. + * + * There is no doubt that some of the code here is not the most efficient way of doing this, but realistically + * this will be run once or twice every not very often - and it runs in a fraction of a second - so I'm not going + * to engage in premature optimisation... + */ + +namespace yaml { + + /* + * Read content from YAML template file + * + * Read YAML template from file passed in p_YAMLtemplateName. + * Replace content of default template 'yamlTemplate' declared in yaml.h if read ok. + * + * + * int ReadYAMLtemplate(const std::string p_YAMLtemplateName) + * + * @param [IN] p_YAMLtemplateName Filename to be read - should be fully qualified + * @return Integer result: + * -1 indicates IO error + * 0 indicates non-existent file + * 1 indicates file exists but contains no content + * 2 indicates contents read ok (and replace the default template declared in yaml.h) + */ + int ReadYAMLtemplate(const std::string p_YAMLtemplateName) { + int result = -1; // result - initially error + + if (utils::FileExists(p_YAMLtemplateName)) { // template file exists? + + std::ifstream yamlTemplateFile(p_YAMLtemplateName); // yes - open the file + if (yamlTemplateFile.is_open()) { // open ok? + + std::vector yamlTemplateContent; // yes - file content + + std::string rec; // record read from file + while (std::getline(yamlTemplateFile, rec)) { // for all records in file - get record from template file + yamlTemplateContent.push_back(rec); // add record to content vector + } + + result = 1; // template file read ok - no content + if (yamlTemplateContent.size() > 0) { // template file has content? + yamlTemplate = yamlTemplateContent; // yes - replace yamlTemplate content + result = 2; // template file read ok - content ok + } + } + } + else result = 0; // no - YAML template file does not exist + + return result; + } + + + /* + * Write YAML content to YAML file + * + * Writes YAML file content passed in p_YAMLcontent to file passed in p_YAMLname. + * Will prompt user for overwrite if file already exists. + * + * + * int WriteYAMLfile(const std::string p_YAMLname, const std::vector p_YAMLcontent) + * + * @param [IN] p_YAMLname Filename to be written - should be fully qualified + * @param [IN] p_YAMLcontent YAML content to be written - vector of strings + * @return Integer result: + * -1 indicates IO error + * 0 indicates file already exists - no overwrite + * 1 indicates success - file written (possibly overwritten) ok + */ + int WriteYAMLfile(const std::string p_YAMLname, const std::vector p_YAMLcontent) { + int result = -1; // result - initially error + + bool doWrite = true; // should write (overwrite)? + if (utils::FileExists(p_YAMLname)) { // file exists? + // yes - ask user whether to overwrite + std::string prompt = "YAML file '" + p_YAMLname + "' already exists - overwrite (Y/N)?"; // set prompt string for overwrite + std::string response = ""; // user response + + do { + std::cout << prompt << std::flush; // prompt use for input + std::string ch = ""; // user response character + std::string lastCh = ""; // last user response character (will always be newline) + size_t charsInput = 0; // number of characters input (including newline) + do { + lastCh = ch; // set last response character + ch = std::cin.get(); // get response character (one character at a time) + charsInput++; // count of characters input + } while (ch != "\n"); // while not newline + ch = charsInput == 2 ? lastCh : ""; // we want just 1 character + newline - character prior to newline + if (!ch.empty()) response = utils::ToLower(ch); // set user response + } while (response != "y" && response != "n"); // while not valid response + doWrite = response == "y"; // set write flag + } + + result = 0; // file not written (no overwrite) result + if (doWrite) { // should write? + result = 1; // yes - set file written result + std::ofstream yamlFile(p_YAMLname); // open the file + if (yamlFile.is_open()) { // open ok? + for (std::size_t i = 0; i < p_YAMLcontent.size(); i++) { // yes - for each record + if (!yamlFile.write(p_YAMLcontent[i].substr(3).c_str(), p_YAMLcontent[i].length() - 3)) { // remove the marker ("HDR" / "OPT") and write + result = false; // failed - set result ... + break; // ... and stop + } + } + } + else result = -1; // no - not open ok - set IO error + } + return result; + } + + + /* + * Construct YAML file content and write to file passed in p_YAMLfilename + * + * Constructs YAML file content based on YAML template read from file passed in + * p_YAMLtemplateName. If no filename passed in p_YAMLtemplateName, the default + * template from yaml.h is used. + * + * Constructed content is written to file passed in p_YAMLfilename. + * + * + * void MakeYAMLfile(const std::string p_YAMLfilename, const std::string p_YAMLtemplateName) + * + * @param [IN] p_YAMLfilename Filename to be written - should be fully qualified + * @param [IN] p_YAMLtemplateName Template filename to be read - should be fully qualified + */ + + void MakeYAMLfile(const std::string p_YAMLfilename, const std::string p_YAMLtemplateName) { + // following macro is for convenience and readability - undefined at end of function + // sets strings to be written to the new YAML file + #define SET_STRINGS(preamble, option, value, allowed, dfault, comment) { \ + yamlPreambleStrings.push_back(preamble); \ + yamlOptionStrings.push_back(option); \ + yamlValueStrings.push_back(value); \ + yamlAllowedStrings.push_back(allowed); \ + yamlDefaultStrings.push_back(dfault); \ + yamlCommentStrings.push_back(comment); } + + + std::vector yamlPreambleStrings; // new YAML file content - preamble strings + std::vector yamlOptionStrings; // new YAML file content - option name strings + std::vector yamlValueStrings; // new YAML file content - option value strings + std::vector yamlAllowedStrings; // new YAML file content - allowed values strings + std::vector yamlDefaultStrings; // new YAML file content - default values strings + std::vector yamlCommentStrings; // new YAML file content - comment strings + + + // process the option + // - format strings as required and populate the yaml vectors (declared above) + auto ProcessOption = [&] (const std::string p_OptionStr, // option name string + const std::string p_ValueStr, // option value string + const std::vector p_AllowedStr, // option allowed value strings + const std::string p_DefaultStr, // option default string + const std::string p_CommentStr, // comment string + const bool p_UserSpecified, // user specified option value? + const TYPENAME p_DataType, // short data type + const std::string p_TypeStr) { // detailed data type + + // format option value/default string + // fix floating point precision + // fix bool for python (0/true, 1/false -> True, False) + // add '' for string options if not already present + // not all data types need to be formatted - some just pass through + auto FormatString = [&] (const std::string p_Str, // string to be formatted + const TYPENAME p_shortType, // short data type + const std::string p_detailedType) { // detailed data type + std::stringstream ss; + switch (p_shortType) { + case TYPENAME::FLOAT : { float v = std::stof(p_Str); ss << std::fixed << std::setprecision(v < 100 ? 6 : 2) << v; } break; + case TYPENAME::DOUBLE : { double v = std::stod(p_Str); ss << std::fixed << std::setprecision(v < 100 ? 6 : 2) << v; } break; + case TYPENAME::LONGDOUBLE: { long double v = std::stold(p_Str); ss << std::fixed << std::setprecision(v < 100 ? 6 : 2) << v; } break; + case TYPENAME::BOOL : { std::string s = p_Str; s = utils::trim(s); ss << (s == "1" || utils::Equals(s, "true") ? "True" : "False"); } break; + case TYPENAME::STRING : { + bool vecType = (p_detailedType == "VECTOR"); // vector of strings? + size_t len = p_Str.length(); // str length + if (len == 0) { // empty str? + ss << (vecType ? "{ }" : "''"); // yes - just quotes/braces (for vector) + } + else { // no - str not empty + // add quotes if necessary + // the assumption here is that if the string already has opening and closing quotes + // then we're good - do nothing, but if it has only an opening quote or a closing quote, + // or neither, then we need to add both opening and closing quotes + // (same assumption for open and close brace for vector strings - if it has braces we leave it alone) + + if (!vecType) { // VECTOR ? + if (p_Str[0] != '\'' || p_Str[len - 1] != '\'') { ss << "'"; ss << p_Str; ss << "'"; } // no - add quotes if necessary + else ss << p_Str; // has quotes - just pass through + } + else { // yes - string vector - parse and format string + std::string str = p_Str; // string to be formatted + str = utils::trim(str); // trim whitespace both ends + if (str[0] != '{' || str[len - 1] != '}') { // has open and close brace? + ss << "{ "; // no - add open brace + size_t start = str[0] == '{' ? 1 : 0; // start position for find + size_t end = 0; // found position + bool first = true; // for comma placement + while ((end = p_Str.find(' ', start)) != std::string::npos) { // find space + std::string v = p_Str.substr(start, end - start); // got it - extract the substring + if (v.length() > 0) { // skip empty substring + if (!first) ss << ", "; // add comma if not first element + if (v[0] != '\'' || v[len - 1] != '\'') { ss << "'"; ss << v; ss << "'"; } // add quotes if necessary + else ss << v; // has quotes - just pass through + } + start = end + 1; // for next space + first = false; // not first element + } + std::string v = p_Str.substr(start, end - start); // extract (possible) last substring + if (v.length() > 0) { // anything there? + if (!first) ss << ", "; // yes - add comma if not first element (shouldn't be, but just in case...) + if (v[0] != '\'' || v[len - 1] != '\'') { ss << "'"; ss << v; ss << "'"; } // add quotes if necessary + else ss << v; // has quotes - just pass through + } + if (str[0] != '{' || str[len - 1] != '}') ss << " }"; // add close brace if necessary + } + else ss << p_Str; // has braces - just pass it through + } + } + } break; + default: ss << p_Str; // just pass it through + } + return ss.str(); // formatted string + }; + + std::string valueStr = FormatString(p_ValueStr, p_DataType, p_TypeStr); + std::string defaultStr = FormatString(p_DefaultStr, p_DataType, p_TypeStr); + + std::string preamble = p_UserSpecified ? " --" : "# --"; // preamble - all option records are commented, except options that are user specified + + if (p_AllowedStr.size() == 0) { // multiple option values? + SET_STRINGS(preamble, p_OptionStr, valueStr, "", defaultStr, p_CommentStr); // no - record for YAML file output - value set + } + else { // yes - multiple option values + // We list the allowed values in the order they are stored in the COMPASUnorderedMap + // in constants.h. We could instead list in alphabetical order, but the assumption + // is that the order in constants.h was deliberate, so we'll maintain it - if that's + // not true then we could just sort alphabetically here + std::string allowedValuesStr = "Options: ["; // records allowed option values + for (size_t idx = 0; idx < p_AllowedStr.size(); idx++) { // for each allowed value + allowedValuesStr += p_AllowedStr[idx]; // show allowed value + if (idx < p_AllowedStr.size() - 1) allowedValuesStr += ","; // add delimiter if necessary + } + allowedValuesStr += "]"; // close bracket + SET_STRINGS(preamble, p_OptionStr, valueStr, allowedValuesStr, defaultStr, p_CommentStr); // option record for YAML file output + } + }; + + + // begin MakeYAMLfile() body + + // get COMPAS option details + std::vector optionDetails = OPTIONS->CmdLineOptionsDetails(); + + if (optionDetails.empty()) { // have COMPAS option details? + std::cerr << "Unable to access COMPAS option details - no YAML file created.\n"; // no - announce error + } + else { // yes - have options + // process options/create YAML file + auto wallTime = std::chrono::system_clock::now(); // get wall time + std::time_t timeNow = std::chrono::system_clock::to_time_t(wallTime); // current time and date ... + std::string currentTime = std::string(std::ctime(&timeNow)); // ... as a string ... + currentTime = utils::trim(currentTime); // ... trimmed of whitespace (including newline etc.) + + // read YAML template file if supplied + + if (p_YAMLtemplateName.length() > 0) { // have YAML template filename? + int readResult = ReadYAMLtemplate(p_YAMLtemplateName); // yes - read YAML template file + std::string preamble = "*WARNING* File '" + p_YAMLtemplateName + "' "; // preamble for warnings + std::string warn = ""; // warning string + if (readResult < 0) warn += "not read: IO error. COMPAS default template will be used."; // IO error + else if (readResult == 0) warn += "not read: file does not exist. COMPAS default template will be used."; // file not found + else if (readResult == 1) warn += "is empty. COMPAS default template will be used."; // no content in file + if (warn.length() > 0) std::cout << preamble << warn << "\n"; // announce warning if necessary + } + + // add default records (file headers) + + SET_STRINGS("##~!!~## COMPAS option values", "", "", "", "", ""); // header record for YAML file output + + std::string s = "##~!!~## File Created " + currentTime + " by COMPAS v" + VERSION_STRING; // time and version stamp + if (s[23] == ' ') s[23] = '0'; // add leading zero for day if necessary + SET_STRINGS(s, "", "", "", "", ""); // time and version stamp record for YAML file output + + SET_STRINGS("##~!!~##", "", "", "", "", ""); // Blank header line + SET_STRINGS("##~!!~## The default COMPAS YAML file (``compasConfigDefault.yaml``), as distributed, has", "", "", "", "", ""); // Notice regarding commented line in default YAML // time and version stamp record for YAML file output + SET_STRINGS("##~!!~## all COMPAS option entries commented so that the COMPAS default value for the", "", "", "", "", ""); // Notice regarding commented line in default YAML // time and version stamp record for YAML file output + SET_STRINGS("##~!!~## option is used by default. To use a value other than the COMPAS default value,", "", "", "", "", ""); // Notice regarding commented line in default YAML // time and version stamp record for YAML file output + SET_STRINGS("##~!!~## users must uncomment the entry and change the option value to the desired value.", "", "", "", "", ""); // Notice regarding commented line in default YAML // time and version stamp record for YAML file output + + size_t numTemplateRecords = yamlTemplate.size(); // number of records in the YAML template + + // create YAML content + + if (numTemplateRecords == 0) { // have YAML template? + // no... + // we have no template - this should never happen (we've got a default template in the code, + // but we need to deal with that being missing just in case) - so we'll just write the COMPAS + // options alphabetically within the datatype categories (booleanChoices, numericalChoices, + // stringChoices, listChoices) + + std::cerr << "*WARNING* No YAML template - will write COMPAS options alphabetically.\n"; // announce warning + + // this is not pretty - we're going to iterate over the COMPAS options 4 times - once + // for each of the datatype categories mentioned above (see note about premature optimisation + // at the top of this file) + + std::vector categories { "booleanChoices", "numericalChoices", "stringChoices", "listChoices" }; // category names for headers + + for (size_t idx = 0; idx < categories.size(); idx++) { // for each category + + std::string category = categories[idx]; // which category? + SET_STRINGS("", "", "", "", "", ""); // blank record for YAML file output + SET_STRINGS(category + ":", "", "", "", "", ""); // category header for YAML file output + + for (size_t optionIdx = 0; optionIdx < optionDetails.size(); optionIdx++) { // for each COMPAS option + + if (optionDetails[optionIdx].dataType == TYPENAME::BOOL) { // boolean option? + if (category != "booleanChoices") continue; // skip if this category is not booleanChoices + } + else if (optionDetails[optionIdx].dataType == TYPENAME::STRING) { // string, or vector of strings, option? + if (optionDetails[optionIdx].typeStr == "VECTOR") { // ... vector of strings + if (category != "listChoices") continue; // skip if this category is not listChoices + } + else { // ... string + if (category != "stringChoices") continue; // skip if this category is not stringChoices + } + } + else { // assume numerical option + if (category != "numericalChoices") continue; // skip if this category is not numericalChoices + } + + // process the option + ProcessOption(optionDetails[optionIdx].optionStr, // option name string + optionDetails[optionIdx].valueStr, // option value string + optionDetails[optionIdx].allowedStr, // option allowed value strings + optionDetails[optionIdx].defaultStr, // option default string + "", // no comment + utils::Equals(optionDetails[optionIdx].sourceStr, "user_supplied"), // user specified option value? + optionDetails[optionIdx].dataType, // option (short) data type + optionDetails[optionIdx].typeStr); // option (detailed) data type + } + } + } + else { // yes - have YAML template + // use template to format YAML file + for (size_t rec = 0; rec < numTemplateRecords; rec++) { // for each template record + + std::string thisRec = yamlTemplate[rec]; // template record ... + thisRec = utils::trim(thisRec); // ... trimmed of whitespace + + // need to allow for commented options in template, especially since the template + // might be an existing YAML file. Since the template may have the hash character + // ("#") throughout, I'll refer to the hash at the start of the record (or as the + // first non-whitespace character) as the "leading hash" to differentiate it from + // other instances of the hash character in a template record + bool optRec = false; // option template record? + size_t startPos = 0; // where to start looking for non-leading hash + + if (thisRec.length() > 3) { // record long enough to be option record? + if (thisRec.substr(0, 2) == "--") { // yes - has leading "--"? + optRec = true; // yes - assume option record + } + else if (thisRec[0] == '#') { // no - not leading "--": leading hash? + optRec = false; // for now... + if (thisRec.length() > 4) { // enough characters to be option record? + std::string s = thisRec.substr(1); // yes... strip leading hash + s = utils::ltrim(s); // trim whitespace from start + if (s.length() > 2 && s.substr(0, 2) == "--") { // more than 2 characters, and option indicater? + optRec = true; // yes - looks like it might be an option record + startPos = 1; // skip over leading hash in later searches + } + } + } + } + + // parse template record + if (!optRec) { // option record? + if (yamlTemplate[rec].length() < 8 || yamlTemplate[rec].substr(0, 8) != "##~!!~##") { // no - skip COMPAS generated headers, and ... + SET_STRINGS(yamlTemplate[rec], "", "", "", "", ""); // ... output the record as is + } + } + else { // yes - option record + + // look for a comment on the option record and, if present, preserve it. + // I refer to the hash indication comment on the option record as the + // "comment hash" to differentiate it from all the other hashes that might + // be there... Because the template might be an existing YAML file, one or + // both of the (special) strings "# Default:" and "# Options:" may be present, + // and if so we just skip over them looking for any comment on the option record + + size_t hashStart = startPos; // where to start looking for the comment hash + size_t p; // position in string + if ((p = yamlTemplate[rec].find("# Default:", hashStart)) != std::string::npos) { // "# Default:" present? + if (p > hashStart) hashStart = p + 1; // yes - adjust starting position for comment hash search + } + + if ((p = yamlTemplate[rec].find("# Options:", hashStart)) != std::string::npos) { // "# Options:" present? + if (p > hashStart) hashStart = p + 1; // yes - adjust starting position for comment hash search + } + + std::string optionStr; // string to hold option name and value + std::string commentStr; // string to hold optional comment + size_t hashLoc = yamlTemplate[rec].find_first_of("#", hashStart); // find the comment if there is one + if (hashLoc == std::string::npos) { // found hash? + optionStr = yamlTemplate[rec].substr(startPos); // no - no comment present - option string is the record (from startPos) + commentStr = ""; // no comment + } + else { // yes - hash (comment present) + optionStr = yamlTemplate[rec].substr(startPos, hashLoc); // option string is the record up to hash + commentStr = yamlTemplate[rec].substr(hashLoc); // comment string (includes "#") + } + + optionStr = utils::trim(optionStr); // trim whitespace from both ends of option string + + // need to allow for option values in template, especially since the template might + // be an existing YAML file. Values in the template are not preserved - we only use + // the template to preserve header records, blank records, option groupings, and comments. + size_t colonLoc = optionStr.find_first_of(":"); // find the first colon if there is one + if (colonLoc != std::string::npos) { // found colon? + optionStr = optionStr.substr(0, colonLoc); // option string is everything prior to the ":"" + } + + // Find the value for the option (COMPAS value, not any value present in the template) + // - note: could be user supplied + size_t pos = optionStr.find_first_not_of("\t -"); // find option indicator + std::string templateOptionStr = optionStr.substr(pos); // strip "--" from template option string + + bool found = false; // matching COMPAS option string found? Not initially... + for (std::size_t optionIdx = 0; optionIdx < optionDetails.size(); optionIdx++) { // for each COMPAS option + + std::string compasOptionStr = optionDetails[optionIdx].optionStr; // COMPAS option name string + if (utils::Equals(optionDetails[optionIdx].sourceStr, "calculated")) continue; // ignore calculated options + if (utils::Equals(compasOptionStr, templateOptionStr)) { // match? + + found = true; // yes + ProcessOption(templateOptionStr, // option name string (as written in the YAML template) + optionDetails[optionIdx].valueStr, // option (COMPAS) value string + optionDetails[optionIdx].allowedStr, // option allowed value strings + optionDetails[optionIdx].defaultStr, // option default string + commentStr, // comment string (as written in the YAML template) + utils::Equals(optionDetails[optionIdx].sourceStr, "user_supplied"), // user specified option value? + optionDetails[optionIdx].dataType, // option (short) data type + optionDetails[optionIdx].typeStr); // option (detailed) data type + break; // we're done + } + } + + if (!found) { // matching COMPAS option string found? + std::cerr << "*WARNING* Option '" + << templateOptionStr + << "' in YAML template is not a valid COMPAS option - ignored.\n"; // no - announce warning + } + } + } + } + + // add any COMPAS options not in the YAML template - alphabetically at end + + bool extra = false; // extra records? Initially false + for (std::size_t optionIdx = 0; optionIdx < optionDetails.size(); optionIdx++) { // for each COMPAS option + + std::string compasOptionStr = optionDetails[optionIdx].optionStr; // option name string + + if (utils::Equals(optionDetails[optionIdx].sourceStr, "calculated")) continue; // ignore calculated options + if (utils::Equals(compasOptionStr, "help")) continue; // ignore 'help' option + if (utils::Equals(compasOptionStr, "version")) continue; // ignore 'version' option + if (utils::Equals(compasOptionStr, "create-YAML-file")) continue; // ignore 'create-yaml-file' option + if (utils::Equals(compasOptionStr, "YAML-template")) continue; // ignore 'YAML-template' option + + bool match = false; + for (size_t yamlIdx = 0; yamlIdx < yamlOptionStrings.size(); yamlIdx++) { // for each YAML option name + if (utils::Equals(compasOptionStr, yamlOptionStrings[yamlIdx])) { // match? + match = true; // yes - flag it + break; // no need to look further + } + } + + if (!match) { // COMPAS option in YAML options? + if (!extra) { // no - first extra record? + extra = true; // yes - flag it + SET_STRINGS("\n\n### Additional COMPAS options not found in YAML template ###", "", "", "", "", "");// header record for YAML file output + } + ProcessOption(compasOptionStr, // option name string (as written in the COMPAS OPTIONS class) + optionDetails[optionIdx].valueStr, // option value string + optionDetails[optionIdx].allowedStr, // option allowed value strings + optionDetails[optionIdx].defaultStr, // option default string + "", // no comment + utils::Equals(optionDetails[optionIdx].sourceStr, "user supplied"), // user specified option value? + optionDetails[optionIdx].dataType, // option (short) data type + optionDetails[optionIdx].typeStr); // option (detailed) data type + } + } + + // partially build new YAML file records + // for now, just any header or blank records, and preamble, option name, and option value + // for option records set maximum default str length and maximum allowed str length + std::vector yamlRecords; // new YAML file records + size_t maxOptionStrLen = 0; // maximum length of option strings (to locate default string) + size_t maxDefaultStrLen = 0; // maximum length of default strings (to locate allowed string) + size_t maxAllowedStrLen = 0; // maximum length of allowed strings (to locate comment string) + for (std::size_t yamlIdx = 0; yamlIdx < yamlPreambleStrings.size(); yamlIdx++) { // for each YAML option + if (yamlOptionStrings[yamlIdx].empty()) { // header or blank record? + yamlRecords.push_back("HDR" + yamlPreambleStrings[yamlIdx]); // yes - marker and just preamble + } + else { // no - not header or blank record + std::string s = "OPT" + yamlPreambleStrings[yamlIdx] + yamlOptionStrings[yamlIdx] + ": " + yamlValueStrings[yamlIdx]; // construct string including value + if (s.length() > maxOptionStrLen) maxOptionStrLen = s.length(); // get maximum length of YAML option strings + yamlRecords.push_back(s); // partial record for YAML file output + } + if (yamlDefaultStrings[yamlIdx].length() > maxDefaultStrLen) maxDefaultStrLen = yamlDefaultStrings[yamlIdx].length(); // maximum length of default strings + if (yamlAllowedStrings[yamlIdx].length() > maxAllowedStrLen) maxAllowedStrLen = yamlAllowedStrings[yamlIdx].length(); // maximum length of allowed strings + } + + // add default values, allowed values, and template comment as necessary + + size_t defaultPos = maxOptionStrLen + 2; // position of default string + size_t allowedPos = defaultPos + maxDefaultStrLen + 13; // position of allowed strings + size_t commentPos = allowedPos + maxAllowedStrLen + 4; // position of comment string + for (size_t idx = 0; idx < yamlRecords.size(); idx++) { // for each YAML record + std::string s = yamlRecords[idx]; // start with partially constructed record + + if (yamlRecords[idx].substr(0, 3) == "OPT") { // option record? + // yes - header and blank records skipped here + size_t len = s.length(); // current length of record + for (size_t pos = len; pos < defaultPos; pos++) s += " "; // pad with spaces up to option default field + s += "# Default: " + yamlDefaultStrings[idx]; // yes add default values string + + if (!yamlAllowedStrings[idx].empty()) { // have allowed values? + size_t len = s.length(); // yes - current length of record + for (size_t pos = len; pos < allowedPos; pos++) s += " "; // pad with spaces up to allowed strings field + s += "# " + yamlAllowedStrings[idx]; // yes add allowed values string + } + + if (!yamlCommentStrings[idx].empty()) { // have comment? + size_t len = s.length(); // yes - current length of record + for (size_t pos = len; pos < commentPos; pos++) s += " "; // pad with space ups to comment strings field + s += " " + yamlCommentStrings[idx]; // yes add comment string + } + } + yamlRecords[idx] = s + "\n"; // set YAML file record + } + + // write new YAML file + + int writeResult = WriteYAMLfile(p_YAMLfilename, yamlRecords); // write records to file + if (writeResult < 0) std::cerr << "*ERROR* File '" << p_YAMLfilename << "' not written: IO error.\n"; // announce IO error + else if (writeResult == 0) std::cout << "File '" << p_YAMLfilename << "' not written - file already exists.\n"; // announce already exists + else std::cout << "File '" << p_YAMLfilename << "' written.\n"; // announce success + } + } + #undef SET_STRINGS +}