![]() |
Shamrock 2025.10.0
Astrophysical Code
|
The table of physical constants: each constant is a Unit (its SI value and dimension). More...
#include "shamunits/Unit.hpp"#include "shamunits/details/registry.hpp"#include "shamunits/unit_table.hpp"#include <string_view>#include <array>Go to the source code of this file.
Namespaces | |
| namespace | shamunits |
| namespace containing the units library | |
Functions | |
| Unit | shamunits::constants::from_name (std::string_view name) |
| Constant from its name; throws std::invalid_argument if unknown. | |
The table of physical constants: each constant is a Unit (its SI value and dimension).
A constant is the same thing as a unit: usys.get<constants::G>() is G in the system usys. Derived constants are written from other constants, so their dimension is derived and checked rather than retyped. To add a constant: declare it below, then add one registry row; it then appears in Python with no binding edit. Combine with double literals only.
Definition in file constant_table.hpp.
|
inline |
Constant from its name; throws std::invalid_argument if unknown.
Definition at line 150 of file constant_table.hpp.
|
inlineconstexpr |
au
Definition at line 55 of file constant_table.hpp.
|
inlineconstexpr |
alias of astronomical_unit
Definition at line 56 of file constant_table.hpp.
|
inlineconstexpr |
speed of light
Definition at line 38 of file constant_table.hpp.
|
inlineconstexpr |
atomic mass unit
Definition at line 71 of file constant_table.hpp.
|
inlineconstexpr |
day
Definition at line 51 of file constant_table.hpp.
|
inlineconstexpr |
Cs hyperfine frequency.
Definition at line 37 of file constant_table.hpp.
|
inlineconstexpr |
elementary charge
Definition at line 40 of file constant_table.hpp.
|
inlineconstexpr |
Earth mass.
Definition at line 67 of file constant_table.hpp.
|
inlineconstexpr |
Earth equatorial radius.
Definition at line 60 of file constant_table.hpp.
|
inlineconstexpr |
electron mass, from the proton/electron mass ratio
Definition at line 66 of file constant_table.hpp.
|
inlineconstexpr |
vacuum permittivity
Definition at line 87 of file constant_table.hpp.
|
inlineconstexpr |
Definition at line 80 of file constant_table.hpp.
|
inlineconstexpr |
density of Guinness, 1.017 g.cm-3
Definition at line 75 of file constant_table.hpp.
|
inlineconstexpr |
Planck constant.
Definition at line 39 of file constant_table.hpp.
|
inlineconstexpr |
reduced Planck
Definition at line 82 of file constant_table.hpp.
|
inlineconstexpr |
hour
Definition at line 50 of file constant_table.hpp.
|
inlineconstexpr |
Jupiter mass.
Definition at line 68 of file constant_table.hpp.
|
inlineconstexpr |
Boltzmann constant.
Definition at line 41 of file constant_table.hpp.
|
inlineconstexpr |
Boltzmann constant
Definition at line 89 of file constant_table.hpp.
|
inlineconstexpr |
luminous efficacy
Definition at line 45 of file constant_table.hpp.
|
inlineconstexpr |
Coulomb constant.
Definition at line 88 of file constant_table.hpp.
|
inlineconstexpr |
light year
Definition at line 57 of file constant_table.hpp.
|
inlineconstexpr |
minute
Definition at line 49 of file constant_table.hpp.
|
inlineconstexpr |
vacuum permeability
Definition at line 83 of file constant_table.hpp.
|
inlineconstexpr |
Avogadro constant.
Definition at line 43 of file constant_table.hpp.
|
inlineconstexpr |
parsec
Definition at line 58 of file constant_table.hpp.
|
inlineconstexpr |
pi, as a plain number for building constants (same value as shamunits::pi<double>)
Definition at line 31 of file constant_table.hpp.
|
inlineconstexpr |
Planck length.
Definition at line 61 of file constant_table.hpp.
|
inlineconstexpr |
Planck mass.
Definition at line 70 of file constant_table.hpp.
|
inlineconstexpr |
proton mass
Definition at line 64 of file constant_table.hpp.
|
inlineconstexpr |
Name registry: one name per constant (long and short are the same). These are the Python method names (Constants(usys).G())
Definition at line 97 of file constant_table.hpp.
|
inlineconstexpr |
second
Definition at line 48 of file constant_table.hpp.
|
inlineconstexpr |
Stefan-Boltzmann constant.
Definition at line 92 of file constant_table.hpp.
|
inlineconstexpr |
solar mass
Definition at line 69 of file constant_table.hpp.
|
inlineconstexpr |
solar radius
Definition at line 59 of file constant_table.hpp.
|
inlineconstexpr |
Julian year.
Definition at line 52 of file constant_table.hpp.
|
inlineconstexpr |
vacuum impedance
Definition at line 86 of file constant_table.hpp.