dolfinx.cpp.function

Function module

Classes

Constant(self, arg0, arg1)

A value constant with respect to integration domain

Expression(self, coefficients, constants, …)

An Expression

Function(*args, **kwargs)

A finite element function

FunctionSpace(self, arg0, arg1, arg2)

class dolfinx.cpp.function.Constant(self: dolfinx.cpp.function.Constant, arg0: List[int], arg1: List[float]) → None

Bases: pybind11_builtins.pybind11_object

A value constant with respect to integration domain

Create a constant from a scalar value array

value(self: dolfinx.cpp.function.Constant) → numpy.ndarray
class dolfinx.cpp.function.Expression(self: dolfinx.cpp.function.Expression, coefficients: List[dolfinx.cpp.function.Function], constants: List[dolfinx.cpp.function.Constant], mesh: dolfinx::mesh::Mesh, x: numpy.ndarray[numpy.float64[m, n], flags.c_contiguous], fn: object, value_size: int) → None

Bases: pybind11_builtins.pybind11_object

An Expression

eval(self: dolfinx.cpp.function.Expression, arg0: List[int], arg1: numpy.ndarray[numpy.float64[m, n], flags.writeable, flags.c_contiguous]) → None
property mesh
property num_points
property value_size
property x
class dolfinx.cpp.function.Function(*args, **kwargs)

Bases: pybind11_builtins.pybind11_object

A finite element function

Overloaded function.

  1. __init__(self: dolfinx.cpp.function.Function, arg0: dolfinx::function::FunctionSpace) -> None

Create a function on the given function space

  1. __init__(self: dolfinx.cpp.function.Function, arg0: dolfinx::function::FunctionSpace, arg1: dolfinx::la::Vector<double>) -> None

collapse(self: dolfinx.cpp.function.Function)dolfinx.cpp.function.Function

Collapse sub-function view

compute_point_values(self: dolfinx.cpp.function.Function) → numpy.ndarray[numpy.float64[m, n]]

Compute values at all mesh points

eval(self: dolfinx.cpp.function.Function, x: numpy.ndarray[numpy.float64[m, 3], flags.c_contiguous], cells: numpy.ndarray[numpy.int32[m, 1]], values: numpy.ndarray[numpy.float64[m, n], flags.writeable, flags.c_contiguous]) → None

Evaluate Function

property function_space
property id
interpolate(*args, **kwargs)

Overloaded function.

  1. interpolate(self: dolfinx.cpp.function.Function, f: Callable[[numpy.ndarray[numpy.float64[3, n], flags.c_contiguous]], numpy.ndarray[numpy.float64[m, n]]]) -> None

Interpolate an expression

  1. interpolate(self: dolfinx.cpp.function.Function, u: dolfinx.cpp.function.Function) -> None

Interpolate a finite element function

interpolate_ptr(self: dolfinx.cpp.function.Function, arg0: int) → None

Interpolate using a pointer to an expression with a C signature

property name
sub(self: dolfinx.cpp.function.Function, arg0: int)dolfinx.cpp.function.Function

Return sub-function (view into parent Function

property vector

Return the vector associated with the finite element Function

property x

Return the vector associated with the finite element Function

class dolfinx.cpp.function.FunctionSpace(self: dolfinx.cpp.function.FunctionSpace, arg0: dolfinx::mesh::Mesh, arg1: dolfinx::fem::FiniteElement, arg2: dolfinx::fem::DofMap) → None

Bases: pybind11_builtins.pybind11_object

collapse(self: dolfinx.cpp.function.FunctionSpace) → Tuple[dolfinx.cpp.function.FunctionSpace, List[int]]
component(self: dolfinx.cpp.function.FunctionSpace) → List[int]
contains(self: dolfinx.cpp.function.FunctionSpace, arg0: dolfinx.cpp.function.FunctionSpace) → bool
property dim
property dofmap
property element
property id
property mesh
sub(self: dolfinx.cpp.function.FunctionSpace, arg0: List[int])dolfinx.cpp.function.FunctionSpace
tabulate_dof_coordinates(self: dolfinx.cpp.function.FunctionSpace) → numpy.ndarray[numpy.float64[m, 3]]