.. _program_listing_file_src_utils_Constants.hpp: Program Listing for File Constants.hpp ====================================== |exhale_lsh| :ref:`Return to documentation for file ` (``src/utils/Constants.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef CONSTANTS_HPP #define CONSTANTS_HPP #include // NOLINT(misc-include-cleaner) namespace utils { // Physical constants, taken directly from GSL's cgs values // (gsl_const_cgsm.h) inline constexpr double c = GSL_CONST_CGSM_SPEED_OF_LIGHT; inline constexpr double h = GSL_CONST_CGSM_PLANCKS_CONSTANT_H; inline constexpr double Ryd = GSL_CONST_CGSM_RYDBERG; // NOLINT(readability-identifier-naming) -- capitalized to match standard astrophysical/physical notation (Ryd, G, Msun, Rsun, Lsun, Jy below), rather than the project's usual camelBack variable convention inline constexpr double G = GSL_CONST_CGSM_GRAVITATIONAL_CONSTANT; // NOLINT(readability-identifier-naming) -- see Ryd inline constexpr double pc = GSL_CONST_CGSM_PARSEC; inline constexpr double Angstrom = GSL_CONST_CGSM_ANGSTROM; // NOLINT(readability-identifier-naming) -- see Ryd inline constexpr double sigmaSB = GSL_CONST_CGSM_STEFAN_BOLTZMANN_CONSTANT; inline constexpr double kB = GSL_CONST_CGSM_BOLTZMANN; inline constexpr double eV = GSL_CONST_CGSM_ELECTRON_VOLT; inline constexpr double Msun = GSL_CONST_CGSM_SOLAR_MASS; // NOLINT(readability-identifier-naming) -- see Ryd inline constexpr double day = GSL_CONST_CGSM_DAY; // Constants and units GSL has no cgs value for inline constexpr double yr = 365.25 * day; inline constexpr double Rsun = 6.957e10; // NOLINT(readability-identifier-naming) -- see Ryd inline constexpr double Lsun = 3.828e33; // NOLINT(readability-identifier-naming) -- see Ryd inline constexpr double Jy = 1e-23; // NOLINT(readability-identifier-naming) -- see Ryd } // namespace utils #endif // CONSTANTS_HPP