18 #ifndef __FINITE_ELEMENT_H 19 #define __FINITE_ELEMENT_H 24 #include <boost/multi_array.hpp> 25 #include <dolfin/common/types.h> 26 #include <dolfin/log/log.h> 42 FiniteElement(std::shared_ptr<const ufc::finite_element> element);
53 dolfin_assert(_ufc_element);
54 return _ufc_element->signature();
61 dolfin_assert(_ufc_element);
62 return _ufc_element->cell_shape();
69 dolfin_assert(_ufc_element);
70 return _ufc_element->topological_dimension();
77 dolfin_assert(_ufc_element);
78 return _ufc_element->geometric_dimension();
85 dolfin_assert(_ufc_element);
86 return _ufc_element->space_dimension();
92 dolfin_assert(_ufc_element);
93 return _ufc_element->value_rank();
99 dolfin_assert(_ufc_element);
100 return _ufc_element->value_dimension(i);
105 const double* coordinate_dofs,
106 int cell_orientation)
const 108 dolfin_assert(_ufc_element);
109 _ufc_element->evaluate_basis(i, values, x, coordinate_dofs,
116 const double* coordinate_dofs,
117 int cell_orientation)
const 119 dolfin_assert(_ufc_element);
120 _ufc_element->evaluate_basis_all(values, x, coordinate_dofs,
129 const double* coordinate_dofs,
130 int cell_orientation)
const 132 dolfin_assert(_ufc_element);
133 _ufc_element->evaluate_basis_derivatives(i, n, values, x,
143 const double* coordinate_dofs,
144 int cell_orientation)
const 146 dolfin_assert(_ufc_element);
147 _ufc_element->evaluate_basis_derivatives_all(n, values, x,
154 const ufc::function&
function,
155 const double* coordinate_dofs,
156 int cell_orientation,
157 const ufc::cell& c)
const 159 dolfin_assert(_ufc_element);
160 return _ufc_element->evaluate_dof(i,
function, coordinate_dofs,
161 cell_orientation, c);
166 const ufc::function& f,
167 const double* coordinate_dofs,
168 int cell_orientation,
169 const ufc::cell& c)
const 171 dolfin_assert(_ufc_element);
172 _ufc_element->evaluate_dofs(values, f, coordinate_dofs,
173 cell_orientation, c);
182 double* coefficients,
183 const double* coordinate_dofs,
184 int cell_orientation)
const 186 dolfin_assert(_ufc_element);
187 _ufc_element->interpolate_vertex_values(vertex_values, coefficients,
201 const std::vector<double>& coordinate_dofs,
202 const Cell& cell)
const;
209 dolfin_assert(_ufc_element);
210 return _ufc_element->num_sub_elements();
220 std::shared_ptr<const FiniteElement>
223 dolfin_assert(_ufc_element);
224 std::shared_ptr<const ufc::finite_element>
226 std::shared_ptr<const FiniteElement>
232 std::shared_ptr<const FiniteElement>
create()
const 234 dolfin_assert(_ufc_element);
235 std::shared_ptr<const ufc::finite_element>
241 std::shared_ptr<const FiniteElement>
247 {
return _ufc_element; }
252 std::shared_ptr<const ufc::finite_element> _ufc_element;
255 static std::shared_ptr<const FiniteElement>
257 const std::vector<std::size_t>& component);
std::size_t num_sub_elements() const
Definition: FiniteElement.h:207
std::shared_ptr< const ufc::finite_element > ufc_element() const
Definition: FiniteElement.h:246
double evaluate_dof(std::size_t i, const ufc::function &function, const double *coordinate_dofs, int cell_orientation, const ufc::cell &c) const
Evaluate linear functional for dof i on the function f.
Definition: FiniteElement.h:153
void evaluate_basis_derivatives_all(unsigned int n, double *values, const double *x, const double *coordinate_dofs, int cell_orientation) const
Definition: FiniteElement.h:140
std::shared_ptr< const FiniteElement > create_sub_element(std::size_t i) const
Create a new finite element for sub element i (for a mixed element)
Definition: FiniteElement.h:221
void interpolate_vertex_values(double *vertex_values, double *coefficients, const double *coordinate_dofs, int cell_orientation) const
Definition: FiniteElement.h:181
virtual ~FiniteElement()
Destructor.
Definition: FiniteElement.h:45
FiniteElement(std::shared_ptr< const ufc::finite_element > element)
Definition: FiniteElement.cpp:29
std::size_t hash() const
Return simple hash of the signature string.
Definition: FiniteElement.h:216
virtual unsigned int geometric_dimension() const
Definition: FiniteElement.h:75
A Cell is a MeshEntity of topological codimension 0.
Definition: Cell.h:42
std::shared_ptr< const FiniteElement > extract_sub_element(const std::vector< std::size_t > &component) const
Extract sub finite element for component.
Definition: FiniteElement.cpp:57
void evaluate_basis(std::size_t i, double *values, const double *x, const double *coordinate_dofs, int cell_orientation) const
Evaluate basis function i at given point in cell.
Definition: FiniteElement.h:104
std::size_t value_rank() const
Return the rank of the value space.
Definition: FiniteElement.h:90
std::shared_ptr< const FiniteElement > create() const
Create a new class instance.
Definition: FiniteElement.h:232
std::size_t space_dimension() const
Definition: FiniteElement.h:83
void evaluate_basis_all(double *values, const double *x, const double *coordinate_dofs, int cell_orientation) const
Evaluate all basis functions at given point in cell.
Definition: FiniteElement.h:114
std::size_t value_dimension(std::size_t i) const
Return the dimension of the value space for axis i.
Definition: FiniteElement.h:97
void evaluate_dofs(double *values, const ufc::function &f, const double *coordinate_dofs, int cell_orientation, const ufc::cell &c) const
Evaluate linear functionals for all dofs on the function f.
Definition: FiniteElement.h:165
std::size_t topological_dimension() const
Definition: FiniteElement.h:67
This is a wrapper for a UFC finite element (ufc::finite_element).
Definition: FiniteElement.h:35
void tabulate_dof_coordinates(boost::multi_array< double, 2 > &coordinates, const std::vector< double > &coordinate_dofs, const Cell &cell) const
Definition: FiniteElement.cpp:35
ufc::shape cell_shape() const
Definition: FiniteElement.h:59
void evaluate_basis_derivatives(unsigned int i, unsigned int n, double *values, const double *x, const double *coordinate_dofs, int cell_orientation) const
Evaluate order n derivatives of basis function i at given point in cell.
Definition: FiniteElement.h:125
std::string signature() const
Definition: FiniteElement.h:51