21 template<
class T>
class gsBasis;
44 typedef memory::shared_ptr< gsBasisFun >
Ptr;
47 typedef memory::unique_ptr< gsBasisFun >
uPtr;
59 virtual std::ostream &
print(std::ostream &os)
const
61 os <<
"gsBasisFun";
return os;
89 unsigned index()
const {
return m_index; }
108 : m_basis(basis), m_index(i)
110 GISMO_ASSERT( i<
unsigned(m_basis.size()),
"Invalid basis function index" );
113 template<
class T>
void
116 GISMO_ASSERT( i<
unsigned(m_basis.size()),
"Invalid basis function index" );
120 template<
class T>
void
126 template<
class T>
bool
129 return ( ++m_index < static_cast<unsigned>(m_basis.size()) );
132 template<
class T>
bool
135 return ( m_index < static_cast<unsigned>(m_basis.size()) );
141 return m_basis.support(m_index);
144 template<
class T>
void
147 m_basis.evalSingle_into(m_index, u, result);
150 template<
class T>
void
153 m_basis.derivSingle_into(m_index, u, result);
156 #ifdef GISMO_WITH_PYBIND11
161 void pybind11_init_gsBasisFun(pybind11::module &m);
163 #endif // GISMO_WITH_PYBIND11
memory::shared_ptr< gsBasisFun > Ptr
Shared pointer for gsBasisFun.
Definition: gsBasisFun.h:44
void first()
Point to the first basis function of the basis.
Definition: gsBasisFun.h:121
#define short_t
Definition: gsConfig.h:35
bool valid()
Return false if the the function iteration is invalidated.
Definition: gsBasisFun.h:133
short_t domainDim() const
Dimension of the (source) domain.
Definition: gsBasisFun.h:65
#define index_t
Definition: gsConfig.h:32
A function from a n-dimensional domain to an m-dimensional image.
Definition: gsFunction.h:59
short_t targetDim() const
Dimension of the target space.
Definition: gsBasisFun.h:67
bool next()
Definition: gsBasisFun.h:127
#define GISMO_ASSERT(cond, message)
Definition: gsDebug.h:89
void setFunction(unsigned const &i)
Definition: gsBasisFun.h:114
memory::unique_ptr< gsBasisFun > uPtr
Unique pointer for gsBasisFun.
Definition: gsBasisFun.h:47
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
gsBasisFun()
Default empty constructor.
Definition: gsBasisFun.h:40
virtual const gsBasisFun & piece(const index_t) const
Returns the piece(s) of the function(s) at subdomain k.
Definition: gsBasisFun.h:92
Represents an individual function in a function set, or a certain component of a vector-valued functi...
Definition: gsBasisFun.h:36
void eval_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluate the function at points u into result.
Definition: gsBasisFun.h:145
virtual std::ostream & print(std::ostream &os) const
Prints the object as a string.
Definition: gsBasisFun.h:59
void deriv_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluate derivatives of the function at points u into result.
Definition: gsBasisFun.h:151
Provides declaration of Function abstract interface.
A basis represents a family of scalar basis functions defined over a common parameter domain...
Definition: gsBasis.h:78