|
preCICE
|
#include <Bspline.hpp>
Public Member Functions | |
| 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. | |
| Eigen::VectorXd | interpolateAt (double t) const |
| Samples the B-Spline interpolation. | |
Private Attributes | |
| Eigen::VectorXd | _knots |
| Eigen::MatrixXd | _ctrls |
| double | _tsMin |
| double | _tsMax |
| int | _ndofs |
Definition at line 6 of file Bspline.hpp.
| 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.
| 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 15 of file Bspline.cpp.
| Eigen::VectorXd precice::math::Bspline::interpolateAt | ( | double | t | ) | const |
Samples the B-Spline interpolation.
| t | must be within [_tsMin; _tsMax]. |
Definition at line 69 of file Bspline.cpp.
|
private |
Definition at line 31 of file Bspline.hpp.
|
private |
Definition at line 30 of file Bspline.hpp.
|
private |
Definition at line 34 of file Bspline.hpp.
|
private |
Definition at line 33 of file Bspline.hpp.
|
private |
Definition at line 32 of file Bspline.hpp.