57 typedef memory::shared_ptr< gsFunctionExpr >
Ptr;
60 typedef memory::unique_ptr<gsFunctionExpr>
uPtr;
72 const std::string & expression_string2,
77 const std::string & expression_string2,
78 const std::string & expression_string3,
83 const std::string & expression_string2,
84 const std::string & expression_string3,
85 const std::string & expression_string4,
90 const std::string & expression_string2,
91 const std::string & expression_string3,
92 const std::string & expression_string4,
93 const std::string & expression_string5,
94 const std::string & expression_string6,
95 const std::string & expression_string7,
96 const std::string & expression_string8,
97 const std::string & expression_string9,
109 static uPtr make(
const std::string & expression_string1,
const std::string & expression_string2,
short_t ddim)
113 static uPtr make(
const std::string & expression_string1,
const std::string & expression_string2,
114 const std::string & expression_string3,
short_t ddim)
115 {
return uPtr(
new gsFunctionExpr(expression_string1, expression_string2, expression_string3, ddim)); }
118 static uPtr make(
const std::string & expression_string1,
const std::string & expression_string2,
119 const std::string & expression_string3,
const std::string & expression_string4,
short_t ddim)
120 {
return uPtr(
new gsFunctionExpr(expression_string1, expression_string2, expression_string3, expression_string4, ddim)); }
123 static uPtr make(
const std::string & expression_string1,
const std::string & expression_string2,
124 const std::string & expression_string3,
const std::string & expression_string4,
125 const std::string & expression_string5,
const std::string & expression_string6,
126 const std::string & expression_string7,
const std::string & expression_string8,
127 const std::string & expression_string9,
short_t ddim)
128 {
return uPtr(
new gsFunctionExpr(expression_string1, expression_string2, expression_string3, expression_string4,
129 expression_string5, expression_string6, expression_string7, expression_string8, expression_string9, ddim)); }
131 #if EIGEN_HAS_RVALUE_REFERENCES
169 const std::string & expression(
int i = 0)
const;
172 void set_x (T
const & v)
const;
174 void set_y (T
const & v)
const;
176 void set_z (T
const & v)
const;
178 void set_w (T
const & v)
const;
180 void set_u (T
const & v)
const;
182 void set_v (T
const & v)
const;
184 void set_t (T
const & t)
const;
212 std::ostream &
print(std::ostream &os)
const;
215 { std::swap(this->my, other.my); }
219 class gsFunctionExprPrivate;
220 typedef gsFunctionExprPrivate PrivateData_t;
227 #ifdef GISMO_WITH_PYBIND11
232 void pybind11_init_gsFunctionExpr(pybind11::module &m);
234 #endif // GISMO_WITH_PYBIND11
239 #ifndef GISMO_BUILD_LIB
240 #include GISMO_HPP_HEADER(gsFunctionExpr.hpp)
gsMatrix< T > laplacian(const gsMatrix< T > &u) const
Evaluate the Laplacian at points u.
Definition: gsFunctionExpr.hpp:708
virtual void eval_component_into(const gsMatrix< T > &u, const index_t comp, gsMatrix< T > &result) const
Evaluate the function for component comp in the target dimension at points u into result...
Definition: gsFunctionExpr.hpp:536
virtual void deriv2_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluate second derivatives of the function at points u into result.
Definition: gsFunctionExpr.hpp:588
virtual void deriv_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluate derivatives of the function at points u into result.
Definition: gsFunctionExpr.hpp:559
void set_z(T const &v) const
Sets the symbol "z" to a value.
Definition: gsFunctionExpr.hpp:498
short_t targetDim() const
Dimension of the target space.
Definition: gsFunctionExpr.hpp:474
#define short_t
Definition: gsConfig.h:35
virtual void eval_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluate the function at points u into result.
Definition: gsFunctionExpr.hpp:513
void set_u(T const &v) const
Sets the symbol "u" to a value.
Definition: gsFunctionExpr.hpp:504
void addComponent(const std::string &strExpression)
Adds another component to this (vector) function.
Definition: gsFunctionExpr.hpp:480
#define index_t
Definition: gsConfig.h:32
void set_y(T const &v) const
Sets the symbol "y" to a value.
Definition: gsFunctionExpr.hpp:495
A function from a n-dimensional domain to an m-dimensional image.
Definition: gsFunction.h:59
memory::unique_ptr< gsFunction > uPtr
Unique pointer for gsFunction.
Definition: gsFunction.h:68
void set_v(T const &v) const
Sets the symbol "v" to a value.
Definition: gsFunctionExpr.hpp:507
virtual const gsFunctionExpr & piece(const index_t) const
Returns the piece(s) of the function(s) at subdomain k.
Definition: gsFunctionExpr.h:157
static uPtr make(const std::string &expression_string1, const std::string &expression_string2, const std::string &expression_string3, const std::string &expression_string4, const std::string &expression_string5, const std::string &expression_string6, const std::string &expression_string7, const std::string &expression_string8, const std::string &expression_string9, short_t ddim)
Make function taking nine expression strings (9D vector valued function) used for (3x3) matrix coeffi...
Definition: gsFunctionExpr.h:123
static uPtr make(const std::string &expression_string1, const std::string &expression_string2, short_t ddim)
Make function taking two expression strings (2D vector valued function)
Definition: gsFunctionExpr.h:109
gsMatrix< T > * mderiv(const gsMatrix< T > &u, const index_t k, const index_t j) const
Mixed derivative wrt variables k and j.
Definition: gsFunctionExpr.hpp:677
memory::shared_ptr< gsFunctionExpr > Ptr
Shared pointer for gsFunctionExpr.
Definition: gsFunctionExpr.h:57
short_t domainDim() const
Dimension of the (source) domain.
Definition: gsFunctionExpr.hpp:468
static uPtr make(const std::string &expression_string, short_t ddim)
Make function taking an expression string and the domain dimension (scalar function) ...
Definition: gsFunctionExpr.h:105
void set_t(T const &t) const
Sets the symbol "t" to a value.
Definition: gsFunctionExpr.hpp:510
gsFuncCoordinate< T > coord(const index_t c) const
Returns the scalar function giving the i-th coordinate of this function.
Definition: gsFunction.hpp:32
void set_x(T const &v) const
Sets the symbol "x" to a value.
Definition: gsFunctionExpr.hpp:492
std::ostream & print(std::ostream &os) const
Prints the object as a string.
Definition: gsFunctionExpr.hpp:740
static uPtr make(const std::string &expression_string1, const std::string &expression_string2, const std::string &expression_string3, const std::string &expression_string4, short_t ddim)
Make function taking four expression strings (4D vector valued function) used for matrix coefficients...
Definition: gsFunctionExpr.h:118
memory::unique_ptr< gsFunctionExpr > uPtr
Unique pointer for gsFunctionExpr.
Definition: gsFunctionExpr.h:60
Class defining a multivariate (real or vector) function given by a string mathematical expression...
Definition: gsFunctionExpr.h:51
gsFunctionExpr()
Default empty constructor.
Definition: gsFunctionExpr.hpp:338
Provides declaration of Function abstract interface.
static uPtr make(const std::string &expression_string1, const std::string &expression_string2, const std::string &expression_string3, short_t ddim)
Make function taking two expression strings (3D vector valued function)
Definition: gsFunctionExpr.h:113
void set_w(T const &v) const
Sets the symbol "w" to a value.
Definition: gsFunctionExpr.hpp:501