tlm_adjoint.fenics.expr

Symbolic expression functionality.

Module Contents

class tlm_adjoint.fenics.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.fenics.expr.eliminate_zeros(expr)

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

Parameters:

expr – A ufl.core.expr.Expr or ufl.Form.

Returns:

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

class tlm_adjoint.fenics.expr.Replacement(x, count)

Represents a symbolic variable but with no value.