|
OPAL (Object Oriented Parallel Accelerator Library)
2024.1
OPAL
|
#include <TriLinearInterpolator.h>


Public Member Functions | |
| TriLinearInterpolator (ThreeDGrid *grid, double ***F) | |
| TriLinearInterpolator (const TriLinearInterpolator &tli) | |
| ~TriLinearInterpolator () | |
| void | function (const double Point[3], double Value[1]) const |
| virtual void | function (const Mesh::Iterator &point, double *value) const |
| TriLinearInterpolator * | clone () const |
Public Member Functions inherited from interpolation::Interpolator3dGridTo1d | |
| Interpolator3dGridTo1d (ThreeDGrid *grid, double ***F) | |
| Interpolator3dGridTo1d () | |
| virtual | ~Interpolator3dGridTo1d () |
| int | getNumberOfXCoords () const |
| int | getNumberOfYCoords () const |
| int | getNumberOfZCoords () const |
| unsigned int | getPointDimension () const |
| unsigned int | getValueDimension () const |
| ThreeDGrid * | getMesh () const |
| void | setGrid (ThreeDGrid *grid) |
| void | setX (int nCoords, double *x) |
| void | setY (int nCoords, double *y) |
| void | setZ (int nCoords, double *z) |
| void | setF (double ***inF) |
| void | deleteFunc (double ***func) |
| double *** | function () const |
| void | setAll (ThreeDGrid *grid, double ***F) |
| void | clear () |
Public Member Functions inherited from interpolation::VectorMap | |
| virtual void | function (const double *point, double *value) const =0 |
| virtual void | functionAppend (const std::vector< std::vector< double > > &point_vec, std::vector< std::vector< double > > &value_vec) const |
| virtual bool | checkPoint (const std::vector< double > &point) const |
| virtual bool | checkValue (const std::vector< double > &value) const |
| virtual | ~VectorMap () |
Additional Inherited Members | |
Protected Attributes inherited from interpolation::Interpolator3dGridTo1d | |
| ThreeDGrid * | coordinates_m |
| double *** | f_m |
TriLinearInterpolator performs a linear interpolation in x then y then z
Performs a linear interpolation in x then y then z returning a 1D value.
Definition at line 38 of file TriLinearInterpolator.h.
|
inline |
Constructor for grids with constant spacing
| grid | 3d mesh on which data is stored - adds a reference to *this into the mesh smart pointer thing. |
| F | function data with points on each element of the grid. Indexing goes like [index_x][index_y][index_z]. Interpolator3dGridTo1d now owns this memory All the data handling is done at Interpolator3dGridTo1d |
Definition at line 83 of file TriLinearInterpolator.h.
Referenced by clone().
| interpolation::TriLinearInterpolator::TriLinearInterpolator | ( | const TriLinearInterpolator & | tli | ) |
Copy constructor
Deep copies the mesh and the function data
Definition at line 32 of file TriLinearInterpolator.cpp.
References interpolation::ThreeDGrid::add(), interpolation::Interpolator3dGridTo1d::coordinates_m, interpolation::Interpolator3dGridTo1d::f_m, interpolation::ThreeDGrid::xSize(), interpolation::ThreeDGrid::ySize(), and interpolation::ThreeDGrid::zSize().

|
inline |
Destructor - removes reference from the mesh and from the function data
Definition at line 87 of file TriLinearInterpolator.h.
|
inlinevirtual |
Copy function (can be called on parent class)
Implements interpolation::Interpolator3dGridTo1d.
Definition at line 90 of file TriLinearInterpolator.h.
References TriLinearInterpolator().

|
virtual |
Get the interpolated value of the function at some point
First does bound checking, then makes linear interpolations using the standard 1d interpolation formula
\(y(x) \approx \frac{\Delta y}{\Delta x} dx + y_0\)
\(y(x) \approx \frac{y_1(x_1)-y_0(x_0)}{dx}(x-x_0) + y_0\)
Interpolate along 4 x grid lines to make a 2D problem, then interpolate along 2 y grid lines to make a 1D problem, then finally interpolate in z to get the value.
Implements interpolation::Interpolator3dGridTo1d.
Definition at line 49 of file TriLinearInterpolator.cpp.
|
inlinevirtual |
Call function at a particular point in the mesh
Reimplemented from interpolation::Interpolator3dGridTo1d.
Definition at line 75 of file TriLinearInterpolator.h.
References interpolation::VectorMap::function().

1.8.5