Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
gmx::anonymous_namespace{cubicsplinetable.cpp} Namespace Reference

Functions

void calculateCubicSplineCoefficients (double functionValue0, double functionValue1, double derivativeValue0, double derivativeValue1, double spacing, double *Y, double *F, double *G, double *H)
 Calculate table elements from function/derivative data. More...
 
void cubicSplineInterpolationFromFunctionAndDerivative (double functionValue0, double functionValue1, double derivativeValue0, double derivativeValue1, double spacing, double eps, double *interpolatedFunctionValue, double *interpolatedDerivativeValue)
 Perform cubic spline interpolation in interval from function/derivative. More...
 
void fillSingleCubicSplineTableData (const std::function< double(double)> &function, const std::function< double(double)> &derivative, const std::pair< real, real > &range, double spacing, std::vector< real > *yfghTableData)
 Construct the data for a single cubic table from analytical functions. More...
 
void fillSingleCubicSplineTableData (ArrayRef< const double > function, ArrayRef< const double > derivative, double inputSpacing, const std::pair< real, real > &range, double spacing, std::vector< real > *yfghTableData)
 Construct the data for a single cubic table from vector data. More...
 

Function Documentation

void gmx::anonymous_namespace{cubicsplinetable.cpp}::calculateCubicSplineCoefficients ( double  functionValue0,
double  functionValue1,
double  derivativeValue0,
double  derivativeValue1,
double  spacing,
double *  Y,
double *  F,
double *  G,
double *  H 
)

Calculate table elements from function/derivative data.

Parameters
functionValue0Function value for the present table index
functionValue1Function value for the next table index
derivativeValue0Derivative value for the present table index
derivativeValue1Derivative value for the next table index
spacingDistance between table points
YFunction value for table index
FComponent to multiply with offset eps
GComponent to multiply with eps^2
HComponent to multiply with eps^3
void gmx::anonymous_namespace{cubicsplinetable.cpp}::cubicSplineInterpolationFromFunctionAndDerivative ( double  functionValue0,
double  functionValue1,
double  derivativeValue0,
double  derivativeValue1,
double  spacing,
double  eps,
double *  interpolatedFunctionValue,
double *  interpolatedDerivativeValue 
)

Perform cubic spline interpolation in interval from function/derivative.

Parameters
functionValue0Function value for the present table index
functionValue1Function value for the next table index
derivativeValue0Derivative value for the present table index
derivativeValue1Derivative value for the next table index
spacingDistance between table points
epsOffset from lower table point for evaluation
[out]interpolatedFunctionValueOutput function value
[out]interpolatedDerivativeValueOutput derivative value
void gmx::anonymous_namespace{cubicsplinetable.cpp}::fillSingleCubicSplineTableData ( const std::function< double(double)> &  function,
const std::function< double(double)> &  derivative,
const std::pair< real, real > &  range,
double  spacing,
std::vector< real > *  yfghTableData 
)

Construct the data for a single cubic table from analytical functions.

Parameters
[in]functionAnalytical functiojn
[in]derivativeAnalytical derivative
[in]rangeUpper/lower limit of region to tabulate
[in]spacingDistance between table points
[out]yfghTableDataOutput cubic spline table with Y,F,G,H entries
void gmx::anonymous_namespace{cubicsplinetable.cpp}::fillSingleCubicSplineTableData ( ArrayRef< const double >  function,
ArrayRef< const double >  derivative,
double  inputSpacing,
const std::pair< real, real > &  range,
double  spacing,
std::vector< real > *  yfghTableData 
)

Construct the data for a single cubic table from vector data.

Parameters
[in]functionInput vector with function data
[in]derivativeInput vector with derivative data
[in]inputSpacingDistance between points in input vectors
[in]rangeUpper/lower limit of region to tabulate
[in]spacingDistance between table points
[out]yfghTableDataOutput cubic spline table with Y,F,G,H entries