PolyFEM
|
Represents one basis function and its gradient. More...
#include <Basis.hpp>
Public Types | |
typedef std::function< void(const Eigen::MatrixXd &uv, Eigen::MatrixXd &val)> | Fun |
Public Member Functions | |
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 |
Private Attributes | |
std::vector< Local2Global > | global_ |
list of real nodes influencing the basis | |
int | local_index_ |
local index inside the element (for debugging purposes) | |
int | order_ |
Fun | basis_ |
basis and gadient | |
Fun | grad_ |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Basis &obj) |
typedef std::function<void(const Eigen::MatrixXd &uv, Eigen::MatrixXd &val)> polyfem::basis::Basis::Fun |
|
inline |
Evaluates the basis function over a set of uv 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.
Referenced by operator()().
|
inline |
|
inline |
|
inline |
Definition at line 104 of file Basis.hpp.
References global_.
Referenced by polyfem::io::Evaluator::average_grad_based_function(), polyfem::State::build_mesh_matrices(), polyfem::assembler::ElementAssemblyValues::compute(), polyfem::compute_diplacement_grad(), polyfem::basis::ElementBases::eval_geom_mapping(), polyfem::basis::ElementBases::eval_geom_mapping_grads(), polyfem::io::OutGeometryData::extract_boundary_mesh(), polyfem::assembler::ElementAssemblyValues::finalize2d(), polyfem::assembler::ElementAssemblyValues::finalize3d(), polyfem::io::Evaluator::interpolate_function(), polyfem::assembler::ElementAssemblyValues::is_geom_mapping_positive(), polyfem::assembler::RhsAssembler::lsq_bc(), and polyfem::solver::MinJacobianForm::value_unweighted().
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.
[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_.
|
inline |
|
inline |
|
inline |
Evaluate the basis function over a set of uv parameters.
[in] | uv | #uv x dim matrix of parameters to evaluate |
Definition at line 84 of file Basis.hpp.
References eval_basis(), and val.
|
inline |
Definition at line 112 of file Basis.hpp.
References order_.
Referenced by p_bases.Lagrange::compute_basis(), q_bases.Lagrange::compute_basis(), and init().
|
inline |
|
inline |
|
friend |
|
private |
basis and gadient
Definition at line 129 of file Basis.hpp.
Referenced by eval_basis(), is_defined(), and set_basis().
|
private |
|
private |
Definition at line 130 of file Basis.hpp.
Referenced by eval_grad(), and set_grad().
|
private |
|
private |