PolyFEM
Loading...
Searching...
No Matches
QuadraticBSpline.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cassert>
4#include <array>
5#include <Eigen/Dense>
6
7namespace polyfem
8{
9 namespace basis
10 {
12 {
13 public:
15 QuadraticBSpline(const std::array<double, 4> &knots)
16 : knots_(knots)
17 {
18 }
19
20 void init(const std::array<double, 4> &knots);
21
22 void interpolate(const Eigen::MatrixXd &ts, Eigen::MatrixXd &result) const;
23 double interpolate(const double t) const;
24
25 void derivative(const Eigen::MatrixXd &ts, Eigen::MatrixXd &result) const;
26 double derivative(const double t) const;
27
28 private:
29 std::array<double, 4> knots_;
30 };
31 } // namespace basis
32} // namespace polyfem
void init(const std::array< double, 4 > &knots)
void interpolate(const Eigen::MatrixXd &ts, Eigen::MatrixXd &result) const
QuadraticBSpline(const std::array< double, 4 > &knots)
void derivative(const Eigen::MatrixXd &ts, Eigen::MatrixXd &result) const