Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
Constants.hpp
Go to the documentation of this file.
1
8
9#pragma once
10
11#include "math/Precision.hpp"
12
13#if __cplusplus >= 202002L || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L)
14#include <numbers>
15#endif
16
21namespace correlation::math {
22
24#if __cplusplus >= 202002L || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L)
25constexpr real_t PI = static_cast<real_t>(std::numbers::pi);
26#else
27constexpr real_t PI = static_cast<real_t>(
28 3.1415926535897932384626433832795028841971693993751058209749445923078164062);
29#endif
30
31constexpr real_t RAD_TO_DEG =
32 static_cast<real_t>(180.0) / PI;
33constexpr real_t DEG_TO_RAD =
34 PI / static_cast<real_t>(180.0);
35constexpr real_t THZ_TO_CMINV = static_cast<real_t>(33.35641);
36constexpr real_t THZ_TO_MEV = static_cast<real_t>(4.135667);
38 static_cast<real_t>(0.529177210903);
40 static_cast<real_t>(1.0) / BOHR_TO_ANGSTROM;
41constexpr real_t TWO_PI = static_cast<real_t>(2.0) * PI;
42constexpr real_t FOUR_PI = static_cast<real_t>(4.0) * PI;
43constexpr real_t KB_EV_PER_K = static_cast<real_t>(8.617333262e-5);
44constexpr real_t HBAR_EV_PS =
45 static_cast<real_t>(6.582119569e-4);
47 static_cast<real_t>(50.0);
48
49} // namespace correlation::math
Floating point precision type definitions for Correlation.
Defines universal mathematical and physical constants.
constexpr real_t KB_EV_PER_K
Boltzmann constant in eV/K.
Definition Constants.hpp:43
constexpr real_t PI
High-precision mathematical pi constant.
Definition Constants.hpp:27
constexpr real_t THZ_TO_MEV
Conversion factor: THz to meV.
Definition Constants.hpp:36
constexpr real_t TWO_PI
2 * PI
Definition Constants.hpp:41
constexpr real_t BOHR_TO_ANGSTROM
Conversion factor: Bohr to Angstroms.
Definition Constants.hpp:37
constexpr real_t MAX_CUTOFF_RADIUS
Maximum allowable cutoff radius in Angstroms.
Definition Constants.hpp:46
constexpr real_t ANGSTROM_TO_BOHR
Conversion factor: Angstroms to Bohr.
Definition Constants.hpp:39
constexpr real_t THZ_TO_CMINV
Conversion factor: THz to cm^-1.
Definition Constants.hpp:35
constexpr real_t RAD_TO_DEG
Conversion factor: Radians to Degrees.
Definition Constants.hpp:31
constexpr real_t HBAR_EV_PS
Reduced Planck constant in eV*ps.
Definition Constants.hpp:44
constexpr real_t DEG_TO_RAD
Conversion factor: Degrees to Radians.
Definition Constants.hpp:33
constexpr real_t FOUR_PI
4 * PI
Definition Constants.hpp:42
double real_t
Definition Precision.hpp:18