28#ifndef _CLASSIC_FIELDS_INTERPOLATOR3DGRIDTO3D_HH_
29#define _CLASSIC_FIELDS_INTERPOLATOR3DGRIDTO3D_HH_
71 double ***Bx,
double ***By,
double ***Bz,
136 inline void setX(
int nCoords,
double* x);
142 inline void setY(
int nCoords,
double* y);
148 inline void setZ(
int nCoords,
double* z);
210 double ***Bx,
double ***By,
double ***Bz,
212 : coordinates_m(nullptr) {
213 for (
int i = 0; i < 3; i++)
219 for (
int i = 0; i < 3; i++)
Interpolator3dGridTo1d is an abstraction for lookup on a 3D mesh to get a 1D value.
Interpolator3dGridTo3d interpolates from 3d grid to a 3d vector.
int getNumberOfXCoords() const
Number of x coordinates in the grid.
interpolationAlgorithm
Enumerator encoding possible interpolation routines.
void setX(int nCoords, double *x)
Set x coordinates in the mesh to an arbitrary set of points.
int getNumberOfZCoords() const
Number of z coordinates in the grid.
Interpolator3dGridTo1d * interpolator_m[3]
int getNumberOfYCoords() const
Number of y coordinates in the grid.
void function(const double Point[3], double Value[3]) const
Return the interpolated data.
void functionPrime(const double Point[3], double Value[3], int axis) const
Do not use (just raises exception) - der.
ThreeDGrid * coordinates_m
unsigned int getPointDimension() const
Dimension of input points.
void setAll(ThreeDGrid *grid, double ***Bx, double ***By, double ***Bz, interpolationAlgorithm algo=TRILINEAR)
Set function and mesh data.
void setY(int nCoords, double *y)
Set y coordinates in the mesh to an arbitrary set of points.
void clear()
Clear all private data.
ThreeDGrid * getMesh() const
Return a pointer to the mesh.
void setZ(int nCoords, double *z)
Set z coordinates in the mesh to an arbitrary set of points.
~Interpolator3dGridTo3d()
Delete member interpolators and remove *this from the mesh smart pointer.
unsigned int getValueDimension() const
Dimension of output values.
void setGrid(ThreeDGrid *grid)
Reset the mesh.
Interpolator3dGridTo3d(ThreeDGrid *grid, double ***Bx, double ***By, double ***Bz, interpolationAlgorithm algo=TRILINEAR)
Constructor for grids with constant spacing.
virtual void function(const Mesh::Iterator &point, double *value) const
Call function at a particular point in the mesh.
Interpolator3dGridTo3d * clone() const
Copy function (can be called on parent class)
Used to loop over some, or all, points in the mesh, as in stl Enables e.g.
ThreeDGrid holds grid information for a rectangular grid used in e.g.
void setY(int nYCoords, double *y)
Reset y grid points - note may need to set SetConstantSpacing()
void setZ(int nZCoords, double *z)
Reset z grid points - note may need to set SetConstantSpacing()
int zSize() const
Get size of z data.
void remove(VectorMap *map)
Remove *map from the maps_m list if it has not already been removed.
int xSize() const
Get size of x data.
void setX(int nXCoords, double *x)
Reset x grid points - note may need to set SetConstantSpacing()
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.
VectorMap is an abstract class that defines mapping from one vector to another.
virtual void function(const double *point, double *value) const =0
Pure virtual function to fill the array value with data evaluated at point.