16 if (e < 0.1270769021427449)
17 val = 12.2304 * pow(e, 1.16849);
18 else if (e < 0.4467079524674040)
19 val = 11.9279 * pow(e, 1.15635);
20 else if (e < 1.9402832534193788)
21 val = 0.0580578 + 11.833 * pow(e, 1.16187);
22 else if (e < 3.7292474570977285)
24 18.202 * e - 62.021814 - 4.85479 * exp(-2.72407e-11 * pow(e, 4.54886)) +
25 65.1272 * pow(e, -0.128012) * exp(-0.00369624 * pow(e, 1.18735)) -
26 4.75253 * pow(e, -1.18423);
28 val = 18.202 * e - 63.0218 - 4.85479 * exp(-2.72407e-11 * pow(e, 4.54886)) +
29 65.1272 * pow(e, -0.128012) * exp(-0.00369624 * pow(e, 1.18735));
30 return pow(val, 3. / 4.);
34 double e = pow(s, 4. / 3.) / 18.2, e0;
37 e = e0 - (
s95p_s(e0) -
s) / (6.608681233 * pow(e0, -0.25));
38 }
while (fabs(e - e0) > 1e-10);
43 ifstream fin(filename);
45 cout <<
"cannot open " << filename << endl;
49 double*
x =
new double[
NX];
50 double*
y =
new double[
NY];
52 for (
int ix = 0; ix <
NX; ix++)
e[ix] =
new double[NY];
54 for (
int ix = 0; ix <
NX; ix++)
55 for (
int iy = 0; iy <
NY; iy++) {
56 fin >> x[ix] >> y[iy] >>
e[ix][iy];
58 e[ix][iy] =
s95p_e(factor * e[ix][iy]);
60 e[ix][iy] = factor * e[ix][iy];
74 const int ix = (int)((x -
xmin) / dx);
75 const int iy = (int)((y -
ymin) /
dy);
76 if (ix < 0 || ix >
NX - 2 || iy < 0 || iy >
NY - 2)
return 0.0;
77 const double sx = x -
xmin - ix * dx;
78 const double sy = y -
ymin - iy *
dy;
79 double wx[2] = {(1. - sx / dx), sx / dx};
80 double wy[2] = {(1. - sy /
dy), sy / dy};
82 for (
int jx = 0; jx < 2; jx++)
83 for (
int jy = 0; jy < 2; jy++) {
84 result += wx[jx] * wy[jy] *
e[ix + jx][iy + jy];