This class interpolates tabulated data with a Bidimension function (either bicubic or bilinear). More...
#include <BidimensionalInterpolation.h>
Public Member Functions | |
BidimensionalInterpolation (const std::vector< Real > &x1, const std::vector< Real > &x2) | |
virtual | ~BidimensionalInterpolation ()=default |
virtual Real | sample (const Real x1, const Real x2) const =0 |
Samples value at point (x1, x2) More... | |
virtual ADReal | sample (const ADReal &x1, const ADReal &x2) const =0 |
virtual ChainedReal | sample (const ChainedReal &x1, const ChainedReal &x2) const =0 |
virtual Real | sampleDerivative (const Real, const Real, unsigned int) const |
Samples first derivative at point (x1, x2) More... | |
virtual ADReal | sampleDerivative (const ADReal &, const ADReal &, unsigned int) const |
virtual ChainedReal | sampleDerivative (const ChainedReal &, const ChainedReal &, unsigned int) const |
virtual Real | sample2ndDerivative (Real, Real, unsigned int) const |
Samples second derivative at point (x1, x2) More... | |
virtual void | sampleValueAndDerivatives (Real, Real, Real &, Real &, Real &) const |
Samples value and first derivatives at point (x1, x2) Use this function for speed when computing both value and derivatives, as it minimizes the amount of time spent locating the point in the tabulated data. More... | |
virtual void | sampleValueAndDerivatives (const ADReal &, const ADReal &, ADReal &, ADReal &, ADReal &) const |
virtual void | sampleValueAndDerivatives (const ChainedReal &, const ChainedReal &, ChainedReal &, ChainedReal &, ChainedReal &) const |
Public Attributes | |
std::vector< Real > | _x1 |
Independent values in the x1 direction. More... | |
std::vector< Real > | _x2 |
Independent values in the x2 direction. More... | |
This class interpolates tabulated data with a Bidimension function (either bicubic or bilinear).
In order to minimize the computational expense of each sample, the coefficients at each point in the tabulated data are computed once in advance, and then accessed during the interpolation.
Adapted from Numerical Recipes in C (section 3.6). The terminology used is consistent with that used in Numerical Recipes, where moving over a column corresponds to moving over the x1 coord. Likewise, moving over a row means moving over the x2 coord.
Definition at line 29 of file BidimensionalInterpolation.h.
BidimensionalInterpolation::BidimensionalInterpolation | ( | const std::vector< Real > & | x1, |
const std::vector< Real > & | x2 | ||
) |
Definition at line 12 of file BidimensionalInterpolation.C.
|
virtualdefault |
Samples value at point (x1, x2)
Implemented in BilinearInterpolation, and BicubicInterpolation.
|
pure virtual |
Implemented in BilinearInterpolation, and BicubicInterpolation.
|
pure virtual |
Implemented in BilinearInterpolation, and BicubicInterpolation.
|
inlinevirtual |
Samples second derivative at point (x1, x2)
Reimplemented in BicubicInterpolation.
Definition at line 73 of file BidimensionalInterpolation.h.
|
inlinevirtual |
Samples first derivative at point (x1, x2)
Reimplemented in BicubicInterpolation, and BilinearInterpolation.
Definition at line 52 of file BidimensionalInterpolation.h.
|
inlinevirtual |
Reimplemented in BilinearInterpolation.
Definition at line 57 of file BidimensionalInterpolation.h.
|
inlinevirtual |
Reimplemented in BilinearInterpolation.
Definition at line 62 of file BidimensionalInterpolation.h.
|
inlinevirtual |
Samples value and first derivatives at point (x1, x2) Use this function for speed when computing both value and derivatives, as it minimizes the amount of time spent locating the point in the tabulated data.
Reimplemented in BilinearInterpolation, and BicubicInterpolation.
Definition at line 84 of file BidimensionalInterpolation.h.
|
inlinevirtual |
Reimplemented in BicubicInterpolation.
Definition at line 90 of file BidimensionalInterpolation.h.
|
inlinevirtual |
Reimplemented in BicubicInterpolation.
Definition at line 99 of file BidimensionalInterpolation.h.
std::vector<Real> BidimensionalInterpolation::_x1 |
Independent values in the x1 direction.
Definition at line 37 of file BidimensionalInterpolation.h.
Referenced by BicubicInterpolation::BicubicInterpolation(), BicubicInterpolation::errorCheck(), BicubicInterpolation::precomputeCoefficients(), BicubicInterpolation::sample2ndDerivative(), BicubicInterpolation::sampleDerivative(), BilinearInterpolation::sampleDerivativeInternal(), BilinearInterpolation::sampleInternal(), BicubicInterpolation::sampleInternal(), BicubicInterpolation::sampleValueAndDerivativesInternal(), and BicubicInterpolation::tableDerivatives().
std::vector<Real> BidimensionalInterpolation::_x2 |
Independent values in the x2 direction.
Definition at line 39 of file BidimensionalInterpolation.h.
Referenced by BicubicInterpolation::BicubicInterpolation(), BicubicInterpolation::errorCheck(), BicubicInterpolation::precomputeCoefficients(), BicubicInterpolation::sample2ndDerivative(), BicubicInterpolation::sampleDerivative(), BilinearInterpolation::sampleDerivativeInternal(), BilinearInterpolation::sampleInternal(), BicubicInterpolation::sampleInternal(), BicubicInterpolation::sampleValueAndDerivativesInternal(), and BicubicInterpolation::tableDerivatives().