![]() |
Shamrock 2025.10.0
Astrophysical Code
|
Physical constants in a unit system, plus a few dimensionless numbers. More...
Go to the source code of this file.
Classes | |
| struct | shamunits::Constants< T > |
| Physical constants in a unit system. More... | |
Namespaces | |
| namespace | shamunits |
| namespace containing the units library | |
Variables | |
| template<class T> | |
| constexpr T | shamunits::pi = 3.141592653589793116 |
| Value of pi Usage : auto pi = shamunits::pi<T>;. | |
| template<class T> | |
| constexpr T | shamunits::fine_structure = 0.0072973525693 |
| Fine structure constant. | |
| template<class T> | |
| constexpr T | shamunits::proton_electron_ratio = 1836.1526734311 |
| Mass ration between the proton and electron. | |
| template<class T> | |
| constexpr T | shamunits::electron_proton_ratio = 1 / proton_electron_ratio<T> |
| Mass ration between the electron and proton. | |
Physical constants in a unit system, plus a few dimensionless numbers.
The constants themselves are the values of shamunits::constants (constant_table.hpp). Constants<T> is kept for backward compatibility: it is a thin wrapper around a UnitSystem, and Constants<T>{usys}.get<constants::G>() is the same as usys.get<constants::G>().
Definition in file Constants.hpp.