58 typedef memory::shared_ptr< gsNurbsBasis >
Ptr;
59 typedef memory::unique_ptr< gsNurbsBasis >
uPtr;
62 static const int Dim = 1;
105 GISMO_MAKE_GEOMETRY_NEW
108 std::ostream &
print(std::ostream &os)
const
110 os <<
"NURBS Basis: deg=" << this->
degree()
111 <<
", size=" << this->
size() <<
", knot vector:\n";
112 os << this->knots() <<
", weights: [ ";
113 os << this->
weights().transpose() <<
" ]";
141 {
return this->
source().firstActive(u); };
144 const KnotVectorType & knots()
const {
return this->
source().knots(); }
145 KnotVectorType & knots() {
return this->
source().knots(); }
167 std::vector<T> newKnots;
168 this->knots().getUniformRefinementKnots(numKnots, newKnots,mul);
169 this->
insertKnots( newKnots.begin(), newKnots.end() );
void gsBoehm(KnotVectorType &knots, Mat &coefs, T val, int r=1, bool update_knots=true)
Performs insertion of multiple knot on "knots" and coefficients "coefs".
Definition: gsBoehm.hpp:29
gsConstantBasis< T > BoundaryBasisType
Associated Boundary basis type.
Definition: gsNurbsBasis.h:56
Class defining a dummy basis of constant functions. This is used for compatibility reasons...
Definition: gsConstantBasis.h:34
gsNurbsBasis()
Default empty constructor.
Definition: gsNurbsBasis.h:80
A NURBS function of one argument, with arbitrary target dimension.
Definition: gsNurbs.h:39
index_t size() const
size
Definition: gsRationalBasis.h:137
Class that creates a rational counterpart for a given basis.
Definition: gsRationalBasis.h:47
Boehm's algorithm for knot insertion.
void gsBoehmRefine(KnotVectorType &knots, Mat &coefs, int p, ValIt valBegin, ValIt valEnd, bool update_knots=true)
Definition: gsBoehm.hpp:163
S give(S &x)
Definition: gsMemory.h:266
gsNurbsBasis(T u0, T u1, unsigned interior, int degree, unsigned mult_interior=1)
Construct a NURBS basis with unit weights.
Definition: gsNurbsBasis.h:72
gsBSplineBasis< T > Family_t
The family type.
Definition: gsNurbsBasis.h:46
#define index_t
Definition: gsConfig.h:32
short_t degree(short_t i=0) const
Degree with respect to the i-th variable. If the basis is a tensor product of (piecewise) polynomial ...
Definition: gsRationalBasis.h:162
memory::shared_ptr< gsFunctionSet > Ptr
Shared pointer for gsFunctionSet.
Definition: gsFunctionSet.h:223
void uniformRefine(int numKnots=1, int mul=1, int dir=-1)
Refine the basis uniformly by inserting numKnots new knots per knot span.
Definition: gsNurbsBasis.h:162
gsNurbsBasis(const gsNurbsBasis &o)
Copy Constructor.
Definition: gsNurbsBasis.h:96
A univariate B-spline basis.
Definition: gsBSplineBasis.h:694
index_t numActive() const
Number of active basis functions at an arbitrary parameter value.
Definition: gsNurbsBasis.h:136
gsMatrix< unsigned, 1 > * firstActive(const gsMatrix< T, 1 > &u) const
Definition: gsNurbsBasis.h:140
memory::unique_ptr< gsFunctionSet > uPtr
Unique pointer for gsFunctionSet.
Definition: gsFunctionSet.h:226
Provides declaration of BSplineBasis class.
gsNurbsBasis(gsBSplineBasis< T > *bs, gsMatrix< T > w)
Construct NURBS basis by a Bspline basis plus weights.
Definition: gsNurbsBasis.h:83
Provides forward declarations of types and structs.
gsNurbsBasis(const gsKnotVector< T > &KV, gsMatrix< T > w)
Construct a rational counterpart of B-spline basis given by knots and weights.
Definition: gsNurbsBasis.h:92
void uniform_k_refine(int const &i=1)
Apply k-refinement to the basis i times.
Definition: gsNurbsBasis.h:173
const gsBSplineBasis< T > & source() const
Returns the source basis of the rational basis.
Definition: gsRationalBasis.h:283
const gsMatrix< T > & weights() const
Returns the weights of the rational basis.
Definition: gsRationalBasis.h:290
gsNurbsBasis(const gsKnotVector< T > &KV)
Construct NURBS basis of a knot vector.
Definition: gsNurbsBasis.h:87
Provides declaration of RationalBasis class.
A univariate NURBS basis.
Definition: gsNurbsBasis.h:39
void insertKnot(T val, int i=1)
Insert a new knot val with multiplicity i.
Definition: gsNurbsBasis.h:148
static const int Dim
Dimension of the parameter domain.
Definition: gsNurbsBasis.h:62
#define GISMO_UNUSED(x)
Definition: gsDebug.h:112
unsigned firstActive(const T &u) const
Returns the index of the first active (ie. non-zero) basis function at point u.
Definition: gsNurbsBasis.h:130
Class for representing a knot vector.
Definition: gsKnotVector.h:79
void insertKnots(It begin, It end)
Insert the new knots given by the range [begin..end).
Definition: gsNurbsBasis.h:156
T domainEnd() const
Returns the starting value of the domain of the basis.
Definition: gsNurbsBasis.h:127
gsNurbs< T > GeometryType
Associated geometry type.
Definition: gsNurbsBasis.h:49
T domainStart() const
Returns the starting value of the domain of the basis.
Definition: gsNurbsBasis.h:124
GISMO_MAKE_GEOMETRY_NEW std::ostream & print(std::ostream &os) const
Clone function. Used to make a copy of a derived basis.
Definition: gsNurbsBasis.h:108