42 f_m[i][j][k] = lhs.
f_m[i][j][k];
49 (
const double Point[3],
double Value[1])
const {
59 if (i < 0 || j < 0 || k < 0) {
67 f_x[0][0] = (
f_m[i+1][j] [k] -
f_m[i][j] [k]) * dx +
f_m[i][j] [k];
68 f_x[1][0] = (
f_m[i+1][j+1][k] -
f_m[i][j+1][k]) * dx +
f_m[i][j+1][k];
69 f_x[0][1] = (
f_m[i+1][j] [k+1] -
f_m[i][j] [k+1]) * dx +
f_m[i][j] [k+1];
70 f_x[1][1] = (
f_m[i+1][j+1][k+1] -
f_m[i][j+1][k+1]) * dx +
f_m[i][j+1][k+1];
75 f_xy[0] = (f_x[1][0] - f_x[0][0])*dy + f_x[0][0];
76 f_xy[1] = (f_x[1][1] - f_x[0][1])*dy + f_x[0][1];
78 Value[0] = (f_xy[1] - f_xy[0])/
Interpolator3dGridTo1d is an abstraction for lookup on a 3D mesh to get a 1D value.
double *** function() const
Return a pointer to the function data.
ThreeDGrid * coordinates_m
ThreeDGrid holds grid information for a rectangular grid used in e.g.
int zSize() const
Get size of z data.
int xSize() const
Get size of x data.
double & x(const int &i)
Get ith coordinate in x.
double & z(const int &k)
Get ith coordinate in z.
double & y(const int &j)
Get ith coordinate in y.
void add(VectorMap *map)
Add *map to the maps_m list if it has not already been added.
int ySize() const
Get size of y data.
void lowerBound(const double &x, int &xIndex, const double &y, int &yIndex, const double &z, int &zIndex) const
Find the indices of the nearest point on the grid less than x, y, z.
TriLinearInterpolator performs a linear interpolation in x then y then z.
TriLinearInterpolator(ThreeDGrid *grid, double ***F)
Constructor for grids with constant spacing.