21 #ifndef __BASIS_FUNCTION_H 22 #define __BASIS_FUNCTION_H 27 #include <dolfin/fem/FiniteElement.h> 58 std::shared_ptr<const FiniteElement> element,
59 const std::vector<double>& coordinate_dofs)
60 : _index(index), _element(element), _coordinate_dofs(coordinate_dofs) {}
78 void eval(
double* values,
const double* x)
const 81 dolfin_assert(_element);
82 _element->evaluate_basis(_index, values, x, _coordinate_dofs.data(), 0);
96 dolfin_assert(_element);
97 _element->evaluate_basis_derivatives(_index, n, values, x,
98 _coordinate_dofs.data(), 0);
111 void evaluate(
double* values,
const double* coordinates,
112 const ufc::cell& cell)
const 113 {
eval(values, coordinates); }
121 std::shared_ptr<const FiniteElement> _element;
124 const std::vector<double> _coordinate_dofs;
void update_index(std::size_t index)
Definition: BasisFunction.h:69
~BasisFunction()
Destructor.
Definition: BasisFunction.h:63
void eval(double *values, const double *x) const
Definition: BasisFunction.h:78
void evaluate(double *values, const double *coordinates, const ufc::cell &cell) const
Definition: BasisFunction.h:111
void eval_derivatives(double *values, const double *x, std::size_t n) const
Definition: BasisFunction.h:93
Represention of a finite element basis function.
Definition: BasisFunction.h:45
BasisFunction(std::size_t index, std::shared_ptr< const FiniteElement > element, const std::vector< double > &coordinate_dofs)
Definition: BasisFunction.h:57