39 typedef memory::shared_ptr< gsConstantFunction >
Ptr;
42 typedef memory::unique_ptr< gsConstantFunction >
uPtr;
144 T value(
size_t i)
const {
return m_coefs.
at(i);}
149 void setValue(
const gsVector<T> & val,
short_t domainDim)
157 result =
m_coefs.transpose().rowwise().replicate( u.cols() );
179 bool sameElement =
false)
const
187 for (
int i = 1; i<=n; ++i)
193 virtual std::ostream &
print(std::ostream &os)
const
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
Class defining a dummy basis of constant functions. This is used for compatibility reasons...
Definition: gsConstantBasis.h:34
gsMatrix< T >::RowXpr coef(index_t i)
Returns the i-th coefficient of the geometry as a row expression.
Definition: gsGeometry.h:346
gsConstantFunction(T x, T y, T z, short_t domainDim)
Constructs a constant Function .
Definition: gsConstantFunction.h:80
static uPtr make(T x, short_t domainDim)
Constructs a constant function .
Definition: gsConstantFunction.h:112
const gsConstantFunction< T > & piece(const index_t) const
Returns the piece(s) of the function(s) at subdomain k.
Definition: gsConstantFunction.h:129
#define GISMO_NO_IMPLEMENTATION
Definition: gsDebug.h:129
Z binomial(const Z n, const Z r)
Computes the binomial expansion coefficient binomial(n,r)
Definition: gsCombinatorics.h:69
virtual void compute(const gsMatrix< T > &in, gsFuncData< T > &out) const
Computes function data.
Definition: gsFunctionSet.hpp:175
#define short_t
Definition: gsConfig.h:35
virtual short_t domainDim() const
Dimension d of the parameter domain (overriding gsFunction::domainDim()).
Definition: gsConstantFunction.h:136
virtual std::ostream & print(std::ostream &os) const
Prints the object as a string.
Definition: gsConstantFunction.h:193
short_t m_domainDim
Spatial dimension of the domain of definition of this function.
Definition: gsConstantFunction.h:211
static uPtr make(const gsVector< T > &val, short_t domainDim)
Constructs a constant function .
Definition: gsConstantFunction.h:108
Provides declaration of Geometry abstract interface.
#define index_t
Definition: gsConfig.h:32
gsConstantFunction(T x, T y, short_t domainDim)
Constructs a constant function .
Definition: gsConstantFunction.h:71
virtual void eval_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluate the function at points u into result.
Definition: gsConstantFunction.h:153
Provides combinatorial unitilies.
#define GISMO_ASSERT(cond, message)
Definition: gsDebug.h:89
memory::shared_ptr< gsConstantFunction > Ptr
Shared pointer for gsConstantFunction.
Definition: gsConstantFunction.h:39
virtual void deriv_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluate derivatives of the function at points u into result.
Definition: gsConstantFunction.h:161
T at(index_t i) const
Returns the i-th element of the vectorization of the matrix.
Definition: gsMatrix.h:211
A vector with arbitrary coefficient type and fixed or dynamic size.
Definition: gsVector.h:35
static uPtr makeZero(short_t domDim, short_t tarDim)
Returns a uPtr to a null function.
Definition: gsConstantFunction.h:49
virtual void deriv2_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluate second derivatives of the function at points u into result.
Definition: gsConstantFunction.h:169
static uPtr make(T x, T y, short_t domainDim)
Constructs a constant function .
Definition: gsConstantFunction.h:116
gsConstantFunction(const gsVector< T > &val, short_t domainDim)
Constructs a constant function .
Definition: gsConstantFunction.h:55
static uPtr make(T x, T y, T z, T w, short_t domainDim)
Constructs a constant Function .
Definition: gsConstantFunction.h:124
void compute(const gsMatrix< T > &in, gsFuncData< T > &out) const
Computes function data.
Definition: gsConstantFunction.h:202
gsConstantFunction(const gsConstantBasis< T > &cb, const gsMatrix< T > &coef)
Compatibility constructor.
Definition: gsConstantFunction.h:101
#define GISMO_UNUSED(x)
Definition: gsDebug.h:112
static const gsConstantFunction Zero(short_t domDim, short_t tarDim)
Returns a null function.
Definition: gsConstantFunction.h:45
This is the main header file that collects wrappers of Eigen for linear algebra.
gsConstantFunction(T x, T y, T z, T w, short_t domainDim)
Constructs a constant Function .
Definition: gsConstantFunction.h:90
virtual short_t targetDim() const
Dimension of the target space.
Definition: gsConstantFunction.h:139
memory::unique_ptr< gsConstantFunction > uPtr
Unique pointer for gsConstantFunction.
Definition: gsConstantFunction.h:42
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: gsConstantFunction.h:177
static uPtr make(T x, T y, T z, short_t domainDim)
Constructs a constant Function .
Definition: gsConstantFunction.h:120
A basis represents a family of scalar basis functions defined over a common parameter domain...
Definition: gsBasis.h:78
virtual gsBasis< T > & basis()
Returns a reference to the basis of the geometry.
Definition: gsConstantFunction.h:200
gsConstantFunction(T x, short_t domainDim)
Constructs a constant function .
Definition: gsConstantFunction.h:63
virtual const gsBasis< T > & basis() const
Returns a const reference to the basis of the geometry.
Definition: gsConstantFunction.h:199
Class defining a globally constant function.
Definition: gsConstantFunction.h:33