#include <Bspline.hpp>
Definition at line 6 of file Bspline.hpp.
◆ Bspline()
precice::math::Bspline::Bspline |
( |
Eigen::VectorXd | ts, |
|
|
const Eigen::MatrixXd & | xs, |
|
|
int | splineDegree ) |
Initialises the B-Spline interpolation with the given data (x0,t0), (x1,t1), ..., (xn,tn) and computes the knots and control points. The code for computing the knots and the control points is copied from Eigens bspline interpolation with minor modifications, https://gitlab.com/libeigen/eigen/-/blob/master/unsupported/Eigen/src/Splines/SplineFitting.h.
- Parameters
-
ts | the timestamps which must be sorted from lowest to highest and contain at least 2 samples. |
xs | the data to be interpolated. It has to contain at least two samples. |
splineDegree | the used spline degree, which has to be larger than 0 |
Definition at line 14 of file Bspline.cpp.
◆ interpolateAt()
Eigen::VectorXd precice::math::Bspline::interpolateAt |
( |
double | t | ) |
const |
Samples the B-Spline interpolation.
- Parameters
-
t | must be within [_tsMin; _tsMax]. |
- Returns
- the inteprolant x(t) if t does not equal any of the timestamps in ts. If t equals any of the timestamps in ts the corresponding value to t is returned.
Definition at line 58 of file Bspline.cpp.
◆ _ctrls
Eigen::MatrixXd precice::math::Bspline::_ctrls |
|
private |
◆ _knots
Eigen::VectorXd precice::math::Bspline::_knots |
|
private |
◆ _ndofs
int precice::math::Bspline::_ndofs |
|
private |
◆ _tsMax
double precice::math::Bspline::_tsMax |
|
private |
◆ _tsMin
double precice::math::Bspline::_tsMin |
|
private |
The documentation for this class was generated from the following files: