Represents one basis function and its gradient.
More...
#include <Basis.hpp>
|
| typedef std::function< void(const Eigen::MatrixXd &uv, Eigen::MatrixXd &val)> | Fun |
| |
|
| | Basis () |
| |
| void | init (const int order, const int global_index, const int local_index, const RowVectorNd &node) |
| | Initialize a basis function within an element.
|
| |
| bool | is_complete () const |
| | Checks if global is empty or not.
|
| |
| void | eval_basis (const Eigen::MatrixXd &uv, Eigen::MatrixXd &val) const |
| | Evaluates the basis function over a set of uv parameters.
|
| |
| Eigen::MatrixXd | operator() (const Eigen::MatrixXd &uv) const |
| | Evaluate the basis function over a set of uv parameters.
|
| |
| void | eval_grad (const Eigen::MatrixXd &uv, Eigen::MatrixXd &val) const |
| | Evaluate the gradient of the basis function.
|
| |
| const std::vector< Local2Global > & | global () const |
| |
| std::vector< Local2Global > & | global () |
| |
| void | set_basis (const Fun &fun) |
| |
| void | set_grad (const Fun &fun) |
| |
| bool | is_defined () const |
| |
| int | order () const |
| |
Represents one basis function and its gradient.
Definition at line 43 of file Basis.hpp.
◆ Fun
◆ Basis()
| polyfem::basis::Basis::Basis |
( |
| ) |
|
◆ eval_basis()
| void polyfem::basis::Basis::eval_basis |
( |
const Eigen::MatrixXd & |
uv, |
|
|
Eigen::MatrixXd & |
val |
|
) |
| const |
|
inline |
Evaluates the basis function over a set of uv parameters.
- Parameters
-
| [in] | uv | #uv x dim matrix of parameters to evaluate |
| [out] | val | #uv x 1 vector of computed values |
Definition at line 72 of file Basis.hpp.
References basis_, and val.
Referenced by operator()().
◆ eval_grad()
| void polyfem::basis::Basis::eval_grad |
( |
const Eigen::MatrixXd & |
uv, |
|
|
Eigen::MatrixXd & |
val |
|
) |
| const |
|
inline |
Evaluate the gradient of the basis function.
- Parameters
-
| [in] | uv | #uv x dim matrix of parameters to evaluate |
| [out] | val | #uv x dim matrix of computed gradients |
Definition at line 97 of file Basis.hpp.
References grad_, and val.
◆ global() [1/2]
| std::vector< Local2Global > & polyfem::basis::Basis::global |
( |
| ) |
|
|
inline |
◆ global() [2/2]
| const std::vector< Local2Global > & polyfem::basis::Basis::global |
( |
| ) |
const |
|
inline |
◆ init()
| void polyfem::basis::Basis::init |
( |
const int |
order, |
|
|
const int |
global_index, |
|
|
const int |
local_index, |
|
|
const RowVectorNd & |
node |
|
) |
| |
Initialize a basis function within an element.
- Parameters
-
| [in] | global_index | Global index of the node associated to the basis |
| [in] | local_index | Local index of the node within the element |
| [in] | node | 1 x dim position of the node associated to the basis |
Definition at line 14 of file Basis.cpp.
References global_, local_index_, order(), and order_.
◆ is_complete()
| bool polyfem::basis::Basis::is_complete |
( |
| ) |
const |
|
inline |
Checks if global is empty or not.
Definition at line 63 of file Basis.hpp.
References global_.
◆ is_defined()
| bool polyfem::basis::Basis::is_defined |
( |
| ) |
const |
|
inline |
◆ operator()()
| Eigen::MatrixXd polyfem::basis::Basis::operator() |
( |
const Eigen::MatrixXd & |
uv | ) |
const |
|
inline |
Evaluate the basis function over a set of uv parameters.
- Parameters
-
| [in] | uv | #uv x dim matrix of parameters to evaluate |
- Returns
- #uv x 1 vector of computed values
Definition at line 84 of file Basis.hpp.
References eval_basis(), and val.
◆ order()
| int polyfem::basis::Basis::order |
( |
| ) |
const |
|
inline |
◆ set_basis()
| void polyfem::basis::Basis::set_basis |
( |
const Fun & |
fun | ) |
|
|
inline |
◆ set_grad()
| void polyfem::basis::Basis::set_grad |
( |
const Fun & |
fun | ) |
|
|
inline |
◆ operator<<
| std::ostream & operator<< |
( |
std::ostream & |
os, |
|
|
const Basis & |
obj |
|
) |
| |
|
friend |
◆ basis_
| Fun polyfem::basis::Basis::basis_ |
|
private |
◆ global_
◆ grad_
| Fun polyfem::basis::Basis::grad_ |
|
private |
◆ local_index_
| int polyfem::basis::Basis::local_index_ |
|
private |
local index inside the element (for debugging purposes)
Definition at line 126 of file Basis.hpp.
Referenced by init().
◆ order_
| int polyfem::basis::Basis::order_ |
|
private |
The documentation for this class was generated from the following files: