35template<
short_t d,
class T>
62 typedef memory::shared_ptr< gsRationalTHBSplineBasis >
Ptr;
65 typedef memory::unique_ptr< gsRationalTHBSplineBasis >
uPtr;
78 gsRationalTHBSplineBasis( gsConstantBasis<T>*
basis, gsMatrix<T>)
81 gsRationalTHBSplineBasis(
const gsRationalTHBSplineBasis & o) :
Base(o) { }
83 GISMO_CLONE_FUNCTION(gsRationalTHBSplineBasis)
85 GISMO_MAKE_GEOMETRY_NEW
88 std::ostream &
print(std::ostream &os)
const
90 os <<
"Rational THB-Spline basis: dim=" << this->dim()<<
", size="<< this->
size() <<
".";
103 for (
index_t i=0; i<ind.size(); ++i)
104 ww(i,0) = m_weights( (ind)(i,0), 0);
109 void refine_withCoefs(gsMatrix<T> & coefs, gsMatrix<T>
const & boxes)
111 auto tmp = m_src->clone();
112 coefs = m_weights.asDiagonal() * coefs;
113 tmp->refine_withCoefs(coefs, boxes);
114 m_src->refine_withCoefs(m_weights, boxes);
115 coefs.array().colwise() /= m_weights.col(0).array();
238 using Base::m_weights;
Struct which represents a certain side of a box.
Definition gsBoundary.h:85
const gsBasis< T > & basis(const index_t k) const
Helper which casts and returns the k-th piece of this function set as a gsBasis.
Definition gsFunctionSet.hpp:33
A matrix with arbitrary coefficient type and fixed or dynamic size.
Definition gsMatrix.h:41
Class that creates a rational counterpart for a given basis.
Definition gsRationalBasis.h:48
index_t size() const
Definition gsRationalBasis.h:137
A rational Truncated Hierarchical B-Spline basis.
Definition gsRationalTHBSplineBasis.h:37
GISMO_MAKE_GEOMETRY_NEW std::ostream & print(std::ostream &os) const
Prints the object as a string.
Definition gsRationalTHBSplineBasis.h:88
gsRationalTHBSpline< d, T > GeometryType
Associated geometry type.
Definition gsRationalTHBSplineBasis.h:56
gsRationalTHBSplineBasis<(1< d?d-1:d), T > BoundaryBasisType
Associated Boundary basis type.
Definition gsRationalTHBSplineBasis.h:59
T Scalar_t
Coefficient type.
Definition gsRationalTHBSplineBasis.h:51
BoundaryBasisType::uPtr boundaryBasis(boxSide const &s)
The number of basis functions in the direction of the k-th parameter component.
gsTHBSplineBasis< d, T > Src_t
Source basis type.
Definition gsRationalTHBSplineBasis.h:45
gsRationalBasis< gsTHBSplineBasis< d, T > > Base
Base type.
Definition gsRationalTHBSplineBasis.h:42
Src_t Basis_t
Coordinate basis type.
Definition gsRationalTHBSplineBasis.h:48
memory::unique_ptr< gsRationalTHBSplineBasis > uPtr
Unique pointer for gsRationalTHBSplineBasis.
Definition gsRationalTHBSplineBasis.h:65
memory::shared_ptr< gsRationalTHBSplineBasis > Ptr
Shared pointer for gsRationalTHBSplineBasis.
Definition gsRationalTHBSplineBasis.h:62
A rational truncated hierarchical B-Spline function of parametric dimension d, with arbitrary target ...
Definition gsRationalTHBSpline.h:40
Truncated hierarchical B-spline basis.
Definition gsTHBSplineBasis.h:36
memory::unique_ptr< gsTHBSplineBasis > uPtr
Unique pointer for gsTHBSplineBasis.
Definition gsTHBSplineBasis.h:53
A tensor product B-spline basis.
Definition gsTensorBSplineBasis.h:37
#define index_t
Definition gsConfig.h:32
#define GISMO_ERROR(message)
Definition gsDebug.h:118
Provides forward declarations of types and structs.
Provides declaration of RationalBasis class.
Represents a rational truncated hierarchical B-Spline patch.
The G+Smo namespace, containing all definitions for the library.
S give(S &x)
Definition gsMemory.h:266