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);}
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
A basis represents a family of scalar basis functions defined over a common parameter domain.
Definition gsBasis.h:79
Class defining a dummy basis of constant functions. This is used for compatibility reasons.
Definition gsConstantBasis.h:35
Class defining a globally constant function.
Definition gsConstantFunction.h:34
static const gsConstantFunction Zero(short_t domDim, short_t tarDim)
Returns a null function.
Definition gsConstantFunction.h:45
virtual short_t domainDim() const
Dimension d of the parameter domain (overriding gsFunction::domainDim()).
Definition gsConstantFunction.h:136
virtual gsBasis< T > & basis()
Returns a reference to the basis of the geometry.
Definition gsConstantFunction.h:200
virtual short_t targetDim() const
Dimension of the target space.
Definition gsConstantFunction.h:139
gsConstantFunction(T x, short_t domainDim)
Constructs a constant function .
Definition gsConstantFunction.h:63
static uPtr make(T x, T y, T z, short_t domainDim)
Constructs a constant Function .
Definition gsConstantFunction.h:120
static uPtr make(T x, T y, T z, T w, short_t domainDim)
Constructs a constant Function .
Definition gsConstantFunction.h:124
gsConstantFunction(const gsConstantBasis< T > &cb, const gsMatrix< T > &coef)
Compatibility constructor.
Definition gsConstantFunction.h:101
gsConstantFunction(T x, T y, T z, T w, short_t domainDim)
Constructs a constant Function .
Definition gsConstantFunction.h:90
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
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
memory::shared_ptr< gsConstantFunction > Ptr
Shared pointer for gsConstantFunction.
Definition gsConstantFunction.h:39
static uPtr makeZero(short_t domDim, short_t tarDim)
Returns a uPtr to a null function.
Definition gsConstantFunction.h:49
const gsConstantFunction< T > & piece(const index_t) const
Returns the piece(s) of the function(s) at subdomain k.
Definition gsConstantFunction.h:129
void compute(const gsMatrix< T > &in, gsFuncData< T > &out) const
Computes function data.
Definition gsConstantFunction.h:202
memory::unique_ptr< gsConstantFunction > uPtr
Unique pointer for gsConstantFunction.
Definition gsConstantFunction.h:42
virtual std::ostream & print(std::ostream &os) const
Prints the object as a string.
Definition gsConstantFunction.h:193
gsConstantFunction(T x, T y, T z, short_t domainDim)
Constructs a constant Function .
Definition gsConstantFunction.h:80
virtual void eval_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluate the function at points u into result.
Definition gsConstantFunction.h:153
gsConstantFunction(T x, T y, short_t domainDim)
Constructs a constant function .
Definition gsConstantFunction.h:71
short_t m_domainDim
Spatial dimension of the domain of definition of this function.
Definition gsConstantFunction.h:211
gsMatrix< T > m_coefs
Global value of this function.
Definition gsGeometry.h:629
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, short_t domainDim)
Constructs a constant function .
Definition gsConstantFunction.h:112
static uPtr make(const gsVector< T > &val, short_t domainDim)
Constructs a constant function .
Definition gsConstantFunction.h:108
gsConstantFunction(const gsVector< T > &val, short_t domainDim)
Constructs a constant function .
Definition gsConstantFunction.h:55
virtual const gsBasis< T > & basis() const
Returns a const reference to the basis of the geometry.
Definition gsConstantFunction.h:199
static uPtr make(T x, T y, short_t domainDim)
Constructs a constant function .
Definition gsConstantFunction.h:116
virtual void compute(const gsMatrix< T > &in, gsFuncData< T > &out) const
Computes function data.
Definition gsFunctionSet.hpp:175
Abstract base class representing a geometry map.
Definition gsGeometry.h:93
gsMatrix< T >::RowXpr coef(index_t i)
Returns the i-th coefficient of the geometry as a row expression.
Definition gsGeometry.h:346
gsMatrix< T > m_coefs
Coefficient matrix of size coefsSize() x geoDim()
Definition gsGeometry.h:629
A matrix with arbitrary coefficient type and fixed or dynamic size.
Definition gsMatrix.h:41
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:37
unsigned binomial()
Returns binomial(n,r) as a compile time constant.
Definition gsCombinatorics.h:125
Provides combinatorial unitilies.
#define short_t
Definition gsConfig.h:35
#define index_t
Definition gsConfig.h:32
#define GISMO_NO_IMPLEMENTATION
Definition gsDebug.h:129
#define GISMO_UNUSED(x)
Definition gsDebug.h:112
#define GISMO_ASSERT(cond, message)
Definition gsDebug.h:89
Provides declaration of Geometry abstract interface.
This is the main header file that collects wrappers of Eigen for linear algebra.
The G+Smo namespace, containing all definitions for the library.