Bases: ufl.coefficient.Coefficient, dolfin.cpp.function.Function
This class represents a function \(u_h\) in a finite element function space \(V_h\), given by
where \(\{\phi_i\}_{i=1}^n\) is a basis for \(V_h\), and \(U\) is a vector of expansion coefficients for \(u_h\).
There is a maximum of three arguments. The first argument must be a Function or a FunctionSpace.
If instantiated from another Function, the (optional) second argument must be an integer denoting the number of sub functions to extract.
In addition can a name argument be passed overruling the default name
Create a Function:
from a FunctionSpace V
f = Function(V)
from another Function f
g = Function(f)
from a FunctionSpace V and a GenericVector v
Warning: this constructor is intended for internal libray use only
g = Function(V, v)
from a FunctionSpace and a filename containg a GenericVector
g = Function(V, 'MyVectorValues.xml')
Initialize Function.
Assign either a Function or linear combination of Functions.
Extract any sub functions.
A sub function can be extracted from a discrete function that is in a MixedFunctionSpace or in a VectorFunctionSpace. The sub function resides in the subspace of the mixed space.
Return an informative str representation of itself
Return a sub function.
The sub functions are numbered from i = 0..N-1, where N is the total number of sub spaces.
Return ufl element
Function used by ufl to evaluate the Function