ExpressionFromCallable#

class cuqipy_fenics.utilities.ExpressionFromCallable(func, **kwargs)#

A dolfin.Expression that is created from a callable. The callable should take a single argument, the coordinate vector x and return a number, the value of the expression at x. The keyword arguments are passed to the dolfin.Expression constructor. An example of the keyword arguments is the degree argument for dolfin.Expression which is used to specify the element (polynomial) degree of the expression.

__init__(func, **kwargs)#

Methods

__init__(func, **kwargs)

compute_vertex_values(mesh)

count()

cpp_object()

dx(*ii)

Return the partial derivative with respect to spatial variable number ii.

eval(value, x)

evaluate(x, mapping, component, index_values)

Get self from mapping and return the component asked for.

geometric_dimension()

Return the geometric dimension this expression lives in.

id()

is_cellwise_constant()

Return whether this expression is spatially constant over each cell.

label()

name()

rename(name, label)

restrict(element, cell)

Returns expansion coefficients of expression restricted to local cell.

ufl_disable_profiling()

Turn off the object counting mechanism.

ufl_domain()

Shortcut to get the domain of the function space of this coefficient.

ufl_domains()

Return tuple of domains related to this terminal object.

ufl_element()

Shortcut to get the finite element of the function space of this coefficient.

ufl_enable_profiling()

Turn on the object counting mechanism and reset counts to zero.

ufl_evaluate(x, component, derivatives)

Function used by ufl to evaluate the Expression

ufl_function_space()

Get the function space of this coefficient.

value_dimension(i)

value_rank()

Attributes

T

Transpose a rank-2 tensor expression.

ufl_free_indices

ufl_index_dimensions

ufl_operands

ufl_shape

Return the associated UFL shape.