5 #ifndef MERCURYDPM_NURBSUTILS_H
6 #define MERCURYDPM_NURBSUTILS_H
22 array2(
size_t nRows,
size_t nCols,
T fillValue = 0.0)
52 int findSpan(
int degree,
const std::vector<double>& knots,
double u);
73 void bsplineBasis(
int deg,
int span,
const std::vector<double>& knots,
double u, std::vector<double>&
N);
84 void bsplineDerBasis(
int deg,
int span,
const std::vector<double>& knots,
double u,
85 int nDers, std::vector<std::vector<double>>& ders);
95 std::vector<Mdouble>
createUniformKnotVector(
unsigned int numberOfControlPoints,
unsigned int degree,
bool clampedAtStart,
bool clampedAtEnd);
111 void extendKnotVector(std::vector<Mdouble>& knots,
unsigned int degree,
unsigned int numStart,
unsigned int numEnd,
bool forceBothEndsUniform =
false);
124 std::vector<std::vector<Vec3D>> controlPoints, std::vector<std::vector<Mdouble>>
weights);
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Scalar * b
Definition: benchVecAdd.cpp:17
Definition: NurbsUtils.h:20
array2(size_t nRows, size_t nCols, T fillValue=0.0)
Definition: NurbsUtils.h:22
size_t cols
Definition: NurbsUtils.h:36
size_t rows
Definition: NurbsUtils.h:36
std::vector< T > data
Definition: NurbsUtils.h:37
T operator()(size_t row, size_t col) const
Definition: NurbsUtils.h:27
T & operator()(size_t row, size_t col)
Definition: NurbsUtils.h:31
Definition: Kernel/Math/Vector.h:30
@ N
Definition: constructor.cpp:22
const Scalar * a
Definition: level2_cplx_impl.h:32
double eps
Definition: crbond_bessel.cc:24
Definition: NurbsUtils.cc:10
int findSpan(int degree, const std::vector< double > &knots, double u)
Definition: NurbsUtils.cc:22
std::vector< Mdouble > createUniformKnotVector(unsigned int numberOfControlPoints, unsigned int degree, bool clampedAtStart, bool clampedAtEnd)
Creates a uniform (clamped) knot vector.
Definition: NurbsUtils.cc:233
double bsplineOneBasis(int i, int deg, const std::vector< double > &U, double u)
Definition: NurbsUtils.cc:63
void extendKnotVector(std::vector< Mdouble > &knots, unsigned int degree, unsigned int numStart, unsigned int numEnd, bool forceBothEndsUniform)
Extends the knot vector for when control points have been added at the start or end.
Definition: NurbsUtils.cc:283
void bsplineBasis(int deg, int span, const std::vector< double > &knots, double u, std::vector< double > &N)
Definition: NurbsUtils.cc:108
void bsplineDerBasis(int deg, int span, const std::vector< double > &knots, double u, int nDers, std::vector< std::vector< double >> &ders)
Definition: NurbsUtils.cc:134
void normalizeKnotVector(std::vector< Mdouble > &knots)
Resets the knot vector to the interval [0, 1].
Definition: NurbsUtils.cc:267
bool close(double a, double b, double eps)
Definition: NurbsUtils.cc:17
bool isKnotVectorMonotonic(const std::vector< double > &knots)
Definition: NurbsUtils.cc:12
Vec3D evaluate(Mdouble u, Mdouble v, std::vector< Mdouble > knotsU, std::vector< Mdouble > knotsV, std::vector< std::vector< Vec3D >> controlPoints, std::vector< std::vector< Mdouble >> weights)
Evaluate point on a NURBS surface.
Definition: NurbsUtils.cc:355
double U
Swimming speed.
Definition: two_d_variable_diff_adapt.cc:53
list weights
Definition: calibrate.py:94
const Mdouble degree
Definition: ExtendedMath.h:32
double epsilon
Definition: osc_ring_sarah_asymptotics.h:43