36 template<
short_t d,
class T>
45 typedef memory::shared_ptr< gsHBSpline >
Ptr;
48 typedef memory::unique_ptr< gsHBSpline >
uPtr;
52 >::type BoundaryGeometryType;
54 typedef typename gsHBSplineBasis<d,T>::BoundaryBasisType BoundaryBasisType;
63 Base( basis, coefs ) { }
67 Base( basis, coefs ) { }
85 void slice(
index_t dir_fixed,T par,BoundaryGeometryType & result)
const
87 GISMO_ASSERT(d-1>=0,
"d must be greater or equal than 1");
88 GISMO_ASSERT(dir_fixed>=0 && static_cast<unsigned>(dir_fixed)<d,
"cannot fix a dir greater than dim or smaller than 0");
89 const BoundaryBasisType * bBasis = this->
basis().basisSlice(dir_fixed,par);
95 result=BoundaryGeometryType(*bBasis,point);
100 bBasis->anchors_into(anchorsSlice);
101 anchorsInGeom.resize(anchorsSlice.rows()+1,anchorsSlice.cols());
102 anchorsInGeom.topRows(dir_fixed)=anchorsSlice.topRows(dir_fixed);
104 anchorsInGeom.bottomRows(anchorsSlice.rows()-dir_fixed)=anchorsSlice.bottomRows(anchorsSlice.rows()-dir_fixed);
106 BoundaryGeometryType* geom =
107 dynamic_cast<BoundaryGeometryType *
>(bBasis->interpolateAtAnchors(vals).release());
108 GISMO_ASSERT(geom!=NULL,
"bBasis should have BoundaryGeometryType.");
116 #ifdef GISMO_WITH_PYBIND11
121 void pybind11_init_gsHBSpline2(pybind11::module &m);
122 void pybind11_init_gsHBSpline3(pybind11::module &m);
123 void pybind11_init_gsHBSpline4(pybind11::module &m);
125 #endif // GISMO_WITH_PYBIND11
129 #ifndef GISMO_BUILD_LIB
130 #include GISMO_HPP_HEADER(gsHBSpline.hpp)
Abstract base class representing a geometry map.
Definition: gsGeometry.h:92
gsMatrix< T > m_coefs
Coefficient matrix of size coefsSize() x geoDim()
Definition: gsGeometry.h:624
gsBasis< T > * m_basis
Pointer to the basis of this geometry.
Definition: gsGeometry.h:627
gsHBSpline()
Default empty constructor.
Definition: gsHBSpline.h:59
A tensor product of d B-spline functions, with arbitrary target dimension.
Definition: gsTensorBSpline.h:44
gsHBSpline(const Basis &basis, const gsMatrix< T > &coefs)
Construct HB-Spline by basis functions and coefficient matrix.
Definition: gsHBSpline.h:66
A hierarchical B-spline basis of parametric dimension d.
Definition: gsHBSplineBasis.h:35
memory::unique_ptr< gsHBSpline > uPtr
Unique pointer for gsHBSpline.
Definition: gsHBSpline.h:48
Provides declaration of Geometry abstract interface.
#define index_t
Definition: gsConfig.h:32
gsHBSpline(const gsTensorBSpline< d, T > &tbsp)
Construct B-Spline from a Tensor B-Spline.
Definition: gsHBSpline.h:70
gsHBSpline(const Basis *basis, const gsMatrix< T > *coefs)
Construct HB-Spline by basis functions and coefficient matrix.
Definition: gsHBSpline.h:62
#define GISMO_ASSERT(cond, message)
Definition: gsDebug.h:89
memory::shared_ptr< gsHBSpline > Ptr
Shared pointer for gsHBSpline.
Definition: gsHBSpline.h:45
A vector with arbitrary coefficient type and fixed or dynamic size.
Definition: gsVector.h:35
Interface for the set of functions defined on a domain (the total number of functions in the set equa...
Definition: gsFuncData.h:23
A hierarchical B-Spline function, in d dimensions.
Definition: gsHBSpline.h:37
void eval_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluate the function at points u into result.
Definition: gsGeometry.hpp:166
This is the main header file that collects wrappers of Eigen for linear algebra.
void slice(index_t dir_fixed, T par, BoundaryGeometryType &result) const
Definition: gsHBSpline.h:85
virtual const gsBasis< T > & basis() const =0
Returns a const reference to the basis of the geometry.
Provides declaration of HBSplineBasis class.
gsMatrix< T > & coefs()
Definition: gsGeometry.h:340