18 #ifndef DECL_FORMULARY_H 19 #define DECL_FORMULARY_H 25 valarray<T>
Gaussian(
const size_t N,
const T vmin,
const T vmax,
const T vth){
29 for (
size_t i(0); i < N; ++i) {
30 G[i] =
static_cast<T
>(i);
32 G *= (vmax-vmin)/(static_cast<T>(N-1));
36 T C(pow( 1.0/ (sqrt(2.0*M_PI)*vth), 3));
37 T al( (-0.5) / (vth*vth));
38 for (
size_t i(0); i < N; ++i) {
39 G[i] = exp( al * G[i]*G[i] );
55 units() : label(
"default"), d(0.0) {}
56 units(
string _x,
double _d) : label(_x), d(_d){}
75 units Units(
string key1,
string key2) {
return D[key1+
"_"+key2]; }
76 string Label(
string key) {
return D[key].label; }
77 string Label(
string key1,
string key2) {
return D[key1+
"_"+key2].label; }
78 double Uconv(
string key) {
return D[key].d; }
79 double Uconv(
string key1,
string key2) {
return D[key1+
"_"+key2].d; }
82 double LOGee(
double ne,
double Te);
83 double LOGee(
double ne,
string un,
double Te,
string uT);
84 double LOGei(
double ne,
double Te,
double Z);
85 double LOGei(
double ne,
string un,
double Te,
string uT,
double Z);
86 double LOGii(
double m1,
double Z1,
double n1,
double T1,
double m2,
double Z2,
double n2,
double T2);
89 double vth(
double Te);
90 double vth(
double Te,
string uT);
91 double Tau_e(
double ne,
double Te);
92 double Tau_e(
double ne,
string un,
double Te,
string uT);
93 double Tau_i(
double ne,
double Te,
double Zeta);
94 double MFP(
double ne,
double Te);
95 double MFP(
double ne,
string un,
double Te,
string uT);
110 static constexpr
double pi=3.141592653589793238;
112 static constexpr
double cL = 299792458;
113 static constexpr
double eps0=8.854187817e-12;
114 static constexpr
double qe = -1.60217662e-19;
115 static constexpr
double me = 9.10938356e-31;
116 static constexpr
double me_over_mp = 0.000544617024;
117 static constexpr
double keVnorm = 510.9989461;
119 static constexpr
double c = 2.99792458*1.0e+10;
120 static constexpr
double e = 4.80320425*1.0e-10;
121 static constexpr
double m = 9.10938215*1.0e-28;
126 static constexpr
double nmin = 1.0e-8;
units(const units &other)
units(string _x, double _d)