dolfin.function.functionspace

Functions

TensorFunctionSpace(mesh, element[, shape, …])

Create tensor finite element (composition of scalar elements) function space.

VectorFunctionSpace(mesh, element[, dim, …])

Create vector finite element (composition of scalar elements) function space.

Classes

ElementMetaData

Data for representing a finite element

FunctionSpace(mesh, element[, cppV])

A space on which Functions (fields) can be defined.

class dolfin.function.functionspace.ElementMetaData[source]

Bases: tuple

Data for representing a finite element

Create new instance of ElementMetaData(family, degree, form_degree)

property degree

Alias for field number 1

property family

Alias for field number 0

property form_degree

Alias for field number 2

class dolfin.function.functionspace.FunctionSpace(mesh: dolfin.cpp.mesh.Mesh, element: Union[ufl.finiteelement.finiteelementbase.FiniteElementBase, dolfin.function.functionspace.ElementMetaData], cppV: Optional[dolfin.cpp.function.FunctionSpace] = None)[source]

Bases: ufl.functionspace.FunctionSpace

A space on which Functions (fields) can be defined.

Create a finite element function space.

collapse(collapsed_dofs: bool = False)[source]
Collapse a subspace and return a new function space and a map from

new to old dofs.

Arguments
collapsed_dofs

Return the map from new to old dofs

Returns
_FunctionSpace_

The new function space.

dict

The map from new to old dofs (optional)

component()[source]

Return the component relative to the parent space.

contains(V)[source]

Check whether a function is in the FunctionSpace.

property dofmap

Return the degree-of-freedom map associated with the function space.

dolfin_element()[source]

Return the DOLFIN element.

property mesh

Return the mesh on which the function space is defined.

num_sub_spaces()[source]

Return the number of sub spaces.

sub(i: int)[source]

Return the i-th sub space.

dolfin.function.functionspace.TensorFunctionSpace(mesh: dolfin.cpp.mesh.Mesh, element: dolfin.function.functionspace.ElementMetaData, shape=None, symmetry: bool = None, restriction=None)[source]

Create tensor finite element (composition of scalar elements) function space.

dolfin.function.functionspace.VectorFunctionSpace(mesh: dolfin.cpp.mesh.Mesh, element: dolfin.function.functionspace.ElementMetaData, dim=None, restriction=None)[source]

Create vector finite element (composition of scalar elements) function space.