dolfin.function.function

Finite element functions

Classes

Function(V[, x, name])

A finite element function that is represented by a function space (domain, element and dofmap) and a vector holding the degrees-of-freedom

class dolfin.function.function.Function(V: dolfin.function.functionspace.FunctionSpace, x: Optional[petsc4py.PETSc.Vec] = None, name: Optional[str] = None)[source]

Bases: ufl.coefficient.Coefficient

A finite element function that is represented by a function space (domain, element and dofmap) and a vector holding the degrees-of-freedom

Initialize finite element Function.

copy()[source]

Return a copy of the Function. The FunctionSpace is shared and the degree-of-freedom vector is copied.

eval(x: numpy.ndarray, bb_tree: dolfin.cpp.geometry.BoundingBoxTree, u=None) → numpy.ndarray[source]

Evaluate Function at points x, where x has shape (num_points, gdim)

property function_space

Return the FunctionSpace

property id

Return object id index.

interpolate(u) → None[source]

Interpolate an expression

property name

Name of the Function.

split()[source]

Extract any sub functions.

A sub function can be extracted from a discrete function that is in a mixed, vector, or tensor FunctionSpace. The sub function resides in the subspace of the mixed space.

sub(i: int)[source]

Return a sub function.

The sub functions are numbered from i = 0..N-1, where N is the total number of sub spaces.

ufl_evaluate(x, component, derivatives)[source]

Function used by ufl to evaluate the Expression

property vector

Return the vector holding Function degrees-of-freedom.