IFEM  90A354
Functions
SplineInterpolator Namespace Reference

Spline interpolation/projection schemes. More...

Functions

void interpolate (const std::vector< double > &params, const std::vector< double > &points, const std::vector< double > &tangent_points, const Go::BsplineBasis &basis, std::vector< double > &coefs)
 Global spline interpolation method. More...
 
void quasiinterpolate (const std::vector< double > &params, const std::vector< double > &points, const std::vector< double > &tangent_points, const Go::BsplineBasis &basis, int index, std::vector< double > &coefs)
 Local spline approximation method (Quasi-Interpolation). More...
 
void leastsquare_approximation (const std::vector< double > &params, const std::vector< double > &paramsweights, const std::vector< double > &points, const std::vector< double > &tangent_points, const Go::BsplineBasis &basis, std::vector< double > &coefs)
 Global spline approximation method (Least-Square Fit). More...
 

Detailed Description

Spline interpolation/projection schemes.

Function Documentation

◆ interpolate()

void SplineInterpolator::interpolate ( const std::vector< double > &  params,
const std::vector< double > &  points,
const std::vector< double > &  tangent_points,
const Go::BsplineBasis &  basis,
std::vector< double > &  coefs 
)

Global spline interpolation method.

Parameters
[in]paramsParameters for the data points. Its size is equal to the total number of data points.
[in]pointsThe data points. Its size is equal to the total number of data points multiplied with the spatial dimension. (NB: The algorithm deduces the spatial dimension to use by dividing the size of points with the size of params).
[in]tangent_pointsTangents associated with those data points that are referred to in params. Its size is equal to the total number of datapoints that has tangents, multiplied by the dimension of the space.
[in]basisThe basis of the B-spline
[out]coefsControl point values of the generated spline curve. (Its basis can be obtained by calling the basis() method).

References DenseMatrix::solve().

◆ leastsquare_approximation()

void SplineInterpolator::leastsquare_approximation ( const std::vector< double > &  params,
const std::vector< double > &  paramsweights,
const std::vector< double > &  points,
const std::vector< double > &  tangent_points,
const Go::BsplineBasis &  basis,
std::vector< double > &  coefs 
)

Global spline approximation method (Least-Square Fit).

Parameters
[in]paramsParameters for the data points
[in]paramsweightsParameter Gauss weights
[in]pointsData points evaluated at the Gauss points
[in]tangent_pointsTangents associated with those data points that are referred to in params
[in]basisThe basis of the B-spline
[out]coefsControl point values of the generated spline curve

References DenseMatrix::getMat(), and DenseMatrix::solve().

Referenced by ASMs2D::projectSolutionLeastSquare(), and ASMs3D::projectSolutionLeastSquare().

◆ quasiinterpolate()

void SplineInterpolator::quasiinterpolate ( const std::vector< double > &  params,
const std::vector< double > &  points,
const std::vector< double > &  tangent_points,
const Go::BsplineBasis &  basis,
int  index,
std::vector< double > &  coefs 
)

Local spline approximation method (Quasi-Interpolation).

Parameters
[in]paramsParameters for the data points. Its size is equal to the local number of data points.
[in]pointsThe local data points
[in]tangent_pointsTangents associated with those data points that are referred to in params
[in]indexIndex of control point to extract in the sliding window
[in]basisThe basis of the B-spline
[out]coefsLocal control point values of the generated spline curve

References DenseMatrix::solve().