|
OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
|
#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 |
| double *** | function () const |
| virtual void | function (const double *point, double *value) const =0 |
| 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) |
| void | setAll (ThreeDGrid *grid, double ***F) |
| void | clear () |
| 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 |
Protected Attributes | |
| 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 82 of file TriLinearInterpolator.h.
| 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 85 of file TriLinearInterpolator.h.
|
inlinevirtualinherited |
Return true if point.size() is the same as this->PointDimension()
Definition at line 94 of file VectorMap.h.
|
inlinevirtualinherited |
Return true if value.size() is the same as this->ValueDimension()
Definition at line 98 of file VectorMap.h.
|
inlineinherited |
Clear all private data
Definition at line 194 of file Interpolator3dGridTo1d.h.
References interpolation::Interpolator3dGridTo1d::coordinates_m, interpolation::Interpolator3dGridTo1d::deleteFunc(), interpolation::Interpolator3dGridTo1d::f_m, and interpolation::ThreeDGrid::remove().
Referenced by interpolation::Interpolator3dGridTo1d::~Interpolator3dGridTo1d().

|
inlinevirtual |
Copy function (can be called on parent class)
Implements interpolation::Interpolator3dGridTo1d.
Definition at line 87 of file TriLinearInterpolator.h.
|
inherited |
Delete any existing function data
Definition at line 31 of file Interpolator3dGridTo1d.cpp.
References interpolation::Interpolator3dGridTo1d::getNumberOfXCoords(), and interpolation::Interpolator3dGridTo1d::getNumberOfYCoords().
Referenced by interpolation::Interpolator3dGridTo1d::clear(), and interpolation::Interpolator3dGridTo1d::setF().

|
inlineinherited |
Return a pointer to the function data
Definition at line 187 of file Interpolator3dGridTo1d.h.
References interpolation::Interpolator3dGridTo1d::f_m.
|
pure virtualinherited |
Pure virtual function to fill the array value with data evaluated at point.
Implemented in interpolation::PolynomialPatch.
Referenced by interpolation::Interpolator3dGridTo1d::function(), interpolation::Interpolator3dGridTo3d::function(), interpolation::PolynomialPatch::function(), function(), interpolation::VectorMap::function(), and interpolation::VectorMap::functionAppend().
|
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 47 of file TriLinearInterpolator.cpp.
References interpolation::Interpolator3dGridTo1d::coordinates_m, interpolation::Interpolator3dGridTo1d::f_m, interpolation::ThreeDGrid::lowerBound(), interpolation::ThreeDGrid::x(), interpolation::ThreeDGrid::xSize(), interpolation::ThreeDGrid::y(), interpolation::ThreeDGrid::ySize(), interpolation::ThreeDGrid::z(), and interpolation::ThreeDGrid::zSize().

|
inlinevirtual |
Call function at a particular point in the mesh
Reimplemented from interpolation::Interpolator3dGridTo1d.
Definition at line 74 of file TriLinearInterpolator.h.
References interpolation::VectorMap::function().

|
inlinevirtualinherited |
Calculate F, appending output values to value_vec.
For each item in point_vec not in value_vec, calculate value_vec (urgh)
Definition at line 109 of file VectorMap.h.
References interpolation::VectorMap::function(), and interpolation::VectorMap::getValueDimension().

|
inlinevirtualinherited |
Return a pointer to the mesh
Reimplemented from interpolation::VectorMap.
Definition at line 162 of file Interpolator3dGridTo1d.h.
References interpolation::Interpolator3dGridTo1d::coordinates_m.
|
inlineinherited |
Number of x coordinates in the grid
Definition at line 152 of file Interpolator3dGridTo1d.h.
References interpolation::Interpolator3dGridTo1d::coordinates_m, and interpolation::ThreeDGrid::xSize().
Referenced by interpolation::Interpolator3dGridTo1d::deleteFunc().

|
inlineinherited |
Number of y coordinates in the grid
Definition at line 154 of file Interpolator3dGridTo1d.h.
References interpolation::Interpolator3dGridTo1d::coordinates_m, and interpolation::ThreeDGrid::ySize().
Referenced by interpolation::Interpolator3dGridTo1d::deleteFunc().

|
inlineinherited |
Number of z coordinates in the grid
Definition at line 156 of file Interpolator3dGridTo1d.h.
References interpolation::Interpolator3dGridTo1d::coordinates_m, and interpolation::ThreeDGrid::zSize().

|
inlinevirtualinherited |
Dimension of input points
Implements interpolation::VectorMap.
Definition at line 158 of file Interpolator3dGridTo1d.h.
|
inlinevirtualinherited |
Dimension of output values
Implements interpolation::VectorMap.
Definition at line 160 of file Interpolator3dGridTo1d.h.
|
inlineinherited |
Set function and mesh data
Definition at line 189 of file Interpolator3dGridTo1d.h.
References interpolation::Interpolator3dGridTo1d::setF(), and interpolation::Interpolator3dGridTo1d::setGrid().
Referenced by interpolation::Interpolator3dGridTo1d::Interpolator3dGridTo1d().

|
inlineinherited |
Set function data, deleting any existing function data
Definition at line 164 of file Interpolator3dGridTo1d.h.
References interpolation::Interpolator3dGridTo1d::deleteFunc(), and interpolation::Interpolator3dGridTo1d::f_m.
Referenced by interpolation::Interpolator3dGridTo1d::setAll().

|
inlineinherited |
Reset the mesh
Removes reference to this from mesh smart pointer if appropriate
Definition at line 169 of file Interpolator3dGridTo1d.h.
References interpolation::ThreeDGrid::add(), interpolation::Interpolator3dGridTo1d::coordinates_m, and interpolation::ThreeDGrid::remove().
Referenced by interpolation::Interpolator3dGridTo1d::setAll().

|
inlineinherited |
Set x coordinates in the mesh to an arbitrary set of points
If mesh is nullptr, does nothing
Definition at line 175 of file Interpolator3dGridTo1d.h.
References interpolation::Interpolator3dGridTo1d::coordinates_m, and interpolation::ThreeDGrid::setX().

|
inlineinherited |
Set y coordinates in the mesh to an arbitrary set of points
If mesh is nullptr, does nothing
Definition at line 179 of file Interpolator3dGridTo1d.h.
References interpolation::Interpolator3dGridTo1d::coordinates_m, and interpolation::ThreeDGrid::setY().

|
inlineinherited |
Set z coordinates in the mesh to an arbitrary set of points
If mesh is nullptr, does nothing
Definition at line 183 of file Interpolator3dGridTo1d.h.
References interpolation::Interpolator3dGridTo1d::coordinates_m, and interpolation::ThreeDGrid::setZ().

|
protectedinherited |
Definition at line 139 of file Interpolator3dGridTo1d.h.
Referenced by interpolation::Interpolator3dGridTo1d::clear(), function(), interpolation::Interpolator3dGridTo1d::getMesh(), interpolation::Interpolator3dGridTo1d::getNumberOfXCoords(), interpolation::Interpolator3dGridTo1d::getNumberOfYCoords(), interpolation::Interpolator3dGridTo1d::getNumberOfZCoords(), interpolation::Interpolator3dGridTo1d::setGrid(), interpolation::Interpolator3dGridTo1d::setX(), interpolation::Interpolator3dGridTo1d::setY(), interpolation::Interpolator3dGridTo1d::setZ(), and TriLinearInterpolator().
|
protectedinherited |
Definition at line 140 of file Interpolator3dGridTo1d.h.
Referenced by interpolation::Interpolator3dGridTo1d::clear(), interpolation::Interpolator3dGridTo1d::function(), function(), interpolation::Interpolator3dGridTo1d::setF(), and TriLinearInterpolator().