#include <EDepSimInterpolator.hh>
|
| Cubic () |
|
double | interpolate (const double *point, const std::vector< std::vector< std::vector< double >>> &g, const double *delta, const double *offset) const |
|
double | interpolate (double x, double y, double z, const std::vector< std::vector< std::vector< double >>> &g, double hx, double hy, double hz, double xo, double yo, double zo) const |
|
Definition at line 44 of file EDepSimInterpolator.hh.
EDepSim::Cubic::Cubic |
( |
| ) |
|
double EDepSim::Cubic::conv_kernel |
( |
double |
s | ) |
const |
|
private |
Definition at line 84 of file EDepSimInterpolator.cc.
90 v = 1 + (0.5) * z * z * (3 * z - 5);
92 else if(1 < z && z < 2)
93 v = 2 - z * (4 + 0.5 * z * (z - 5));
double EDepSim::Cubic::interpolate |
( |
const double * |
point, |
|
|
const std::vector< std::vector< std::vector< double >>> & |
g, |
|
|
const double * |
delta, |
|
|
const double * |
offset |
|
) |
| const |
Definition at line 38 of file EDepSimInterpolator.cc.
41 return interpolate(point[0], point[1], point[2], g, delta[0], delta[1], delta[2], offset[0], offset[1], offset[2]);
double interpolate(const double *point, const std::vector< std::vector< std::vector< double >>> &g, const double *delta, const double *offset) const
double EDepSim::Cubic::interpolate |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z, |
|
|
const std::vector< std::vector< std::vector< double >>> & |
g, |
|
|
double |
hx, |
|
|
double |
hy, |
|
|
double |
hz, |
|
|
double |
xo, |
|
|
double |
yo, |
|
|
double |
zo |
|
) |
| const |
Definition at line 44 of file EDepSimInterpolator.cc.
49 const int xsize = g.size();
50 const int ysize = g[0].size();
51 const int zsize = g[0][0].size();
53 const double xp = (
x - xo) /
hx;
54 const double yp = (
y - yo) /
hy;
55 const double zp = (
z - zo) /
hz;
57 const int x_idx = std::floor(xp);
58 const int y_idx = std::floor(yp);
59 const int z_idx = std::floor(zp);
61 for(
auto i : {x_idx - 1, x_idx, x_idx + 1, x_idx + 2})
63 for(
auto j : {y_idx - 1, y_idx, y_idx + 1, y_idx + 2})
65 for(
auto k : {z_idx - 1, z_idx, z_idx + 1, z_idx + 2})
67 if(i < 0 || j < 0 ||
k < 0)
70 if(i >= xsize || j >= ysize ||
k >= zsize)
76 v += g[i][j][
k] * x_c * y_c * z_c;
double conv_kernel(double s) const
The documentation for this class was generated from the following files: