36template<
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;
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);
129#ifndef GISMO_BUILD_LIB
130#include GISMO_HPP_HEADER(gsHBSpline.hpp)
Abstract base class representing a geometry map.
Definition gsGeometry.h:93
gsMatrix< T > & coefs()
Definition gsGeometry.h:340
void eval_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluate the function at points u into result.
Definition gsGeometry.hpp:166
virtual const gsBasis< T > & basis() const =0
Returns a const reference to the basis of the geometry.
gsBasis< T > * m_basis
Pointer to the basis of this geometry.
Definition gsGeometry.h:632
gsMatrix< T > m_coefs
Coefficient matrix of size coefsSize() x geoDim()
Definition gsGeometry.h:629
A hierarchical B-spline basis of parametric dimension d.
Definition gsHBSplineBasis.h:36
A hierarchical B-Spline function, in d dimensions.
Definition gsHBSpline.h:38
gsHBSpline(const Basis *basis, const gsMatrix< T > *coefs)
Construct HB-Spline by basis functions and coefficient matrix.
Definition gsHBSpline.h:62
memory::unique_ptr< gsHBSpline > uPtr
Unique pointer for gsHBSpline.
Definition gsHBSpline.h:48
gsHBSpline(const Basis &basis, const gsMatrix< T > &coefs)
Construct HB-Spline by basis functions and coefficient matrix.
Definition gsHBSpline.h:66
memory::shared_ptr< gsHBSpline > Ptr
Shared pointer for gsHBSpline.
Definition gsHBSpline.h:45
gsHBSpline()
Default empty constructor.
Definition gsHBSpline.h:59
void slice(index_t dir_fixed, T par, BoundaryGeometryType &result) const
Definition gsHBSpline.h:85
gsHBSpline(const gsTensorBSpline< d, T > &tbsp)
Construct B-Spline from a Tensor B-Spline.
Definition gsHBSpline.h:70
A matrix with arbitrary coefficient type and fixed or dynamic size.
Definition gsMatrix.h:41
A tensor product of d B-spline functions, with arbitrary target dimension.
Definition gsTensorBSpline.h:45
A vector with arbitrary coefficient type and fixed or dynamic size.
Definition gsVector.h:37
#define index_t
Definition gsConfig.h:32
#define GISMO_ASSERT(cond, message)
Definition gsDebug.h:89
Provides declaration of Geometry abstract interface.
Provides declaration of HBSplineBasis class.
This is the main header file that collects wrappers of Eigen for linear algebra.
The G+Smo namespace, containing all definitions for the library.