tlm_adjoint.firedrake.expr

Symbolic expression functionality.

Module Contents

class tlm_adjoint.firedrake.expr.Zero

Mixin for defining a zero-valued variable. Used for zero-valued variables for which UFL zero elimination should not be applied.

tlm_adjoint.firedrake.expr.eliminate_zeros(expr)

Apply zero elimination for Zero objects in the supplied ufl.core.expr.Expr or ufl.form.BaseForm.

Parameters:

expr – A ufl.core.expr.Expr or ufl.form.BaseForm.

Returns:

A ufl.core.expr.Expr or ufl.form.BaseForm with zero elimination applied. May return expr.

class tlm_adjoint.firedrake.expr.Replacement

Represents a symbolic variable but with no value.