#include <SplineInterpolationBase.h>
Public Member Functions | |
SplineInterpolationBase () | |
virtual | ~SplineInterpolationBase ()=default |
Real | sample (const std::vector< Real > &x, const std::vector< Real > &y, const std::vector< Real > &y2, Real x_int) const |
ADReal | sample (const std::vector< Real > &x, const std::vector< Real > &y, const std::vector< Real > &y2, const ADReal &x_int) const |
Real | sampleDerivative (const std::vector< Real > &x, const std::vector< Real > &y, const std::vector< Real > &y2, Real x_int) const |
Real | sample2ndDerivative (const std::vector< Real > &x, const std::vector< Real > &y, const std::vector< Real > &y2, Real x_int) const |
Protected Member Functions | |
void | spline (const std::vector< Real > &x, const std::vector< Real > &y, std::vector< Real > &y2, Real yp1=_deriv_bound, Real ypn=_deriv_bound) |
This function calculates the second derivatives based on supplied x and y-vectors. More... | |
void | findInterval (const std::vector< Real > &x, Real x_int, unsigned int &klo, unsigned int &khi) const |
template<typename T > | |
void | computeCoeffs (const std::vector< Real > &x, unsigned int klo, unsigned int khi, const T &x_int, Real &h, T &a, T &b) const |
template<typename T > | |
T | sample (const std::vector< Real > &x, const std::vector< Real > &y, const std::vector< Real > &y2, const T &x_int, unsigned int klo, unsigned int khi) const |
Sample value at point x_int given the indices of the vector of dependent values that bound the point. More... | |
Static Protected Attributes | |
static const Real | _deriv_bound = std::numeric_limits<Real>::max() |
Definition at line 15 of file SplineInterpolationBase.h.
SplineInterpolationBase::SplineInterpolationBase | ( | ) |
Definition at line 16 of file SplineInterpolationBase.C.
|
virtualdefault |
|
protected |
Definition at line 85 of file SplineInterpolationBase.C.
Referenced by sample(), sample2ndDerivative(), and sampleDerivative().
|
protected |
Definition at line 65 of file SplineInterpolationBase.C.
Referenced by BicubicSplineInterpolation::constructColumnSpline(), BicubicSplineInterpolation::constructRowSpline(), sample(), sample2ndDerivative(), and sampleDerivative().
Real SplineInterpolationBase::sample | ( | const std::vector< Real > & | x, |
const std::vector< Real > & | y, | ||
const std::vector< Real > & | y2, | ||
Real | x_int | ||
) | const |
Definition at line 101 of file SplineInterpolationBase.C.
Referenced by BicubicSplineInterpolation::constructColumnSpline(), BicubicSplineInterpolation::constructRowSpline(), sample(), SplineInterpolation::sample(), BicubicSplineInterpolation::sample(), and BicubicSplineInterpolation::sampleValueAndDerivatives().
ADReal SplineInterpolationBase::sample | ( | const std::vector< Real > & | x, |
const std::vector< Real > & | y, | ||
const std::vector< Real > & | y2, | ||
const ADReal & | x_int | ||
) | const |
Definition at line 113 of file SplineInterpolationBase.C.
|
protected |
Sample value at point x_int given the indices of the vector of dependent values that bound the point.
This method is useful in bicubic spline interpolation, where several spline evaluations are needed to sample from a 2D point.
Definition at line 157 of file SplineInterpolationBase.C.
Real SplineInterpolationBase::sample2ndDerivative | ( | const std::vector< Real > & | x, |
const std::vector< Real > & | y, | ||
const std::vector< Real > & | y2, | ||
Real | x_int | ||
) | const |
Definition at line 141 of file SplineInterpolationBase.C.
Referenced by SplineInterpolation::sample2ndDerivative(), and BicubicSplineInterpolation::sample2ndDerivative().
Real SplineInterpolationBase::sampleDerivative | ( | const std::vector< Real > & | x, |
const std::vector< Real > & | y, | ||
const std::vector< Real > & | y2, | ||
Real | x_int | ||
) | const |
Definition at line 125 of file SplineInterpolationBase.C.
Referenced by SplineInterpolation::sampleDerivative(), BicubicSplineInterpolation::sampleDerivative(), and BicubicSplineInterpolation::sampleValueAndDerivatives().
|
protected |
This function calculates the second derivatives based on supplied x and y-vectors.
Definition at line 19 of file SplineInterpolationBase.C.
Referenced by BicubicSplineInterpolation::constructColumnSpline(), BicubicSplineInterpolation::constructColumnSplineSecondDerivativeTable(), BicubicSplineInterpolation::constructRowSpline(), BicubicSplineInterpolation::constructRowSplineSecondDerivativeTable(), and SplineInterpolation::solve().
Definition at line 79 of file SplineInterpolationBase.h.
Referenced by BicubicSplineInterpolation::errorCheck().