30 template<
short_t d,
class T>
50 struct gsBSplineTraits<0,T>
52 typedef gsKnotVector<T> KnotVectorType;
53 typedef gsConstantBasis<T> Basis;
54 typedef gsConstantBasis<T> RatBasis;
55 typedef gsConstantFunction<T> Geometry;
56 typedef gsConstantFunction<T> RatGeometry;
94 typedef memory::shared_ptr< Self_t >
Ptr;
97 typedef memory::unique_ptr< Self_t >
uPtr;
105 public:
uPtr clone()
const {
return uPtr(dynamic_cast<Self_t*>(clone_impl())); }
120 static Self_t * New(std::vector<
gsBasis<T>*> & bb );
122 static Self_t * New(std::vector<Self_t*> & bb )
124 return new Self_t(*bb.front());
127 static uPtr make(std::vector<gsBasis<T>*> & bb )
129 return uPtr(New(bb));
132 static uPtr make(std::vector<Self_t*> & bb )
134 return uPtr(
new Self_t(*bb.front()));
137 static uPtr make(
const KnotVectorType & KV )
139 return uPtr(
new Self_t(KV));
150 std::swap(m_p, other.m_p);
151 std::swap(m_periodic, other.m_periodic);
152 m_knots.swap(other.m_knots);
165 index_t size()
const {
return m_knots.size() - m_p - 1 - m_periodic; }
184 m_knots.supportIndex_into(i, tmp_vec);
185 result = tmp_vec.cwiseMax(0).cwiseMin(m_knots.numElements());
192 rvo.at(0) = m_knots.uValue(box.
at(0));
193 rvo.at(1) = m_knots.uValue(box.
at(1));
206 m_knots.greville_into(result);
213 result(0,0) = m_knots.greville(i);
285 if ( m_periodic > 0 )
289 m_knots.degree() == m_p &&
290 (int)m_knots.size() > 2*m_p+1
296 m_knots.degree() == m_p &&
297 (int)m_knots.size() > 2*m_p+1
303 std::ostream &
print(std::ostream &os)
const;
306 std::string
detail()
const;
315 bool sameElement =
false)
const;
341 inline unsigned order()
const {
return m_p+1; }
345 {
return ( (pp >= *(m_knots.begin()+m_p)) && (pp <= *(m_knots.end()-m_p-1) ) ); }
359 return ( inDomain(u) ? (m_knots.iFind(u)-m_knots.begin()) - m_p : 0 );
369 const KnotVectorType &
knots (
int i = 0)
const
374 KnotVectorType & knots (
int i = 0)
380 T knot(
index_t const & i)
const {
return m_knots[i];}
384 { m_knots.insert( knot, mult); }
388 { m_knots.remove( knot, mult); }
391 void insertKnots(
const std::vector< std::vector<T> >& refineKnots)
393 GISMO_ASSERT( refineKnots.size() == 1,
"refineKnots vector has wrong size" );
394 this->knots().insert(refineKnots.front());
399 { m_knots.refineSpans(elements); }
403 {
GISMO_UNUSED(dir); m_knots.uniformRefine(numKnots,mul); }
413 { m_knots.coarsen(numKnots); }
424 const std::vector< std::vector<T> >& refineKnots)
430 void refine_withTransfer(gsSparseMatrix<T,RowMajor> & transfer,
const std::vector<T>& knots);
433 const std::vector<std::vector<T> >& knots)
435 GISMO_ASSERT(knots.size()==1,
"the knots you want to insert do not have the right dimension");
456 GISMO_ASSERT( m_p >= other.m_p,
"Degree of other knot-vector should be lower.");
462 const std::vector<T> knots = other.m_knots.unique();
466 m_knots.set_degree(m_p);
468 m_knots.insert(knots,i);
483 GISMO_ASSERT( dir == -1 || dir == 0,
"Invalid direction");
484 m_p+=i; m_knots.degreeElevate(i);
491 GISMO_ASSERT( dir == -1 || dir == 0,
"Invalid direction");
492 GISMO_ASSERT( i<=m_p,
"Cannot reduce degree to negative");
493 m_p-=i; m_knots.degreeReduce(i);
501 GISMO_ASSERT( dir == -1 || dir == 0,
"Invalid direction");
502 m_p+=i; m_knots.degreeIncrease(i);
509 GISMO_ASSERT( dir == -1 || dir == 0,
"Invalid direction");
510 m_p-=i; m_knots.degreeDecrease(i);
516 GISMO_ASSERT( i>=0 && ( m_knots.size()>
static_cast<size_t>(2*(m_p+1)) || i<=m_p ),
517 "Cannot achieve continuity less than C^{-1} at interior knots.");
518 m_knots.reduceMultiplicity(i);
524 GISMO_ASSERT( i>=0 && ( m_knots.size()>
static_cast<size_t>(2*(m_p+1)) || i<=m_p ),
525 "Cannot achieve continuity less than C^{-1} at interior knots.");
527 m_knots.increaseMultiplicity(i);
533 return (m_periodic > 0);
548 if( m_knots[0] != m_knots[m_p])
551 else if( m_knots[m_knots.size() - m_p -1] != m_knots[m_knots.size()-1])
563 _convertToPeriodic();
573 _convertToPeriodic();
579 int borderKnotMult()
const;
588 return ( s == boundary::none ?
595 void enforceOuterKnotsPeriodic();
612 void _convertToPeriodic();
615 void _stretchEndKnots();
629 per_coefs.bottomRows( m_periodic ) = coefs.topRows( m_periodic );
644 const index_t sz = coefs.rows();
645 coefs.conservativeResize(sz+m_periodic, gsEigen::NoChange);
646 coefs.bottomRows( m_periodic ) = coefs.topRows( m_periodic );
653 const index_t sz = coefs.rows();
654 coefs.conservativeResize(sz-m_periodic, gsEigen::NoChange);
660 {
return this->
size() + m_periodic; }
697 typedef memory::shared_ptr< gsBSplineBasis >
Ptr;
698 typedef memory::unique_ptr< gsBSplineBasis >
uPtr;
722 if( ! this->
check() )
723 gsWarn <<
"Warning: Inconsistent "<< *
this<<
"\n";
736 if( ! this->
check() )
737 gsWarn <<
"Warning: Insconsistent "<< *
this<<
"\n";
744 GISMO_ASSERT(1 == KV.size(),
"Expecting a single knotvector." );
746 m_p = KV.front().degree();
759 const int degree,
const unsigned mult_interior=1,
760 const bool periodic =
false )
763 m_knots.initUniform(u0, u1, interior,
m_p+1, mult_interior,
m_p);
769 if( ! this->
check() )
770 gsWarn <<
"Warning: Insconsistent "<< *
this<<
"\n";
794 GISMO_ERROR(
"Dimension should be between 1 and 4.");
797 static typename gsBasis<T>::uPtr
create(std::vector<KnotVectorType> cKV)
799 typedef typename gsBasis<T>::uPtr basisPtr;
805 return basisPtr(
new gsBSplineBasis<T>(
give(cKV)));
808 return basisPtr(
new gsTensorBSplineBasis<2,T>(
give(cKV)));
811 return basisPtr(
new gsTensorBSplineBasis<3,T>(
give(cKV)));
814 return basisPtr(
new gsTensorBSplineBasis<4,T>(
give(cKV)));
817 GISMO_ERROR(
"Dimension should be between 1 and 4.");
828 GISMO_CLONE_FUNCTION(gsBSplineBasis)
836 memory::unique_ptr<gsGeometry<T> >
makeGeometry( gsMatrix<T> coefs ) const;
845 #ifdef GISMO_WITH_PYBIND11
850 void pybind11_init_gsBSplineBasis(pybind11::module &m);
852 #endif // GISMO_WITH_PYBIND11
858 #ifndef GISMO_BUILD_LIB
859 #include GISMO_HPP_HEADER(gsBSplineBasis.hpp)
861 #ifdef gsBSplineBasis_EXPORT
862 #include GISMO_HPP_HEADER(gsBSplineBasis.hpp) // needed on thebrain?
863 #undef EXTERN_CLASS_TEMPLATE
864 #define EXTERN_CLASS_TEMPLATE CLASS_TEMPLATE_INST
869 EXTERN_CLASS_TEMPLATE gsTensorBSplineBasis<1,real_t>;
870 EXTERN_CLASS_TEMPLATE gsBSplineBasis<real_t>;
index_t size() const
size
Definition: gsBSplineBasis.h:165
Class representing a domain. i.e. a collection of elements (triangles, rectangles, cubes, simplices.
Definition: gsDomain.h:31
void _convertToPeriodic()
Tries to convert the basis into periodic.
Definition: gsBSplineBasis.hpp:1136
Re-implements gsDomainIterator for iteration over all elements of a tensor product parameter domain...
Definition: gsTensorDomainIterator.h:35
void degreeIncrease(short_t const &i=1, short_t const dir=-1)
Elevate the degree of the basis by the given amount, preserve knots multiplicity. ...
Definition: gsBSplineBasis.h:498
void degreeReduce(short_t const &i=1, short_t const dir=-1)
Reduce the degree of the basis by the given amount, preserve smoothness.
Definition: gsBSplineBasis.h:488
Iterator over the elements of a tensor-structured grid.
short_t degree(short_t i) const
Returns the degree of the basis wrt variable i.
Definition: gsTensorBasis.h:465
void evalSingle_into(index_t i, const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluate the i-th basis function at points u into result.
Definition: gsTensorBasis.hpp:410
void anchors_into(gsMatrix< T > &result) const
Returns the anchors (greville points) of the basis.
Definition: gsBSplineBasis.h:204
Knot vector for B-splines.
void degreeElevate(short_t const &i=1, short_t const dir=-1)
Elevate the degree of the basis and preserve the smoothness.
Definition: gsBSplineBasis.h:480
bool inDomain(T const &pp) const
True iff the point pp is in the domain of the basis.
Definition: gsBSplineBasis.h:344
short_t totalDegree() const
If the basis is of polynomial or piecewise polynomial type, then this function returns the total poly...
Definition: gsBSplineBasis.h:338
Class defining a dummy basis of constant functions. This is used for compatibility reasons...
Definition: gsConstantBasis.h:34
virtual void evalAllDersSingle_into(index_t i, const gsMatrix< T > &u, int n, gsMatrix< T > &result) const
Evaluate the basis function i and its derivatives up to order n at points u into result.
Definition: gsBasis.hpp:471
index_t firstActive(T u) const
Returns the index of the first active (ie. non-zero) basis function at point u Takes into account non...
Definition: gsBSplineBasis.h:358
A NURBS function of one argument, with arbitrary target dimension.
Definition: gsNurbs.h:39
KnotVectorType m_knots
Knot vector.
Definition: gsBSplineBasis.h:669
virtual gsBasis::uPtr create() const
Create an empty basis of the derived type and return a pointer to it.
Definition: gsBasis.hpp:483
Traits for BSplineBasis in more dimensions.
Definition: gsBSplineBasis.h:31
index_t size() const
Returns the number of elements in the basis.
Definition: gsTensorBasis.h:108
void active_into(const gsMatrix< T > &u, gsMatrix< index_t > &result) const
Returns the indices of active basis functions at points u, as a list of indices, in result...
Definition: gsTensorBSplineBasis.hpp:166
gsBSplineTraits< 0, T >::Basis BoundaryBasisType
Associated Boundary basis type.
Definition: gsBSplineBasis.h:708
virtual void deriv2Single_into(index_t i, const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluate the (partial) derivatives of the i-th basis function at points u into result.
Definition: gsTensorBasis.hpp:454
void refine_p(short_t const &i=1)
p-refinement (essentially degree elevation)
Definition: gsBSplineBasis.h:472
void uniformCoarsen_withTransfer(gsSparseMatrix< T, RowMajor > &transfer, int numKnots=1)
Coarsen the basis uniformly and produce a sparse matrix which maps coarse coefficient vectors to refi...
Definition: gsTensorBasis.hpp:876
size_t numElements(boxSide const &s=0) const
The number of elements on side s.
Definition: gsBSplineBasis.h:168
gsVector< index_t > numActive(const gsMatrix< T > &u) const
Number of active basis functions at an arbitrary parameter value.
Definition: gsBasis.h:151
#define short_t
Definition: gsConfig.h:35
A tensor product of d B-spline functions, with arbitrary target dimension.
Definition: gsTensorBSpline.h:44
gsBSplineBasis(KnotVectorType KV, const bool periodic=false)
Construct BSpline basis of a knot vector.
Definition: gsBSplineBasis.h:727
T _activeLength() const
Returns length of the ``active" part of the knot vector.
Definition: gsBSplineBasis.h:354
short_t degree(short_t i) const
Degree with respect to the i-th variable. If the basis is a tensor product of (piecewise) polynomial ...
Definition: gsBSplineBasis.h:322
short_t m_p
Degree.
Definition: gsBSplineBasis.h:666
virtual void evalDerSingle_into(index_t i, const gsMatrix< T > &u, int n, gsMatrix< T > &result) const
Evaluate the (partial) derivative(s) of order n the i-th basis function at points u into result...
Definition: gsBasis.hpp:476
A tensor product Non-Uniform Rational B-spline function (NURBS) of parametric dimension d...
Definition: gsTensorNurbs.h:40
void expandCoefs(gsMatrix< T > &coefs) const
Helper function for transforming periodic coefficients to full coefficients.
Definition: gsBSplineBasis.h:642
gsBSplineBasis(std::vector< KnotVectorType > KV)
Compatibility constructor with input an std::vector containing a single knotvector.
Definition: gsBSplineBasis.h:742
virtual void connectivity(const gsMatrix< T > &nodes, gsMesh< T > &mesh) const
Definition: gsTensorBasis.hpp:163
memory::unique_ptr< gsGeometry< T > > makeGeometry(gsMatrix< T > coefs) const
Create a gsGeometry of proper type for this basis with the given coefficient matrix.
Definition: gsBSplineBasis.hpp:857
S give(S &x)
Definition: gsMemory.h:266
bool check() const
Check the BSplineBasis for consistency.
Definition: gsBSplineBasis.h:283
void setPeriodic(bool flag=true)
If flag is true, tries to convert the basis to periodic (succeeds only if the knot vector is suitable...
Definition: gsBSplineBasis.h:560
void elementSupport_into(const index_t i, gsMatrix< index_t, 1, 2 > &result) const
Returns span (element) indices of the beginning and end of the support of the i-th basis function...
Definition: gsBSplineBasis.h:181
#define index_t
Definition: gsConfig.h:32
size_t elementIndex(const gsVector< T > &u) const
Returns an index for the element which contains point u.
Definition: gsTensorBasis.h:141
#define GISMO_ENSURE(cond, message)
Definition: gsDebug.h:102
gsTensorBSplineBasis()
Default constructor.
Definition: gsTensorBSplineBasis.h:74
virtual void uniformRefine(int numKnots=1, int mul=1, int dir=-1)
Refine the basis uniformly by inserting numKnots new knots with multiplicity mul on each knot span...
Definition: gsTensorBasis.h:315
void reverse()
Reverse the basis.
Definition: gsBSplineBasis.h:598
gsBasis< T >::domainIter makeDomainIterator() const
Create a domain iterator for the computational mesh of this basis, that points to the first element o...
Definition: gsBSplineBasis.h:581
std::ostream & print(std::ostream &os) const
Prints the object as a string.
Definition: gsTensorBSplineBasis.h:223
Provides declaration of a basis of constant functions, consisting of one constant function...
A tensor product B-spline basis.
Definition: gsTensorBSplineBasis.h:36
#define GISMO_ASSERT(cond, message)
Definition: gsDebug.h:89
memory::shared_ptr< Self_t > Ptr
Smart pointer for gsTensorBSplineBasis.
Definition: gsBSplineBasis.h:94
A B-spline function of one argument, with arbitrary target dimension.
Definition: gsBSpline.h:50
void refineElements(std::vector< index_t > const &elements)
Refinement function, with different sytax for different basis.
Definition: gsBSplineBasis.h:398
A univariate B-spline basis.
Definition: gsBSplineBasis.h:694
gsMatrix< T > elementInSupportOf(index_t j) const
Returns (the coordinates of) an element in the support of basis function j.
Definition: gsTensorBasis.hpp:1066
virtual void eval_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluates nonzero basis functions at point u into result.
Definition: gsTensorBasis.hpp:502
Class Representing a triangle mesh with 3D vertices.
Definition: gsMesh.h:31
T at(index_t i) const
Returns the i-th element of the vectorization of the matrix.
Definition: gsMatrix.h:211
virtual void degreeElevate(short_t const &i=1, short_t const dir=-1)
Elevate the degree of the basis by the given amount, preserve smoothness.
Definition: gsTensorBasis.h:359
virtual void evalAllDers_into(const gsMatrix< T > &u, int n, std::vector< gsMatrix< T > > &result, bool sameElement=false) const
Evaluate the nonzero functions and their derivatives up to order n at points u into result...
Definition: gsTensorBasis.hpp:634
void refine_h(short_t const &i=1)
Uniform h-refinement (placing i new knots inside each knot-span.
Definition: gsBSplineBasis.h:476
gsBSplineBasis(const T u0, const T u1, const unsigned interior, const int degree, const unsigned mult_interior=1, const bool periodic=false)
Construct a BSpline basis.
Definition: gsBSplineBasis.h:758
void setPeriodic(const int dir)
Converts.
Definition: gsTensorBSplineBasis.h:439
#define gsWarn
Definition: gsDebug.h:50
void refine_withCoefs(gsMatrix< T > &coefs, const std::vector< std::vector< T > > &refineKnots)
Takes a vector of coordinate wise knot values and inserts these values to the basis.
Definition: gsTensorBSplineBasis.hpp:83
const KnotVectorType & knots(int i=0) const
Returns the knot vector of the basis.
Definition: gsBSplineBasis.h:369
void insertKnots(const std::vector< std::vector< T > > &refineKnots)
Takes a vector of coordinate wise knot values and inserts these values to the basis.
Definition: gsTensorBSplineBasis.h:306
bool isClamped() const
Checks, if both endknots have multiplicity m_p + 1.
Definition: gsBSplineBasis.h:546
memory::shared_ptr< gsBasis > Ptr
Shared pointer for gsBasis.
Definition: gsBasis.h:86
Re-implements gsDomainIterator for iteration over all elements of the boundary of a tensor product pa...
Definition: gsTensorDomainBoundaryIterator.h:37
gsMatrix< T > perCoefs(const gsMatrix< T > &coefs) const
Helper function for evaluation with periodic basis.
Definition: gsBSplineBasis.h:626
virtual void derivSingle_into(index_t i, const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluates the (partial) derivatives of the i-th basis function at points u into result.
Definition: gsTensorBasis.hpp:429
void elevateContinuity(int const &i=1)
Elevate spline continuity at interior knots by i.
Definition: gsBSplineBasis.h:514
static const short_t Dim
Dimension of the parameter domain.
Definition: gsBSplineBasis.h:91
Interface for the set of functions defined on a domain (the total number of functions in the set equa...
Definition: gsFuncData.h:23
gsBSplineTraits< 0, T >::Basis BoundaryBasisType
Associated Boundary basis type.
Definition: gsBSplineBasis.h:88
Provides forward declarations of types and structs.
void refine_k(const TensorSelf_t &other, int const &i=1)
Increases the degree without adjusting the smoothness at inner knots, except from the knot values in ...
Definition: gsBSplineBasis.h:454
bool isActive(const index_t i, const gsVector< T > &u) const
Returns true if there the point u with non-zero value or derivatives when evaluated at the basis func...
Definition: gsTensorBasis.hpp:239
T Scalar_t
Coefficient type.
Definition: gsBSplineBasis.h:82
Abstract base class for tensor product bases.
Definition: gsTensorBasis.h:33
Struct which represents a certain side of a box.
Definition: gsBoundary.h:84
int m_periodic
Denotes whether the basis is periodic, ( 0 – non-periodic, >0 – number of ``crossing" functions) ...
Definition: gsBSplineBasis.h:672
void refine_withTransfer(gsSparseMatrix< T, RowMajor > &transfer, const std::vector< std::vector< T > > &refineKnots)
Takes a vector of coordinate wise knot values and inserts these values to the basis.
Definition: gsTensorBSplineBasis.hpp:66
int numCrossingFunctions() const
Returns number of functions crossing the boundary of the knot vector.
Definition: gsBSplineBasis.h:540
gsMatrix< T > support() const
Returns (a bounding box for) the domain of the whole basis.
Definition: gsTensorBasis.hpp:390
A tensor product Non-Uniform Rational B-spline (NURBS) basis.
Definition: gsTensorNurbsBasis.h:38
gsBSplineTraits< 1, T >::Geometry GeometryType
Associated geometry type.
Definition: gsBSplineBasis.h:705
short_t maxDegree() const
If the basis is of polynomial or piecewise polynomial type, then this function returns the maximum po...
Definition: gsBSplineBasis.h:332
uPtr clone()
Clone methode. Produceds a deep copy inside a uPtr.
Self_t & component(short_t i)
For a tensor product basis, return the 1-d basis for the i-th parameter component.
Definition: gsBSplineBasis.hpp:1225
void insertKnot(T knot, int mult=1)
Inserts the knot knot in the underlying knot vector.
Definition: gsBSplineBasis.h:383
gsMatrix< T > perCoefs(const gsMatrix< T > &originalCoefs, short_t dir) const
Sets the coefficients so that the resulting TensorBSpline is periodic in direction dir...
Definition: gsTensorBSplineBasis.h:447
gsTensorBasis< d, T > Base
Base type.
Definition: gsTensorBSplineBasis.h:42
memory::unique_ptr< gsBasis > uPtr
Unique pointer for gsBasis.
Definition: gsBasis.h:89
virtual gsBasis::uPtr tensorize(const gsBasis &other) const
Return a tensor basis of this and other.
Definition: gsBasis.hpp:488
virtual void deriv_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluates the first partial derivatives of the nonzero basis function.
Definition: gsTensorBasis.hpp:594
T domainStart() const
Returns the starting value of the domain of the basis.
Definition: gsBSplineBasis.h:348
A univariate NURBS basis.
Definition: gsNurbsBasis.h:39
memory::unique_ptr< Self_t > uPtr
Smart pointer for gsTensorBSplineBasis.
Definition: gsTensorBSplineBasis.h:69
void trimCoefs(gsMatrix< T > &coefs) const
Helper function for transforming full coefficients to periodic coefficients.
Definition: gsBSplineBasis.h:651
A univariate B-spline basis.
Definition: gsBSplineBasis.h:69
static const short_t Dim
Dimension of the parameter domain.
Definition: gsTensorBasis.h:49
void anchor_into(index_t i, gsMatrix< T > &result) const
Returns the anchors (greville points) of the basis.
Definition: gsBSplineBasis.h:210
short_t domainDim() const
Dimension of the (source) domain.
Definition: gsBSplineBasis.h:158
gsDomain< T > * domain() const
Definition: gsBSplineBasis.h:366
unsigned order() const
Returns the order of the B-spline basis.
Definition: gsBSplineBasis.h:341
short_t minDegree() const
If the basis is of polynomial or piecewise polynomial type, then this function returns the minimum po...
Definition: gsBSplineBasis.h:335
gsMatrix< index_t > boundaryOffset(boxSide const &s, index_t offset) const
Definition: gsTensorBasis.hpp:304
virtual void deriv2_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluate the second derivatives of all active basis function at points u.
Definition: gsTensorBasis.hpp:731
#define GISMO_UNUSED(x)
Definition: gsDebug.h:112
virtual std::string detail() const
Prints the object as a string with extended details.
Definition: gsBasis.h:727
gsMatrix< index_t > allBoundary() const
Definition: gsTensorBasis.hpp:283
#define GISMO_ERROR(message)
Definition: gsDebug.h:118
Class for representing a knot vector.
Definition: gsKnotVector.h:79
Iterator over the boundary elements of a tensor-structured grid.
void uniformRefine(int numKnots=1, int mul=1, int dir=-1)
Refine the basis uniformly by inserting numKnots new knots with multiplicity mul on each knot span...
Definition: gsBSplineBasis.h:402
void uniformRefine_withCoefs(gsMatrix< T > &coefs, int numKnots=1, int mul=1, int dir=-1)
Definition: gsTensorBasis.hpp:824
Struct which represents an interface between two patches.
Definition: gsBoundary.h:649
void uniformRefine_withTransfer(gsSparseMatrix< T, RowMajor > &transfer, int numKnots=1, int mul=1)
Definition: gsTensorBasis.hpp:861
void uniformCoarsen(int numKnots=1)
Coarsen the basis uniformly by removing groups of numKnots consecutive knots, each knot removed mul t...
Definition: gsBSplineBasis.h:412
bool isPeriodic() const
Tells, whether the basis is periodic.
Definition: gsBSplineBasis.h:531
int trueSize() const
Returns the size of the basis ignoring the bureaucratic way of turning the basis into periodic...
Definition: gsBSplineBasis.h:659
void removeKnot(T knot, int mult=1)
Removes the knot knot in the underlying knot vector.
Definition: gsBSplineBasis.h:387
Provides declaration of TensorBasis class.
memory::unique_ptr< Self_t > uPtr
Smart pointer for gsTensorBSplineBasis.
Definition: gsBSplineBasis.h:97
virtual void evalFunc_into(const gsMatrix< T > &u, const gsMatrix< T > &coefs, gsMatrix< T > &result) const
Evaluate the function described by coefs at points u, i.e., evaluates a linear combination of coefs x...
Definition: gsBasis.hpp:37
gsBSplineTraits< static_cast< short_t >d-1), T >::Basis::uPtr boundaryBasis(boxSide const &s)
Returns the boundary basis for side s.
const Basis_t & component(short_t dir) const
For a tensor product basis, return the (const) 1-d basis for the i-th parameter component.
Definition: gsTensorBSplineBasis.h:202
Struct which represents a certain corner of a hyper-cube.
Definition: gsBoundary.h:291
T domainEnd() const
Returns the ending value of the domain of the basis.
Definition: gsBSplineBasis.h:351
virtual gsMatrix< T > laplacian(const gsMatrix< T > &u) const
Compute the Laplacian of all nonzero basis functions at points u.
Definition: gsBasis.hpp:184
A basis represents a family of scalar basis functions defined over a common parameter domain...
Definition: gsBasis.h:78
gsBasis< T >::domainIter makeDomainIterator(const boxSide &s) const
Create a boundary domain iterator for the computational mesh this basis, that points to the first ele...
Definition: gsBSplineBasis.h:586
gsBSplineTraits< 1, T >::Geometry GeometryType
Associated geometry type.
Definition: gsBSplineBasis.h:85
void degreeDecrease(short_t const &i=1, short_t const dir=-1)
Lower the degree of the basis by the given amount, preserving knots multiplicity. ...
Definition: gsBSplineBasis.h:506
void reduceContinuity(int const &i=1)
Reduces spline continuity at interior knots by i.
Definition: gsBSplineBasis.h:522
void matchWith(const boundaryInterface &, const gsBasis< T > &, gsMatrix< index_t > &, gsMatrix< index_t > &, index_t) const
Computes the indices of DoFs that match on the interface bi. The interface is assumed to be a common ...
Definition: gsBSplineBasis.h:600