FiniteElement

class dolfin.cpp.fem.FiniteElement

Bases: object

This is a wrapper for a UFC finite element (ufc::finite_element).

Create finite element from UFC finite element (data may be shared)

Parameters:const ufc::finite_element > element (std::shared_ptr<) – (ufc::finite_element) UFC finite element
cell_shape()

Return the cell shape

Return type:ufc::shape
Returns:ufc::shape
create()

Create a new class instance.

Return type:std::shared_ptr< const FiniteElement >
create_sub_element()

Create a new finite element for sub element i (for a mixed element)

Parameters:i (std::size_t) –
Return type:std::shared_ptr< const FiniteElement >
evaluate_basis()

Evaluate basis function i at given point in cell.

Parameters:
  • i (std::size_t) –
  • * values (double) –
  • double * x (const) –
  • double * coordinate_dofs (const) –
  • cell_orientation (int) –
Return type:

void

evaluate_basis_all()

Evaluate all basis functions at given point in cell.

Parameters:
  • * values (double) –
  • double * x (const) –
  • double * coordinate_dofs (const) –
  • cell_orientation (int) –
Return type:

void

evaluate_basis_derivatives()

Evaluate order n derivatives of basis function i at given point in cell.

Parameters:
  • int i (unsigned) –
  • int n (unsigned) –
  • * values (double) –
  • double * x (const) –
  • double * coordinate_dofs (const) –
  • cell_orientation (int) –
Return type:

void

evaluate_basis_derivatives_all()

Evaluate order n derivatives of all basis functions at given point in cell

Parameters:
  • int n (unsigned) –
  • * values (double) –
  • double * x (const) –
  • double * coordinate_dofs (const) –
  • cell_orientation (int) –
Return type:

void

evaluate_dof()

Evaluate linear functional for dof i on the function f.

Parameters:
  • i (std::size_t) –
  • ufc::function & function (const) –
  • double * coordinate_dofs (const) –
  • cell_orientation (int) –
  • ufc::cell & c (const) –
Return type:

double

evaluate_dofs()

Evaluate linear functionals for all dofs on the function f.

Parameters:
  • * values (double) –
  • ufc::function & f (const) –
  • double * coordinate_dofs (const) –
  • cell_orientation (int) –
  • ufc::cell & c (const) –
Return type:

void

extract_sub_element()

Extract sub finite element for component.

Parameters:std::vector< std::size_t > & component (const) –
Return type:std::shared_ptr< const FiniteElement >
geometric_dimension()

Return the geometric dimension of the cell shape

Return type:unsigned int
Returns:unsigned int
hash()

Return simple hash of the signature string.

Return type:std::size_t
interpolate_vertex_values()

Interpolate vertex values from dof values

Parameters:
  • * vertex_values (double) – (double*)
  • * coefficients (double) – (double*)
  • double * coordinate_dofs (const) – (const double*)
  • cell_orientation (int) – (int)
Return type:

void

num_sub_elements()

Return the number of sub elements (for a mixed element)

Return type:std::size_t
Returns:std::size_t number of sub-elements
signature()

Return a string identifying the finite element

Return type:std::string
Returns:std::string
space_dimension()

Return the dimension of the finite element function space

Return type:std::size_t
Returns:std::size_t
tabulate_dof_coordinates(cell, coordinates=None)

Tabulate the coordinates of all dofs on a cell

Arguments
cell (_Cell_)
The cell.
coordinates (NumPy array)
Optional argument: The coordinates of all dofs on a cell.
Returns
coordinates
The coordinates of all dofs on a cell.
thisown

The membership flag

topological_dimension()

Return the topological dimension of the cell shape

Return type:std::size_t
Returns:std::size_t
ufc_element()

Return underlying UFC element. Intended for libray usage only and may change.

Return type:std::shared_ptr< const ufc::finite_element >
value_dimension()

Return the dimension of the value space for axis i.

Parameters:i (std::size_t) –
Return type:std::size_t
value_rank()

Return the rank of the value space.

Return type:std::size_t