28#ifndef _CLASSIC_FIELDS_INTERPOLATOR3DGRIDTO1D_H_
29#define _CLASSIC_FIELDS_INTERPOLATOR3DGRIDTO1D_H_
106 inline void setX(
int nCoords,
double* x);
112 inline void setY(
int nCoords,
double* y);
118 inline void setZ(
int nCoords,
double* z);
122 inline void setF(
double*** inF);
144 : coordinates_m(nullptr), f_m(nullptr) {
149 : coordinates_m(nullptr), f_m(nullptr) {
Interpolator3dGridTo1d is an abstraction for lookup on a 3D mesh to get a 1D value.
virtual void function(const Mesh::Iterator &point, double *value) const
Call function at a particular point in the mesh.
int getNumberOfXCoords() const
Number of x coordinates in the grid.
virtual void function(const double Point[3], double Value[1]) const =0
Get the interpolated function data.
double *** function() const
Return a pointer to the function data.
ThreeDGrid * coordinates_m
int getNumberOfYCoords() const
Number of y coordinates in the grid.
void clear()
Clear all private data.
void setZ(int nCoords, double *z)
Set z coordinates in the mesh to an arbitrary set of points.
virtual Interpolator3dGridTo1d * clone() const =0
Copy constructor.
Interpolator3dGridTo1d()
Default constructor - initialises data to nullptr.
ThreeDGrid * getMesh() const
Return a pointer to the mesh.
void deleteFunc(double ***func)
Delete any existing function data.
void setY(int nCoords, double *y)
Set y coordinates in the mesh to an arbitrary set of points.
void setF(double ***inF)
Set function data, deleting any existing function data.
virtual ~Interpolator3dGridTo1d()
Deletes F data and removes *this from ThreeDGrid smart pointer thing.
void setX(int nCoords, double *x)
Set x coordinates in the mesh to an arbitrary set of points.
unsigned int getValueDimension() const
Dimension of output values.
void setAll(ThreeDGrid *grid, double ***F)
Set function and mesh data.
unsigned int getPointDimension() const
Dimension of input points.
void setGrid(ThreeDGrid *grid)
Reset the mesh.
int getNumberOfZCoords() const
Number of z coordinates in the grid.
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.