![]() |
G+Smo
25.01.0
Geometry + Simulation Modules
|
This namespace contains implementation of B-spline related algorithms. More...
Functions | |
| template<class T , typename KnotIterator , typename MatrixType > | |
| void | allDersBasis () |
| template<class T , typename KnotIterator , typename MatrixType > | |
| void | allDersSingle () |
| template<short_t d> | |
| void | buildCoeffsStrides (const gsVector< index_t, d > &size_of_coefs, gsVector< index_t, d > &strides) |
| template<typename T , typename KnotVectorType > | |
| void | computeAlpha (std::vector< std::vector< T > > &alpha, const KnotVectorType &knots, T value, int r, int k, int p, int s) |
| template<typename T , typename KnotVectorType , typename ValIt , typename newKnotsType > | |
| void | computeTensorAlpha (std::vector< std::vector< T > > &alpha, newKnotsType &nknots, const KnotVectorType &knots, ValIt valBegin, ValIt valEnd, bool sparse=false) |
| void | correctNewStride (gsVector< unsigned > &new_str, const gsVector< unsigned > &str, const int direction, const int r) |
| template<class T , typename KnotIterator > | |
| void | deBoorTriangle (T u, KnotIterator knot, int deg, T N[]) |
| template<class Basis_t > | |
| void | degreeElevateBSpline (Basis_t &basis, gsMatrix< typename Basis_t::Scalar_t > &coefs, short_t m) |
| Increase the degree of a 1D B-spline from degree p to degree p + m. | |
| template<class T , typename KnotIterator , typename MatrixType > | |
| void | derivBasis () |
| template<class T , typename KnotIterator , typename MatrixType > | |
| void | derivBasisSingle () |
| template<class T , typename KnotIterator , typename Derived > | |
| void | evalBasis (T u, KnotIterator knot, int deg, gsEigen::MatrixBase< Derived > const &result) |
| template<class T , typename KnotIterator , typename MatrixType > | |
| void | evalBasis2 (const T &u, const KnotIterator &knot, int deg, MatrixType &result) |
| template<class T , typename KnotIterator , typename MatrixType > | |
| void | evalBasisSingle () |
| template<class T , typename KnotIterator , typename Derived > | |
| void | evalDeg1Basis (const T &u, const KnotIterator knot, gsEigen::MatrixBase< Derived > const &result) |
| Evaluation for degree 1 B-spline basis. | |
| template<class T , typename KnotIterator , typename Derived > | |
| void | evalDeg2Basis (const T &u, const KnotIterator knot, gsEigen::MatrixBase< Derived > const &result) |
| Evaluation for degree 2 B-spline basis. | |
| template<class T , typename KnotIterator , typename MatrixType > | |
| void | evalDeg3Basis (const T &u, const KnotIterator knot, MatrixType &result) |
| Evaluation for degree 3 B-spline basis. | |
| template<class T , typename KnotIterator , typename MatrixType > | |
| void | evalGeo (const T &u, const KnotIterator &knot, int deg, MatrixType coefs, MatrixType &result) |
| int | getIndex (const gsVector< unsigned > &stride, const gsVector< int > &position) |
| void | getLastIndex (const gsVector< unsigned > &stride, const unsigned number_of_points, gsVector< int > &last_point) |
| template<short_t d> | |
| void | getLastIndexLocal (const gsVector< index_t, d > &size_of_coef, gsVector< index_t, d > &last_point) |
| unsigned | numberOfIterations (const gsVector< index_t > &nmb_of_coefs, const unsigned direction) |
This namespace contains implementation of B-spline related algorithms.
| void allDersBasis | ( | ) |
Input: a sequence of 2*p+1 knots, evaluation point, output the value of all derivatives up to order k supported on those knots
| void allDersSingle | ( | ) |
Input: a sequence of p+2 knots, evaluation point, output the value of all derivatives up to order k supported on those knots
| void buildCoeffsStrides | ( | const gsVector< index_t, d > & | size_of_coefs, |
| gsVector< index_t, d > & | strides | ||
| ) |
Function builds strides from given sizes of the coefficients. We can use computed strides for calculating indices corresponding to the size of the coefficients
| size_of_coefs | size of the coefficients |
| strides | we compute strides into this variable |
| void computeAlpha | ( | std::vector< std::vector< T > > & | alpha, |
| const KnotVectorType & | knots, | ||
| T | value, | ||
| int | r, | ||
| int | k, | ||
| int | p, | ||
| int | s | ||
| ) |
Computes 2D vector of alpha values.
| alpha | - to be computed |
| knots | - knot vector |
| value | - knot we want to insert |
| r | - how many times we want to insert knot value |
| k | - value in [knots[k], knots[k + 1]) |
| p | - degree corresponding B-splines |
| s | - multiplicity of knot value |
| void computeTensorAlpha | ( | std::vector< std::vector< T > > & | alpha, |
| newKnotsType & | nknots, | ||
| const KnotVectorType & | knots, | ||
| ValIt | valBegin, | ||
| ValIt | valEnd, | ||
| bool | sparse = false |
||
| ) |
Computes 2D vector of alpha values, and also computes new knot values and saves them into nknots.
| alpha | - 2D vector; to be computed |
| nknots | - new knot vector, to be computed |
| knots | - knot vector |
| valBegin | - iterator pointing to the begining of the vector of the knots we want to insert |
| valEnd | - iterator pointing to the end of the vector of the knots we want to insert |
| sparse |
|
inline |
Corrects values of a new stride according to the old stride with respect to direction of knot refinment and number of knots we want to insert.
| new_str | - vector of new strides (will be modified) |
| str | - vector of old strides |
| direction | - direction of the refinement |
| r | - number of knots we will insert |
| void deBoorTriangle | ( | T | u, |
| KnotIterator | knot, | ||
| int | deg, | ||
| T | N[] | ||
| ) |
Input: parameter position u, KnotIterator knot identifying the active interval, degree deg, Output: table N. Computes deBoor table used in Algorithm A2.5 in NURBS book. Used by evalDerSingle_into(...), evalAllDerSingle_into(...) and evalSingle_into(...).
| void derivBasis | ( | ) |
Input: a sequence of 2*p+1 knots, evaluation point, output the derivatives evaluated at all functions supported on those knots
| void derivBasisSingle | ( | ) |
Input: a sequence of p+2 knots, evaluation point. Output: the value of the derivative of basis function supported on those knots
| void evalBasis | ( | T | u, |
| KnotIterator | knot, | ||
| int | deg, | ||
| gsEigen::MatrixBase< Derived > const & | result | ||
| ) |
Input: an iterator pointing to the the biggest knot less than u, evaluation point u, output the value of all basis functions which are active at u. Uses B-spline recursion for evaluation
| void evalBasis2 | ( | const T & | u, |
| const KnotIterator & | knot, | ||
| int | deg, | ||
| MatrixType & | result | ||
| ) |
Input: a sequence of 2*p+1 knots starting at iterator position knot, evaluation point u, output the value of all basis functions which are active on u. Uses DeBoor's algorithm for evaluation
| void evalBasisSingle | ( | ) |
Input: a sequence of p+2 knots, evaluation point. Output: the value of the basis function supported on those knots
| void evalGeo | ( | const T & | u, |
| const KnotIterator & | knot, | ||
| int | deg, | ||
| MatrixType | coefs, | ||
| MatrixType & | result | ||
| ) |
Input: a sequence of 2*p+1 knots starting at iterator position knot, evaluation point u, output the value of the B-spline defined by coefs Uses DeBoor's algorithm for evaluation
From strides and current position computes index (row) used in global presentation of the coefficients
| stride | - vector of strides |
| position | - current position [x0, x1, x2, x3, ...] |
|
inline |
Computes last point of the cube, so that can be passed to nextCubePoint function
| stride | - vector of strides |
| number_of_points | - total number of coefficients (coef.rows()) |
| last_point | - throght this parameter function sets last point of the cube |
| void getLastIndexLocal | ( | const gsVector< index_t, d > & | size_of_coef, |
| gsVector< index_t, d > & | last_point | ||
| ) |
Computes last point of a cube. We can pass the point to nextCubePoint function. Function computes last point for local algorithm.
| size_of_coef | size of the coefficients |
| last_point | we compute last point into this variable |
|
inline |
Function computes necessary number of iterations for given number of the coefficients. We will iterate through cube (its size is nmb_of_coefs) in given direction.
| nmb_of_coefs | number of the coefficients |
| direction | direction in which we iterate |