22 gsFunctionSet<T>::~gsFunctionSet () {}
28 "No function found, instead: "<< piece(k));
36 "No basis found, instead: "<< piece(k));
37 return static_cast<const gsBasis<T>&
>(piece(k));
48 gsMatrix<T> gsFunctionSet<T>::supportOf(
const index_t &)
const
68 gsWarn <<
"eval: Is piece(.) needed/implemented ?\n";
83 bool sameElement)
const
92 eval_into(u, result[0]);
95 eval_into (u, result[0]);
96 deriv_into(u, result[1]);
99 eval_into (u, result[0]);
100 deriv_into (u, result[1]);
101 deriv2_into(u, result[2]);
104 GISMO_ERROR(
"evalAllDers implemented for order up to 2<"<<n );
110 std::vector<gsMatrix<T> >
113 std::vector<gsMatrix<T> > result;
114 this->evalAllDers_into( u, n, result, sameElement);
123 this->eval_into( u, result );
132 this->deriv_into( u, result );
141 this->deriv2_into( u, result );
174 template <
typename T>
176 gsFuncData<T> & out )
const
178 const unsigned flags = out.flags;
180 out.dim = this->dimensions();
182 const int md = out.maxDeriv();
184 evalAllDers_into(in, md, out.values, flags &
SAME_ELEMENT);
189 active_into(in.col(0), out.actives);
192 active_into(in, out.actives);
200 const index_t dsz = out.deriv2Size();
201 const index_t numact = out.values[2].rows() / dsz;
202 out.laplacians.resize(numact, in.cols());
203 for (
index_t i=0; i!= numact; ++i)
204 out.laplacians.row(i) =
205 out.values[2].middleRows(dsz*i,out.dim.first).colwise().sum();
gsMatrix< T > deriv2(const gsMatrix< T > &u) const
Evaluates the second derivatives of active (i.e., non-zero) functions at points u.
Definition: gsFunctionSet.hpp:138
#define GISMO_NO_IMPLEMENTATION
Definition: gsDebug.h:129
virtual void compute(const gsMatrix< T > &in, gsFuncData< T > &out) const
Computes function data.
Definition: gsFunctionSet.hpp:175
const gsFunction< T > & function(const index_t k) const
Helper which casts and returns the k-th piece of this function set as a gsFunction.
Definition: gsFunctionSet.hpp:25
virtual 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: gsFunctionSet.hpp:81
gsMatrix< T > deriv(const gsMatrix< T > &u) const
Evaluate the derivatives,.
Definition: gsFunctionSet.hpp:129
Provides declaration of Basis abstract interface.
gsMatrix< T > eval(const gsMatrix< T > &u) const
Evaluate the function,.
Definition: gsFunctionSet.hpp:120
#define index_t
Definition: gsConfig.h:32
A function from a n-dimensional domain to an m-dimensional image.
Definition: gsFunction.h:59
#define GISMO_ASSERT(cond, message)
Definition: gsDebug.h:89
Laplacian.
Definition: gsForwardDeclarations.h:83
#define gsWarn
Definition: gsDebug.h:50
virtual void active_into(const gsMatrix< T > &u, gsMatrix< index_t > &result) const
Indices of active (non-zero) function(s) for each point.
Definition: gsFunctionSet.hpp:56
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
Active function ids.
Definition: gsForwardDeclarations.h:84
Interface for the set of functions defined on a domain (the total number of functions in the set equa...
Definition: gsFuncData.h:23
virtual void deriv2_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Second derivatives.
Definition: gsFunctionSet.hpp:77
Enable optimizations based on the assumption that all evaluation points are in the same bezier domain...
Definition: gsForwardDeclarations.h:89
#define GISMO_UNUSED(x)
Definition: gsDebug.h:112
#define GISMO_ERROR(message)
Definition: gsDebug.h:118
std::vector< gsMatrix< T > > evalAllDers(const gsMatrix< T > &u, int n, bool sameElement=false) const
Evaluate all derivatives upto order n,.
Definition: gsFunctionSet.hpp:111
Provides declaration of Function abstract interface.
This object is a cache for computed values from an evaluator.
virtual void deriv_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
First derivatives.
Definition: gsFunctionSet.hpp:73
A basis represents a family of scalar basis functions defined over a common parameter domain...
Definition: gsBasis.h:78
virtual void eval_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluates the function(s).
Definition: gsFunctionSet.hpp:66