PolyFEM
Loading...
Searching...
No Matches
QuadraticBSpline3d.cpp
Go to the documentation of this file.
2
3namespace polyfem
4{
5 namespace basis
6 {
7 void QuadraticBSpline3d::init(const std::array<double, 4> &knots_u, const std::array<double, 4> &knots_v, const std::array<double, 4> &knots_w)
8 {
9 spline_u_.init(knots_u);
10 spline_v_.init(knots_v);
11 spline_w_.init(knots_w);
12 }
13
14 void QuadraticBSpline3d::interpolate(const Eigen::MatrixXd &ts, Eigen::MatrixXd &result) const
15 {
16 const int n_t = int(ts.rows());
17 assert(ts.cols() == 3);
18
19 result.resize(n_t, 1);
20
21 for (int i = 0; i < n_t; ++i)
22 result(i) = interpolate(ts(i, 0), ts(i, 1), ts(i, 2));
23 }
24
25 double QuadraticBSpline3d::interpolate(const double u, const double v, const double w) const
26 {
28 }
29
30 void QuadraticBSpline3d::derivative(const Eigen::MatrixXd &ts, Eigen::MatrixXd &result) const
31 {
32 const int n_t = int(ts.rows());
33 assert(ts.cols() == 3);
34
35 result.resize(n_t, 3);
36
37 for (int i = 0; i < n_t; ++i)
38 {
39 const double u = ts(i, 0);
40 const double v = ts(i, 1);
41 const double w = ts(i, 2);
42
46 }
47 }
48 } // namespace basis
49} // namespace polyfem
void interpolate(const Eigen::MatrixXd &ts, Eigen::MatrixXd &result) const
void derivative(const Eigen::MatrixXd &ts, Eigen::MatrixXd &result) const
void init(const std::array< double, 4 > &knots_u, const std::array< double, 4 > &knots_v, const std::array< double, 4 > &knots_w)
void init(const std::array< double, 4 > &knots)
void interpolate(const Eigen::MatrixXd &ts, Eigen::MatrixXd &result) const
void derivative(const Eigen::MatrixXd &ts, Eigen::MatrixXd &result) const