Class for NURBS curves, with IGA specific functions. NURBS specific algorithms taken from Piegl, Tiller 'The NURBS book' 1996.
More...
#include <Nurbs.h>
|
| Nurbs (const std::array< std::vector< double >, TDimParameter > &knots, const std::vector< std::vector< NodeSimple * >> &controlPoints, const std::vector< std::vector< double >> &weights, const std::array< int, TDimParameter > °ree) |
| Constructors. More...
|
|
int | GetDimension () const |
| Getter. More...
|
|
int | GetNumControlPointsElement (int dir) const |
| get the number of control points for each IGA element (one parametric span) in a specific direction More...
|
|
int | GetNumControlPointsElement () const |
| get the number of control points for each IGA element (one parametric span) More...
|
|
std::array< Eigen::Vector2d, TDimParameter > | GetKnotVectorElement (std::array< int, TDimParameter > knotIDs) const |
| get the knots to given knot ids More...
|
|
Eigen::VectorXd | GetControlPointsElement (const std::array< int, TDimParameter > &knotID, int instance=0) const |
|
Eigen::VectorXd | Evaluate (const Eigen::Matrix< double, TDimParameter, 1 > ¶meter, int derivativeOrder=0) const |
| Evaluation. More...
|
|
const std::array< int, TDimParameter > | FindSpan (const Eigen::Matrix< double, TDimParameter, 1 > ¶meter) const |
| calculates the knot span to given parameters More...
|
|
Eigen::MatrixXd | BasisFunctionsAndDerivativesRational (int der, const Eigen::Matrix< double, TDimParameter, 1 > ¶meter) const |
|
template<> |
Eigen::VectorXd | GetControlPointsElement (const std::array< int, 1 > &knotID, int instance) const |
|
template<> |
Eigen::VectorXd | GetControlPointsElement (const std::array< int, 2 > &knotID, int instance) const |
|
template<> |
Eigen::MatrixXd | BasisFunctionsAndDerivativesRational (int der, const Eigen::Matrix< double, 1, 1 > ¶meter) const |
|
template<> |
Eigen::MatrixXd | BasisFunctionsAndDerivativesRational (int der, const Eigen::Matrix< double, 2, 1 > ¶meter) const |
|
|
static int | FindSpan (double parameter, int degree, const std::vector< double > &knots) |
| Basis Functions. More...
|
|
static Eigen::MatrixXd | BasisFunctionsAndDerivatives (int derivativeOrder, double parameter, int spanIdx, int degree, const std::vector< double > &knots) |
| calculates the basisfunctions and derivatives, see Piegl/Tiller 'NURBS Book' 2nd ed., Page 72 More...
|
|
static Eigen::VectorXd | BasisFunctionsAndDerivativesRational (int derivativeOrder, double parameter, int spanIdx, int degree, const std::vector< double > &knots, const std::vector< double > &weights) |
| calculates the basisfunctions and derivatives, see Piegl/Tiller 'NURBS Book' 2nd ed., Page 72 More...
|
|
template<int TDimParameter>
class NuTo::Nurbs< TDimParameter >
Class for NURBS curves, with IGA specific functions. NURBS specific algorithms taken from Piegl, Tiller 'The NURBS book' 1996.
- Author
- Peter Otto, BAM
- Date
- September, 2017
- Template Parameters
-
TDimParameter | dimension of the parametric space: curve is 1D and surface is 2D |
template<int TDimParameter>
Enumerator |
---|
chord |
|
centripetal |
|
template<int TDimParameter>
NuTo::Nurbs< TDimParameter >::Nurbs |
( |
const std::array< std::vector< double >, TDimParameter > & |
knots, |
|
|
const std::vector< std::vector< NodeSimple * >> & |
controlPoints, |
|
|
const std::vector< std::vector< double >> & |
weights, |
|
|
const std::array< int, TDimParameter > & |
degree |
|
) |
| |
|
inline |
Constructors.
constructor
- Parameters
-
degree | degree of the polynomial |
knots | knot vector |
controlPoints | control points |
template<int TDimParameter>
static Eigen::MatrixXd NuTo::Nurbs< TDimParameter >::BasisFunctionsAndDerivatives |
( |
int |
derivativeOrder, |
|
|
double |
parameter, |
|
|
int |
spanIdx, |
|
|
int |
degree, |
|
|
const std::vector< double > & |
knots |
|
) |
| |
|
inlinestatic |
calculates the basisfunctions and derivatives, see Piegl/Tiller 'NURBS Book' 2nd ed., Page 72
- Parameters
-
derivativeOrder | up to order derivativeOrder |
parameter | parameter at which the functions are calculated |
spanIdx | spanIdx to the parameter |
degree | degree of the given NURBS curve |
knots | knot vector |
- Returns
- Eigen::MatrixXd matrix containing the shape functions up to derivative der, the row index represents the derivative order
template<int TDimParameter>
static Eigen::VectorXd NuTo::Nurbs< TDimParameter >::BasisFunctionsAndDerivativesRational |
( |
int |
derivativeOrder, |
|
|
double |
parameter, |
|
|
int |
spanIdx, |
|
|
int |
degree, |
|
|
const std::vector< double > & |
knots, |
|
|
const std::vector< double > & |
weights |
|
) |
| |
|
inlinestatic |
calculates the basisfunctions and derivatives, see Piegl/Tiller 'NURBS Book' 2nd ed., Page 72
- Parameters
-
derivativeOrder | up to order derivativeOrder |
parameter | parameter at which the functions are calculated |
spanIdx | spanIdx to the parameter |
degree | degree of the given NURBS curve |
knots | knot vector |
weights | weights vector |
- Returns
- Eigen::VectorXd vector containing the shape functions (no derivatives)
template<int TDimParameter>
Eigen::MatrixXd NuTo::Nurbs< TDimParameter >::BasisFunctionsAndDerivativesRational |
( |
int |
der, |
|
|
const Eigen::Matrix< double, TDimParameter, 1 > & |
parameter |
|
) |
| const |
template<>
Eigen::MatrixXd NuTo::Nurbs< 1 >::BasisFunctionsAndDerivativesRational |
( |
int |
der, |
|
|
const Eigen::Matrix< double, 1, 1 > & |
parameter |
|
) |
| const |
|
inline |
template<>
Eigen::MatrixXd NuTo::Nurbs< 2 >::BasisFunctionsAndDerivativesRational |
( |
int |
der, |
|
|
const Eigen::Matrix< double, 2, 1 > & |
parameter |
|
) |
| const |
|
inline |
template<int TDimParameter>
Eigen::VectorXd NuTo::Nurbs< TDimParameter >::Evaluate |
( |
const Eigen::Matrix< double, TDimParameter, 1 > & |
parameter, |
|
|
int |
derivativeOrder = 0 |
|
) |
| const |
|
inline |
template<int TDimParameter>
static int NuTo::Nurbs< TDimParameter >::FindSpan |
( |
double |
parameter, |
|
|
int |
degree, |
|
|
const std::vector< double > & |
knots |
|
) |
| |
|
inlinestatic |
template<int TDimParameter>
const std::array<int, TDimParameter> NuTo::Nurbs< TDimParameter >::FindSpan |
( |
const Eigen::Matrix< double, TDimParameter, 1 > & |
parameter | ) |
const |
|
inline |
calculates the knot span to given parameters
- Parameters
-
parameter | parameter(s) at which the functions are calculated |
- Returns
- std::array knot span(s) to given parameter(s)
template<int TDimParameter>
Eigen::VectorXd NuTo::Nurbs< TDimParameter >::GetControlPointsElement |
( |
const std::array< int, TDimParameter > & |
knotID, |
|
|
int |
instance = 0 |
|
) |
| const |
template<>
Eigen::VectorXd NuTo::Nurbs< 1 >::GetControlPointsElement |
( |
const std::array< int, 1 > & |
knotID, |
|
|
int |
instance |
|
) |
| const |
|
inline |
template<>
Eigen::VectorXd NuTo::Nurbs< 2 >::GetControlPointsElement |
( |
const std::array< int, 2 > & |
knotID, |
|
|
int |
instance |
|
) |
| const |
|
inline |
template<int TDimParameter>
int NuTo::Nurbs< TDimParameter >::GetDimension |
( |
| ) |
const |
|
inline |
Getter.
get the dimension of the curve = dimension of each control point
- Returns
- dimension of the curve
template<int TDimParameter>
std::array<Eigen::Vector2d, TDimParameter> NuTo::Nurbs< TDimParameter >::GetKnotVectorElement |
( |
std::array< int, TDimParameter > |
knotIDs | ) |
const |
|
inline |
get the knots to given knot ids
- Returns
- knots
template<int TDimParameter>
int NuTo::Nurbs< TDimParameter >::GetNumControlPointsElement |
( |
int |
dir | ) |
const |
|
inline |
get the number of control points for each IGA element (one parametric span) in a specific direction
- Returns
- degree + 1
template<int TDimParameter>
int NuTo::Nurbs< TDimParameter >::GetNumControlPointsElement |
( |
| ) |
const |
|
inline |
get the number of control points for each IGA element (one parametric span)
- Returns
- product of the number of control points in each direction
The documentation for this class was generated from the following file: