24 case LVCMPolicy::PYR3:
25 case LVCMPolicy::PYR24: {
29 double E_data_PYR3[2] = {3.94f, 4.84f};
30 double w_data_PYR3[3] = {0.074f, 0.126f, 0.118f};
31 double kcoeff_data_PYR3[4] = {-0.105f, 0.149f, 0.037f, -0.254f};
32 double lcoeff_data_PYR3[4] = {0.000f, 0.262f, 0.262f, 0.000f};
35 double E_data_PYR24[2] = {-0.4617f, 0.4617f};
36 double w_data_PYR24[24] = {0.0740f, 0.1273f, 0.1568f, 0.1347f, 0.3431f, 0.1157f, 0.3242f, 0.3621f,
37 0.2673f, 0.3052f, 0.0968f, 0.0589f, 0.0400f, 0.1726f, 0.2863f, 0.2484f,
38 0.1536f, 0.2105f, 0.0778f, 0.2294f, 0.1915f, 0.4000f, 0.3810f, 0.0936f};
39 double kcoeff_data_PYR24[46] = {-0.0964f, 0.1194f, 0.0470f, 0.2012f, 0.1594f, 0.0484f, 0.0308f, -0.0308f,
40 0.0782f, -0.0782f, 0.0261f, -0.0261f, 0.0717f, -0.0717f, 0.0780f, -0.0780f,
41 0.0560f, -0.0560f, 0.0625f, -0.0625f, 0.0188f, -0.0188f, 0.0112f, -0.0112f,
42 0.0069f, -0.0069f, 0.0265f, -0.0265f, 0.0433f, -0.0433f, 0.0361f, -0.0361f,
43 0.0210f, -0.0210f, 0.0281f, -0.0281f, 0.0102f, -0.0102f, 0.0284f, -0.0284f,
44 0.0196f, -0.0196f, 0.0306f, -0.0306f, 0.0269f, -0.0269f};
45 double lcoeff_data_PYR24[4] = {0.000f, 0.1825f, 0.1825f, 0.000f};
53 case LVCMPolicy::PYR3:
58 kcoeff_data = kcoeff_data_PYR3;
59 lcoeff_data = lcoeff_data_PYR3;
61 case LVCMPolicy::PYR24:
64 E_data = E_data_PYR24;
65 w_data = w_data_PYR24;
66 kcoeff_data = kcoeff_data_PYR24;
67 lcoeff_data = lcoeff_data_PYR24;
75 for (
int j = 0; j <
Dimension::N; ++j)
w[j] = w_data[j] / H_unit;
76 for (
int j = 0, ji = 0; j <
N_mode; ++j) {
77 for (
int i = 0; i <
Dimension::F; ++i, ++ji) {
kcoeff[ji] = (kcoeff_data[ji] / H_unit) * sqrt(
w[j]); }
81 lcoeff[j0ik] = (lcoeff_data[j0ik] / H_unit) * sqrt(
w[j]);
86 case LVCMPolicy::BUTA5: {
90 double E_data_BUTA5[2] = {9.41165f, 9.95575f};
91 double w_data_BUTA5[5] = {0.1089f, 0.1773f, 0.2578f, 0.3713f, 0.0912f};
92 double kcoeff_data_BUTA5[8] = {-0.0531f, -0.0594f, 0.0115f, 0.0100f,
93 -0.1628f, 0.3422f, -0.0403f, 0.0321f};
94 double lcoeff_data_BUTA5[4] = {0.000f, 0.2880f, 0.2880f, 0.000f};
102 E_data = E_data_BUTA5;
103 w_data = w_data_BUTA5;
104 kcoeff_data = kcoeff_data_BUTA5;
105 lcoeff_data = lcoeff_data_BUTA5;
111 for (
int j = 0; j <
Dimension::N; ++j)
w[j] = w_data[j] / H_unit;
112 for (
int j = 0, ji = 0; j <
N_mode; ++j) {
113 for (
int i = 0; i <
Dimension::F; ++i, ++ji) {
kcoeff[ji] = (kcoeff_data[ji] / H_unit) * sqrt(
w[j]); }
117 lcoeff[j0ik] = (lcoeff_data[j0ik] / H_unit) * sqrt(
w[j]);
122 case LVCMPolicy::CRC2:
123 case LVCMPolicy::CRC5: {
129 const double kappa1 = -0.0169f;
130 const double kappa3 = -0.0272f;
131 const double lambda1a = 0.0328f;
132 const double lambda1b = -0.0978f;
133 const double lambda2a = 0.0095f;
134 const double lambda2b = 0.1014f;
136 double E_data_CRC5[3] = {0.0424f, 0.0424f, 0.4344f};
137 double w_data_CRC5[5] = {0.0129f, 0.0129f, 0.0342f, 0.0561f, 0.0561f};
138 double kcoeff_data_CRC5[1] = {0.0f};
139 double lcoeff_data_CRC5[45] = {
141 0.0f, lambda1a, 0.0f,
142 lambda1a, 0.0f, lambda1b,
143 0.0f, lambda1b, 0.0f,
144 -lambda1a, 0.0f, lambda1b,
145 0.0f, lambda1a, 0.0f,
146 lambda1b, 0.0f, 0.0f,
150 -lambda2a, 0.0f, lambda2b,
151 0.0f, lambda2a, 0.0f,
152 lambda2b, 0.0f, 0.0f,
153 0.0f, lambda2a, 0.0f,
154 lambda2a, 0.0f, lambda2b,
158 double *E_data = E_data_CRC5;
159 double *w_data = w_data_CRC5;
160 double *kcoeff_data = kcoeff_data_CRC5;
161 double *lcoeff_data = lcoeff_data_CRC5;
167 for (
int j = 0; j <
Dimension::N; ++j)
w[j] = w_data[j] / H_unit;
168 for (
int j = 0, ji = 0; j <
N_mode; ++j) {
169 for (
int i = 0; i <
Dimension::F; ++i, ++ji) {
kcoeff[ji] = (kcoeff_data[ji] / H_unit) * sqrt(
w[j]); }
173 lcoeff[j0ik] = (lcoeff_data[j0ik] / H_unit) * sqrt(
w[j]);
178 case LVCMPolicy::CED2:
179 case LVCMPolicy::CED3: {
180 const double lightspeed = 137.03599907444f;
183 double E_data_CED2[2] = {-0.6738f, -0.2798f};
184 double mu_data_CED2[4] = {0.000f, +1.034f,
187 double E_data_CED3[3] = {-0.6738f, -0.2798f, -0.1547f};
188 double mu_data_CED3[9] = {0.000f, +1.034f, 0.000f,
189 +1.034f, 0.000f, -2.536f,
190 0.000f, -2.536f, 0.000f};
192 double Lcav = 2.362e5;
193 double Rcav = Lcav / 2;
198 case LVCMPolicy::CED2:
199 E_data = E_data_CED2;
200 mu_data = mu_data_CED2;
202 case LVCMPolicy::CED3:
203 E_data = E_data_CED3;
204 mu_data = mu_data_CED3;
217 lcoeff[jik] = sqrt(2.0f / (epsilon0 * Lcav)) * sin((2 * j + 1) *
phys::math::pi * Rcav / Lcav) *
223 case LVCMPolicy::PYR2CED: {
233 double E_data_PYR2[2] = {3.94f, 4.84f};
234 double w_data_PYR2[3] = {0.074f, 0.118f};
235 double kcoeff_data_PYR2[4] = {-0.105f, 0.149f};
236 double lcoeff_data_PYR2[4] = {0.000f, 0.262f, 0.262f, 0.000f};
238 double *E_data = E_data_PYR2;
239 double *w_data = w_data_PYR2;
240 double *kcoeff_data = kcoeff_data_PYR2;
241 double *lcoeff_data = lcoeff_data_PYR2;
249 Hsys[0 * 4 + 3] = gcoup;
250 Hsys[1 * 4 + 2] = gcoup;
251 Hsys[2 * 4 + 1] = gcoup;
252 Hsys[3 * 4 + 0] = gcoup;
253 for (
int j = 0; j <
Dimension::N; ++j)
w[j] = w_data[j] / H_unit;
254 for (
int j = 0, ji = 0; j <
N_mode; ++j) {
256 kcoeff[ji] = (kcoeff_data[j * 2 + i % 2] / H_unit) * sqrt(
w[j]);
263 lcoeff[j0ik] = (lcoeff_data[j0 * 4 + (i % 2) * 2 + k % 2] / H_unit) * sqrt(
w[j]);
272 case LVCMPolicy::BEN5: {
275 case LVCMPolicy::Read: {
276 std::string lvcm_readfile =
_param->get_string(
"lvcm_readfile",
LOC(),
"lvcm.dat");
277 std::ifstream ifs(lvcm_readfile);
278 std::string H_unit_str;
279 std::string firstline;
280 getline(ifs, firstline);
281 std::stringstream sstr(firstline);
289 ifs >> flag >> dsize;
291 if (ifs >> val)
Hsys[ii] = val / H_unit;
294 for (
int j = 0, ji = 0, j0ik = 0; j <
Dimension::N; ++j) {
295 ifs >> flag >> dsize;
297 if (ifs >> val)
w[j] = val / H_unit;
299 if (ifs >> val)
kcoeff[ji] = val / H_unit;
301 if (ifs >> val)
w[j] = val / H_unit;
303 if (ifs >> val)
lcoeff[j0ik] = val / H_unit;
308 ifs >> flag >> dsize;
310 if (ifs >> val)
Hsys[ii] = val / H_unit;
313 if (ifs >> val)
Hsys[i] = val / H_unit;
324 case LVCMPolicy::CRC2:
325 case LVCMPolicy::CRC5: {
326 double reqb[5] = {0.0f, 14.3514f, -9.9699f, -7.0189f, 0.0f};
327 double alpw[5] = {0.4501f, 0.4286f, 0.6204f, 0.4535f, 0.5539f};
329 x0[j] = reqb[j] / sqrt(
w[j]);
332 p_sigma[j] = 0.5f * sqrt(
w[j]) / alpw[j];