22gsFunctionSet<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));
48gsMatrix<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 );
110std::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 );
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();
A basis represents a family of scalar basis functions defined over a common parameter domain.
Definition gsBasis.h:79
Interface for the set of functions defined on a domain (the total number of functions in the set equa...
Definition gsFunctionSet.h:219
virtual void deriv2_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Second derivatives.
Definition gsFunctionSet.hpp:77
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
gsMatrix< T > eval(const gsMatrix< T > &u) const
Evaluate the function,.
Definition gsFunctionSet.hpp:120
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
virtual void eval_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluates the function(s).
Definition gsFunctionSet.hpp:66
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
virtual void compute(const gsMatrix< T > &in, gsFuncData< T > &out) const
Computes function data.
Definition gsFunctionSet.hpp:175
gsMatrix< T > deriv(const gsMatrix< T > &u) const
Evaluate the derivatives,.
Definition gsFunctionSet.hpp:129
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
virtual void deriv_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
First derivatives.
Definition gsFunctionSet.hpp:73
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
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 function from a n-dimensional domain to an m-dimensional image.
Definition gsFunction.h:60
A matrix with arbitrary coefficient type and fixed or dynamic size.
Definition gsMatrix.h:41
Provides declaration of Basis abstract interface.
#define index_t
Definition gsConfig.h:32
#define GISMO_NO_IMPLEMENTATION
Definition gsDebug.h:129
#define GISMO_ERROR(message)
Definition gsDebug.h:118
#define gsWarn
Definition gsDebug.h:50
#define GISMO_UNUSED(x)
Definition gsDebug.h:112
#define GISMO_ASSERT(cond, message)
Definition gsDebug.h:89
This object is a cache for computed values from an evaluator.
Provides declaration of Function abstract interface.
The G+Smo namespace, containing all definitions for the library.
@ NEED_LAPLACIAN
Laplacian.
Definition gsForwardDeclarations.h:83
@ SAME_ELEMENT
Enable optimizations based on the assumption that all evaluation points are in the same bezier domain...
Definition gsForwardDeclarations.h:89
@ NEED_ACTIVE
Active function ids.
Definition gsForwardDeclarations.h:84