TBCI Numerical high perf. C++ Library 2.8.0
constants.h
Go to the documentation of this file.
1
4
5//-------------------------------------------------------------
6// a.m.b., dec 96
7// last update dec 97
8// $Id: constants.h,v 1.8.2.6 2006/03/06 15:27:00 garloff Exp $
9//-------------------------------------------------------------
10
11
12#ifndef TBCI_CONSTANTS_H
13#define TBCI_CONSTANTS_H
14
15#ifndef ALIGN
16# if defined(__GNUC__) && !defined(_DOXYGEN)
17# define ALIGN(x) __attribute__ ((aligned(x)))
18# else
19# define ALIGN(x)
20# endif
21#endif
22
23#define HUGEVAL 1E38
24#define MINVAL 1E-38
25
26/* This is a bit of a hack:
27 * We want that this header is also useable under plain C,
28 * so we can't include basics.h.
29 * If we are under C++ and basics.h has already been included,
30 * we do use the TBCI namespace though to avoid conflicts
31 */
32#if defined(__cplusplus) && defined(NAMESPACE_TBCI)
34#endif
35
36const long double Pi ALIGN(8) = 3.1415926535897932384626433832795028841968;
38const double pi ALIGN(8) = Pi;
39#ifndef PI
40 const double PI ALIGN(8) = Pi;
41#endif
42
44const double pi2 = pi * 2.0;
45
47const double c_0 ALIGN(8) = 299792458; // speed of light in vacuo [m/s]
48
50const double e_0 ALIGN(8) = 1.602189e-19; // minus charge of electron [As]
51
53const double m_e ALIGN(8) = 9.10953e-31; // rest mass of electron [kg]
54
56const double epsilon_0 ALIGN(8) = 8.85418781762039e-12; // dielectricity of vacuum [As/Vm]
57
59const double mu_0 ALIGN(8) = 4*pi*1.0e-7; // permeability of vacuum [Vs/Am]
60
62const double Z_0 ALIGN(8) = 376.73031346177; // waveimpedance in vacuum [Ohm]
63
65const double k_B ALIGN(8) = 1.38066e-23; // Boltzmann constant [J/K]
66
68const long double LN_2 ALIGN(8) = .6931471805599453094172321214581765680755;
69
71const double E1 ALIGN(8) = 2.718281828459045235360287471352662498;
72
74const double amu ALIGN(8) = 1.66055e-27; // unified atomic mass unit [kg]
75
77const double Ar_mass ALIGN(8) = 39.948*amu; // Ar atomic mass [kg]
78
80const double Planck = 6.626176e-34; // Planck constant [Js]
81
83const double Planck_bar = Planck/(2*pi);
84
86const double Avogadro = 6.02205e+23; // Avogadro/Loschmidt [1/mol]
87
89const double Grav = 6.673e-11; // Gravitational constant [Nm2/kg2]
90
92const long double SQRT2 ALIGN(8) = 1.41421356237309504880168872420969807857;
93
94#if defined(__cplusplus) && defined(NAMESPACE_TBCI)
96#endif
97
98#endif /* TBCI_CONSTANTS_H */
#define NAMESPACE_END
Definition basics.h:323
#define NAMESPACE_TBCI
Definition basics.h:317
const long double Pi
Definition constants.h:36
const double amu
[kg]. Atomic mass unit. (1/12 of the mass of 12C)
Definition constants.h:74
const double Grav
[N/kg^2]. Gravitational constant.
Definition constants.h:89
const double c_0
[m/s]. Speed of light (vacuum).
Definition constants.h:47
const double pi2
Definition constants.h:44
const double Avogadro
[1/mol]. Number of particles in a mol.
Definition constants.h:86
const double Planck
[Js]. Planck's constant.
Definition constants.h:80
const double E1
. Exponential base.
Definition constants.h:71
const long double LN_2
. Natural logarithm of 2.
Definition constants.h:68
const double pi
Definition constants.h:38
const double k_B
[J/K]. Boltzmann constant.
Definition constants.h:65
const double e_0
[As]. Elementary charge.
Definition constants.h:50
const double mu_0
[Vs/Am]. Permeability of vacuum.
Definition constants.h:59
const double Z_0
[ ] Waveimpedance of vacuum.
Definition constants.h:62
const double Ar_mass
[kg]. Rest mass of an Argon atom.
Definition constants.h:77
const double Planck_bar
[Js]. Planck's bar constant.
Definition constants.h:83
const double epsilon_0
[AS/Vm]. Dielectricity of vacuum.
Definition constants.h:56
const double PI
Definition constants.h:40
#define ALIGN(x)
Definition constants.h:19
const long double SQRT2
. Square root of 2.
Definition constants.h:92
const double m_e
[kg]. Rest mass of an electron.
Definition constants.h:53