47 typedef std::function<void(
const Eigen::MatrixXd &uv, Eigen::MatrixXd &
val)>
Fun;
58 void init(
const int order,
const int global_index,
const int local_index,
const RowVectorNd &node);
84 Eigen::MatrixXd
operator()(
const Eigen::MatrixXd &uv)
const
97 void eval_grad(
const Eigen::MatrixXd &uv, Eigen::MatrixXd &
val)
const
119 os <<
"\tl2g: " << l2g.index <<
" (" << l2g.node <<
") " << l2g.val <<
"\n";
Represents one basis function and its gradient.
friend std::ostream & operator<<(std::ostream &os, const Basis &obj)
bool is_complete() const
Checks if global is empty or not.
Fun basis_
basis and gadient
void eval_basis(const Eigen::MatrixXd &uv, Eigen::MatrixXd &val) const
Evaluates the basis function over a set of uv parameters.
void set_grad(const Fun &fun)
void set_basis(const Fun &fun)
const std::vector< Local2Global > & global() const
std::vector< Local2Global > & global()
void init(const int order, const int global_index, const int local_index, const RowVectorNd &node)
Initialize a basis function within an element.
void eval_grad(const Eigen::MatrixXd &uv, Eigen::MatrixXd &val) const
Evaluate the gradient of the basis function.
std::function< void(const Eigen::MatrixXd &uv, Eigen::MatrixXd &val)> Fun
std::vector< Local2Global > global_
list of real nodes influencing the basis
Eigen::MatrixXd operator()(const Eigen::MatrixXd &uv) const
Evaluate the basis function over a set of uv parameters.
int local_index_
local index inside the element (for debugging purposes)
Represents a virtual node of the FEM mesh as a weighted sum of real (unknown) nodes.
RowVectorNd node
node position
int index
global index of the actual node
Local2Global(const int _index, const RowVectorNd &_node, const double _val)
Eigen::Matrix< double, 1, Eigen::Dynamic, Eigen::RowMajor, 1, 3 > RowVectorNd